mirror of
https://github.com/projectacrn/acrn-hypervisor.git
synced 2026-01-13 11:33:58 +00:00
hv: distinguish between LAPIC_PASSTHROUGH configured vs enabled
ACRN supports LAPIC emulation for guests using x86 APICv. When guest OS/BIOS switches from xAPIC to x2APIC mode of operation, ACRN also supports switching froom LAPIC emulation to LAPIC passthrough to guest. User/developer needs to configure GUEST_FLAG_LAPIC_PASSTHROUGH for guest_flags in the corresponding VM's config for ACRN to enable LAPIC passthrough. This patch does the following 1)Fixes a bug in the abovementioned feature. For a guest that is configured with GUEST_FLAG_LAPIC_PASSTHROUGH, during the time period guest is using xAPIC mode of LAPIC, virtual interrupts are not delivered. This can be manifested as guest hang when it does not receive virtual timer interrupts. 2)ACRN exposes physical topology via CPUID leaf 0xb to LAPIC PT VMs. This patch removes that condition and exposes virtual topology via CPUID leaf 0xb. Tracked-On: #3136 Signed-off-by: Sainath Grandhi <sainath.grandhi@intel.com> Reviewed-by: Eddie Dong <eddie.dong@intel.com>
This commit is contained in:
committed by
Eddie Dong
parent
cb6a3e8f08
commit
536c69b9ff
@@ -639,7 +639,7 @@ int32_t ptirq_msix_remap(struct acrn_vm *vm, uint16_t virt_bdf, uint16_t phys_bd
|
||||
info->pmsi_data.full = 0U;
|
||||
} else {
|
||||
/* build physical config MSI, update to info->pmsi_xxx */
|
||||
if (is_lapic_pt(vm)) {
|
||||
if (is_lapic_pt_enabled(vm)) {
|
||||
/* for vm with lapic-pt, keep vector from guest */
|
||||
ptirq_build_physical_msi(vm, info, entry, (uint32_t)info->vmsi_data.bits.vector);
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user