Patchwork [03/13] oslib-posix: Align to permit transparent hugepages on ARM Linux

login
register
mail settings
Submitter Peter Maydell
Date March 5, 2013, 1:12 a.m.
Message ID <1362445931-4383-4-git-send-email-peter.maydell@linaro.org>
Download mbox | patch
Permalink /patch/224902/
State New
Headers show

Comments

Peter Maydell - March 5, 2013, 1:12 a.m.
ARM Linux (like x86-64 Linux) can use transparent hugepages for
KVM if memory blocks are 2MiB aligned; set QEMU_VMALLOC_ALIGN
accordingly.

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>
---
 util/oslib-posix.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Patch

diff --git a/util/oslib-posix.c b/util/oslib-posix.c
index b4152fb..433dd68 100644
--- a/util/oslib-posix.c
+++ b/util/oslib-posix.c
@@ -35,7 +35,7 @@ 
 extern int daemon(int, int);
 #endif
 
-#if defined(__linux__) && defined(__x86_64__)
+#if defined(__linux__) && (defined(__x86_64__) || defined(__arm__))
    /* Use 2 MiB alignment so transparent hugepages can be used by KVM.
       Valgrind does not support alignments larger than 1 MiB,
       therefore we need special code which handles running on Valgrind. */