Blame SOURCES/kvm-ppc-Change-Power9-compat-table-to-support-at-most-8-.patch

4a2fec
From ff6a3c436c561a73b00e8dbe4b5c8dc52ecfda40 Mon Sep 17 00:00:00 2001
4a2fec
From: David Gibson <dgibson@redhat.com>
4a2fec
Date: Fri, 19 Jan 2018 04:04:55 +0100
4a2fec
Subject: [PATCH 15/21] ppc: Change Power9 compat table to support at most 8
4a2fec
 threads/core
4a2fec
4a2fec
RH-Author: David Gibson <dgibson@redhat.com>
4a2fec
Message-id: <20180119040458.5629-2-dgibson@redhat.com>
4a2fec
Patchwork-id: 78675
4a2fec
O-Subject: [RHEL-7.5 qemu-kvm-rhev PATCH 1/4] ppc: Change Power9 compat table to support at most 8 threads/core
4a2fec
Bugzilla: 1529243
4a2fec
RH-Acked-by: Thomas Huth <thuth@redhat.com>
4a2fec
RH-Acked-by: Laurent Vivier <lvivier@redhat.com>
4a2fec
RH-Acked-by: Miroslav Rezanina <mrezanin@redhat.com>
4a2fec
4a2fec
From: Jose Ricardo Ziviani <joserz@linux.vnet.ibm.com>
4a2fec
4a2fec
Increases the max smt mode to 8 for Power9. That's because KVM supports
4a2fec
smt emulation in this platform so QEMU should allow users to use it as
4a2fec
well.
4a2fec
4a2fec
Today if we try to pass -smp ...,threads=8, QEMU will silently truncate
4a2fec
it to smt4 mode and may cause a crash if we try to perform a cpu
4a2fec
hotplug.
4a2fec
4a2fec
Signed-off-by: Jose Ricardo Ziviani <joserz@linux.vnet.ibm.com>
4a2fec
[dwg: Added an explanatory comment]
4a2fec
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
4a2fec
(cherry picked from commit 03ee51d3548f5f553a3089f466483c1c6d5c666b)
4a2fec
4a2fec
Signed-off-by: David Gibson <dgibson@redhat.com>
4a2fec
Signed-off-by: Miroslav Rezanina <mrezanin@redhat.com>
4a2fec
---
4a2fec
 target/ppc/compat.c | 9 ++++++++-
4a2fec
 1 file changed, 8 insertions(+), 1 deletion(-)
4a2fec
4a2fec
diff --git a/target/ppc/compat.c b/target/ppc/compat.c
4a2fec
index 2d95434..94ff14a 100644
4a2fec
--- a/target/ppc/compat.c
4a2fec
+++ b/target/ppc/compat.c
4a2fec
@@ -73,7 +73,14 @@ static const CompatInfo compat_table[] = {
4a2fec
         .pvr = CPU_POWERPC_LOGICAL_3_00,
4a2fec
         .pcr = PCR_COMPAT_3_00,
4a2fec
         .pcr_level = PCR_COMPAT_3_00,
4a2fec
-        .max_threads = 4,
4a2fec
+        /*
4a2fec
+         * POWER9 hardware only supports 4 threads / core, but this
4a2fec
+         * limit is for guests.  We need to support 8 vthreads/vcore
4a2fec
+         * on POWER9 for POWER8 compatibility guests, and it's very
4a2fec
+         * confusing if half of the threads disappear from the guest
4a2fec
+         * if it announces it's POWER9 aware at CAS time.
4a2fec
+         */
4a2fec
+        .max_threads = 8,
4a2fec
     },
4a2fec
 };
4a2fec
 
4a2fec
-- 
4a2fec
1.8.3.1
4a2fec