]> git.proxmox.com Git - mirror_qemu.git/commit - util/oslib-posix.c
qemu_vmalloc: align properly for transparent hugepages and KVM
authorAvi Kivity <avi@redhat.com>
Mon, 5 Sep 2011 08:07:05 +0000 (11:07 +0300)
committerAnthony Liguori <aliguori@us.ibm.com>
Fri, 9 Sep 2011 17:58:16 +0000 (12:58 -0500)
commit36b586284e678da28df3af9fd0907d2b16f9311c
tree9aea538dac96f4481be4a7d3486b794546d21a72
parentdf00bed0fa30a6f5712456e7add783e470c534c9
qemu_vmalloc: align properly for transparent hugepages and KVM

To make good use of transparent hugepages, KVM requires that guest-physical
and host-virtual addresses share the low 21 bits (as opposed to just the low
12 bits normally required).

Adjust qemu_vmalloc() to honor that requirement.  Ignore it for small regions
to avoid fragmentation.

Signed-off-by: Avi Kivity <avi@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
oslib-posix.c