All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] xio3130_upstream: Add ACS (Access Control Services) capability
@ 2022-08-14  7:47 Paul Schlacter
  2022-08-14 10:47 ` Michael S. Tsirkin
  0 siblings, 1 reply; 4+ messages in thread
From: Paul Schlacter @ 2022-08-14  7:47 UTC (permalink / raw)
  To: mst, marcel.apfelbaum, fam, kwolf, stefanha, k.jensen, f4bug, its,
	xypron.glpk, imammedo, qemu-devel, armbru, kbusch, hreitz, ani

[-- Attachment #1: Type: text/plain, Size: 1120 bytes --]

If it is a pcie device, check that all devices on the path from

the device to the root complex have ACS enabled, and then the

device will become an iommu_group.

it will have the effect of isolation


Signed-off-by: wlfightup <wlfightup@gmail.com>

---

 hw/pci-bridge/xio3130_upstream.c | 3 +++

 1 file changed, 3 insertions(+)


diff --git a/hw/pci-bridge/xio3130_upstream.c
b/hw/pci-bridge/xio3130_upstream.c

index 5ff46ef050..2df952222b 100644

--- a/hw/pci-bridge/xio3130_upstream.c

+++ b/hw/pci-bridge/xio3130_upstream.c

@@ -37,6 +37,8 @@

 #define XIO3130_SSVID_SSID              0

 #define XIO3130_EXP_OFFSET              0x90

 #define XIO3130_AER_OFFSET              0x100

+#define XIO3130_ACS_OFFSET \

+        (XIO3130_AER_OFFSET + PCI_ERR_SIZEOF)


 static void xio3130_upstream_write_config(PCIDevice *d, uint32_t address,

                                           uint32_t val, int len)

@@ -92,6 +94,7 @@ static void xio3130_upstream_realize(PCIDevice *d, Error
**errp)

         goto err;

     }


+    pcie_acs_init(d, XIO3130_ACS_OFFSET);

     return;


 err:

--

2.24.3 (Apple Git-128)

[-- Attachment #2: Type: text/html, Size: 7656 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2022-08-14 22:56 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-08-14  7:47 [PATCH] xio3130_upstream: Add ACS (Access Control Services) capability Paul Schlacter
2022-08-14 10:47 ` Michael S. Tsirkin
2022-08-14 15:59   ` Paul Schlacter
2022-08-14 22:55     ` Michael S. Tsirkin

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.