mirror of
https://github.com/projectacrn/acrn-hypervisor.git
synced 2025-09-22 01:07:57 +00:00
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:
@@ -64,7 +64,7 @@ static void remap_vmsi(const struct pci_vdev *vdev)
|
||||
{
|
||||
struct ptirq_msi_info info = {};
|
||||
union pci_bdf pbdf = vdev->pdev->bdf;
|
||||
struct acrn_vm *vm = vdev->vpci->vm;
|
||||
struct acrn_vm *vm = vpci2vm(vdev->vpci);
|
||||
uint32_t capoff = vdev->msi.capoff;
|
||||
uint32_t vmsi_msgdata, vmsi_addrlo, vmsi_addrhi = 0U;
|
||||
|
||||
@@ -130,7 +130,7 @@ void write_vmsi_cfg(struct pci_vdev *vdev, uint32_t offset, uint32_t bytes, uint
|
||||
void deinit_vmsi(const struct pci_vdev *vdev)
|
||||
{
|
||||
if (has_msi_cap(vdev)) {
|
||||
ptirq_remove_msix_remapping(vdev->vpci->vm, vdev->bdf.value, 1U);
|
||||
ptirq_remove_msix_remapping(vpci2vm(vdev->vpci), vdev->bdf.value, 1U);
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user