[PATCH v9 06/13] iommufd: Add a vDEVICE operation ioctl framework
Baolu Lu
baolu.lu at linux.intel.com
Thu Nov 19 17:17:30 PST 2026
On 11/16/2026 4:19 PM, Aneesh Kumar K.V (Arm) wrote:
> 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.
>
> Cc: Jason Gunthorpe<jgg at ziepe.ca>
> Cc: Kevin Tian<kevin.tian at intel.com>
> Cc: Joerg Roedel<joro at 8bytes.org>
> Cc: Will Deacon<will at kernel.org>
> Cc: Robin Murphy<robin.murphy at arm.com>
> Cc: Alexey Kardashevskiy<aik at amd.com>
> Cc: Lukas Wunner<lukas at wunner.de>
> Cc:iommu at lists.linux.dev
> Signed-off-by: Aneesh Kumar K.V (Arm)<aneesh.kumar at kernel.org>
> ---
> drivers/iommu/iommufd/iommufd_private.h | 1 +
> drivers/iommu/iommufd/main.c | 3 +++
> drivers/iommu/iommufd/viommu.c | 36 +++++++++++++++++++++++++
> include/linux/iommufd.h | 3 +++
> include/linux/tsm.h | 1 +
> include/uapi/linux/iommufd.h | 33 +++++++++++++++++++++++
> 6 files changed, 77 insertions(+)
Reviewed-by: Lu Baolu <baolu.lu at linux.intel.com>
More information about the linux-arm-kernel
mailing list