mirror of
https://github.com/projectacrn/acrn-hypervisor.git
synced 2025-04-29 12:14:13 +00:00
HV: fix hide all sriov in ecap
When VM read pre-sriov header in ECAP of ptdev, only emulate the reading if SRIOV is hidden. Write to pre-sriov header is ignored so no need to fix writting. Tracked-On: #5085 Signed-off-by: Tao Yuhong <yuhong.tao@intel.com>
This commit is contained in:
parent
6cafb9cf01
commit
61aa89da12
@ -521,7 +521,7 @@ static int32_t read_pt_dev_cfg(const struct pci_vdev *vdev, uint32_t offset,
|
||||
} else if (sriovcap_access(vdev, offset)) {
|
||||
read_sriov_cap_reg(vdev, offset, bytes, val);
|
||||
} else {
|
||||
if (offset == vdev->pdev->sriov.pre_pos) {
|
||||
if ((offset == vdev->pdev->sriov.pre_pos) && (vdev->pdev->sriov.hide_sriov)) {
|
||||
*val = pci_vdev_read_vcfg(vdev, offset, bytes);
|
||||
} else if (!is_quirk_ptdev(vdev)) {
|
||||
/* passthru to physical device */
|
||||
|
Loading…
Reference in New Issue
Block a user