lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <Z5iThcDwBmBHZBJd@archie.me>
Date: Tue, 28 Jan 2025 15:21:25 +0700
From: Bagas Sanjaya <bagasdotme@...il.com>
To: Nicolin Chen <nicolinc@...dia.com>, jgg@...dia.com,
	kevin.tian@...el.com, corbet@....net, will@...nel.org
Cc: joro@...tes.org, suravee.suthikulpanit@....com, robin.murphy@....com,
	dwmw2@...radead.org, baolu.lu@...ux.intel.com, shuah@...nel.org,
	linux-kernel@...r.kernel.org, iommu@...ts.linux.dev,
	linux-arm-kernel@...ts.infradead.org,
	linux-kselftest@...r.kernel.org, linux-doc@...r.kernel.org,
	eric.auger@...hat.com, jean-philippe@...aro.org, mdf@...nel.org,
	mshavit@...gle.com, shameerali.kolothum.thodi@...wei.com,
	smostafa@...gle.com, ddutile@...hat.com, yi.l.liu@...el.com,
	patches@...ts.linux.dev
Subject: Re: [PATCH v6 11/14] Documentation: userspace-api: iommufd: Update
 FAULT and VEVENTQ

On Fri, Jan 24, 2025 at 04:30:40PM -0800, Nicolin Chen wrote:
> diff --git a/Documentation/userspace-api/iommufd.rst b/Documentation/userspace-api/iommufd.rst
> index 70289d6815d2..b0df15865dec 100644
> --- a/Documentation/userspace-api/iommufd.rst
> +++ b/Documentation/userspace-api/iommufd.rst
> @@ -63,6 +63,13 @@ Following IOMMUFD objects are exposed to userspace:
>    space usually has mappings from guest-level I/O virtual addresses to guest-
>    level physical addresses.
>  
> +- IOMMUFD_FAULT, representing a software queue for an HWPT reporting IO page
> +  faults using the IOMMU HW's PRI (Page Request Interface). This queue object
> +  provides user space an FD to poll the page fault events and also to respond
> +  to those events. A FAULT object must be created first to get a fault_id that
> +  could be then used to allocate a fault-enabled HWPT via the IOMMU_HWPT_ALLOC
> +  command by setting the IOMMU_HWPT_FAULT_ID_VALID bit in its flags field.
> +
>  - IOMMUFD_OBJ_VIOMMU, representing a slice of the physical IOMMU instance,
>    passed to or shared with a VM. It may be some HW-accelerated virtualization
>    features and some SW resources used by the VM. For examples:
> @@ -109,6 +116,14 @@ Following IOMMUFD objects are exposed to userspace:
>    vIOMMU, which is a separate ioctl call from attaching the same device to an
>    HWPT_PAGING that the vIOMMU holds.
>  
> +- IOMMUFD_OBJ_VEVENTQ, representing a software queue for a vIOMMU to report its
> +  events such as translation faults occurred to a nested stage-1 (excluding I/O
> +  page faults that should go through IOMMUFD_OBJ_FAULT) and HW-specific events.
> +  This queue object provides user space an FD to poll/read the vIOMMU events. A
> +  vIOMMU object must be created first to get its viommu_id, which could be then
> +  used to allocate a vEVENTQ. Each vIOMMU can support multiple types of vEVENTS,
> +  but is confined to one vEVENTQ per vEVENTQ type.
> +
>  All user-visible objects are destroyed via the IOMMU_DESTROY uAPI.
>  
>  The diagrams below show relationships between user-visible objects and kernel
> @@ -251,8 +266,10 @@ User visible objects are backed by following datastructures:
>  - iommufd_device for IOMMUFD_OBJ_DEVICE.
>  - iommufd_hwpt_paging for IOMMUFD_OBJ_HWPT_PAGING.
>  - iommufd_hwpt_nested for IOMMUFD_OBJ_HWPT_NESTED.
> +- iommufd_fault for IOMMUFD_OBJ_FAULT.
>  - iommufd_viommu for IOMMUFD_OBJ_VIOMMU.
>  - iommufd_vdevice for IOMMUFD_OBJ_VDEVICE.
> +- iommufd_veventq for IOMMUFD_OBJ_VEVENTQ.
>  
>  Several terminologies when looking at these datastructures:
>  

Looks good, thanks!

Reviewed-by: Bagas Sanjaya <bagasdotme@...il.com>

-- 
An old man doll... just what I always wanted! - Clara

Download attachment "signature.asc" of type "application/pgp-signature" (229 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ