Skip to content
Commit 61061257 authored by Matt Evans's avatar Matt Evans Committed by Will Deacon
Browse files

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: default avatarMatt Evans <matt@ozlabs.org>
Signed-off-by: default avatarPekka Enberg <penberg@kernel.org>
parent b24e316a
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment