[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 62/66] x86: ich9: factor out "guest_cpu_hotplug_features"
From: |
Michael S. Tsirkin |
Subject: |
[PULL 62/66] x86: ich9: factor out "guest_cpu_hotplug_features" |
Date: |
Tue, 8 Dec 2020 14:37:29 -0500 |
From: Igor Mammedov <imammedo@redhat.com>
it will be reused by next patch to check validity of unplug
feature.
Signed-off-by: Igor Mammedov <imammedo@redhat.com>
Message-Id: <20201207140739.3829993-8-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 | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/hw/isa/lpc_ich9.c b/hw/isa/lpc_ich9.c
index 087a18d04d..da80430144 100644
--- a/hw/isa/lpc_ich9.c
+++ b/hw/isa/lpc_ich9.c
@@ -366,6 +366,7 @@ static void smi_features_ok_callback(void *opaque)
{
ICH9LPCState *lpc = opaque;
uint64_t guest_features;
+ uint64_t guest_cpu_hotplug_features;
if (lpc->smi_features_ok) {
/* negotiation already complete, features locked */
@@ -378,9 +379,12 @@ static void smi_features_ok_callback(void *opaque)
/* guest requests invalid features, leave @features_ok at zero */
return;
}
+
+ guest_cpu_hotplug_features = guest_features &
+ (BIT_ULL(ICH9_LPC_SMI_F_CPU_HOTPLUG_BIT) |
+ BIT_ULL(ICH9_LPC_SMI_F_CPU_HOT_UNPLUG_BIT));
if (!(guest_features & BIT_ULL(ICH9_LPC_SMI_F_BROADCAST_BIT)) &&
- guest_features & (BIT_ULL(ICH9_LPC_SMI_F_CPU_HOTPLUG_BIT) |
- BIT_ULL(ICH9_LPC_SMI_F_CPU_HOT_UNPLUG_BIT))) {
+ guest_cpu_hotplug_features) {
/*
* cpu hot-[un]plug with SMI requires SMI broadcast,
* leave @features_ok at zero
--
MST
- [PULL 50/66] libvhost-user: add a simple link test without glib, (continued)
- [PULL 50/66] libvhost-user: add a simple link test without glib, Michael S. Tsirkin, 2020/12/08
- [PULL 51/66] .gitlab-ci: add build-libvhost-user, Michael S. Tsirkin, 2020/12/08
- [PULL 52/66] contrib/vhost-user-blk: avoid g_return_val_if() input validation, Michael S. Tsirkin, 2020/12/08
- [PULL 49/66] libvhost-user: check memfd API, Michael S. Tsirkin, 2020/12/08
- [PULL 53/66] contrib/vhost-user-gpu: avoid g_return_val_if() input validation, Michael S. Tsirkin, 2020/12/08
- [PULL 54/66] contrib/vhost-user-input: avoid g_return_val_if() input validation, Michael S. Tsirkin, 2020/12/08
- [PULL 55/66] block/export: avoid g_return_val_if() input validation, Michael S. Tsirkin, 2020/12/08
- [PULL 58/66] x86: acpi: introduce AcpiPmInfo::smi_on_cpu_unplug, Michael S. Tsirkin, 2020/12/08
- [PULL 56/66] hw/i386/pc: add max combined fw size as machine configuration option, Michael S. Tsirkin, 2020/12/08
- [PULL 59/66] tests/acpi: allow expected files change, Michael S. Tsirkin, 2020/12/08
- [PULL 62/66] x86: ich9: factor out "guest_cpu_hotplug_features",
Michael S. Tsirkin <=
- [PULL 61/66] tests/acpi: update expected files, Michael S. Tsirkin, 2020/12/08
- [PULL 63/66] x86: ich9: let firmware negotiate 'CPU hot-unplug with SMI' feature, Michael S. Tsirkin, 2020/12/08
- [PULL 64/66] pcie_aer: Fix help message of pcie_aer_inject_error command, Michael S. Tsirkin, 2020/12/08
- [PULL 65/66] hw/virtio-pci Added counter for pcie capabilities offsets., Michael S. Tsirkin, 2020/12/08
- [PULL 66/66] hw/virtio-pci Added AER capability., Michael S. Tsirkin, 2020/12/08
- [PULL 60/66] x86: acpi: let the firmware handle pending "CPU remove" events in SMM, Michael S. Tsirkin, 2020/12/08
- [PULL 41/66] failover: simplify failover_unplug_primary, Michael S. Tsirkin, 2020/12/08
- [PULL 57/66] acpi: cpuhp: introduce 'firmware performs eject' status/control bits, Michael S. Tsirkin, 2020/12/08
- Re: [PULL 00/66] pc,pci,virtio: fixes, cleanups, Philippe Mathieu-Daudé, 2020/12/08