hv: vpci: a minor fix about handling vmsix table mmio access for post-launched VM
In "commit 90480d" we use a pointer new_owner to point to the actual vPCI device for post-launched VM when this device is assigned to this post-launched VM from SOS. However, now DM will use SOS's vmsix_table_mmio_access_handler to trap vMSI-X table mmio access for post-launched VM. So we should use the post-launched VM's vPCI device in this case. Tracked-On: #3475 Signed-off-by: Li, Fei1 <fei1.li@intel.com>
This commit is contained in:
parent
60adef33d3
commit
a6954486e9
|
@ -289,6 +289,10 @@ int32_t vmsix_table_mmio_access_handler(struct io_request *io_req, void *handler
|
||||||
void *hva;
|
void *hva;
|
||||||
|
|
||||||
vdev = (struct pci_vdev *)handler_private_data;
|
vdev = (struct pci_vdev *)handler_private_data;
|
||||||
|
/* This device is assigned to post-launched VM from SOS */
|
||||||
|
if (vdev->new_owner != NULL) {
|
||||||
|
vdev = vdev->new_owner;
|
||||||
|
}
|
||||||
offset = mmio->address - vdev->msix.mmio_gpa;
|
offset = mmio->address - vdev->msix.mmio_gpa;
|
||||||
|
|
||||||
if (msixtable_access(vdev, (uint32_t)offset)) {
|
if (msixtable_access(vdev, (uint32_t)offset)) {
|
||||||
|
|
Loading…
Reference in New Issue