Re: [PATCH 20/22] iommufd: Introduce vIOMMU option via IOMMU_OPTION ioctl

From: Jason Gunthorpe

Date: Mon Mar 30 2026 - 08:20:45 EST


On Mon, Mar 30, 2026 at 08:42:04AM +0000, Suravee Suthikulpanit wrote:
> Introduce a new iommufd_option enum value, IOMMU_OPTION_VIOMMU, to
> support vIOMMU-specific options. Extend the existing IOMMU_OPTION
> ioctl to accept key-value style input, enabling access to data arrays
> such as hardware registers.
>
> Additionally, introduce struct iommufd_viommu_ops with set_option
> and get_option callbacks to support IOMMUFD vIOMMU options.

This doesn't seem like the right API to use use for this. You should
probably add a new ioctl for viommu "commands" or something like that
which is better structured..

Jason