HV: enable ARI if PCI bridge support it

For SRIOV needs ARI support, so enable it in HV if
the PCI bridge support it.

TODO:
  need check all the PCI devices under this bridge can support ARI,
if not, it is better not enable it as PCIe spec. That check will be
done when scanning PCI devices.

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-03-02 14:26:36 +08:00
committed by wenlingz
parent b6684f5b61
commit ad4d14e37f
2 changed files with 31 additions and 0 deletions

View File

@@ -169,6 +169,11 @@
#define PCIM_PCIE_FLRCAP (0x1U << 28U)
#define PCIM_PCIE_FLR (0x1U << 15U)
#define PCIR_PCIE_DEVCAP2 0x24U
#define PCIM_PCIE_DEVCAP2_ARI (0x1U << 5U)
#define PCIR_PCIE_DEVCTL2 0x28U
#define PCIM_PCIE_DEVCTL2_ARI (0x1U << 5U)
/* Conventional PCI Advanced Features Capability */
#define PCIY_AF 0x13U
#define PCIM_AF_FLR_CAP (0x1U << 25U)
@@ -228,6 +233,7 @@ struct pci_pdev {
union pci_bdf bdf;
uint32_t msi_capoff;
uint32_t pcie_capoff;
struct pci_msix_cap msix;
struct pci_sriov_cap sriov;