]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commit
vmw_balloon: do not use 2MB without batching
authorNadav Amit <namit@vmware.com>
Tue, 19 Jun 2018 23:00:25 +0000 (16:00 -0700)
committerJuerg Haefliger <juergh@canonical.com>
Wed, 24 Jul 2019 01:45:46 +0000 (19:45 -0600)
commitab12f853c88ebb18e62dba117222d4bc8b179bac
tree09ad4df188ac366cd0f97c1a56392e4c8cb220d0
parentb7c7aeebf94bc5e2c29678e95b4bbd39cfb14204
vmw_balloon: do not use 2MB without batching

BugLink: https://bugs.launchpad.net/bugs/1835972
commit 5081efd112560d3febb328e627176235b250d59d upstream.

If the hypervisor sets 2MB batching is on, while batching is cleared,
the balloon code breaks. In this case the legacy mechanism is used with
2MB page. The VM would report a 2MB page is ballooned, and the
hypervisor would only take the first 4KB.

While the hypervisor should not report such settings, make the code more
robust by not enabling 2MB support without batching.

Fixes: 365bd7ef7ec8e ("VMware balloon: Support 2m page ballooning.")
Cc: stable@vger.kernel.org
Reviewed-by: Xavier Deguillard <xdeguillard@vmware.com>
Signed-off-by: Nadav Amit <nadav.amit@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Kleber Sacilotto de Souza <kleber.souza@canonical.com>
drivers/misc/vmw_balloon.c