mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-02 23:33:54 -06:00
pcie: Add a simple PCIe ACS (Access Control Services) helper function
Implementing an ACS capability on downstream ports and multifunction endpoints indicates isolation and IOMMU visibility to a finer granularity. This creates smaller IOMMU groups in the guest and thus more flexibility in assigning endpoints to guest userspace or an L2 guest. Signed-off-by: Knut Omang <knut.omang@oracle.com> Message-Id: <07489975121696f5573b0a92baaf3486ef51e35d.1550768238.git-series.knut.omang@oracle.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com> Reviewed-by: Alex Williamson <alex.williamson@redhat.com>
This commit is contained in:
parent
a1fe0b8f27
commit
db891a9ba3
3 changed files with 48 additions and 0 deletions
|
@ -79,6 +79,9 @@ struct PCIExpressDevice {
|
|||
|
||||
/* Offset of ATS capability in config space */
|
||||
uint16_t ats_cap;
|
||||
|
||||
/* ACS */
|
||||
uint16_t acs_cap;
|
||||
};
|
||||
|
||||
#define COMPAT_PROP_PCP "power_controller_present"
|
||||
|
@ -128,6 +131,9 @@ void pcie_add_capability(PCIDevice *dev,
|
|||
uint16_t offset, uint16_t size);
|
||||
void pcie_sync_bridge_lnk(PCIDevice *dev);
|
||||
|
||||
void pcie_acs_init(PCIDevice *dev, uint16_t offset);
|
||||
void pcie_acs_reset(PCIDevice *dev);
|
||||
|
||||
void pcie_ari_init(PCIDevice *dev, uint16_t offset, uint16_t nextfn);
|
||||
void pcie_dev_ser_num_init(PCIDevice *dev, uint16_t offset, uint64_t ser_num);
|
||||
void pcie_ats_init(PCIDevice *dev, uint16_t offset);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue