qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] xio3130_upstream: Add ACS (Access Control Services) capabili


From: Paul Schlacter
Subject: Re: [PATCH] xio3130_upstream: Add ACS (Access Control Services) capability
Date: Sun, 14 Aug 2022 23:59:51 +0800

What's wrong with not disabling the old version?



On Sun, Aug 14, 2022 at 6:48 PM Michael S. Tsirkin <mst@redhat.com> wrote:
On Sun, Aug 14, 2022 at 03:47:49PM +0800, Paul Schlacter wrote:
> 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>

I don't think we can do this unconditionally. Has to have
a property and disabled for old versions.

> ---
>
>  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)
>


reply via email to

[Prev in Thread] Current Thread [Next in Thread]