mirror of
https://github.com/projectacrn/acrn-hypervisor.git
synced 2025-09-26 19:24:17 +00:00
hv: unmap SR-IOV VF MMIO when the VF physical device is disabled
To avoid information leakage, we need to ensure that the device is inaccessble when it does not exist. For SR-IOV disabled VF device, we have the following operations. 1. The configuration space accessing will get 0xFFFFFFFF as a return value after set the device state to zombie. 2. The BAR MMIO EPT mapping are removed, the accesssing causes EPT violation. 3. The device will be detached from IOMMU. 4. The IRQ pin and vector are released. Tracked-On: #4433 Signed-off-by: Yuan Liu <yuan1.liu@intel.com> Acked-by: Eddie Dong <eddie.dong@intel.com>
This commit is contained in:
@@ -239,8 +239,6 @@ static void disable_vfs(struct pci_vdev *pf_vdev)
|
||||
* resources
|
||||
*
|
||||
* If the VF drivers are still running in SOS or UOS, the MMIO access will return 0xFF.
|
||||
*
|
||||
* TODO For security reasons, we need to enforce a return of 0xFF to avoid information leakage.
|
||||
*/
|
||||
num_vfs = read_sriov_reg(pf_vdev, PCIR_SRIOV_NUMVFS);
|
||||
first = read_sriov_reg(pf_vdev, PCIR_SRIOV_FST_VF_OFF);
|
||||
|
Reference in New Issue
Block a user