From 7003afbe74741147ed044e9304c297593e47cd56 Mon Sep 17 00:00:00 2001 From: Binbin Wu Date: Thu, 29 Nov 2018 14:37:27 +0800 Subject: [PATCH] hv: msix: fix bug when check if msix table access The offset calculation should base on the MSI-x BAR address, not MSIX-table address. Tracked-On: #1946 Signed-off-by: Binbin Wu Acked-by: Eddie Dong --- hypervisor/dm/vpci/msix.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hypervisor/dm/vpci/msix.c b/hypervisor/dm/vpci/msix.c index 238f1ec25..12030ef07 100644 --- a/hypervisor/dm/vpci/msix.c +++ b/hypervisor/dm/vpci/msix.c @@ -265,7 +265,7 @@ static int vmsix_table_mmio_access_handler(struct io_request *io_req, void *hand uint64_t hva; vdev = (struct pci_vdev *)handler_private_data; - offset = mmio->address - vdev->msix.intercepted_gpa; + offset = mmio->address - vdev->msix.mmio_gpa; if (msixtable_access(vdev, (uint32_t)offset)) { vmsix_table_rw(vdev, mmio, (uint32_t)offset);