Skip to content

Commit b2b1a27

Browse files
donshengwenlingz
authored andcommitted
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 <dongsheng.x.zhang@intel.com> Acked-by: Eddie Dong <eddie.dong@intel.com>
1 parent 5767d1e commit b2b1a27

File tree

2 files changed

+1
-8
lines changed

2 files changed

+1
-8
lines changed

hypervisor/dm/vpci/msix.c

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -376,11 +376,8 @@ static int32_t vmsix_init_helper(struct pci_vdev *vdev)
376376
/* The lower boundary of the 4KB aligned address range for MSI-X table */
377377
addr_lo = round_page_down(msix->mmio_gpa + msix->table_offset);
378378

379-
msix->intercepted_gpa = addr_lo;
380-
msix->intercepted_size = addr_hi - addr_lo;
381-
382379
(void)register_mmio_emulation_handler(vdev->vpci->vm, vmsix_table_mmio_access_handler,
383-
msix->intercepted_gpa, msix->intercepted_gpa + msix->intercepted_size, vdev);
380+
addr_lo, addr_hi, vdev);
384381
}
385382
ret = 0;
386383
} else {
@@ -421,8 +418,6 @@ int32_t vmsix_init(struct pci_vdev *vdev)
421418
int32_t vmsix_deinit(struct pci_vdev *vdev)
422419
{
423420
if (has_msix_cap(vdev)) {
424-
vdev->msix.intercepted_size = 0U;
425-
426421
if (vdev->msix.table_count != 0U) {
427422
ptirq_remove_msix_remapping(vdev->vpci->vm, vdev->vbdf.value, vdev->msix.table_count);
428423
}

hypervisor/include/dm/vpci.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,8 +63,6 @@ struct pci_msix {
6363
uint64_t mmio_gpa;
6464
uint64_t mmio_hpa;
6565
uint64_t mmio_size;
66-
uint64_t intercepted_gpa;
67-
uint64_t intercepted_size;
6866
uint32_t capoff;
6967
uint32_t caplen;
7068
uint32_t table_bar;

0 commit comments

Comments
 (0)