[PATCH] xio3130_downstream: Add ACS (Access Control Services) capability

Wang,Liang(ACG CCN01) posted 1 patch 1 year, 10 months ago
Failed in applying to current master (apply log)
There is a newer version of this series
1 file changed, 4 insertions(+)
[PATCH] xio3130_downstream: Add ACS (Access Control Services) capability
Posted by Wang,Liang(ACG CCN01) 1 year, 10 months ago
When vfio-pci devices are attached to the downstream, pcie acs

capability may be needed, Consistent with physical machine.


It has been tested in our environment, and pcie acs capability

is required in some scenarios.


Signed-off-by: wangliang <wangliang40@baidu.com>

---

 hw/pci-bridge/xio3130_downstream.c | 4 ++++

 1 file changed, 4 insertions(+)


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

index 05e2b06c0c..6ab13b47e2 100644

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

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

@@ -40,6 +40,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_downstream_write_config(PCIDevice *d, uint32_t address,

                                          uint32_t val, int len)

@@ -111,6 +113,8 @@ static void xio3130_downstream_realize(PCIDevice *d, Error **errp)

         goto err;

     }


+

+    pcie_acs_init(d, XIO3130_ACS_OFFSET);

     return;


 err:

--

2.24.3 (Apple Git-128)

Re: [PATCH] xio3130_downstream: Add ACS (Access Control Services) capability
Posted by Paul Schlacter 1 year, 10 months ago
pin

On Mon, May 16, 2022 at 9:54 PM Wang,Liang(ACG CCN01) <wangliang40@baidu.com>
wrote:

> When vfio-pci devices are attached to the downstream, pcie acs
>
> capability may be needed, Consistent with physical machine.
>
>
> It has been tested in our environment, and pcie acs capability
>
> is required in some scenarios.
>
>
> Signed-off-by: wangliang <wangliang40@baidu.com>
>
> ---
>
>  hw/pci-bridge/xio3130_downstream.c | 4 ++++
>
>  1 file changed, 4 insertions(+)
>
>
> diff --git a/hw/pci-bridge/xio3130_downstream.c
> b/hw/pci-bridge/xio3130_downstream.c
>
> index 05e2b06c0c..6ab13b47e2 100644
>
> --- a/hw/pci-bridge/xio3130_downstream.c
>
> +++ b/hw/pci-bridge/xio3130_downstream.c
>
> @@ -40,6 +40,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_downstream_write_config(PCIDevice *d, uint32_t
> address,
>
>                                           uint32_t val, int len)
>
> @@ -111,6 +113,8 @@ static void xio3130_downstream_realize(PCIDevice *d,
> Error **errp)
>
>          goto err;
>
>      }
>
>
> +
>
> +    pcie_acs_init(d, XIO3130_ACS_OFFSET);
>
>      return;
>
>
>  err:
>
> --
>
> 2.24.3 (Apple Git-128)
>
>