hv: vpci: remove vm structure pointer from vpci

We could use container_of to get vm structure pointer from vpci. So vm
structure pointer is no need in vpci structure.

Tracked-On: #4550
Signed-off-by: Li Fei1 <fei1.li@intel.com>
This commit is contained in:
Li Fei1
2020-03-30 13:32:27 +08:00
committed by wenlingz
parent a7768fdb6a
commit 0a7770cbb7
8 changed files with 46 additions and 39 deletions

View File

@@ -88,7 +88,7 @@ static void remap_one_vmsix_entry(const struct pci_vdev *vdev, uint32_t index)
info.vmsi_addr.full = vdev->msix.table_entries[index].addr;
info.vmsi_data.full = vdev->msix.table_entries[index].data;
ret = ptirq_prepare_msix_remap(vdev->vpci->vm, vdev->bdf.value, vdev->pdev->bdf.value, (uint16_t)index, &info);
ret = ptirq_prepare_msix_remap(vpci2vm(vdev->vpci), vdev->bdf.value, vdev->pdev->bdf.value, (uint16_t)index, &info);
if (ret == 0) {
/* Write the table entry to the physical structure */
pentry = get_msix_table_entry(vdev, index);
@@ -266,7 +266,7 @@ void deinit_vmsix(const struct pci_vdev *vdev)
{
if (has_msix_cap(vdev)) {
if (vdev->msix.table_count != 0U) {
ptirq_remove_msix_remapping(vdev->vpci->vm, vdev->bdf.value, vdev->msix.table_count);
ptirq_remove_msix_remapping(vpci2vm(vdev->vpci), vdev->bdf.value, vdev->msix.table_count);
}
}
}