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

From: Suthikulpanit, Suravee

Date: Mon Apr 06 2026 - 13:04:37 EST




On 3/30/2026 7:15 PM, Jason Gunthorpe wrote:
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

Ok. I'll introduce a new IOCTL.

Suravee