hv: ptdev: simplify struct ptdev_msi_info
The virt_vector/phys_vector are only used for debugging. Rename msix to is_msix. Signed-off-by: Li, Fei1 <fei1.li@intel.com> Acked-by: Anthony Xu <anthony.xu@intel.com>
This commit is contained in:
parent
2371839cad
commit
da57284ba5
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue