Skip to content

Commit

Permalink
oslib-posix: Align to permit transparent hugepages on ARM Linux
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
pm215 committed Mar 5, 2013
1 parent 0011597 commit 2e07b29
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion util/oslib-posix.c
Original file line number Diff line number Diff line change
Expand Up @@ -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. */
Expand Down

0 comments on commit 2e07b29

Please sign in to comment.