[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 05/35] q35: catch invalid cpu hotplug configuration
From: |
Michael S. Tsirkin |
Subject: |
[PULL 05/35] q35: catch invalid cpu hotplug configuration |
Date: |
Sat, 4 Sep 2021 17:36:09 -0400 |
From: Gerd Hoffmann <kraxel@redhat.com>
Related: https://bugzilla.redhat.com//show_bug.cgi?id=1985924
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Message-Id: <20210812102341.3316254-1-kraxel@redhat.com>
Reviewed-by: Igor Mammedov <imammedo@redhat.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
---
hw/isa/lpc_ich9.c | 13 +++++++++++++
1 file changed, 13 insertions(+)
diff --git a/hw/isa/lpc_ich9.c b/hw/isa/lpc_ich9.c
index 5f9de0239c..5f143dca17 100644
--- a/hw/isa/lpc_ich9.c
+++ b/hw/isa/lpc_ich9.c
@@ -31,6 +31,7 @@
#include "qemu/osdep.h"
#include "qemu/log.h"
#include "cpu.h"
+#include "qapi/error.h"
#include "qapi/visitor.h"
#include "qemu/range.h"
#include "hw/isa/isa.h"
@@ -676,6 +677,18 @@ static void ich9_lpc_realize(PCIDevice *d, Error **errp)
DeviceState *dev = DEVICE(d);
ISABus *isa_bus;
+ if ((lpc->smi_host_features & BIT_ULL(ICH9_LPC_SMI_F_CPU_HOT_UNPLUG_BIT))
&&
+ !(lpc->smi_host_features & BIT_ULL(ICH9_LPC_SMI_F_CPU_HOTPLUG_BIT))) {
+ /*
+ * smi_features_ok_callback() throws an error on this.
+ *
+ * So bail out here instead of advertizing the invalid
+ * configuration and get obscure firmware failures from that.
+ */
+ error_setg(errp, "cpu hot-unplug requires cpu hot-plug");
+ return;
+ }
+
isa_bus = isa_bus_new(DEVICE(d), get_system_memory(), get_system_io(),
errp);
if (!isa_bus) {
--
MST
- [PULL 00/35] pc,pci,virtio: fixes, cleanups, Michael S. Tsirkin, 2021/09/04
- [PULL 01/35] vhost-vdpa: Do not send empty IOTLB update batches, Michael S. Tsirkin, 2021/09/04
- [PULL 02/35] hw/virtio: Fix leak of host-notifier memory-region, Michael S. Tsirkin, 2021/09/04
- [PULL 03/35] vhost: make SET_VRING_ADDR, SET_FEATURES send replies, Michael S. Tsirkin, 2021/09/04
- [PULL 04/35] hw/acpi: define PIIX4 acpi pci hotplug property strings at a single place, Michael S. Tsirkin, 2021/09/04
- [PULL 05/35] q35: catch invalid cpu hotplug configuration,
Michael S. Tsirkin <=
- [PULL 06/35] hw/acpi: refactor acpi hp modules so that targets can just use what they need, Michael S. Tsirkin, 2021/09/04
- Re: [PULL 06/35] hw/acpi: refactor acpi hp modules so that targets can just use what they need, Philippe Mathieu-Daudé, 2021/09/06
- Re: [PULL 06/35] hw/acpi: refactor acpi hp modules so that targets can just use what they need, Ani Sinha, 2021/09/06
- Re: [PULL 06/35] hw/acpi: refactor acpi hp modules so that targets can just use what they need, Philippe Mathieu-Daudé, 2021/09/06
- Re: [PULL 06/35] hw/acpi: refactor acpi hp modules so that targets can just use what they need, Ani Sinha, 2021/09/06
- Re: [PULL 06/35] hw/acpi: refactor acpi hp modules so that targets can just use what they need, Ani Sinha, 2021/09/07
- Re: [PULL 06/35] hw/acpi: refactor acpi hp modules so that targets can just use what they need, Philippe Mathieu-Daudé, 2021/09/07
- Re: [PULL 06/35] hw/acpi: refactor acpi hp modules so that targets can just use what they need, Ani Sinha, 2021/09/07
- Re: [PULL 06/35] hw/acpi: refactor acpi hp modules so that targets can just use what they need, Ani Sinha, 2021/09/07
[PULL 07/35] hw/virtio: move vhost_set_backend_type() to vhost.c, Michael S. Tsirkin, 2021/09/04