From b2b1a278f055c706da2c8588d823e1b94fba53e0 Mon Sep 17 00:00:00 2001 From: dongshen Date: Thu, 14 Mar 2019 14:28:11 -0700 Subject: [PATCH] HV: remove intercepted_gpa and intercepted_size from struct pci_msix No need to use these 2 variables as global (per pci_misx), can simply use local variables in code instead. Tracked-On: #2534 Signed-off-by: dongshen Acked-by: Eddie Dong --- hypervisor/dm/vpci/msix.c | 7 +------ hypervisor/include/dm/vpci.h | 2 -- 2 files changed, 1 insertion(+), 8 deletions(-) diff --git a/hypervisor/dm/vpci/msix.c b/hypervisor/dm/vpci/msix.c index a67fddec3..27a39bea4 100644 --- a/hypervisor/dm/vpci/msix.c +++ b/hypervisor/dm/vpci/msix.c @@ -376,11 +376,8 @@ static int32_t vmsix_init_helper(struct pci_vdev *vdev) /* The lower boundary of the 4KB aligned address range for MSI-X table */ addr_lo = round_page_down(msix->mmio_gpa + msix->table_offset); - msix->intercepted_gpa = addr_lo; - msix->intercepted_size = addr_hi - addr_lo; - (void)register_mmio_emulation_handler(vdev->vpci->vm, vmsix_table_mmio_access_handler, - msix->intercepted_gpa, msix->intercepted_gpa + msix->intercepted_size, vdev); + addr_lo, addr_hi, vdev); } ret = 0; } else { @@ -421,8 +418,6 @@ int32_t vmsix_init(struct pci_vdev *vdev) int32_t vmsix_deinit(struct pci_vdev *vdev) { if (has_msix_cap(vdev)) { - vdev->msix.intercepted_size = 0U; - if (vdev->msix.table_count != 0U) { ptirq_remove_msix_remapping(vdev->vpci->vm, vdev->vbdf.value, vdev->msix.table_count); } diff --git a/hypervisor/include/dm/vpci.h b/hypervisor/include/dm/vpci.h index 792c3f47b..5c6bb4f1e 100644 --- a/hypervisor/include/dm/vpci.h +++ b/hypervisor/include/dm/vpci.h @@ -63,8 +63,6 @@ struct pci_msix { uint64_t mmio_gpa; uint64_t mmio_hpa; uint64_t mmio_size; - uint64_t intercepted_gpa; - uint64_t intercepted_size; uint32_t capoff; uint32_t caplen; uint32_t table_bar;