mirror of
https://github.com/cloud-hypervisor/cloud-hypervisor.git
synced 2025-03-20 07:58:55 +00:00
vmm: Set MADT "Online Capable" flag
The Linux kernel now checks for this before marking CPUs as hotpluggable: commit aa06e20f1be628186f0c2dcec09ea0009eb69778 Author: Mario Limonciello <mario.limonciello@amd.com> Date: Wed Sep 8 16:41:46 2021 -0500 x86/ACPI: Don't add CPUs that are not online capable A number of systems are showing "hotplug capable" CPUs when they are not really hotpluggable. This is because the MADT has extra CPU entries to support different CPUs that may be inserted into the socket with different numbers of cores. Starting with ACPI 6.3 the spec has an Online Capable bit in the MADT used to determine whether or not a CPU is hotplug capable when the enabled bit is not set. Link: https://uefi.org/htmlspecs/ACPI_Spec_6_4_html/05_ACPI_Software_Programming_Model/ACPI_Software_Programming_Model.html?#local-apic-flags Signed-off-by: Mario Limonciello <mario.limonciello@amd.com> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com> Signed-off-by: Rob Bradford <robert.bradford@intel.com>
This commit is contained in:
parent
0c82e7593d
commit
93237f0106
@ -1271,7 +1271,7 @@ impl CpuManager {
|
||||
1 << MADT_CPU_ENABLE_FLAG
|
||||
} else {
|
||||
0
|
||||
},
|
||||
} | 1 << MADT_CPU_ONLINE_CAPABLE_FLAG,
|
||||
};
|
||||
madt.append(lapic);
|
||||
}
|
||||
@ -1524,6 +1524,9 @@ struct Cpu {
|
||||
#[cfg(target_arch = "x86_64")]
|
||||
const MADT_CPU_ENABLE_FLAG: usize = 0;
|
||||
|
||||
#[cfg(target_arch = "x86_64")]
|
||||
const MADT_CPU_ONLINE_CAPABLE_FLAG: usize = 1;
|
||||
|
||||
impl Cpu {
|
||||
#[cfg(target_arch = "x86_64")]
|
||||
fn generate_mat(&self) -> Vec<u8> {
|
||||
|
Loading…
x
Reference in New Issue
Block a user