All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Michael S. Tsirkin" <mst@redhat.com>
To: Paul Schlacter <wlfightup@gmail.com>
Cc: marcel.apfelbaum@gmail.com, fam@euphon.net, kwolf@redhat.com,
	stefanha@redhat.com, k.jensen@samsung.com, f4bug@amsat.org,
	its@irrelevant.dk, xypron.glpk@gmx.de, imammedo@redhat.com,
	qemu-devel@nongnu.org, armbru@redhat.com, kbusch@kernel.org,
	hreitz@redhat.com, ani@anisinha.ca
Subject: Re: [PATCH] xio3130_upstream: Add ACS (Access Control Services) capability
Date: Sun, 14 Aug 2022 06:47:59 -0400	[thread overview]
Message-ID: <20220814064705-mutt-send-email-mst@kernel.org> (raw)
In-Reply-To: <CADak6y5OdAgSwCmsdghy9JarwFqeR7GtaK2pz+TSLvSiAy8PQA@mail.gmail.com>

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	other threads:[~2022-08-14 10:51 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-08-14  7:47 [PATCH] xio3130_upstream: Add ACS (Access Control Services) capability Paul Schlacter
2022-08-14 10:47 ` Michael S. Tsirkin [this message]
2022-08-14 15:59   ` Paul Schlacter
2022-08-14 22:55     ` Michael S. Tsirkin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220814064705-mutt-send-email-mst@kernel.org \
    --to=mst@redhat.com \
    --cc=ani@anisinha.ca \
    --cc=armbru@redhat.com \
    --cc=f4bug@amsat.org \
    --cc=fam@euphon.net \
    --cc=hreitz@redhat.com \
    --cc=imammedo@redhat.com \
    --cc=its@irrelevant.dk \
    --cc=k.jensen@samsung.com \
    --cc=kbusch@kernel.org \
    --cc=kwolf@redhat.com \
    --cc=marcel.apfelbaum@gmail.com \
    --cc=qemu-devel@nongnu.org \
    --cc=stefanha@redhat.com \
    --cc=wlfightup@gmail.com \
    --cc=xypron.glpk@gmx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.