linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* [PATCH QEMU] osdep: powerpc64 align memory to allow 2MB radix THP page tables
@ 2018-05-06  7:29 Nicholas Piggin
  2018-06-06  1:06 ` David Gibson
  0 siblings, 1 reply; 2+ messages in thread
From: Nicholas Piggin @ 2018-05-06  7:29 UTC (permalink / raw)
  To: qemu-ppc
  Cc: Nicholas Piggin, David Gibson, Alexander Graf, kvm-ppc, linuxppc-dev

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).

Signed-off-by: Nicholas Piggin <npiggin@gmail.com>
---
 include/qemu/osdep.h | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/include/qemu/osdep.h b/include/qemu/osdep.h
index 41658060a7..5910682221 100644
--- a/include/qemu/osdep.h
+++ b/include/qemu/osdep.h
@@ -357,7 +357,8 @@ void qemu_anon_ram_free(void *ptr, size_t size);
 #endif
 
 #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.
       Valgrind does not support alignments larger than 1 MiB,
       therefore we need special code which handles running on Valgrind. */
-- 
2.17.0

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH QEMU] osdep: powerpc64 align memory to allow 2MB radix THP page tables
  2018-05-06  7:29 [PATCH QEMU] osdep: powerpc64 align memory to allow 2MB radix THP page tables Nicholas Piggin
@ 2018-06-06  1:06 ` David Gibson
  0 siblings, 0 replies; 2+ messages in thread
From: David Gibson @ 2018-06-06  1:06 UTC (permalink / raw)
  To: Nicholas Piggin; +Cc: qemu-ppc, Alexander Graf, kvm-ppc, linuxppc-dev

[-- Attachment #1: Type: text/plain, Size: 1434 bytes --]

On Sun, May 06, 2018 at 05:29:49PM +1000, Nicholas Piggin wrote:
> 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).
> 
> Signed-off-by: Nicholas Piggin <npiggin@gmail.com>

I've applied this to my ppc-for-3.0 tree.  It's not strictly within
the code I maintain, but since it only affects ppc, it seems
reasonable to go through my tree.

> ---
>  include/qemu/osdep.h | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/include/qemu/osdep.h b/include/qemu/osdep.h
> index 41658060a7..5910682221 100644
> --- a/include/qemu/osdep.h
> +++ b/include/qemu/osdep.h
> @@ -357,7 +357,8 @@ void qemu_anon_ram_free(void *ptr, size_t size);
>  #endif
>  
>  #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.
>        Valgrind does not support alignments larger than 1 MiB,
>        therefore we need special code which handles running on Valgrind. */

-- 
David Gibson			| I'll have my music baroque, and my code
david AT gibson.dropbear.id.au	| minimalist, thank you.  NOT _the_ _other_
				| _way_ _around_!
http://www.ozlabs.org/~dgibson

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2018-06-06  1:06 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-05-06  7:29 [PATCH QEMU] osdep: powerpc64 align memory to allow 2MB radix THP page tables Nicholas Piggin
2018-06-06  1:06 ` David Gibson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).