]> git.proxmox.com Git - mirror_qemu.git/commit
ppc: Yet another fix for the huge page support detection mechanism
authorThomas Huth <thuth@redhat.com>
Fri, 15 Jul 2016 08:10:25 +0000 (10:10 +0200)
committerDavid Gibson <david@gibson.dropbear.id.au>
Mon, 18 Jul 2016 00:52:19 +0000 (10:52 +1000)
commit159d2e39a8602c369542a92573a52acb5f5f58f2
tree1d58dfdc0c62d6c588f731163341f43cb90f1a3c
parentb56d417b8d7548e913d928809ce6bb1d6c2563e2
ppc: Yet another fix for the huge page support detection mechanism

Commit 86b50f2e1bef ("Disable huge page support if it is not available
for main RAM") already made sure that huge page support is not announced
to the guest if the normal RAM of non-NUMA configurations is not backed
by a huge page filesystem. However, there is one more case that can go
wrong: NUMA is enabled, but the RAM of the NUMA nodes are not configured
with huge page support (and only the memory of a DIMM is configured with
it). When QEMU is started with the following command line for example,
the Linux guest currently crashes because it is trying to use huge pages
on a memory region that does not support huge pages:

 qemu-system-ppc64 -enable-kvm ... -m 1G,slots=4,maxmem=32G -object \
   memory-backend-file,policy=default,mem-path=/hugepages,size=1G,id=mem-mem1 \
   -device pc-dimm,id=dimm-mem1,memdev=mem-mem1 -smp 2 \
   -numa node,nodeid=0 -numa node,nodeid=1

To fix this issue, we've got to make sure to disable huge page support,
too, when there is a NUMA node that is not using a memory backend with
huge page support.

Fixes: 86b50f2e1befc33407bdfeb6f45f7b0d2439a740
Signed-off-by: Thomas Huth <thuth@redhat.com>
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
target-ppc/kvm.c