diff --git a/hypervisor/dm/vpci/msix.c b/hypervisor/dm/vpci/msix.c index ac322fed7..4fbb25956 100644 --- a/hypervisor/dm/vpci/msix.c +++ b/hypervisor/dm/vpci/msix.c @@ -177,7 +177,7 @@ static int vmsix_cfgwrite(struct pci_vdev *vdev, uint32_t offset, uint32_t bytes } if (((msgctrl ^ val) & PCIM_MSIXCTRL_FUNCTION_MASK) != 0U) { - pci_pdev_write_cfg(vdev->pdev.bdf, offset, 2U, msgctrl); + pci_pdev_write_cfg(vdev->pdev.bdf, offset, 2U, val); } } @@ -246,7 +246,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.mmio_gpa; + offset = mmio->address - vdev->msix.intercepted_gpa; if (msixtable_access(vdev, (uint32_t)offset)) { vmsix_table_rw(vdev, mmio, (uint32_t)offset);