HV: unify the sharing_mode_vpci_deinit and partition_mode_vpci_deinit code

Put the deinit code in deinit_prelaunched_vm_vpci() for both sos and pre-launched VMs, and
remove sharing_mode_vpci_deinit() and partition_mode_vpci_deinit().

Rename functions used by deinit():
 vhostbridge_deinit --> deinit_vhostbridge
 vmsi_deinit --> deinit_vmsi
 vmsix_deinit --> deinit_vmsix
 post_launched_vm_vpci_deinit --> deinit_post_launched_vm

Tracked-On: #3056
Signed-off-by: dongshen <dongsheng.x.zhang@intel.com>
Reviewed-by: Eddie Dong <eddie.dong@intel.com>
This commit is contained in:
dongshen
2019-05-14 14:51:11 -07:00
committed by ACRN System Integration
parent 3a6c63f2d8
commit 19af3bc8aa
5 changed files with 24 additions and 48 deletions

View File

@@ -166,7 +166,7 @@ int32_t vmsi_cfgwrite(struct pci_vdev *vdev, uint32_t offset, uint32_t bytes, ui
return ret;
}
void vmsi_deinit(const struct pci_vdev *vdev)
void deinit_vmsi(const struct pci_vdev *vdev)
{
if (has_msi_cap(vdev)) {
ptirq_remove_msix_remapping(vdev->vpci->vm, vdev->vbdf.value, 1U);