Re: [RFC PATCH v6 09/11] iommufd: Add the vdevice TSM request ioctl
From: Jason Gunthorpe
Date: Thu Oct 22 2026 - 08:31:25 EST
On Thu, Oct 22, 2026 at 06:16:04PM +1100, Alexey Kardashevskiy wrote:
> > > [ ... 34 lines skipped ... ]
> > > +/**
> > > + * enum iommu_vdevice_tsm_guest_req_op - operation for guest TSM requests
> > > + * @TSM_REQ_VALIDATE_MMIO: Validate MMIO for the TDI
> > > + * @TSM_REQ_SET_TDI_STATE: Set TDI state
> > > + * @TSM_REQ_SEV_ENABLE_DMA: Enable SEV DMA
> >
> > That seems wrong.. The hypervisor should not have control over T=1
> > DMA.
>
> This is a guest request to the PSP which does control T=1, the HV is
> forwarding it and does some extra stuff while there. Probably could
> be decoupled and go to a separate ioctl().
Presumably the guest request is encrypted/authenticated somehow?
Otherwise it is security broken if the host can forge a T=1 control.
If that's so this should just be some AMD_PSP_AUTHENTICATED_COMMAND it
doesn't need more detail?
Also, reminder, since none of this is actually multi-vendor before
anything goes into the uapi header it needs a concrete public spec
reference to what exactly it is carrying through the uAPI.
Jason