From: Jason Gunthorpe <jgg@nvidia.com>
To: "Aneesh Kumar K.V" <aneesh.kumar@kernel.org>
Cc: Alexey Kardashevskiy <aik@amd.com>,
Borislav Petkov <bp@alien8.de>, Jonathan Corbet <corbet@lwn.net>,
Dave Hansen <dave.hansen@linux.intel.com>,
"H. Peter Anvin" <hpa@zytor.com>,
Kiryl Shutsemau <kas@kernel.org>,
kvm@vger.kernel.org, linux-coco@lists.linux.dev,
linux-doc@vger.kernel.org, linux-kselftest@vger.kernel.org,
Lukas Wunner <lukas@wunner.de>, Ingo Molnar <mingo@redhat.com>,
Randy Dunlap <rdunlap@infradead.org>,
Rick Edgecombe <rick.p.edgecombe@intel.com>,
Shuah Khan <shuah@kernel.org>,
Shuah Khan <skhan@linuxfoundation.org>,
Thomas Gleixner <tglx@kernel.org>,
x86@kernel.org, Jiri Pirko <jiri@resnulli.us>,
patches@lists.linux.dev, Yeoreum Yun <yeoreum.yun@arm.com>
Subject: Re: [PATCH tsm 2/4] attestation: Move the ARM Realm Token tsm_report driver
Date: Tue, 1 Dec 2026 09:03:48 -0400 [thread overview]
Message-ID: <20261201130348.GD114472@nvidia.com> (raw)
In-Reply-To: <yq5ah5gx609d.fsf@kernel.org>
On Tue, Dec 01, 2026 at 10:55:02AM +0530, Aneesh Kumar K.V wrote:
> Jason Gunthorpe <jgg@nvidia.com> writes:
>
> > drivers/virt/coco/arm-cca-guest/main.c is a bit broadly named, but it is
> > the driver for the Root of Trust inside the RMM, which the guest accesses
> > only through RSI calls.
> >
> > This is commonly called the "Realm Token". It also has 4 measurement
> > registers, but there is no driver for them in Linux yet.
> >
> > Move it into drivers/attestation/arm/cca-guest.c.
> >
> > The simple rename takes the arm_smccc_driver for SMC_RSI_ABI_VERSION along
> > with it. This isn't going to work long term, but Yeoreum has some good
> > ideas on how to split multi-function SMCCC interfaces into
> > subsystem-specific drivers that will solve this.
> >
>
> [ ... 150 lines skipped ... ]
>
> That creates quite a bit of confusion around the guest driver. The CoCo
> driver, arm-cca-guest.ko, will gain many additional features.
Not really, it prevent confusions by splitting things up by
functionality.
This file today is 100% the realm token driver. It would make things
worse to cram a bunch of other unrelated stuff into it later on and
then try to split out again.
Lets start with things in the right place before we add more stuff.
> The model I have been working towards is for arm-cca-guest.ko to be
> the driver for the arm-rsi device and, depending on the relevant
> conditions, register with different subsystems. For example, it
> registers an attestation device by calling:
>
> attestation_cca_guest_register(dsc->realm_dev, dsc->binding, tsm);
That call is the job of the tsm driver, and we still need to figure
out where that all lives. A tsm driver for bare metal living in
drivers/virt/coco is pretty nonsensical too. As is AMD putting their
tsm driver in drivers/crypto :\
TSM has the same issue, I don't want to see drivers strewn all over
the place. I'm strongly thinking that drivers/firwmare/tsm/ is
probably the right thing to do there too.
> attestation_cca_guest_register() will be provided by
> attestation-cca-guest.ko, with the implementation in
> drivers/attestation/arm/cca/da-guest.c.
Sure, that makes sense, and this patch is just the realm token version
of the same idea.
> IMHO, drivers/virt/coco should remain the location of the CoCo driver,
> which should manage the arm-rsi device.
We don't need a "rsi device" for the realm token, we just need to
autoprobe the module somehow.
> Once tsm_report is moved to the attestation framework, the cca-guest
> attestation driver would similarly provide the corresponding
> registration functions.
That doesn't seem as nice - I prefer Yeoreum's enhancement to the smcc
bus..
But which ever direction things go the report/attestation code wants
to live here where I moved it and all this code belongs there. We will
figure out the driver binding to deal with the 'multi function smccc'
in one way or another so we can have proper drivers housed in their
proper subsystems.
The FIRME stuff has the same issue it wants an attestation driver and
a TSM driver, which is why I liked the smcc bus enhancement. It is
nice and reusable for each. You can just fork off the two drivers
naturally and then have some shared 'arm_rsi' or 'arm_firme' helper
library under drivers/firmware/arm as necessary.
Jason
next prev parent reply other threads:[~2026-12-01 13:03 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-12-01 0:52 [PATCH tsm 0/4] Start building drivers/attestation Jason Gunthorpe
2026-12-01 0:52 ` [PATCH tsm 1/4] attestation: Start the new subsystem using tsm_report and mr Jason Gunthorpe
2026-12-01 0:52 ` [PATCH tsm 2/4] attestation: Move the ARM Realm Token tsm_report driver Jason Gunthorpe
2026-12-01 5:25 ` Aneesh Kumar K.V
2026-12-01 13:03 ` Jason Gunthorpe [this message]
2026-12-01 0:52 ` [PATCH tsm 3/4] attestation: Move Intel TDX Guest tsm_report and mr driver Jason Gunthorpe
2026-12-01 0:52 ` [PATCH tsm 4/4] attestation: Move AMD SEV Guest tsm_report driver Jason Gunthorpe
2026-12-01 3:05 ` Borislav Petkov
2026-12-01 13:07 ` Jason Gunthorpe
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=20261201130348.GD114472@nvidia.com \
--to=jgg@nvidia.com \
--cc=aik@amd.com \
--cc=aneesh.kumar@kernel.org \
--cc=bp@alien8.de \
--cc=corbet@lwn.net \
--cc=dave.hansen@linux.intel.com \
--cc=hpa@zytor.com \
--cc=jiri@resnulli.us \
--cc=kas@kernel.org \
--cc=kvm@vger.kernel.org \
--cc=linux-coco@lists.linux.dev \
--cc=linux-doc@vger.kernel.org \
--cc=linux-kselftest@vger.kernel.org \
--cc=lukas@wunner.de \
--cc=mingo@redhat.com \
--cc=patches@lists.linux.dev \
--cc=rdunlap@infradead.org \
--cc=rick.p.edgecombe@intel.com \
--cc=shuah@kernel.org \
--cc=skhan@linuxfoundation.org \
--cc=tglx@kernel.org \
--cc=x86@kernel.org \
--cc=yeoreum.yun@arm.com \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox