[PATCH v10 08/18] iommufd: Add a vDEVICE operation ioctl framework

Tian, Kevin kevin.tian at intel.com
Thu Dec 3 19:24:55 PST 2026


> From: Jason Gunthorpe <jgg at ziepe.ca>
> Sent: Friday, December 4, 2026 12:01 AM
> 
> On Thu, Dec 03, 2026 at 08:25:43AM +0000, Tian, Kevin wrote:
> > > From: Aneesh Kumar K.V <aneesh.kumar at kernel.org>
> > > Sent: Thursday, December 3, 2026 4:17 PM
> > >
> > > "Tian, Kevin" <kevin.tian at intel.com> writes:
> > >
> > > >> From: Aneesh Kumar K.V (Arm) <aneesh.kumar at kernel.org>
> > > >> Sent: Wednesday, November 25, 2026 4:11 PM
> > > >>
> > > >> Add IOMMU_VDEVICE_OP to execute operations on a vDEVICE using
> > > >> separate
> > > >> request and response buffers. Each operation defines its request and
> > > >> response formats, with response capacity checked before changing
> device
> > > >> state.
> > > >>
> > > >> Look up the vDEVICE and check its supported_ops mask before
> > > dispatching
> > > >> an operation. Reject out-of-range operation numbers before testing
> the
> > > >> corresponding bit. Backends set the mask during vdevice_init().
> > > >>
> > > >> This patch defines no operations. The default dispatch returns
> > > >> -EOPNOTSUPP; later patches can add operations independently.
> > > >>
> > > >
> > > > Given this is a tsm series, it'd be clearer to include related ops definition
> > > > (e.g. IOMMU_VDEVICE_OP_SET_TDISP_STATE) in this series instead of
> > > > leaving it to be dig out from your cca repo.
> > >
> > >
> > > The conclusion was that the required set of operations is still unclear.
> > > We initially had multiple operations to read or regenerate different
> > > SPDM objects. After switching to an attestation-based interface, the CCA
> > > series now has:
> > >
> > > enum iommu_vdevice_ops {
> > > 	IOMMU_VDEVICE_OP_SET_TDISP_STATE = 0,
> > > 	IOMMU_VDEVICE_OP_GET_ATTESTATION_FD = 1,
> > > };
> > >
> > > This was not included in the series to keep the interface open until the
> > > TDX and TIO implementations help finalize the operations list.
> > >
> >
> > this series is in-progress so nothing can be considered ready. IMHO
> > including it helps understand the overall picture. You can add a note
> > that the actual definition is not finalized.
> 
> We need to make a choice if SET_TDISP_STATE is an attestation op or a
> viommu op.
> 
> Anyone have thoughts on that?
> 
> From a guest perspective I am thinking it will be an attestaion op
> integrated into the standard SPDM workflow so guest and host have an
> identical SPDM uAPI flow to accept a device.
> 

I didn't follow the attestation part closely, so may need more background
to better understand the open here. I vaguely remember you gave an idea
about returning a ctlv fd in vdev creation, but not sure whether you already
covered all your thoughts there.

quick feeling - if all tdisp state transitions can fit into the attestation op
then it is an unified interface used in both host and guest. then we avoid
introducing an iommufd specific route. this sounds positive.

'lock/unlock' sounds directly related to attestation, but I'm not sure
about 'run'. Is 'run' state triggering any specific action from attestation angle?





More information about the linux-arm-kernel mailing list