diff options
| author | Kuppuswamy Sathyanarayanan <[email protected]> | 2019-02-19 11:04:51 -0800 |
|---|---|---|
| committer | Joerg Roedel <[email protected]> | 2019-02-26 11:07:05 +0100 |
| commit | e5567f5f67621877726f99be040af9fbedda37dc (patch) | |
| tree | adedf638da604e2a1340da262ee7d6faa4107983 /include/linux | |
| parent | 3f0c625c6ae714cf4dbab534b4c399f1d720e5db (diff) | |
PCI/ATS: Add pci_prg_resp_pasid_required() interface.
Return the PRG Response PASID Required bit in the Page Request
Status Register.
As per PCIe spec r4.0, sec 10.5.2.3, if this bit is Set, the device
expects a PASID TLP Prefix on PRG Response Messages when the
corresponding Page Requests had a PASID TLP Prefix. If Clear, the device
does not expect PASID TLP Prefixes on any PRG Response Message, and the
device behavior is undefined if the device receives a PRG Response Message
with a PASID TLP Prefix. Also the device behavior is undefined if this
bit is Set and the device receives a PRG Response Message with no PASID TLP
Prefix when the corresponding Page Requests had a PASID TLP Prefix.
This function will be used by drivers like IOMMU, if it is required to
check the status of the PRG Response PASID Required bit before enabling
the PASID support of the device.
Cc: Ashok Raj <[email protected]>
Cc: Jacob Pan <[email protected]>
Cc: Keith Busch <[email protected]>
Suggested-by: Ashok Raj <[email protected]>
Signed-off-by: Kuppuswamy Sathyanarayanan <[email protected]>
Acked-by: Bjorn Helgaas <[email protected]>
Signed-off-by: Joerg Roedel <[email protected]>
Diffstat (limited to 'include/linux')
| -rw-r--r-- | include/linux/pci-ats.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/include/linux/pci-ats.h b/include/linux/pci-ats.h index 7c4b8e27268c..facfd6a18fe1 100644 --- a/include/linux/pci-ats.h +++ b/include/linux/pci-ats.h @@ -40,6 +40,7 @@ void pci_disable_pasid(struct pci_dev *pdev); void pci_restore_pasid_state(struct pci_dev *pdev); int pci_pasid_features(struct pci_dev *pdev); int pci_max_pasids(struct pci_dev *pdev); +int pci_prg_resp_pasid_required(struct pci_dev *pdev); #else /* CONFIG_PCI_PASID */ @@ -66,6 +67,10 @@ static inline int pci_max_pasids(struct pci_dev *pdev) return -EINVAL; } +static int pci_prg_resp_pasid_required(struct pci_dev *pdev) +{ + return 0; +} #endif /* CONFIG_PCI_PASID */ |