yeahuh / rpms / qemu-kvm

Forked from rpms/qemu-kvm 2 years ago
Clone

Blame SOURCES/kvm-osdep-powerpc64-align-memory-to-allow-2MB-radix-THP-.patch

ae23c9
From e54816f13676b09c4bd8899b466f8aafb9cf3d0e Mon Sep 17 00:00:00 2001
ae23c9
From: David Gibson <dgibson@redhat.com>
ae23c9
Date: Wed, 25 Jul 2018 07:35:49 +0100
ae23c9
Subject: [PATCH 02/14] osdep: powerpc64 align memory to allow 2MB radix THP
ae23c9
 page tables
ae23c9
ae23c9
RH-Author: David Gibson <dgibson@redhat.com>
ae23c9
Message-id: <20180725073549.9857-1-dgibson@redhat.com>
ae23c9
Patchwork-id: 81499
ae23c9
O-Subject: [RHEL-8.0 qemu-kvm PATCH] osdep: powerpc64 align memory to allow 2MB radix THP page tables
ae23c9
Bugzilla: 1601317
ae23c9
RH-Acked-by: Thomas Huth <thuth@redhat.com>
ae23c9
RH-Acked-by: Laurent Vivier <lvivier@redhat.com>
ae23c9
RH-Acked-by: Serhii Popovych <spopovyc@redhat.com>
ae23c9
ae23c9
From: Nicholas Piggin <npiggin@gmail.com>
ae23c9
ae23c9
This allows KVM with the Book3S radix MMU mode to take advantage of
ae23c9
THP and install larger pages in the partition scope page tables (the
ae23c9
host translation).
ae23c9
ae23c9
Signed-off-by: Nicholas Piggin <npiggin@gmail.com>
ae23c9
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
ae23c9
(cherry picked from commit 0c1272cc7c72dfe0ef66be8f283cf67c74b58586)
ae23c9
ae23c9
Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=1601317
ae23c9
Brew: https://brewweb.engineering.redhat.com/brew/taskinfo?taskID=17346107
ae23c9
ae23c9
Signed-off-by: David Gibson <dgibson@redhat.com>
ae23c9
Signed-off-by: Danilo C. L. de Paula <ddepaula@redhat.com>
ae23c9
---
ae23c9
 include/qemu/osdep.h | 3 ++-
ae23c9
 1 file changed, 2 insertions(+), 1 deletion(-)
ae23c9
ae23c9
diff --git a/include/qemu/osdep.h b/include/qemu/osdep.h
ae23c9
index 4165806..5910682 100644
ae23c9
--- a/include/qemu/osdep.h
ae23c9
+++ b/include/qemu/osdep.h
ae23c9
@@ -357,7 +357,8 @@ void qemu_anon_ram_free(void *ptr, size_t size);
ae23c9
 #endif
ae23c9
 
ae23c9
 #if defined(__linux__) && \
ae23c9
-    (defined(__x86_64__) || defined(__arm__) || defined(__aarch64__))
ae23c9
+    (defined(__x86_64__) || defined(__arm__) || defined(__aarch64__) \
ae23c9
+     || defined(__powerpc64__))
ae23c9
    /* Use 2 MiB alignment so transparent hugepages can be used by KVM.
ae23c9
       Valgrind does not support alignments larger than 1 MiB,
ae23c9
       therefore we need special code which handles running on Valgrind. */
ae23c9
-- 
ae23c9
1.8.3.1
ae23c9