]> git.karo-electronics.de Git - karo-tx-linux.git/commit
kvm tools: Add ability to map guest RAM from hugetlbfs
authorMatt Evans <matt@ozlabs.org>
Tue, 13 Dec 2011 06:21:46 +0000 (17:21 +1100)
committerPekka Enberg <penberg@kernel.org>
Tue, 13 Dec 2011 15:16:23 +0000 (17:16 +0200)
commit378ee7e6dd301347c6bf2c740cb1fb40174bcb8b
tree511af33aa7f5ff465c57d2def40300e42481ce82
parentc5fa2dfd9e563e21be0174e884680a95ef5aec7e
kvm tools: Add ability to map guest RAM from hugetlbfs

Add a --hugetlbfs commandline option to give a path to hugetlbfs-map guest
memory (down in kvm__arch_init()).  For x86, guest memory is a normal
ANON mmap() if this option is not provided, otherwise a hugetlbfs mmap.

This maps directly from a hugetlbfs temp file rather than using something
like MADV_HUGEPAGES so that, if the user asks for hugepages, we definitely
are using hugepages.  (This is particularly useful for architectures that
don't yet support KVM without hugepages, so we definitely need to use
them for the whole of guest RAM.)

Signed-off-by: Matt Evans <matt@ozlabs.org>
Signed-off-by: Pekka Enberg <penberg@kernel.org>
tools/kvm/builtin-run.c
tools/kvm/include/kvm/kvm.h
tools/kvm/include/kvm/util.h
tools/kvm/kvm.c
tools/kvm/util/util.c
tools/kvm/x86/kvm.c