Re: [RFC PATCH v1 11/38] KVM: arm64: CCA: register host tsm platform device
From: Greg KH
Date: Wed Oct 15 2025 - 12:04:01 EST
On Wed, Oct 15, 2025 at 11:19:41AM -0400, James Bottomley wrote:
> On Wed, 2025-10-15 at 08:50 -0300, Jason Gunthorpe wrote:
> > On Wed, Oct 15, 2025 at 11:58:25AM +0200, Greg KH wrote:
> [...]
> > > The real device that has the resources you wish to share access
> > > to. Are there physical resources here you are sharing? If so,
> > > that device is the parent. If there is no such thing, then just
> > > make a bunch of faux devices and be done with it :)
> >
> > At the very bottom of the stack it looks like the PSCI interface is
> > discovered first through DT/ACPI. The PSCI interface has RPCs that
> > are then used to discover if SMC/etc/etc are present and along the
> > way it makes platform devices to plug in subsystems to it based on
> > what it can discover.
> >
> > It is just not sharing "resources" in the traditional sense, PSCI has
> > no registers or interrupts, yet it is a service provided by the
> > platform firmare.
> >
> > Again faux devices don't serve the need here to load modules and do
> > driver binding.
>
> This came up for the SVSM as well: we want to expose things that can be
> virtual devices or other resources that the guest discovers. Our
> conclusion was we either needed to share one of the virtual busses
> (like virtio) or do our own svsm bus. The agreement was to implement
> our own bus, but we still haven't got around to it.
I think it might be time to get around to it and not abuse other busses
:)
As an example, take the faux bus code as a base if you want a tiny
example.
thanks,
greg k-h