hv: don't remap msi for pt devices if lapic_pt
Since lapic is passed through, MSI/MSIx should be configured with the vector allocated within guest OS, instead of physical vector allocated in hypervisor. Tracked-On: #2351 Signed-off-by: Yan, Like <like.yan@intel.com> Acked-by: Anthony Xu <anthony.xu@intel.com>
This commit is contained in:
parent
a073ebeeca
commit
16df57aa44
|
@ -541,7 +541,13 @@ int32_t ptirq_msix_remap(struct acrn_vm *vm, uint16_t virt_bdf,
|
|||
info->pmsi_data.full = 0U;
|
||||
} else {
|
||||
/* build physical config MSI, update to info->pmsi_xxx */
|
||||
ptirq_build_physical_msi(vm, info, irq_to_vector(entry->allocated_pirq));
|
||||
if (is_lapic_pt(vm)) {
|
||||
/* for vm with lapic-pt, keep vector from guest */
|
||||
ptirq_build_physical_msi(vm, info, info->vmsi_data.bits.vector);
|
||||
} else {
|
||||
ptirq_build_physical_msi(vm, info, irq_to_vector(entry->allocated_pirq));
|
||||
}
|
||||
|
||||
entry->msi = *info;
|
||||
dev_dbg(ACRN_DBG_IRQ, "PCI %x:%x.%x MSI VR[%d] 0x%x->0x%x assigned to vm%d",
|
||||
pci_bus(virt_bdf), pci_slot(virt_bdf), pci_func(virt_bdf), entry_nr,
|
||||
|
|
Loading…
Reference in New Issue