HV: return virtual lapic id in vcpuid 0b leaf
Currently vlapic id of SOS VM is virtualized, it is indexed by vcpuid in physical APIC id sequence, but CPUID 0BH leaf still report physical APIC ID. In SDC/INDUSTRY scenario they are identical mapping so no issue occured. In hybrid mode this would be a problem because vAPIC ID might be different with pAPIC ID. We need to make the APIC ID which returned from CPUID consistent with the one returned from LAPIC register. Tracked-On: #3214 Signed-off-by: Victor Sun <victor.sun@intel.com> Acked-by: Eddie Dong <eddie.dong@intel.com>
This commit is contained in:
parent
0a748fedac
commit
04d82e5c0f
|
@ -425,7 +425,6 @@ static void guest_cpuid_0bh(struct acrn_vcpu *vcpu, uint32_t *eax, uint32_t *ebx
|
|||
cpuid_subleaf(leaf, subleaf, eax, ebx, ecx, edx);
|
||||
} else {
|
||||
*ecx = subleaf & 0xFFU;
|
||||
*edx = vlapic_get_apicid(vcpu_vlapic(vcpu));
|
||||
/* No HT emulation for UOS */
|
||||
switch (subleaf) {
|
||||
case 0U:
|
||||
|
@ -449,6 +448,7 @@ static void guest_cpuid_0bh(struct acrn_vcpu *vcpu, uint32_t *eax, uint32_t *ebx
|
|||
break;
|
||||
}
|
||||
}
|
||||
*edx = vlapic_get_apicid(vcpu_vlapic(vcpu));
|
||||
}
|
||||
|
||||
static void guest_cpuid_0dh(__unused struct acrn_vcpu *vcpu, uint32_t *eax, uint32_t *ebx, uint32_t *ecx, uint32_t *edx)
|
||||
|
|
Loading…
Reference in New Issue