浏览代码

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 年之前
父节点
当前提交
2e07b297e0
共有 1 个文件被更改,包括 1 次插入1 次删除
  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. */