mirror of
https://github.com/cloud-hypervisor/cloud-hypervisor.git
synced 2025-02-01 17:35:19 +00:00
vmm, arch: x86_64: Set the APIC ID on the 0x1f CPUID leaf
The extended topology leaf (0x1f) also needs to have the APIC ID (which is the KVM cpu ID) set. This mirrors the APIC ID set on the 0xb topology leaf Signed-off-by: Rob Bradford <robert.bradford@intel.com>
This commit is contained in:
parent
b81bc77390
commit
e19079782d
@ -208,6 +208,7 @@ pub fn configure_vcpu(
|
||||
) -> super::Result<()> {
|
||||
let mut cpuid = cpuid;
|
||||
CpuidPatch::set_cpuid_reg(&mut cpuid, 0xb, None, CpuidReg::EDX, u32::from(id));
|
||||
CpuidPatch::set_cpuid_reg(&mut cpuid, 0x1f, None, CpuidReg::EDX, u32::from(id));
|
||||
fd.set_cpuid2(&cpuid)
|
||||
.map_err(Error::SetSupportedCpusFailed)?;
|
||||
|
||||
|
@ -789,6 +789,7 @@ impl CpuManager {
|
||||
{
|
||||
let mut cpuid = self.cpuid.clone();
|
||||
CpuidPatch::set_cpuid_reg(&mut cpuid, 0xb, None, CpuidReg::EDX, u32::from(cpu_id));
|
||||
CpuidPatch::set_cpuid_reg(&mut cpuid, 0x1f, None, CpuidReg::EDX, u32::from(cpu_id));
|
||||
|
||||
vcpu.lock()
|
||||
.unwrap()
|
||||
|
Loading…
x
Reference in New Issue
Block a user