]> www.infradead.org Git - users/dwmw2/qemu.git/commitdiff
ppc: Change Power9 compat table to support at most 8 threads/core
authorJose Ricardo Ziviani <joserz@linux.vnet.ibm.com>
Sun, 14 Jan 2018 19:23:48 +0000 (17:23 -0200)
committerDavid Gibson <david@gibson.dropbear.id.au>
Tue, 16 Jan 2018 22:35:24 +0000 (09:35 +1100)
Increases the max smt mode to 8 for Power9. That's because KVM supports
smt emulation in this platform so QEMU should allow users to use it as
well.

Today if we try to pass -smp ...,threads=8, QEMU will silently truncate
it to smt4 mode and may cause a crash if we try to perform a cpu
hotplug.

Signed-off-by: Jose Ricardo Ziviani <joserz@linux.vnet.ibm.com>
[dwg: Added an explanatory comment]
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
target/ppc/compat.c

index ad8f93c0644e26d4025dbec40dd0b39ecb5dcc2b..276b5b52c22759163fd1271ab07a5aaafd0868eb 100644 (file)
@@ -73,7 +73,14 @@ static const CompatInfo compat_table[] = {
         .pvr = CPU_POWERPC_LOGICAL_3_00,
         .pcr = PCR_COMPAT_3_00,
         .pcr_level = PCR_COMPAT_3_00,
-        .max_threads = 4,
+        /*
+         * POWER9 hardware only supports 4 threads / core, but this
+         * limit is for guests.  We need to support 8 vthreads/vcore
+         * on POWER9 for POWER8 compatibility guests, and it's very
+         * confusing if half of the threads disappear from the guest
+         * if it announces it's POWER9 aware at CAS time.
+         */
+        .max_threads = 8,
     },
 };