From: Jim MacArthur <jim.macarthur@linaro.org>
To: Jonathan Cameron <jic23@kernel.org>
Cc: qemu-devel@nongnu.org, "Michael S. Tsirkin" <mst@redhat.com>,
Pierrick Bouvier <pierrick.bouvier@oss.qualcomm.com>
Subject: Re: [PATCH 2/4] hw/pci: add IDE + TEE capability to PCIe root port
Date: Thu, 5 Nov 2026 11:48:51 +0000 [thread overview]
Message-ID: <auxtI9xz2y3tWfl8@linaro.org> (raw)
In-Reply-To: <20261104192709.3b260e06@jic23-hlaptop>
On Wed, Nov 04, 2026 at 07:27:09PM +0000, Jonathan Cameron wrote:
> On Thu, 29 Oct 2026 15:05:11 +0000
> Jim MacArthur <jim.macarthur@linaro.org> wrote:
>
> > From: Pierrick Bouvier <pierrick.bouvier@linaro.org>
> >
> > Adds the TEE flag in the legacy config space, and the IDE
> > (Integrity & Data Encryption) extended capability. These
> > will be present when rme-cap=on is specified for the
> > pcie-root-port device.
> >
> > Signed-off-by: Pierrick Bouvier <pierrick.bouvier@linaro.org>
> > Signed-off-by: Jim MacArthur <Jim MacArthur@linaro.org>
> > ---
> > hw/pci-bridge/gen_pcie_root_port.c | 21 ++++++++++++++++++++-
> > hw/pci/pcie.c | 19 +++++++++++++++++++
> > include/hw/pci/pcie.h | 3 +++
> > include/hw/pci/pcie_regs.h | 4 ++++
> > 4 files changed, 46 insertions(+), 1 deletion(-)
> >
> > diff --git a/hw/pci-bridge/gen_pcie_root_port.c b/hw/pci-bridge/gen_pcie_root_port.c
> > index 5434d693d9..ab8087da87 100644
> > --- a/hw/pci-bridge/gen_pcie_root_port.c
> > +++ b/hw/pci-bridge/gen_pcie_root_port.c
> > @@ -26,13 +26,16 @@ OBJECT_DECLARE_SIMPLE_TYPE(GenPCIERootPort, GEN_PCIE_ROOT_PORT)
> > #define GEN_PCIE_ROOT_PORT_AER_OFFSET 0x100
> > #define GEN_PCIE_ROOT_PORT_ACS_OFFSET \
> > (GEN_PCIE_ROOT_PORT_AER_OFFSET + PCI_ERR_SIZEOF)
> > -
> > +#define GEN_PCIE_ROOT_PORT_ACS_END \
> > + (GEN_PCIE_ROOT_PORT_ACS_OFFSET + PCI_ACS_SIZEOF)
>
> Can't you figure this out from root port class acs offset?
>
> Or if you want it in a fixed place follow that pattern and stash it
> in the root class during dev_rp_dev_class_init.
>
There seems to be quite a lot of cases where we're arranging capabilities in
sequential order in memory, but hard-coding the locations. I would rather all
of this be replaced with a dynamic pointer which records the next capability
offset, and it looks like there are attempts to do this with, e.g.
pcie_insert_capability, but that has a lot of caveats and only gets used once.
I'll have another think about this, and in the meantime if anyone knows a good
reason why we do hardcode this, that would be useful.
> > +
> > + if (grp->rme_caps) {
> Not arm specific. Can't see any harm in using a generic config name
> for this. Actually I'm not seeing a reason not to always include
> the ide cap. Maybe less so for setting up tee. Haven't really thought about
> that.
>
Good point, IDE/TEE could be separate named options quite easily. There might
be more Arm RME things included later, but that can be a third option.
Thanks for the review,
Jim
next prev parent reply other threads:[~2026-11-05 11:49 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-29 15:05 [PATCH 0/4] RME-DA capabilities for PCIe Root Port Jim MacArthur
2026-10-29 15:05 ` [PATCH 1/4] hw/pci-bridge: Add pcie_add_dvsec_capability helper Jim MacArthur
2026-11-04 19:20 ` Jonathan Cameron
2026-11-09 1:08 ` Gustavo Romero
2026-12-02 12:03 ` Jim MacArthur
2026-10-29 15:05 ` [PATCH 2/4] hw/pci: add IDE + TEE capability to PCIe root port Jim MacArthur
2026-11-04 19:27 ` Jonathan Cameron
2026-11-05 11:48 ` Jim MacArthur [this message]
2026-11-12 1:38 ` Jonathan Cameron
2026-11-09 1:11 ` Gustavo Romero
2026-10-29 15:05 ` [PATCH 3/4] hw/pci: add DVSEC RMEDA " Jim MacArthur
2026-11-04 19:29 ` Jonathan Cameron
2026-11-09 1:12 ` Gustavo Romero
2026-10-29 15:05 ` [PATCH 4/4] hw/pci: More comments in pcie.c Jim MacArthur
2026-11-09 1:12 ` Gustavo Romero
2026-11-09 1:13 ` [PATCH 0/4] RME-DA capabilities for PCIe Root Port Gustavo Romero
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=auxtI9xz2y3tWfl8@linaro.org \
--to=jim.macarthur@linaro.org \
--cc=jic23@kernel.org \
--cc=mst@redhat.com \
--cc=pierrick.bouvier@oss.qualcomm.com \
--cc=qemu-devel@nongnu.org \
/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.