diff --git a/hypervisor/arch/x86/assign.c b/hypervisor/arch/x86/assign.c index 9124edb3b..6c0a836d5 100644 --- a/hypervisor/arch/x86/assign.c +++ b/hypervisor/arch/x86/assign.c @@ -426,7 +426,7 @@ void ptdev_softirq(__unused uint16_t cpu_id) dev_dbg(ACRN_DBG_PTIRQ, "dev-assign: irq=0x%x MSI VR: 0x%x-0x%x", entry->allocated_pirq, - msi->virt_vector, + msi->vmsi_data & 0xFFU, irq_to_vector(entry->allocated_pirq)); dev_dbg(ACRN_DBG_PTIRQ, " vmsi_addr: 0x%x vmsi_data: 0x%x", @@ -527,15 +527,13 @@ int ptdev_msix_remap(struct vm *vm, uint16_t virt_bdf, /* build physical config MSI, update to info->pmsi_xxx */ ptdev_build_physical_msi(vm, info, irq_to_vector(entry->allocated_pirq)); entry->msi = *info; - entry->msi.virt_vector = info->vmsi_data & 0xFFU; - entry->msi.phys_vector = irq_to_vector(entry->allocated_pirq); dev_dbg(ACRN_DBG_IRQ, "PCI %x:%x.%x MSI VR[%d] 0x%x->0x%x assigned to vm%d", (virt_bdf >> 8) & 0xFFU, (virt_bdf >> 3) & 0x1FU, (virt_bdf) & 0x7U, entry_nr, - entry->msi.virt_vector, - entry->msi.phys_vector, + info->vmsi_data & 0xFFU, + irq_to_vector(entry->allocated_pirq), entry->vm->vm_id); END: return 0; diff --git a/hypervisor/common/hypercall.c b/hypervisor/common/hypercall.c index a78e8170b..c56535932 100644 --- a/hypervisor/common/hypercall.c +++ b/hypervisor/common/hypercall.c @@ -622,7 +622,7 @@ int32_t hcall_remap_pci_msix(struct vm *vm, uint16_t vmid, uint64_t param) if (!is_vm0(vm)) { ret = -1; } else { - info.msix = remap.msix; + info.is_msix = remap.msix; info.vmsi_ctl = remap.msi_ctl; info.vmsi_addr = remap.msi_addr; info.vmsi_data = remap.msi_data; diff --git a/hypervisor/include/common/ptdev.h b/hypervisor/include/common/ptdev.h index 4594a31bc..b4f70b7bf 100644 --- a/hypervisor/include/common/ptdev.h +++ b/hypervisor/include/common/ptdev.h @@ -43,9 +43,7 @@ struct ptdev_msi_info { uint16_t vmsi_ctl; /* virt msi_ctl */ uint32_t pmsi_addr; /* phys msi_addr */ uint32_t pmsi_data; /* phys msi_data */ - int msix; /* 0-MSI, 1-MSIX */ - uint32_t virt_vector; - uint32_t phys_vector; + int is_msix; /* 0-MSI, 1-MSIX */ }; /* entry per each allocated irq/vector