[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL v2 62/65] x86: ich9: let firmware negotiate 'CPU hot-unplug with S
From: |
Michael S. Tsirkin |
Subject: |
[PULL v2 62/65] x86: ich9: let firmware negotiate 'CPU hot-unplug with SMI' feature |
Date: |
Wed, 9 Dec 2020 13:11:28 -0500 |
From: Igor Mammedov <imammedo@redhat.com>
Keep CPU hotunplug with SMI disabled on 5.2 and older and enable
it by default on newer machine types.
Signed-off-by: Igor Mammedov <imammedo@redhat.com>
Message-Id: <20201207140739.3829993-9-imammedo@redhat.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
---
hw/i386/pc.c | 4 +++-
hw/isa/lpc_ich9.c | 8 +++++++-
2 files changed, 10 insertions(+), 2 deletions(-)
diff --git a/hw/i386/pc.c b/hw/i386/pc.c
index 675e15c0aa..9e29f3792b 100644
--- a/hw/i386/pc.c
+++ b/hw/i386/pc.c
@@ -97,7 +97,9 @@
#include "trace.h"
#include CONFIG_DEVICES
-GlobalProperty pc_compat_5_2[] = {};
+GlobalProperty pc_compat_5_2[] = {
+ { "ICH9-LPC", "x-smi-cpu-hotunplug", "off" },
+};
const size_t pc_compat_5_2_len = G_N_ELEMENTS(pc_compat_5_2);
GlobalProperty pc_compat_5_1[] = {
diff --git a/hw/isa/lpc_ich9.c b/hw/isa/lpc_ich9.c
index da80430144..d3145bf014 100644
--- a/hw/isa/lpc_ich9.c
+++ b/hw/isa/lpc_ich9.c
@@ -392,6 +392,12 @@ static void smi_features_ok_callback(void *opaque)
return;
}
+ if (guest_cpu_hotplug_features ==
+ BIT_ULL(ICH9_LPC_SMI_F_CPU_HOT_UNPLUG_BIT)) {
+ /* cpu hot-unplug is unsupported without cpu-hotplug */
+ return;
+ }
+
/* valid feature subset requested, lock it down, report success */
lpc->smi_negotiated_features = guest_features;
lpc->smi_features_ok = 1;
@@ -774,7 +780,7 @@ static Property ich9_lpc_properties[] = {
DEFINE_PROP_BIT64("x-smi-cpu-hotplug", ICH9LPCState, smi_host_features,
ICH9_LPC_SMI_F_CPU_HOTPLUG_BIT, true),
DEFINE_PROP_BIT64("x-smi-cpu-hotunplug", ICH9LPCState, smi_host_features,
- ICH9_LPC_SMI_F_CPU_HOT_UNPLUG_BIT, false),
+ ICH9_LPC_SMI_F_CPU_HOT_UNPLUG_BIT, true),
DEFINE_PROP_END_OF_LIST(),
};
--
MST
- [PULL v2 56/65] acpi: cpuhp: introduce 'firmware performs eject' status/control bits, (continued)
- [PULL v2 56/65] acpi: cpuhp: introduce 'firmware performs eject' status/control bits, Michael S. Tsirkin, 2020/12/09
- [PULL v2 57/65] x86: acpi: introduce AcpiPmInfo::smi_on_cpu_unplug, Michael S. Tsirkin, 2020/12/09
- [PULL v2 58/65] tests/acpi: allow expected files change, Michael S. Tsirkin, 2020/12/09
- [PULL v2 59/65] x86: acpi: let the firmware handle pending "CPU remove" events in SMM, Michael S. Tsirkin, 2020/12/09
- [PULL v2 61/65] x86: ich9: factor out "guest_cpu_hotplug_features", Michael S. Tsirkin, 2020/12/09
- [PULL v2 60/65] tests/acpi: update expected files, Michael S. Tsirkin, 2020/12/09
- [PULL v2 63/65] pcie_aer: Fix help message of pcie_aer_inject_error command, Michael S. Tsirkin, 2020/12/09
- [PULL v2 64/65] hw/virtio-pci Added counter for pcie capabilities offsets., Michael S. Tsirkin, 2020/12/09
- [PULL v2 65/65] hw/virtio-pci Added AER capability., Michael S. Tsirkin, 2020/12/09
- [PULL v2 37/65] failover: remove failover_find_primary_device() error parameter, Michael S. Tsirkin, 2020/12/09
- [PULL v2 62/65] x86: ich9: let firmware negotiate 'CPU hot-unplug with SMI' feature,
Michael S. Tsirkin <=
- Re: [PULL v2 00/65] pc,pci,virtio: fixes, cleanups, Peter Maydell, 2020/12/09