HV: deny HV owned PCI bar access from SOS

This patch denies Service VM the access permission to device resources
owned by hypervisor.
HV may own these devices: (1) debug uart pci device for debug version
(2) type 1 pci device if have pre-launched VMs.
Current implementation exposes the mmio/pio resource of HV owned devices
to SOS, should remove them from SOS.

Tracked-On: #5615
Signed-off-by: Tao Yuhong <yuhong.tao@intel.com>
This commit is contained in:
Tao Yuhong
2021-01-29 17:16:10 -05:00
committed by wenlingz
parent 6e7ce4a73f
commit 50d8525618
6 changed files with 73 additions and 36 deletions

View File

@@ -90,7 +90,7 @@ static void create_vf(struct pci_vdev *pf_vdev, union pci_bdf vf_bdf, uint16_t v
* Per VT-d 8.3.3, the VFs are under the scope of the same
* remapping unit as the associated PF when SRIOV is enabled.
*/
vf_pdev = init_pdev(vf_bdf.value, pf_vdev->pdev->drhd_index);
vf_pdev = pci_init_pdev(vf_bdf, pf_vdev->pdev->drhd_index);
if (vf_pdev != NULL) {
struct acrn_vm_pci_dev_config *dev_cfg;