mirror of
https://github.com/projectacrn/acrn-hypervisor.git
synced 2025-06-18 11:47:30 +00:00
hv: add BAR GPA for vmsix over msi in pre-launched vm
In pre-launched VM the GPA of vmsix BAR which is used for vmsix over msi is calculated/allocated by acrn-config tool. The GPA needs to be assigned to vdev when vdev is initialized. The assignment is only needed for pre-launched VM. For SOS kernel will reprogram the Bar base when startup. For post-launched VM the Bar GPA will be assigned by device model via hypercall. Tracked-On: #5316 Signed-off-by: Jian Jun Chen <jian.jun.chen@intel.com> Acked-by: Eddie Dong <eddie.dong@intel.com>
This commit is contained in:
parent
182620535b
commit
ac8e0d6d10
@ -117,9 +117,12 @@ void init_vmsix_on_msi(struct pci_vdev *vdev)
|
||||
* - For Service VM: when first time init, it is programmed as 0, then OS will program
|
||||
* the value later.
|
||||
* - For Post-launched VM: The GPA is assigned by device model.
|
||||
* - For Pre-launched VM: Not supported yet.
|
||||
* - For Pre-launched VM: The GPA is assigned by acrn-config tool.
|
||||
*/
|
||||
pci_vdev_write_vbar(vdev, i, (uint32_t)vdev->vbars[i].base_gpa);
|
||||
if (is_prelaunched_vm(vpci2vm(vdev->vpci))) {
|
||||
vdev->vbars[i].base_gpa = vdev->pci_dev_config->vbar_base[i];
|
||||
pci_vdev_write_vbar(vdev, i, (uint32_t)vdev->vbars[i].base_gpa);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user