[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH v2 09/14] pc: apic_common: reset APIC ID to initial
From: |
Igor Mammedov |
Subject: |
[Qemu-devel] [PATCH v2 09/14] pc: apic_common: reset APIC ID to initial ID when switching into x2APIC mode |
Date: |
Thu, 22 Sep 2016 14:50:50 +0200 |
SDM: x2APIC State Transitions:
State Changes From xAPIC Mode to x2APIC Mode
"
Any APIC ID value written to the memory-mapped
local APIC ID register is not preserved
"
Signed-off-by: Igor Mammedov <address@hidden>
---
hw/intc/apic_common.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/hw/intc/apic_common.c b/hw/intc/apic_common.c
index e246cf3..492afb3 100644
--- a/hw/intc/apic_common.c
+++ b/hw/intc/apic_common.c
@@ -39,6 +39,11 @@ void cpu_set_apic_base(DeviceState *dev, uint64_t val)
if (dev) {
APICCommonState *s = APIC_COMMON(dev);
APICCommonClass *info = APIC_COMMON_GET_CLASS(s);
+ /* switching to x2APIC, reset possibly modified xAPIC ID */
+ if (!(s->apicbase & MSR_IA32_APICBASE_EXTD) &&
+ (val & MSR_IA32_APICBASE_EXTD)) {
+ s->id = s->initial_apic_id;
+ }
info->set_base(s, val);
}
}
--
2.7.4
- [Qemu-devel] [PATCH v2 01/14] numa: reduce code duplication by adding helper numa_get_node_for_cpu(), (continued)
- [Qemu-devel] [PATCH v2 01/14] numa: reduce code duplication by adding helper numa_get_node_for_cpu(), Igor Mammedov, 2016/09/22
- [Qemu-devel] [PATCH v2 05/14] acpi: cphp: force switch to modern cpu hotplug if APIC ID > 254, Igor Mammedov, 2016/09/22
- [Qemu-devel] [PATCH v2 06/14] pc: leave max apic_id_limit only in legacy cpu hotplug code, Igor Mammedov, 2016/09/22
- [Qemu-devel] [PATCH v2 08/14] pc: apic_common: restore APIC ID to initial ID on reset, Igor Mammedov, 2016/09/22
- [Qemu-devel] [PATCH v2 07/14] pc: apic_common: extend APIC ID property to 32bit, Igor Mammedov, 2016/09/22
[Qemu-devel] [PATCH v2 09/14] pc: apic_common: reset APIC ID to initial ID when switching into x2APIC mode,
Igor Mammedov <=
[Qemu-devel] [PATCH v2 10/14] pc: kvm_apic: pass APIC ID depending on xAPIC/x2APIC mode, Igor Mammedov, 2016/09/22
[Qemu-devel] [PATCH v2 12/14] increase MAX_CPUMASK_BITS from 255 to 288, Igor Mammedov, 2016/09/22
[Qemu-devel] [PATCH v2 11/14] pc: clarify FW_CFG_MAX_CPUS usage comment, Igor Mammedov, 2016/09/22
[Qemu-devel] [PATCH v2 13/14] pc: add 'etc/boot-cpus' fw_cfg file for machine with more than 255 CPUs, Igor Mammedov, 2016/09/22
[Qemu-devel] [PATCH v2 14/14] pc: q35: bump max_cpus to 288, Igor Mammedov, 2016/09/22
Re: [Qemu-devel] [PATCH v2 00/14] pc: q35: x2APIC support in kvm_apic mode, no-reply, 2016/09/22