mirror of
https://github.com/projectacrn/acrn-hypervisor.git
synced 2025-08-13 13:56:19 +00:00
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. Tracked-On: #1568 Signed-off-by: Zide Chen <zide.chen@intel.com> Reviewed-by: Li, Fei1 <fei1.li@intel.com>
This commit is contained in:
parent
119eccfea1
commit
53971e1974
@ -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) {
|
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;
|
uint64_t hva;
|
||||||
|
|
||||||
vdev = (struct pci_vdev *)handler_private_data;
|
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)) {
|
if (msixtable_access(vdev, (uint32_t)offset)) {
|
||||||
vmsix_table_rw(vdev, mmio, (uint32_t)offset);
|
vmsix_table_rw(vdev, mmio, (uint32_t)offset);
|
||||||
|
Loading…
Reference in New Issue
Block a user