aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Maydell <peter.maydell@linaro.org>2017-04-03 11:15:33 +0100
committerPeter Maydell <peter.maydell@linaro.org>2017-04-03 11:15:33 +0100
commit9eb5adae26b828219e82f17c854cdf1f192f9565 (patch)
treea0b07301b732e7f91fca8233c7ee8d70d68fe006
parent6954cdc070b4209cc468263455670d8b02765a95 (diff)
parent8149e2992f7811355cc34721b79d69d1a3a667dd (diff)
Merge remote-tracking branch 'remotes/dgibson/tags/ppc-for-2.9-20170403' into staging
ppc patch queue 2017-04-03 A single bugfix in this pull request, for an ugly assert() failure, if the user ignores the information in query-hotpluggable-cpus and tries to hot add CPUs to pseries with bad parameters. # gpg: Signature made Mon 03 Apr 2017 11:06:58 BST # gpg: using RSA key 0x6C38CACA20D9B392 # gpg: Good signature from "David Gibson <david@gibson.dropbear.id.au>" # gpg: aka "David Gibson (Red Hat) <dgibson@redhat.com>" # gpg: aka "David Gibson (ozlabs.org) <dgibson@ozlabs.org>" # gpg: aka "David Gibson (kernel.org) <dwg@kernel.org>" # Primary key fingerprint: 75F4 6586 AE61 A66C C44E 87DC 6C38 CACA 20D9 B392 * remotes/dgibson/tags/ppc-for-2.9-20170403: pseries: Enforce homogeneous threads-per-core Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
-rw-r--r--hw/ppc/spapr.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/hw/ppc/spapr.c b/hw/ppc/spapr.c
index 44c26e4be8..35db949dbc 100644
--- a/hw/ppc/spapr.c
+++ b/hw/ppc/spapr.c
@@ -2790,6 +2790,12 @@ static void spapr_core_pre_plug(HotplugHandler *hotplug_dev, DeviceState *dev,
goto out;
}
+ if (cc->nr_threads != smp_threads) {
+ error_setg(errp, "invalid nr-threads %d, must be %d",
+ cc->nr_threads, smp_threads);
+ return;
+ }
+
core_slot = spapr_find_cpu_slot(MACHINE(hotplug_dev), cc->core_id, &index);
if (!core_slot) {
error_setg(&local_err, "core id %d out of range", cc->core_id);