mirror of
https://github.com/projectacrn/acrn-hypervisor.git
synced 2026-06-08 01:54:44 +00:00
hv: Modify vlapic_get_apicid for x2APIC mode of vLAPIC
This patch adds support to return APIC ID if guest uses vLAPIC in x2APIC mode. Tracked-On: #1626 Signed-off-by: Sainath Grandhi <sainath.grandhi@intel.com> Reviewed-by: Xu Anthony <anthony.xu@intel.com>
This commit is contained in:
committed by
lijinxia
parent
80b6e62735
commit
cf4d191272
@@ -327,10 +327,10 @@ void guest_cpuid(struct vcpu *vcpu,
|
||||
case 0x01U:
|
||||
{
|
||||
cpuid(leaf, eax, ebx, ecx, edx);
|
||||
uint32_t apicid = vlapic_get_id(vcpu_vlapic(vcpu));
|
||||
uint32_t apicid = vlapic_get_apicid(vcpu_vlapic(vcpu));
|
||||
/* Patching initial APIC ID */
|
||||
*ebx &= ~APIC_ID_MASK;
|
||||
*ebx |= (apicid & APIC_ID_MASK);
|
||||
*ebx |= (apicid << APIC_ID_SHIFT);
|
||||
|
||||
#ifndef CONFIG_MTRR_ENABLED
|
||||
/* mask mtrr */
|
||||
|
||||
Reference in New Issue
Block a user