[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PULL 5/6] spapr: Prevent boot CPU core removal
From: |
David Gibson |
Subject: |
[Qemu-devel] [PULL 5/6] spapr: Prevent boot CPU core removal |
Date: |
Fri, 29 Jul 2016 14:53:43 +1000 |
From: Bharata B Rao <address@hidden>
Boot CPU is assumed to be always present in QEMU code. So
until that assumptions are gone, deny removal request.
In another words, QEMU won't support boot CPU core hot-unplug.
Signed-off-by: Bharata B Rao <address@hidden>
[dwg: Tweaked error message for clarity]
Signed-off-by: David Gibson <address@hidden>
---
hw/ppc/spapr_cpu_core.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/hw/ppc/spapr_cpu_core.c b/hw/ppc/spapr_cpu_core.c
index 5a132bf..ec81ee6 100644
--- a/hw/ppc/spapr_cpu_core.c
+++ b/hw/ppc/spapr_cpu_core.c
@@ -133,6 +133,11 @@ void spapr_core_unplug(HotplugHandler *hotplug_dev,
DeviceState *dev,
sPAPRDRConnectorClass *drck;
Error *local_err = NULL;
+ if (index == 0) {
+ error_setg(errp, "Boot CPU core may not be unplugged");
+ return;
+ }
+
g_assert(drc);
drck = SPAPR_DR_CONNECTOR_GET_CLASS(drc);
--
2.7.4
- [Qemu-devel] [PULL 0/6] ppc-for-2.7 queue 20160729, David Gibson, 2016/07/29
- [Qemu-devel] [PULL 1/6] spapr: init CPUState->cpu_index with index relative to core-id, David Gibson, 2016/07/29
- [Qemu-devel] [PULL 6/6] tests: add drive_del-test to ppc/ppc64, David Gibson, 2016/07/29
- [Qemu-devel] [PULL 3/6] test: port postcopy test to ppc64, David Gibson, 2016/07/29
- [Qemu-devel] [PULL 5/6] spapr: Prevent boot CPU core removal,
David Gibson <=
- [Qemu-devel] [PULL 2/6] Revert "spapr: Ensure CPU cores are added contiguously and removed in LIFO order", David Gibson, 2016/07/29
- [Qemu-devel] [PULL 4/6] ppc: Fix fault PC reporting for lve*/stve* VMX instructions, David Gibson, 2016/07/29
- Re: [Qemu-devel] [PULL 0/6] ppc-for-2.7 queue 20160729, Peter Maydell, 2016/07/29