osdep: powerpc64 align memory to allow 2MB radix THP page tables

This allows KVM with the Book3S radix MMU mode to take advantage of
THP and install larger pages in the partition scope page tables (the
host translation).

Backports commit 0c1272cc7c72dfe0ef66be8f283cf67c74b58586 from qemu
This commit is contained in:
Nicholas Piggin 2018-06-15 11:53:45 -04:00 committed by Lioncash
parent d4ad9e37a2
commit 1a9d9e3547
No known key found for this signature in database
GPG key ID: 4E3C3CC1031BA9C7

View file

@ -27,7 +27,8 @@
*/ */
#if defined(__linux__) && \ #if defined(__linux__) && \
(defined(__x86_64__) || defined(__arm__) || defined(__aarch64__)) (defined(__x86_64__) || defined(__arm__) || defined(__aarch64__) \
|| defined(__powerpc64__))
/* Use 2 MiB alignment so transparent hugepages can be used by KVM. /* Use 2 MiB alignment so transparent hugepages can be used by KVM.
Valgrind does not support alignments larger than 1 MiB, Valgrind does not support alignments larger than 1 MiB,
therefore we need special code which handles running on Valgrind. */ therefore we need special code which handles running on Valgrind. */