[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PULL v2 09/16] pc: Clarify FW_CFG_MAX_CPUS usage comment
From: |
Eduardo Habkost |
Subject: |
[Qemu-devel] [PULL v2 09/16] pc: Clarify FW_CFG_MAX_CPUS usage comment |
Date: |
Mon, 24 Oct 2016 17:52:18 -0200 |
From: Igor Mammedov <address@hidden>
Signed-off-by: Igor Mammedov <address@hidden>
Reviewed-by: Eduardo Habkost <address@hidden>
Signed-off-by: Eduardo Habkost <address@hidden>
---
hw/i386/pc.c | 18 ++++++++----------
1 file changed, 8 insertions(+), 10 deletions(-)
diff --git a/hw/i386/pc.c b/hw/i386/pc.c
index b1f8638..83ad556 100644
--- a/hw/i386/pc.c
+++ b/hw/i386/pc.c
@@ -746,17 +746,15 @@ static FWCfgState *bochs_bios_init(AddressSpace *as,
PCMachineState *pcms)
/* FW_CFG_MAX_CPUS is a bit confusing/problematic on x86:
*
- * SeaBIOS needs FW_CFG_MAX_CPUS for CPU hotplug, but the CPU hotplug
- * QEMU<->SeaBIOS interface is not based on the "CPU index", but on the
APIC
- * ID of hotplugged CPUs[1]. This means that FW_CFG_MAX_CPUS is not the
- * "maximum number of CPUs", but the "limit to the APIC ID values SeaBIOS
- * may see".
+ * For machine types prior to 1.8, SeaBIOS needs FW_CFG_MAX_CPUS for
+ * building MPTable, ACPI MADT, ACPI CPU hotplug and ACPI SRAT table,
+ * that tables are based on xAPIC ID and QEMU<->SeaBIOS interface
+ * for CPU hotplug also uses APIC ID and not "CPU index".
+ * This means that FW_CFG_MAX_CPUS is not the "maximum number of CPUs",
+ * but the "limit to the APIC ID values SeaBIOS may see".
*
- * So, this means we must not use max_cpus, here, but the maximum possible
- * APIC ID value, plus one.
- *
- * [1] The only kind of "CPU identifier" used between SeaBIOS and QEMU is
- * the APIC ID, not the "CPU index"
+ * So for compatibility reasons with old BIOSes we are stuck with
+ * "etc/max-cpus" actually being apic_id_limit
*/
fw_cfg_add_i16(fw_cfg, FW_CFG_MAX_CPUS, (uint16_t)pcms->apic_id_limit);
fw_cfg_add_i64(fw_cfg, FW_CFG_RAM_SIZE, (uint64_t)ram_size);
--
2.7.4
- [Qemu-devel] [PULL v2 00/16] x86 and CPU queue, 2016-10-24, Eduardo Habkost, 2016/10/24
- [Qemu-devel] [PULL v2 01/16] pc: acpi: x2APIC support for MADT table and _MAT method, Eduardo Habkost, 2016/10/24
- [Qemu-devel] [PULL v2 02/16] pc: acpi: x2APIC support for SRAT table, Eduardo Habkost, 2016/10/24
- [Qemu-devel] [PULL v2 03/16] acpi: cphp: Force switch to modern cpu hotplug if APIC ID > 254, Eduardo Habkost, 2016/10/24
- [Qemu-devel] [PULL v2 04/16] pc: Leave max apic_id_limit only in legacy cpu hotplug code, Eduardo Habkost, 2016/10/24
- [Qemu-devel] [PULL v2 06/16] pc: apic_common: Restore APIC ID to initial ID on reset, Eduardo Habkost, 2016/10/24
- [Qemu-devel] [PULL v2 05/16] pc: apic_common: Extend APIC ID property to 32bit, Eduardo Habkost, 2016/10/24
- [Qemu-devel] [PULL v2 08/16] pc: kvm_apic: Pass APIC ID depending on xAPIC/x2APIC mode, Eduardo Habkost, 2016/10/24
- [Qemu-devel] [PULL v2 07/16] pc: apic_common: Reset APIC ID to initial ID when switching into x2APIC mode, Eduardo Habkost, 2016/10/24
- [Qemu-devel] [PULL v2 09/16] pc: Clarify FW_CFG_MAX_CPUS usage comment,
Eduardo Habkost <=
- [Qemu-devel] [PULL v2 10/16] Increase MAX_CPUMASK_BITS from 255 to 288, Eduardo Habkost, 2016/10/24
- [Qemu-devel] [PULL v2 11/16] pc: Add 'etc/boot-cpus' fw_cfg file for machine with more than 255 CPUs, Eduardo Habkost, 2016/10/24
- [Qemu-devel] [PULL v2 13/16] pc: q35: Bump max_cpus to 288, Eduardo Habkost, 2016/10/24
- [Qemu-devel] [PULL v2 12/16] pc: Require IRQ remapping and EIM if there could be x2APIC CPUs, Eduardo Habkost, 2016/10/24
- [Qemu-devel] [PULL v2 14/16] exec: split cpu_exec_init(), Eduardo Habkost, 2016/10/24
- [Qemu-devel] [PULL v2 16/16] exec: call cpu_exec_exit() from a CPU unrealize common function, Eduardo Habkost, 2016/10/24
- [Qemu-devel] [PULL v2 15/16] exec: move cpu_exec_init() calls to realize functions, Eduardo Habkost, 2016/10/24
- Re: [Qemu-devel] [PULL v2 00/16] x86 and CPU queue, 2016-10-24, Peter Maydell, 2016/10/25