Răsfoiți Sursa

oslib-posix: Align to permit transparent hugepages on ARM Linux

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>
Peter Maydell 12 ani în urmă
părinte
comite
2e07b297e0
1 a modificat fișierele cu 1 adăugiri și 1 ștergeri
  1. 1 1
      util/oslib-posix.c

+ 1 - 1
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. */