mirror of
https://github.com/projectacrn/acrn-hypervisor.git
synced 2025-09-20 16:28:10 +00:00
hv: vpci: minor refine about MSI/MSI-X de-initialization
About the MSI/MSI-X Capability, there're some fields of it would never been changed once they had been initialized. So it's no need to reset them once the vdev instance is still used. What need to reset are the fields which would been changed by guest at runtime. Tracked-On: #4550 Signed-off-by: Li Fei1 <fei1.li@intel.com>
This commit is contained in:
@@ -284,7 +284,8 @@ void deinit_vmsix(struct pci_vdev *vdev)
|
||||
if (has_msix_cap(vdev)) {
|
||||
if (vdev->msix.table_count != 0U) {
|
||||
ptirq_remove_msix_remapping(vpci2vm(vdev->vpci), vdev->pdev->bdf.value, vdev->msix.table_count);
|
||||
(void)memset((void *)&vdev->msix, 0U, sizeof(struct pci_msix));
|
||||
(void)memset((void *)&vdev->msix.table_entries, 0U, sizeof(vdev->msix.table_entries));
|
||||
vdev->msix.is_vmsix_on_msi_programmed = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user