hv: fix 2 bugs in msix.c
in vmsix_cfgwrite(), it should write the new value 'val'.
in vmsix_table_mmio_access_handler(), mmio_gpa is a typo for intercepted_gpa.
@@ -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);
