hv: vpci: a minor fix about vpci_init_pt_dev

In "commit 6ebc22" the vPCI device initialize sequence is wrong changed. This patch
tries to revert it.

Tracked-On: #3475
Signed-off-by: Li, Fei1 <fei1.li@intel.com>
This commit is contained in:
Li, Fei1 2019-09-16 20:06:18 +08:00 committed by wenlingz
parent a6954486e9
commit de589c25fc
1 changed files with 4 additions and 3 deletions

View File

@ -328,12 +328,13 @@ static struct pci_vdev *find_vdev(const struct acrn_vpci *vpci, union pci_bdf bd
static void vpci_init_pt_dev(struct pci_vdev *vdev)
{
/*
* init_vdev_pt() must be called before init_vmsix() because init_vmsix
* assigns BAR base hpa to MSI-X mmio_hpa which is initialized in init_vdev_pt().
* Here init_vdev_pt() needs to be called after init_vmsix() for the following reason:
* init_vdev_pt() will indirectly call has_msix_cap(), which
* requires init_vmsix() to be called first.
*/
init_vdev_pt(vdev);
init_vmsi(vdev);
init_vmsix(vdev);
init_vdev_pt(vdev);
assign_vdev_pt_iommu_domain(vdev);
}