[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-ppc] [PULL 12/18] pseries: Restore support for total vcpus not a m
From: |
David Gibson |
Subject: |
[Qemu-ppc] [PULL 12/18] pseries: Restore support for total vcpus not a multiple of threads-per-core for old machine types |
Date: |
Thu, 25 May 2017 13:51:26 +1000 |
As of pseries-2.7 and later, we require the total number of guest vcpus to
be a multiple of the threads-per-core. pseries-2.6 and earlier machine
types, however, are supposed to allow this for the sake of migration from
old qemu versions which allowed this.
Unfortunately, 8149e29 "pseries: Enforce homogeneous threads-per-core"
broke this by not considering the old machine type case. This fixes it by
only applying the check when the machine type supports hotpluggable cpus.
By not-entirely-coincidence, that corresponds to the same time when we
started enforcing total threads being a multiple of threads-per-core.
Fixes: 8149e2992f7811355cc34721b79d69d1a3a667dd
Signed-off-by: David Gibson <address@hidden>
Reviewed-by: Laurent Vivier <address@hidden>
Reviewed-by: Greg Kurz <address@hidden>
Tested-by: Greg Kurz <address@hidden>
---
hw/ppc/spapr.c | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/hw/ppc/spapr.c b/hw/ppc/spapr.c
index c92d269..bcb0e18 100644
--- a/hw/ppc/spapr.c
+++ b/hw/ppc/spapr.c
@@ -2863,7 +2863,13 @@ static void spapr_core_pre_plug(HotplugHandler
*hotplug_dev, DeviceState *dev,
goto out;
}
- if (cc->nr_threads != smp_threads) {
+ /*
+ * In general we should have homogeneous threads-per-core, but old
+ * (pre hotplug support) machine types allow the last core to have
+ * reduced threads as a compatibility hack for when we allowed
+ * total vcpus not a multiple of threads-per-core.
+ */
+ if (mc->has_hotpluggable_cpus && (cc->nr_threads != smp_threads)) {
error_setg(errp, "invalid nr-threads %d, must be %d",
cc->nr_threads, smp_threads);
return;
--
2.9.4
- [Qemu-ppc] [PULL 09/18] spapr_cpu_core: drop reference on ICP object during CPU realization, (continued)
- [Qemu-ppc] [PULL 09/18] spapr_cpu_core: drop reference on ICP object during CPU realization, David Gibson, 2017/05/24
- [Qemu-ppc] [PULL 06/18] xics_kvm: cache already enabled vCPU ids, David Gibson, 2017/05/24
- [Qemu-ppc] [PULL 13/18] spapr: add pre_plug function for memory, David Gibson, 2017/05/24
- [Qemu-ppc] [PULL 11/18] pseries: Split CAS PVR negotiation out into a separate function, David Gibson, 2017/05/24
- [Qemu-ppc] [PULL 14/18] hw/ppc/spapr.c: adding pending_dimm_unplugs to sPAPRMachineState, David Gibson, 2017/05/24
- [Qemu-ppc] [PULL 03/18] spapr: sanitize error handling in spapr_ics_create(), David Gibson, 2017/05/24
- [Qemu-ppc] [PULL 05/18] spapr: Consolidate HPT freeing code into a routine, David Gibson, 2017/05/24
- [Qemu-ppc] [PULL 18/18] xics: add unrealize handler, David Gibson, 2017/05/24
- [Qemu-ppc] [PULL 15/18] hw/ppc: removing drc->detach_cb and drc->detach_cb_opaque, David Gibson, 2017/05/24
- [Qemu-ppc] [PULL 12/18] pseries: Restore support for total vcpus not a multiple of threads-per-core for old machine types,
David Gibson <=
- [Qemu-ppc] [PULL 17/18] hw/ppc/spapr.c: recover pending LMB unplug info in spapr_lmb_release, David Gibson, 2017/05/24
- [Qemu-ppc] [PULL 16/18] hw/ppc: migrating the DRC state of hotplugged devices, David Gibson, 2017/05/24
- Re: [Qemu-ppc] [Qemu-devel] [PULL 00/18] ppc-for-2.10 queue 20170525, Stefan Hajnoczi, 2017/05/30