[svsm-devel] Using a linux bus for SVSM devices

Stefano Garzarella sgarzare at redhat.com
Wed Feb 26 16:16:47 CET 2025


On Wed, 26 Feb 2025 at 15:34, James Bottomley <James.Bottomley at hansenpartnership.com> wrote:
>
> On Wed, 2025-02-26 at 15:04 +0100, Stefano Garzarella wrote:
> [...]
> > IIUC the SVSM vTPM driver will be the first one using the new bus.
> > Since I have the new version almost ready (need to finish writing
> > better commit descriptions), do you think I should post it in any
> > case as RFC, or better to wait to include also the SVSM bus?
> >
> > The current version is here [1] but it still uses platform devices,
> > even though I removed one as requested during the review of the
> > previous version.
>
> So on this, yes, it's always wise to post early and often, particularly
> where there's a discussion about where the code is going.  Seeing
> updated code helps people frame arguments.

Got it ;-)

>
> Just on the platform device: Greg seems to be going on an anti-platform
> device bender at the moment
>
> https://lore.kernel.org/linux-usb/2025021023-sandstorm-precise-9f5d@gregkh/
>
> So you may need to humour him and use his faux bus instead.

I see, thanks for sharing!

Currently, I have
- module_platform_driver_probe(tpm_svsm_driver, tpm_svsm_probe) in
  drivers/char/tpm/tpm_svsm.c since they asked to keep tpm drivers in
  drivers/char/tpm
- platform_device_register(&tpm_svsm_device) in arch/x86/coco/sev/core.c
  to load it

I'll check if I can use the faux bus in this case.

>
> > If no one is working on the new SVSM bus or planning to (don't want
> > to step on anyone's toes), I can try adding something to that branch
> > and send an RFC here.
>
> I was going to do an RFC in my copious free time, but I've no objection
> at all to someone else doing it...

If I can do something (probably next week), I'll let you know!

Thanks,
Stefano



More information about the Svsm-devel mailing list