Displaying 9 results from an estimated 9 matches for "pci_cap_id_exp".
Did you mean:
pci_cap_id_agp
2008 Sep 27
2
[PATCH 3/6 v3] PCI: support ARI capability
..._dev *dev)
+{
+ int pos;
+ u32 cap;
+ u16 ctrl;
+
+ if (!dev->is_pcie || (dev->pcie_type != PCI_EXP_TYPE_ROOT_PORT &&
+ dev->pcie_type != PCI_EXP_TYPE_DOWNSTREAM))
+ return;
+
+ pos = pci_find_capability(dev, PCI_CAP_ID_EXP);
+ if (!pos)
+ return;
+
+ pci_read_config_dword(dev, pos + PCI_EXP_DEVCAP2, &cap);
+
+ if (!(cap & PCI_EXP_DEVCAP2_ARI))
+ return;
+
+ pci_read_config_word(dev, pos + PCI_EXP_DEVCTL2, &ctrl);
+ ctrl |= PCI_EXP_DEVCTL2_ARI;
+...
2008 Sep 27
2
[PATCH 3/6 v3] PCI: support ARI capability
..._dev *dev)
+{
+ int pos;
+ u32 cap;
+ u16 ctrl;
+
+ if (!dev->is_pcie || (dev->pcie_type != PCI_EXP_TYPE_ROOT_PORT &&
+ dev->pcie_type != PCI_EXP_TYPE_DOWNSTREAM))
+ return;
+
+ pos = pci_find_capability(dev, PCI_CAP_ID_EXP);
+ if (!pos)
+ return;
+
+ pci_read_config_dword(dev, pos + PCI_EXP_DEVCAP2, &cap);
+
+ if (!(cap & PCI_EXP_DEVCAP2_ARI))
+ return;
+
+ pci_read_config_word(dev, pos + PCI_EXP_DEVCTL2, &ctrl);
+ ctrl |= PCI_EXP_DEVCTL2_ARI;
+...
2008 Aug 12
0
SR-IOV: patches are available for Linux kernel [2/4]
...e_fwd - enable ARI forwarding
+ * @dev: PCI device
+ */
+void pci_ari_enable_fwd(struct pci_dev *dev)
+{
+ int pos;
+ u32 cap;
+ u16 ctrl;
+
+ if (dev->pcie_type != PCI_EXP_TYPE_ROOT_PORT &&
+ dev->pcie_type != PCI_EXP_TYPE_DOWNSTREAM)
+ return;
+
+ pos = pci_find_capability(dev, PCI_CAP_ID_EXP);
+ if (!pos)
+ return;
+
+ pci_read_config_dword(dev, pos + PCI_EXP_DEVCAP2, &cap);
+
+ if (!(cap & PCI_EXP_DEVCAP2_ARI))
+ return;
+
+ dev->ari_enabled = 1;
+ dev_info(&dev->dev, "ARI forwarding enabled.\n");
+ pci_read_config_word(dev, pos + PCI_EXP_DEVCTL2, &ct...
2008 Aug 12
0
SR-IOV: patches are available for Linux kernel [2/4]
...e_fwd - enable ARI forwarding
+ * @dev: PCI device
+ */
+void pci_ari_enable_fwd(struct pci_dev *dev)
+{
+ int pos;
+ u32 cap;
+ u16 ctrl;
+
+ if (dev->pcie_type != PCI_EXP_TYPE_ROOT_PORT &&
+ dev->pcie_type != PCI_EXP_TYPE_DOWNSTREAM)
+ return;
+
+ pos = pci_find_capability(dev, PCI_CAP_ID_EXP);
+ if (!pos)
+ return;
+
+ pci_read_config_dword(dev, pos + PCI_EXP_DEVCAP2, &cap);
+
+ if (!(cap & PCI_EXP_DEVCAP2_ARI))
+ return;
+
+ dev->ari_enabled = 1;
+ dev_info(&dev->dev, "ARI forwarding enabled.\n");
+ pci_read_config_word(dev, pos + PCI_EXP_DEVCTL2, &ct...
2008 Aug 12
0
SR-IOV: patches are available for Linux kernel [2/4]
...e_fwd - enable ARI forwarding
+ * @dev: PCI device
+ */
+void pci_ari_enable_fwd(struct pci_dev *dev)
+{
+ int pos;
+ u32 cap;
+ u16 ctrl;
+
+ if (dev->pcie_type != PCI_EXP_TYPE_ROOT_PORT &&
+ dev->pcie_type != PCI_EXP_TYPE_DOWNSTREAM)
+ return;
+
+ pos = pci_find_capability(dev, PCI_CAP_ID_EXP);
+ if (!pos)
+ return;
+
+ pci_read_config_dword(dev, pos + PCI_EXP_DEVCAP2, &cap);
+
+ if (!(cap & PCI_EXP_DEVCAP2_ARI))
+ return;
+
+ dev->ari_enabled = 1;
+ dev_info(&dev->dev, "ARI forwarding enabled.\n");
+ pci_read_config_word(dev, pos + PCI_EXP_DEVCTL2, &ct...
2008 Sep 01
1
[PATCH 2/4 v2] PCI: support ARI capability
...he PCI device
+ */
+void pci_ari_enable_fwd(struct pci_dev *dev)
+{
+ int pos;
+ u32 cap;
+ u16 ctrl;
+
+ if (dev->pcie_type != PCI_EXP_TYPE_ROOT_PORT &&
+ dev->pcie_type != PCI_EXP_TYPE_DOWNSTREAM &&
+ dev->ari_enabled)
+ return;
+
+ pos = pci_find_capability(dev, PCI_CAP_ID_EXP);
+ if (!pos)
+ return;
+
+ pci_read_config_dword(dev, pos + PCI_EXP_DEVCAP2, &cap);
+
+ if (!(cap & PCI_EXP_DEVCAP2_ARI))
+ return;
+
+ dev->ari_enabled = 1;
+ dev_info(&dev->dev, "ARI forwarding enabled.\n");
+
+ pci_read_config_word(dev, pos + PCI_EXP_DEVCTL2, &...
2008 Sep 01
1
[PATCH 2/4 v2] PCI: support ARI capability
...he PCI device
+ */
+void pci_ari_enable_fwd(struct pci_dev *dev)
+{
+ int pos;
+ u32 cap;
+ u16 ctrl;
+
+ if (dev->pcie_type != PCI_EXP_TYPE_ROOT_PORT &&
+ dev->pcie_type != PCI_EXP_TYPE_DOWNSTREAM &&
+ dev->ari_enabled)
+ return;
+
+ pos = pci_find_capability(dev, PCI_CAP_ID_EXP);
+ if (!pos)
+ return;
+
+ pci_read_config_dword(dev, pos + PCI_EXP_DEVCAP2, &cap);
+
+ if (!(cap & PCI_EXP_DEVCAP2_ARI))
+ return;
+
+ dev->ari_enabled = 1;
+ dev_info(&dev->dev, "ARI forwarding enabled.\n");
+
+ pci_read_config_word(dev, pos + PCI_EXP_DEVCTL2, &...
2008 Sep 01
1
[PATCH 2/4 v2] PCI: support ARI capability
...he PCI device
+ */
+void pci_ari_enable_fwd(struct pci_dev *dev)
+{
+ int pos;
+ u32 cap;
+ u16 ctrl;
+
+ if (dev->pcie_type != PCI_EXP_TYPE_ROOT_PORT &&
+ dev->pcie_type != PCI_EXP_TYPE_DOWNSTREAM &&
+ dev->ari_enabled)
+ return;
+
+ pos = pci_find_capability(dev, PCI_CAP_ID_EXP);
+ if (!pos)
+ return;
+
+ pci_read_config_dword(dev, pos + PCI_EXP_DEVCAP2, &cap);
+
+ if (!(cap & PCI_EXP_DEVCAP2_ARI))
+ return;
+
+ dev->ari_enabled = 1;
+ dev_info(&dev->dev, "ARI forwarding enabled.\n");
+
+ pci_read_config_word(dev, pos + PCI_EXP_DEVCTL2, &...
2009 Jul 31
8
[PATCH][ioemu] support the assignment of the VF of Intel 82599 10GbE Controller
...a1 100644
--- a/hw/pass-through.c
+++ b/hw/pass-through.c
@@ -2408,6 +2408,25 @@ out:
return err;
}
+/* A return value of 1 means the capability should NOT be exposed to guest. */
+static int pt_hide_dev_cap(const struct pci_dev *dev, uint8_t grp_id)
+{
+ switch (grp_id)
+ {
+ case PCI_CAP_ID_EXP:
+ /* The PCI Express Capability Structure of the VF of Intel 82599 10GbE
+ * Controller looks trivial, e.g., the PCI Express Capabilities
+ * Register is 0. We should not try to expose it to guest.
+ */
+ if (dev->vendor_id == PCI_VENDOR_ID_INTEL &&...