HV: add vpci bridge operations support

add vpci bridge operations in hypervisor, to avoid SOS mis-operations
to affect other VM's PCI devices.

assumption: before hypervisor bootup, the physical pci-bridge shall be
configured correctly by BIOS or other bootloader; for ACS (Access
Control Service) capability, it is configured by BIOS to support the
devices under it to be isolated and allocated to different VMs.

to simplify the emulations of vpci bridge, set limitations as following:
  1. expose all configure space registers, but readonly
  2. BIST not support; by default is 0
  3. not support interrupt, including INTx and MSI.

TODO:
  1. configure tool can select whether a PCI bridge is emulated or pass
  through.

Open:
  1. SOS how to reset PCI device under the PCI bridge?

Tracked-On: #3381
Signed-off-by: Yin Fengwei <fengwei.yin@intel.com>
Signed-off-by: Minggui Cao <minggui.cao@intel.com>
Acked-by: Eddie Dong <eddie.dong@Intel.com>
This commit is contained in:
Minggui Cao
2020-02-13 09:35:00 +08:00
committed by wenlingz
parent c246d1c9b8
commit bd92304dcf
5 changed files with 131 additions and 1 deletions

View File

@@ -122,6 +122,9 @@
#define PCIC_BRIDGE 0x06U
#define PCIS_BRIDGE_HOST 0x00U
/* PCI device subclass */
#define PCIS_BRIDGE_PCI 0x04U
/* MSI-X definitions */
#define PCIR_MSIX_CTRL 0x2U
#define PCIR_MSIX_TABLE 0x4U