iommufd: Add fault and response message definitions
authorLu Baolu <baolu.lu@linux.intel.com>
Tue, 2 Jul 2024 06:34:39 +0000 (14:34 +0800)
committerJason Gunthorpe <jgg@nvidia.com>
Tue, 9 Jul 2024 16:54:32 +0000 (13:54 -0300)
commitc714f15860fcca02fe0fd7c3f1f1fc35b1768ac1
treed5dce67a05b4f66401ee995db6ad6e95e7843f95
parent8519e689834a3ecf9a36332a9abb1844bd34e459
iommufd: Add fault and response message definitions

iommu_hwpt_pgfaults represent fault messages that the userspace can
retrieve. Multiple iommu_hwpt_pgfaults might be put in an iopf group,
with the IOMMU_PGFAULT_FLAGS_LAST_PAGE flag set only for the last
iommu_hwpt_pgfault.

An iommu_hwpt_page_response is a response message that the userspace
should send to the kernel after finishing handling a group of fault
messages. The @dev_id, @pasid, and @grpid fields in the message
identify an outstanding iopf group for a device. The @cookie field,
which matches the cookie field of the last fault in the group, will
be used by the kernel to look up the pending message.

Link: https://lore.kernel.org/r/20240702063444.105814-6-baolu.lu@linux.intel.com
Signed-off-by: Lu Baolu <baolu.lu@linux.intel.com>
Reviewed-by: Kevin Tian <kevin.tian@intel.com>
Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
include/uapi/linux/iommufd.h