sphinx.addnodesdocument)}( rawsourcechildren]( translations LanguagesNode)}(hhh](h pending_xref)}(hhh]docutils.nodesTextChinese (Simplified)}parenthsba attributes}(ids]classes]names]dupnames]backrefs] refdomainstdreftypedoc reftarget)/translations/zh_CN/userspace-api/iommufdmodnameN classnameN refexplicitutagnamehhh ubh)}(hhh]hChinese (Traditional)}hh2sbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget)/translations/zh_TW/userspace-api/iommufdmodnameN classnameN refexplicituh1hhh ubh)}(hhh]hItalian}hhFsbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget)/translations/it_IT/userspace-api/iommufdmodnameN classnameN refexplicituh1hhh ubh)}(hhh]hJapanese}hhZsbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget)/translations/ja_JP/userspace-api/iommufdmodnameN classnameN refexplicituh1hhh ubh)}(hhh]hKorean}hhnsbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget)/translations/ko_KR/userspace-api/iommufdmodnameN classnameN refexplicituh1hhh ubh)}(hhh]hPortuguese (Brazilian)}hhsbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget)/translations/pt_BR/userspace-api/iommufdmodnameN classnameN refexplicituh1hhh ubh)}(hhh]hSpanish}hhsbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget)/translations/sp_SP/userspace-api/iommufdmodnameN classnameN refexplicituh1hhh ubeh}(h]h ]h"]h$]h&]current_languageEnglishuh1h hh _documenthsourceNlineNubhcomment)}(h!SPDX-License-Identifier: GPL-2.0+h]h!SPDX-License-Identifier: GPL-2.0+}hhsbah}(h]h ]h"]h$]h&] xml:spacepreserveuh1hhhhhhC/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd.rsthKubhsection)}(hhh](htitle)}(hIOMMUFDh]hIOMMUFD}(hhhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhhhhhKubh field_list)}(hhh](hfield)}(hhh](h field_name)}(hAuthorh]hAuthor}(hhhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhhhKubh field_body)}(hJason Gunthorpeh]h paragraph)}(hhh]hJason Gunthorpe}(hhhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhhubah}(h]h ]h"]h$]h&]uh1hhhubeh}(h]h ]h"]h$]h&]uh1hhhhKhhhhubh)}(hhh](h)}(hAuthorh]hAuthor}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhhhKubh)}(h Kevin Tian h]h)}(h Kevin Tianh]h Kevin Tian}(hj-hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhj)ubah}(h]h ]h"]h$]h&]uh1hhjubeh}(h]h ]h"]h$]h&]uh1hhhhKhhhhubeh}(h]h ]h"]h$]h&]uh1hhhhhhhhKubh)}(hhh](h)}(hOverviewh]hOverview}(hjPhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjMhhhhhK ubh)}(hXrIOMMUFD is the user API to control the IOMMU subsystem as it relates to managing IO page tables from userspace using file descriptors. It intends to be general and consumable by any driver that wants to expose DMA to userspace. These drivers are eventually expected to deprecate any internal IOMMU logic they may already/historically implement (e.g. vfio_iommu_type1.c).h]hXrIOMMUFD is the user API to control the IOMMU subsystem as it relates to managing IO page tables from userspace using file descriptors. It intends to be general and consumable by any driver that wants to expose DMA to userspace. These drivers are eventually expected to deprecate any internal IOMMU logic they may already/historically implement (e.g. vfio_iommu_type1.c).}(hj^hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK hjMhhubh)}(hAt minimum iommufd provides universal support of managing I/O address spaces and I/O page tables for all IOMMUs, with room in the design to add non-generic features to cater to specific hardware functionality.h]hAt minimum iommufd provides universal support of managing I/O address spaces and I/O page tables for all IOMMUs, with room in the design to add non-generic features to cater to specific hardware functionality.}(hjlhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjMhhubh)}(hIn this context the capital letter (IOMMUFD) refers to the subsystem while the small letter (iommufd) refers to the file descriptors created via /dev/iommu for use by userspace.h]hIn this context the capital letter (IOMMUFD) refers to the subsystem while the small letter (iommufd) refers to the file descriptors created via /dev/iommu for use by userspace.}(hjzhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjMhhubeh}(h]overviewah ]h"]overviewah$]h&]uh1hhhhhhhhK ubh)}(hhh](h)}(h Key Conceptsh]h Key Concepts}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhhhhhKubh)}(hhh](h)}(hUser Visible Objectsh]hUser Visible Objects}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhhhhhKubh)}(h3Following IOMMUFD objects are exposed to userspace:h]h3Following IOMMUFD objects are exposed to userspace:}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK!hjhhubh bullet_list)}(hhh](h list_item)}(hX*IOMMUFD_OBJ_IOAS, representing an I/O address space (IOAS), allowing map/unmap of user space memory into ranges of I/O Virtual Address (IOVA). The IOAS is a functional replacement for the VFIO container, and like the VFIO container it copies an IOVA map to a list of iommu_domains held within it. h](h)}(hIOMMUFD_OBJ_IOAS, representing an I/O address space (IOAS), allowing map/unmap of user space memory into ranges of I/O Virtual Address (IOVA).h]hIOMMUFD_OBJ_IOAS, representing an I/O address space (IOAS), allowing map/unmap of user space memory into ranges of I/O Virtual Address (IOVA).}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK#hjubh)}(hThe IOAS is a functional replacement for the VFIO container, and like the VFIO container it copies an IOVA map to a list of iommu_domains held within it.h]hThe IOAS is a functional replacement for the VFIO container, and like the VFIO container it copies an IOVA map to a list of iommu_domains held within it.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK&hjubeh}(h]h ]h"]h$]h&]uh1jhjhhhhhNubj)}(hZIOMMUFD_OBJ_DEVICE, representing a device that is bound to iommufd by an external driver. h]h)}(hYIOMMUFD_OBJ_DEVICE, representing a device that is bound to iommufd by an external driver.h]hYIOMMUFD_OBJ_DEVICE, representing a device that is bound to iommufd by an external driver.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK)hjubah}(h]h ]h"]h$]h&]uh1jhjhhhhhNubj)}(hXIOMMUFD_OBJ_HWPT_PAGING, representing an actual hardware I/O page table (i.e. a single struct iommu_domain) managed by the iommu driver. "PAGING" primarily indicates this type of HWPT should be linked to an IOAS. It also indicates that it is backed by an iommu_domain with __IOMMU_DOMAIN_PAGING feature flag. This can be either an UNMANAGED stage-1 domain for a device running in the user space, or a nesting parent stage-2 domain for mappings from guest-level physical addresses to host-level physical addresses. The IOAS has a list of HWPT_PAGINGs that share the same IOVA mapping and it will synchronize its mapping with each member HWPT_PAGING. h](h)}(hXIOMMUFD_OBJ_HWPT_PAGING, representing an actual hardware I/O page table (i.e. a single struct iommu_domain) managed by the iommu driver. "PAGING" primarily indicates this type of HWPT should be linked to an IOAS. It also indicates that it is backed by an iommu_domain with __IOMMU_DOMAIN_PAGING feature flag. This can be either an UNMANAGED stage-1 domain for a device running in the user space, or a nesting parent stage-2 domain for mappings from guest-level physical addresses to host-level physical addresses.h]hXIOMMUFD_OBJ_HWPT_PAGING, representing an actual hardware I/O page table (i.e. a single struct iommu_domain) managed by the iommu driver. “PAGING” primarily indicates this type of HWPT should be linked to an IOAS. It also indicates that it is backed by an iommu_domain with __IOMMU_DOMAIN_PAGING feature flag. This can be either an UNMANAGED stage-1 domain for a device running in the user space, or a nesting parent stage-2 domain for mappings from guest-level physical addresses to host-level physical addresses.}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK,hjubh)}(hThe IOAS has a list of HWPT_PAGINGs that share the same IOVA mapping and it will synchronize its mapping with each member HWPT_PAGING.h]hThe IOAS has a list of HWPT_PAGINGs that share the same IOVA mapping and it will synchronize its mapping with each member HWPT_PAGING.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK4hjubeh}(h]h ]h"]h$]h&]uh1jhjhhhhhNubj)}(hXIOMMUFD_OBJ_HWPT_NESTED, representing an actual hardware I/O page table (i.e. a single struct iommu_domain) managed by user space (e.g. guest OS). "NESTED" indicates that this type of HWPT should be linked to an HWPT_PAGING. It also indicates that it is backed by an iommu_domain that has a type of IOMMU_DOMAIN_NESTED. This must be a stage-1 domain for a device running in the user space (e.g. in a guest VM enabling the IOMMU nested translation feature.) As such, it must be created with a given nesting parent stage-2 domain to associate to. This nested stage-1 page table managed by the user space usually has mappings from guest-level I/O virtual addresses to guest- level physical addresses. h]h)}(hXIOMMUFD_OBJ_HWPT_NESTED, representing an actual hardware I/O page table (i.e. a single struct iommu_domain) managed by user space (e.g. guest OS). "NESTED" indicates that this type of HWPT should be linked to an HWPT_PAGING. It also indicates that it is backed by an iommu_domain that has a type of IOMMU_DOMAIN_NESTED. This must be a stage-1 domain for a device running in the user space (e.g. in a guest VM enabling the IOMMU nested translation feature.) As such, it must be created with a given nesting parent stage-2 domain to associate to. This nested stage-1 page table managed by the user space usually has mappings from guest-level I/O virtual addresses to guest- level physical addresses.h]hXIOMMUFD_OBJ_HWPT_NESTED, representing an actual hardware I/O page table (i.e. a single struct iommu_domain) managed by user space (e.g. guest OS). “NESTED” indicates that this type of HWPT should be linked to an HWPT_PAGING. It also indicates that it is backed by an iommu_domain that has a type of IOMMU_DOMAIN_NESTED. This must be a stage-1 domain for a device running in the user space (e.g. in a guest VM enabling the IOMMU nested translation feature.) As such, it must be created with a given nesting parent stage-2 domain to associate to. This nested stage-1 page table managed by the user space usually has mappings from guest-level I/O virtual addresses to guest- level physical addresses.}(hj/hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK7hj+ubah}(h]h ]h"]h$]h&]uh1jhjhhhhhNubj)}(hXIOMMUFD_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. h]h)}(hXIOMMUFD_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.h]hXIOMMUFD_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.}(hjGhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKBhjCubah}(h]h ]h"]h$]h&]uh1jhjhhhhhNubj)}(hXpIOMMUFD_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: * Security namespace for guest owned ID, e.g. guest-controlled cache tags * Non-device-affiliated event reporting, e.g. invalidation queue errors * Access to a shareable nesting parent pagetable across physical IOMMUs * Virtualization of various platforms IDs, e.g. RIDs and others * Delivery of paravirtualized invalidation * Direct assigned invalidation queues * Direct assigned interrupts Such a vIOMMU object generally has the access to a nesting parent pagetable to support some HW-accelerated virtualization features. So, a vIOMMU object must be created given a nesting parent HWPT_PAGING object, and then it would encapsulate that HWPT_PAGING object. Therefore, a vIOMMU object can be used to allocate an HWPT_NESTED object in place of the encapsulated HWPT_PAGING. .. note:: The name "vIOMMU" isn't necessarily identical to a virtualized IOMMU in a VM. A VM can have one giant virtualized IOMMU running on a machine having multiple physical IOMMUs, in which case the VMM will dispatch the requests or configurations from this single virtualized IOMMU instance to multiple vIOMMU objects created for individual slices of different physical IOMMUs. In other words, a vIOMMU object is always a representation of one physical IOMMU, not necessarily of a virtualized IOMMU. For VMMs that want the full virtualization features from physical IOMMUs, it is suggested to build the same number of virtualized IOMMUs as the number of physical IOMMUs, so the passed-through devices would be connected to their own virtualized IOMMUs backed by corresponding vIOMMU objects, in which case a guest OS would do the "dispatch" naturally instead of VMM trappings. h](h)}(hIOMMUFD_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:h]hIOMMUFD_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:}(hj_hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKIhj[ubj)}(hhh](j)}(hGSecurity namespace for guest owned ID, e.g. guest-controlled cache tagsh]h)}(hjrh]hGSecurity namespace for guest owned ID, e.g. guest-controlled cache tags}(hjthhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKMhjpubah}(h]h ]h"]h$]h&]uh1jhjmubj)}(hENon-device-affiliated event reporting, e.g. invalidation queue errorsh]h)}(hjh]hENon-device-affiliated event reporting, e.g. invalidation queue errors}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKNhjubah}(h]h ]h"]h$]h&]uh1jhjmubj)}(hEAccess to a shareable nesting parent pagetable across physical IOMMUsh]h)}(hjh]hEAccess to a shareable nesting parent pagetable across physical IOMMUs}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKOhjubah}(h]h ]h"]h$]h&]uh1jhjmubj)}(h=Virtualization of various platforms IDs, e.g. RIDs and othersh]h)}(hjh]h=Virtualization of various platforms IDs, e.g. RIDs and others}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKPhjubah}(h]h ]h"]h$]h&]uh1jhjmubj)}(h(Delivery of paravirtualized invalidationh]h)}(hjh]h(Delivery of paravirtualized invalidation}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKQhjubah}(h]h ]h"]h$]h&]uh1jhjmubj)}(h#Direct assigned invalidation queuesh]h)}(hjh]h#Direct assigned invalidation queues}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKRhjubah}(h]h ]h"]h$]h&]uh1jhjmubj)}(hDirect assigned interrupts h]h)}(hDirect assigned interruptsh]hDirect assigned interrupts}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKShjubah}(h]h ]h"]h$]h&]uh1jhjmubeh}(h]h ]h"]h$]h&]bullet*uh1jhhhKMhj[ubh)}(hX|Such a vIOMMU object generally has the access to a nesting parent pagetable to support some HW-accelerated virtualization features. So, a vIOMMU object must be created given a nesting parent HWPT_PAGING object, and then it would encapsulate that HWPT_PAGING object. Therefore, a vIOMMU object can be used to allocate an HWPT_NESTED object in place of the encapsulated HWPT_PAGING.h]hX|Such a vIOMMU object generally has the access to a nesting parent pagetable to support some HW-accelerated virtualization features. So, a vIOMMU object must be created given a nesting parent HWPT_PAGING object, and then it would encapsulate that HWPT_PAGING object. Therefore, a vIOMMU object can be used to allocate an HWPT_NESTED object in place of the encapsulated HWPT_PAGING.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKUhj[ubhnote)}(hXfThe name "vIOMMU" isn't necessarily identical to a virtualized IOMMU in a VM. A VM can have one giant virtualized IOMMU running on a machine having multiple physical IOMMUs, in which case the VMM will dispatch the requests or configurations from this single virtualized IOMMU instance to multiple vIOMMU objects created for individual slices of different physical IOMMUs. In other words, a vIOMMU object is always a representation of one physical IOMMU, not necessarily of a virtualized IOMMU. For VMMs that want the full virtualization features from physical IOMMUs, it is suggested to build the same number of virtualized IOMMUs as the number of physical IOMMUs, so the passed-through devices would be connected to their own virtualized IOMMUs backed by corresponding vIOMMU objects, in which case a guest OS would do the "dispatch" naturally instead of VMM trappings.h]h)}(hXfThe name "vIOMMU" isn't necessarily identical to a virtualized IOMMU in a VM. A VM can have one giant virtualized IOMMU running on a machine having multiple physical IOMMUs, in which case the VMM will dispatch the requests or configurations from this single virtualized IOMMU instance to multiple vIOMMU objects created for individual slices of different physical IOMMUs. In other words, a vIOMMU object is always a representation of one physical IOMMU, not necessarily of a virtualized IOMMU. For VMMs that want the full virtualization features from physical IOMMUs, it is suggested to build the same number of virtualized IOMMUs as the number of physical IOMMUs, so the passed-through devices would be connected to their own virtualized IOMMUs backed by corresponding vIOMMU objects, in which case a guest OS would do the "dispatch" naturally instead of VMM trappings.h]hXpThe name “vIOMMU” isn’t necessarily identical to a virtualized IOMMU in a VM. A VM can have one giant virtualized IOMMU running on a machine having multiple physical IOMMUs, in which case the VMM will dispatch the requests or configurations from this single virtualized IOMMU instance to multiple vIOMMU objects created for individual slices of different physical IOMMUs. In other words, a vIOMMU object is always a representation of one physical IOMMU, not necessarily of a virtualized IOMMU. For VMMs that want the full virtualization features from physical IOMMUs, it is suggested to build the same number of virtualized IOMMUs as the number of physical IOMMUs, so the passed-through devices would be connected to their own virtualized IOMMUs backed by corresponding vIOMMU objects, in which case a guest OS would do the “dispatch” naturally instead of VMM trappings.}(hj.hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK]hj*ubah}(h]h ]h"]h$]h&]uh1j(hj[ubeh}(h]h ]h"]h$]h&]uh1jhjhhhNhNubj)}(hXvIOMMUFD_OBJ_VDEVICE, representing a virtual device for an IOMMUFD_OBJ_DEVICE against an IOMMUFD_OBJ_VIOMMU. This virtual device holds the device's virtual information or attributes (related to the vIOMMU) in a VM. An immediate vDATA example can be the virtual ID of the device on a vIOMMU, which is a unique ID that VMM assigns to the device for a translation channel/port of the vIOMMU, e.g. vSID of ARM SMMUv3, vDeviceID of AMD IOMMU, and vRID of Intel VT-d to a Context Table. Potential use cases of some advanced security information can be forwarded via this object too, such as security level or realm information in a Confidential Compute Architecture. A VMM should create a vDEVICE object to forward all the device information in a VM, when it connects a device to a vIOMMU, which is a separate ioctl call from attaching the same device to an HWPT_PAGING that the vIOMMU holds. h]h)}(hXuIOMMUFD_OBJ_VDEVICE, representing a virtual device for an IOMMUFD_OBJ_DEVICE against an IOMMUFD_OBJ_VIOMMU. This virtual device holds the device's virtual information or attributes (related to the vIOMMU) in a VM. An immediate vDATA example can be the virtual ID of the device on a vIOMMU, which is a unique ID that VMM assigns to the device for a translation channel/port of the vIOMMU, e.g. vSID of ARM SMMUv3, vDeviceID of AMD IOMMU, and vRID of Intel VT-d to a Context Table. Potential use cases of some advanced security information can be forwarded via this object too, such as security level or realm information in a Confidential Compute Architecture. A VMM should create a vDEVICE object to forward all the device information in a VM, when it connects a device to a vIOMMU, which is a separate ioctl call from attaching the same device to an HWPT_PAGING that the vIOMMU holds.h]hXwIOMMUFD_OBJ_VDEVICE, representing a virtual device for an IOMMUFD_OBJ_DEVICE against an IOMMUFD_OBJ_VIOMMU. This virtual device holds the device’s virtual information or attributes (related to the vIOMMU) in a VM. An immediate vDATA example can be the virtual ID of the device on a vIOMMU, which is a unique ID that VMM assigns to the device for a translation channel/port of the vIOMMU, e.g. vSID of ARM SMMUv3, vDeviceID of AMD IOMMU, and vRID of Intel VT-d to a Context Table. Potential use cases of some advanced security information can be forwarded via this object too, such as security level or realm information in a Confidential Compute Architecture. A VMM should create a vDEVICE object to forward all the device information in a VM, when it connects a device to a vIOMMU, which is a separate ioctl call from attaching the same device to an HWPT_PAGING that the vIOMMU holds.}(hjLhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKjhjHubah}(h]h ]h"]h$]h&]uh1jhjhhhhhNubj)}(hXIOMMUFD_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. h]h)}(hXIOMMUFD_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.h]hXIOMMUFD_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.}(hjdhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKwhj`ubah}(h]h ]h"]h$]h&]uh1jhjhhhhhNubj)}(hXIOMMUFD_OBJ_HW_QUEUE, representing a hardware accelerated queue, as a subset of IOMMU's virtualization features, for the IOMMU HW to directly read or write the virtual queue memory owned by a guest OS. This HW-acceleration feature can allow VM to work with the IOMMU HW directly without a VM Exit, so as to reduce overhead from the hypercalls. Along with the HW QUEUE object, iommufd provides user space an mmap interface for VMM to mmap a physical MMIO region from the host physical address space to the guest physical address space, allowing the guest OS to directly control the allocated HW QUEUE. Thus, when allocating a HW QUEUE, the VMM must request a pair of mmap info (offset/length) and pass in exactly to an mmap syscall via its offset and length arguments. h]h)}(hXIOMMUFD_OBJ_HW_QUEUE, representing a hardware accelerated queue, as a subset of IOMMU's virtualization features, for the IOMMU HW to directly read or write the virtual queue memory owned by a guest OS. This HW-acceleration feature can allow VM to work with the IOMMU HW directly without a VM Exit, so as to reduce overhead from the hypercalls. Along with the HW QUEUE object, iommufd provides user space an mmap interface for VMM to mmap a physical MMIO region from the host physical address space to the guest physical address space, allowing the guest OS to directly control the allocated HW QUEUE. Thus, when allocating a HW QUEUE, the VMM must request a pair of mmap info (offset/length) and pass in exactly to an mmap syscall via its offset and length arguments.h]hXIOMMUFD_OBJ_HW_QUEUE, representing a hardware accelerated queue, as a subset of IOMMU’s virtualization features, for the IOMMU HW to directly read or write the virtual queue memory owned by a guest OS. This HW-acceleration feature can allow VM to work with the IOMMU HW directly without a VM Exit, so as to reduce overhead from the hypercalls. Along with the HW QUEUE object, iommufd provides user space an mmap interface for VMM to mmap a physical MMIO region from the host physical address space to the guest physical address space, allowing the guest OS to directly control the allocated HW QUEUE. Thus, when allocating a HW QUEUE, the VMM must request a pair of mmap info (offset/length) and pass in exactly to an mmap syscall via its offset and length arguments.}(hj|hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjxubah}(h]h ]h"]h$]h&]uh1jhjhhhhhNubeh}(h]h ]h"]h$]h&]j-uh1jhhhK#hjhhubh)}(hBAll user-visible objects are destroyed via the IOMMU_DESTROY uAPI.h]hBAll user-visible objects are destroyed via the IOMMU_DESTROY uAPI.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjhhubh)}(hThe diagrams below show relationships between user-visible objects and kernel datastructures (external to iommufd), with numbers referred to operations creating the objects and links::h]hThe diagrams below show relationships between user-visible objects and kernel datastructures (external to iommufd), with numbers referred to operations creating the objects and links:}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjhhubh literal_block)}(hX _______________________________________________________________________ | iommufd (HWPT_PAGING only) | | | | [1] [3] [2] | | ________________ _____________ ________ | | | | | | | | | | | IOAS |<---| HWPT_PAGING |<---------------------| DEVICE | | | |________________| |_____________| |________| | | | | | | |_________|____________________|__________________________________|_____| | | | | ______v_____ ___v__ | PFN storage | (paging) | |struct| |------------>|iommu_domain|<-----------------------|device| |____________| |______| _______________________________________________________________________ | iommufd (with HWPT_NESTED) | | | | [1] [3] [4] [2] | | ________________ _____________ _____________ ________ | | | | | | | | | | | | | IOAS |<---| HWPT_PAGING |<---| HWPT_NESTED |<--| DEVICE | | | |________________| |_____________| |_____________| |________| | | | | | | | |_________|____________________|__________________|_______________|_____| | | | | | ______v_____ ______v_____ ___v__ | PFN storage | (paging) | | (nested) | |struct| |------------>|iommu_domain|<----|iommu_domain|<----|device| |____________| |____________| |______| _______________________________________________________________________ | iommufd (with vIOMMU/vDEVICE) | | | | [5] [6] | | _____________ _____________ | | | | | | | | |----------------| vIOMMU |<---| vDEVICE |<----| | | | | | |_____________| | | | | | | | | | | [1] | | [4] | [2] | | | ______ | | _____________ _|______ | | | | | | [3] | | | | | | | | | IOAS |<---|(HWPT_PAGING)|<---| HWPT_NESTED |<--| DEVICE | | | | |______| |_____________| |_____________| |________| | | | | | | | | |______|________|______________|__________________|_______________|_____| | | | | | ______v_____ | ______v_____ ______v_____ ___v__ | struct | | PFN | (paging) | | (nested) | |struct| |iommu_device| |------>|iommu_domain|<----|iommu_domain|<----|device| |____________| storage|____________| |____________| |______|h]hX _______________________________________________________________________ | iommufd (HWPT_PAGING only) | | | | [1] [3] [2] | | ________________ _____________ ________ | | | | | | | | | | | IOAS |<---| HWPT_PAGING |<---------------------| DEVICE | | | |________________| |_____________| |________| | | | | | | |_________|____________________|__________________________________|_____| | | | | ______v_____ ___v__ | PFN storage | (paging) | |struct| |------------>|iommu_domain|<-----------------------|device| |____________| |______| _______________________________________________________________________ | iommufd (with HWPT_NESTED) | | | | [1] [3] [4] [2] | | ________________ _____________ _____________ ________ | | | | | | | | | | | | | IOAS |<---| HWPT_PAGING |<---| HWPT_NESTED |<--| DEVICE | | | |________________| |_____________| |_____________| |________| | | | | | | | |_________|____________________|__________________|_______________|_____| | | | | | ______v_____ ______v_____ ___v__ | PFN storage | (paging) | | (nested) | |struct| |------------>|iommu_domain|<----|iommu_domain|<----|device| |____________| |____________| |______| _______________________________________________________________________ | iommufd (with vIOMMU/vDEVICE) | | | | [5] [6] | | _____________ _____________ | | | | | | | | |----------------| vIOMMU |<---| vDEVICE |<----| | | | | | |_____________| | | | | | | | | | | [1] | | [4] | [2] | | | ______ | | _____________ _|______ | | | | | | [3] | | | | | | | | | IOAS |<---|(HWPT_PAGING)|<---| HWPT_NESTED |<--| DEVICE | | | | |______| |_____________| |_____________| |________| | | | | | | | | |______|________|______________|__________________|_______________|_____| | | | | | ______v_____ | ______v_____ ______v_____ ___v__ | struct | | PFN | (paging) | | (nested) | |struct| |iommu_device| |------>|iommu_domain|<----|iommu_domain|<----|device| |____________| storage|____________| |____________| |______|}hjsbah}(h]h ]h"]h$]h&]hhuh1jhhhKhjhhubhenumerated_list)}(hhh](j)}(hX+IOMMUFD_OBJ_IOAS is created via the IOMMU_IOAS_ALLOC uAPI. An iommufd can hold multiple IOAS objects. IOAS is the most generic object and does not expose interfaces that are specific to single IOMMU drivers. All operations on the IOAS must operate equally on each of the iommu_domains inside of it. h]h)}(hX*IOMMUFD_OBJ_IOAS is created via the IOMMU_IOAS_ALLOC uAPI. An iommufd can hold multiple IOAS objects. IOAS is the most generic object and does not expose interfaces that are specific to single IOMMU drivers. All operations on the IOAS must operate equally on each of the iommu_domains inside of it.h]hX*IOMMUFD_OBJ_IOAS is created via the IOMMU_IOAS_ALLOC uAPI. An iommufd can hold multiple IOAS objects. IOAS is the most generic object and does not expose interfaces that are specific to single IOMMU drivers. All operations on the IOAS must operate equally on each of the iommu_domains inside of it.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjubah}(h]h ]h"]h$]h&]uh1jhjhhhhhNubj)}(hXIOMMUFD_OBJ_DEVICE is created when an external driver calls the IOMMUFD kAPI to bind a device to an iommufd. The driver is expected to implement a set of ioctls to allow userspace to initiate the binding operation. Successful completion of this operation establishes the desired DMA ownership over the device. The driver must also set the driver_managed_dma flag and must not touch the device until this operation succeeds. h]h)}(hXIOMMUFD_OBJ_DEVICE is created when an external driver calls the IOMMUFD kAPI to bind a device to an iommufd. The driver is expected to implement a set of ioctls to allow userspace to initiate the binding operation. Successful completion of this operation establishes the desired DMA ownership over the device. The driver must also set the driver_managed_dma flag and must not touch the device until this operation succeeds.h]hXIOMMUFD_OBJ_DEVICE is created when an external driver calls the IOMMUFD kAPI to bind a device to an iommufd. The driver is expected to implement a set of ioctls to allow userspace to initiate the binding operation. Successful completion of this operation establishes the desired DMA ownership over the device. The driver must also set the driver_managed_dma flag and must not touch the device until this operation succeeds.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjubah}(h]h ]h"]h$]h&]uh1jhjhhhhhNubj)}(hXIOMMUFD_OBJ_HWPT_PAGING can be created in two ways: * IOMMUFD_OBJ_HWPT_PAGING is automatically created when an external driver calls the IOMMUFD kAPI to attach a bound device to an IOAS. Similarly the external driver uAPI allows userspace to initiate the attaching operation. If a compatible member HWPT_PAGING object exists in the IOAS's HWPT_PAGING list, then it will be reused. Otherwise a new HWPT_PAGING that represents an iommu_domain to userspace will be created, and then added to the list. Successful completion of this operation sets up the linkages among IOAS, device and iommu_domain. Once this completes the device could do DMA. * IOMMUFD_OBJ_HWPT_PAGING can be manually created via the IOMMU_HWPT_ALLOC uAPI, provided an ioas_id via @pt_id to associate the new HWPT_PAGING to the corresponding IOAS object. The benefit of this manual allocation is to allow allocation flags (defined in enum iommufd_hwpt_alloc_flags), e.g. it allocates a nesting parent HWPT_PAGING if the IOMMU_HWPT_ALLOC_NEST_PARENT flag is set. h](h)}(h3IOMMUFD_OBJ_HWPT_PAGING can be created in two ways:h]h3IOMMUFD_OBJ_HWPT_PAGING can be created in two ways:}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjubj)}(hhh](j)}(hXLIOMMUFD_OBJ_HWPT_PAGING is automatically created when an external driver calls the IOMMUFD kAPI to attach a bound device to an IOAS. Similarly the external driver uAPI allows userspace to initiate the attaching operation. If a compatible member HWPT_PAGING object exists in the IOAS's HWPT_PAGING list, then it will be reused. Otherwise a new HWPT_PAGING that represents an iommu_domain to userspace will be created, and then added to the list. Successful completion of this operation sets up the linkages among IOAS, device and iommu_domain. Once this completes the device could do DMA. h]h)}(hXKIOMMUFD_OBJ_HWPT_PAGING is automatically created when an external driver calls the IOMMUFD kAPI to attach a bound device to an IOAS. Similarly the external driver uAPI allows userspace to initiate the attaching operation. If a compatible member HWPT_PAGING object exists in the IOAS's HWPT_PAGING list, then it will be reused. Otherwise a new HWPT_PAGING that represents an iommu_domain to userspace will be created, and then added to the list. Successful completion of this operation sets up the linkages among IOAS, device and iommu_domain. Once this completes the device could do DMA.h]hXMIOMMUFD_OBJ_HWPT_PAGING is automatically created when an external driver calls the IOMMUFD kAPI to attach a bound device to an IOAS. Similarly the external driver uAPI allows userspace to initiate the attaching operation. If a compatible member HWPT_PAGING object exists in the IOAS’s HWPT_PAGING list, then it will be reused. Otherwise a new HWPT_PAGING that represents an iommu_domain to userspace will be created, and then added to the list. Successful completion of this operation sets up the linkages among IOAS, device and iommu_domain. Once this completes the device could do DMA.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhj ubah}(h]h ]h"]h$]h&]uh1jhj ubj)}(hXIOMMUFD_OBJ_HWPT_PAGING can be manually created via the IOMMU_HWPT_ALLOC uAPI, provided an ioas_id via @pt_id to associate the new HWPT_PAGING to the corresponding IOAS object. The benefit of this manual allocation is to allow allocation flags (defined in enum iommufd_hwpt_alloc_flags), e.g. it allocates a nesting parent HWPT_PAGING if the IOMMU_HWPT_ALLOC_NEST_PARENT flag is set. h]h)}(hXIOMMUFD_OBJ_HWPT_PAGING can be manually created via the IOMMU_HWPT_ALLOC uAPI, provided an ioas_id via @pt_id to associate the new HWPT_PAGING to the corresponding IOAS object. The benefit of this manual allocation is to allow allocation flags (defined in enum iommufd_hwpt_alloc_flags), e.g. it allocates a nesting parent HWPT_PAGING if the IOMMU_HWPT_ALLOC_NEST_PARENT flag is set.h]hXIOMMUFD_OBJ_HWPT_PAGING can be manually created via the IOMMU_HWPT_ALLOC uAPI, provided an ioas_id via @pt_id to associate the new HWPT_PAGING to the corresponding IOAS object. The benefit of this manual allocation is to allow allocation flags (defined in enum iommufd_hwpt_alloc_flags), e.g. it allocates a nesting parent HWPT_PAGING if the IOMMU_HWPT_ALLOC_NEST_PARENT flag is set.}(hj)hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhj%ubah}(h]h ]h"]h$]h&]uh1jhj ubeh}(h]h ]h"]h$]h&]jjuh1jhhhKhjubeh}(h]h ]h"]h$]h&]uh1jhjhhhNhNubj)}(hXIOMMUFD_OBJ_HWPT_NESTED can be only manually created via the IOMMU_HWPT_ALLOC uAPI, provided an hwpt_id or a viommu_id of a vIOMMU object encapsulating a nesting parent HWPT_PAGING via @pt_id to associate the new HWPT_NESTED object to the corresponding HWPT_PAGING object. The associating HWPT_PAGING object must be a nesting parent manually allocated via the same uAPI previously with an IOMMU_HWPT_ALLOC_NEST_PARENT flag, otherwise the allocation will fail. The allocation will be further validated by the IOMMU driver to ensure that the nesting parent domain and the nested domain being allocated are compatible. Successful completion of this operation sets up linkages among IOAS, device, and iommu_domains. Once this completes the device could do DMA via a 2-stage translation, a.k.a nested translation. Note that multiple HWPT_NESTED objects can be allocated by (and then associated to) the same nesting parent. .. note:: Either a manual IOMMUFD_OBJ_HWPT_PAGING or an IOMMUFD_OBJ_HWPT_NESTED is created via the same IOMMU_HWPT_ALLOC uAPI. The difference is at the type of the object passed in via the @pt_id field of struct iommufd_hwpt_alloc. h](h)}(hXIOMMUFD_OBJ_HWPT_NESTED can be only manually created via the IOMMU_HWPT_ALLOC uAPI, provided an hwpt_id or a viommu_id of a vIOMMU object encapsulating a nesting parent HWPT_PAGING via @pt_id to associate the new HWPT_NESTED object to the corresponding HWPT_PAGING object. The associating HWPT_PAGING object must be a nesting parent manually allocated via the same uAPI previously with an IOMMU_HWPT_ALLOC_NEST_PARENT flag, otherwise the allocation will fail. The allocation will be further validated by the IOMMU driver to ensure that the nesting parent domain and the nested domain being allocated are compatible. Successful completion of this operation sets up linkages among IOAS, device, and iommu_domains. Once this completes the device could do DMA via a 2-stage translation, a.k.a nested translation. Note that multiple HWPT_NESTED objects can be allocated by (and then associated to) the same nesting parent.h]hXIOMMUFD_OBJ_HWPT_NESTED can be only manually created via the IOMMU_HWPT_ALLOC uAPI, provided an hwpt_id or a viommu_id of a vIOMMU object encapsulating a nesting parent HWPT_PAGING via @pt_id to associate the new HWPT_NESTED object to the corresponding HWPT_PAGING object. The associating HWPT_PAGING object must be a nesting parent manually allocated via the same uAPI previously with an IOMMU_HWPT_ALLOC_NEST_PARENT flag, otherwise the allocation will fail. The allocation will be further validated by the IOMMU driver to ensure that the nesting parent domain and the nested domain being allocated are compatible. Successful completion of this operation sets up linkages among IOAS, device, and iommu_domains. Once this completes the device could do DMA via a 2-stage translation, a.k.a nested translation. Note that multiple HWPT_NESTED objects can be allocated by (and then associated to) the same nesting parent.}(hjMhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjIubj))}(hEither a manual IOMMUFD_OBJ_HWPT_PAGING or an IOMMUFD_OBJ_HWPT_NESTED is created via the same IOMMU_HWPT_ALLOC uAPI. The difference is at the type of the object passed in via the @pt_id field of struct iommufd_hwpt_alloc.h]h)}(hEither a manual IOMMUFD_OBJ_HWPT_PAGING or an IOMMUFD_OBJ_HWPT_NESTED is created via the same IOMMU_HWPT_ALLOC uAPI. The difference is at the type of the object passed in via the @pt_id field of struct iommufd_hwpt_alloc.h]hEither a manual IOMMUFD_OBJ_HWPT_PAGING or an IOMMUFD_OBJ_HWPT_NESTED is created via the same IOMMU_HWPT_ALLOC uAPI. The difference is at the type of the object passed in via the @pt_id field of struct iommufd_hwpt_alloc.}(hj_hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhj[ubah}(h]h ]h"]h$]h&]uh1j(hjIubeh}(h]h ]h"]h$]h&]uh1jhjhhhNhNubj)}(hXJIOMMUFD_OBJ_VIOMMU can be only manually created via the IOMMU_VIOMMU_ALLOC uAPI, provided a dev_id (for the device's physical IOMMU to back the vIOMMU) and an hwpt_id (to associate the vIOMMU to a nesting parent HWPT_PAGING). The iommufd core will link the vIOMMU object to the struct iommu_device that the struct device is behind. And an IOMMU driver can implement a viommu_alloc op to allocate its own vIOMMU data structure embedding the core-level structure iommufd_viommu and some driver-specific data. If necessary, the driver can also configure its HW virtualization feature for that vIOMMU (and thus for the VM). Successful completion of this operation sets up the linkages between the vIOMMU object and the HWPT_PAGING, then this vIOMMU object can be used as a nesting parent object to allocate an HWPT_NESTED object described above. h]h)}(hXIIOMMUFD_OBJ_VIOMMU can be only manually created via the IOMMU_VIOMMU_ALLOC uAPI, provided a dev_id (for the device's physical IOMMU to back the vIOMMU) and an hwpt_id (to associate the vIOMMU to a nesting parent HWPT_PAGING). The iommufd core will link the vIOMMU object to the struct iommu_device that the struct device is behind. And an IOMMU driver can implement a viommu_alloc op to allocate its own vIOMMU data structure embedding the core-level structure iommufd_viommu and some driver-specific data. If necessary, the driver can also configure its HW virtualization feature for that vIOMMU (and thus for the VM). Successful completion of this operation sets up the linkages between the vIOMMU object and the HWPT_PAGING, then this vIOMMU object can be used as a nesting parent object to allocate an HWPT_NESTED object described above.h]hXKIOMMUFD_OBJ_VIOMMU can be only manually created via the IOMMU_VIOMMU_ALLOC uAPI, provided a dev_id (for the device’s physical IOMMU to back the vIOMMU) and an hwpt_id (to associate the vIOMMU to a nesting parent HWPT_PAGING). The iommufd core will link the vIOMMU object to the struct iommu_device that the struct device is behind. And an IOMMU driver can implement a viommu_alloc op to allocate its own vIOMMU data structure embedding the core-level structure iommufd_viommu and some driver-specific data. If necessary, the driver can also configure its HW virtualization feature for that vIOMMU (and thus for the VM). Successful completion of this operation sets up the linkages between the vIOMMU object and the HWPT_PAGING, then this vIOMMU object can be used as a nesting parent object to allocate an HWPT_NESTED object described above.}(hj}hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjyubah}(h]h ]h"]h$]h&]uh1jhjhhhhhNubj)}(hXhIOMMUFD_OBJ_VDEVICE can be only manually created via the IOMMU_VDEVICE_ALLOC uAPI, provided a viommu_id for an iommufd_viommu object and a dev_id for an iommufd_device object. The vDEVICE object will be the binding between these two parent objects. Another @virt_id will be also set via the uAPI providing the iommufd core an index to store the vDEVICE object to a vDEVICE array per vIOMMU. If necessary, the IOMMU driver may choose to implement a vdevce_alloc op to init its HW for virtualization feature related to a vDEVICE. Successful completion of this operation sets up the linkages between vIOMMU and device. h]h)}(hXgIOMMUFD_OBJ_VDEVICE can be only manually created via the IOMMU_VDEVICE_ALLOC uAPI, provided a viommu_id for an iommufd_viommu object and a dev_id for an iommufd_device object. The vDEVICE object will be the binding between these two parent objects. Another @virt_id will be also set via the uAPI providing the iommufd core an index to store the vDEVICE object to a vDEVICE array per vIOMMU. If necessary, the IOMMU driver may choose to implement a vdevce_alloc op to init its HW for virtualization feature related to a vDEVICE. Successful completion of this operation sets up the linkages between vIOMMU and device.h]hXgIOMMUFD_OBJ_VDEVICE can be only manually created via the IOMMU_VDEVICE_ALLOC uAPI, provided a viommu_id for an iommufd_viommu object and a dev_id for an iommufd_device object. The vDEVICE object will be the binding between these two parent objects. Another @virt_id will be also set via the uAPI providing the iommufd core an index to store the vDEVICE object to a vDEVICE array per vIOMMU. If necessary, the IOMMU driver may choose to implement a vdevce_alloc op to init its HW for virtualization feature related to a vDEVICE. Successful completion of this operation sets up the linkages between vIOMMU and device.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjubah}(h]h ]h"]h$]h&]uh1jhjhhhhhNubeh}(h]h ]h"]h$]h&]enumtypearabicprefixhsuffix.uh1jhjhhhhhKubh)}(hA device can only bind to an iommufd due to DMA ownership claim and attach to at most one IOAS object (no support of PASID yet).h]hA device can only bind to an iommufd due to DMA ownership claim and attach to at most one IOAS object (no support of PASID yet).}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjhhubeh}(h]user-visible-objectsah ]h"]user visible objectsah$]h&]uh1hhjhhhhhKubh)}(hhh](h)}(hKernel Datastructureh]hKernel Datastructure}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhhhhhMubh)}(hhjhhubh)}(hAn io_pagetable is composed of iopt_areas pointing at iopt_pages, along with a list of iommu_domains that mirror the IOVA to PFN map.h]hAn io_pagetable is composed of iopt_areas pointing at iopt_pages, along with a list of iommu_domains that mirror the IOVA to PFN map.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMBhjhhubh)}(hMultiple io_pagetable-s, through their iopt_area-s, can share a single iopt_pages which avoids multi-pinning and double accounting of page consumption.h]hMultiple io_pagetable-s, through their iopt_area-s, can share a single iopt_pages which avoids multi-pinning and double accounting of page consumption.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMEhjhhubh)}(hiommufd_ioas is shareable between subsystems, e.g. VFIO and VDPA, as long as devices managed by different subsystems are bound to a same iommufd.h]hiommufd_ioas is shareable between subsystems, e.g. VFIO and VDPA, as long as devices managed by different subsystems are bound to a same iommufd.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMIhjhhubeh}(h]kernel-datastructureah ]h"]kernel datastructureah$]h&]uh1hhjhhhhhMubeh}(h] key-conceptsah ]h"] key conceptsah$]h&]uh1hhhhhhhhKubh)}(hhh](h)}(hIOMMUFD User APIh]hIOMMUFD User API}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhhhhhMMubhtarget)}(h.. _General ioctl format:h]h}(h]h ]h"]h$]h&]refidgeneral-ioctl-formatuh1j*hKhjhhhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hubh)}(h**General ioctl format**h]hstrong)}(hj;h]hGeneral ioctl format}(hj?hhhNhNubah}(h]h ]h"]h$]h&]uh1j=hj9ubah}(h]j7ah ]h"]general ioctl formatah$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhKhjhhexpect_referenced_by_name}jPj,sexpect_referenced_by_id}j7j,subh)}(hX{The ioctl interface follows a general format to allow for extensibility. Each ioctl is passed in a structure pointer as the argument providing the size of the structure in the first u32. The kernel checks that any structure space beyond what it understands is 0. This allows userspace to use the backward compatible portion while consistently using the newer, larger, structures.h]hX{The ioctl interface follows a general format to allow for extensibility. Each ioctl is passed in a structure pointer as the argument providing the size of the structure in the first u32. The kernel checks that any structure space beyond what it understands is 0. This allows userspace to use the backward compatible portion while consistently using the newer, larger, structures.}(hjXhhhNhNubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhK hjhhubh)}(h0ioctls use a standard meaning for common errnos:h]h0ioctls use a standard meaning for common errnos:}(hjghhhNhNubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhKhjhhubh block_quote)}(hX- ENOTTY: The IOCTL number itself is not supported at all - E2BIG: The IOCTL number is supported, but the provided structure has non-zero in a part the kernel does not understand. - EOPNOTSUPP: The IOCTL number is supported, and the structure is understood, however a known field has a value the kernel does not understand or support. - EINVAL: Everything about the IOCTL was understood, but a field is not correct. - ENOENT: An ID or IOVA provided does not exist. - ENOMEM: Out of memory. - EOVERFLOW: Mathematics overflowed. h]j)}(hhh](j)}(h7ENOTTY: The IOCTL number itself is not supported at allh]h)}(hjh]h7ENOTTY: The IOCTL number itself is not supported at all}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhKhjubah}(h]h ]h"]h$]h&]uh1jhj|ubj)}(hwE2BIG: The IOCTL number is supported, but the provided structure has non-zero in a part the kernel does not understand.h]h)}(hwE2BIG: The IOCTL number is supported, but the provided structure has non-zero in a part the kernel does not understand.h]hwE2BIG: The IOCTL number is supported, but the provided structure has non-zero in a part the kernel does not understand.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhKhjubah}(h]h ]h"]h$]h&]uh1jhj|ubj)}(hEOPNOTSUPP: The IOCTL number is supported, and the structure is understood, however a known field has a value the kernel does not understand or support.h]h)}(hEOPNOTSUPP: The IOCTL number is supported, and the structure is understood, however a known field has a value the kernel does not understand or support.h]hEOPNOTSUPP: The IOCTL number is supported, and the structure is understood, however a known field has a value the kernel does not understand or support.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhKhjubah}(h]h ]h"]h$]h&]uh1jhj|ubj)}(hNEINVAL: Everything about the IOCTL was understood, but a field is not correct.h]h)}(hNEINVAL: Everything about the IOCTL was understood, but a field is not correct.h]hNEINVAL: Everything about the IOCTL was understood, but a field is not correct.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhKhjubah}(h]h ]h"]h$]h&]uh1jhj|ubj)}(h.ENOENT: An ID or IOVA provided does not exist.h]h)}(hjh]h.ENOENT: An ID or IOVA provided does not exist.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhKhjubah}(h]h ]h"]h$]h&]uh1jhj|ubj)}(hENOMEM: Out of memory.h]h)}(hjh]hENOMEM: Out of memory.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhKhjubah}(h]h ]h"]h$]h&]uh1jhj|ubj)}(h#EOVERFLOW: Mathematics overflowed. h]h)}(h"EOVERFLOW: Mathematics overflowed.h]h"EOVERFLOW: Mathematics overflowed.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhKhjubah}(h]h ]h"]h$]h&]uh1jhj|ubeh}(h]h ]h"]h$]h&]jjuh1jhjhKhjxubah}(h]h ]h"]h$]h&]uh1jvhjhKhjhhubh)}(h5As well as additional errnos, within specific ioctls.h]h5As well as additional errnos, within specific ioctls.}(hj7hhhNhNubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhK!hjhhubhindex)}(hhh]h}(h]h ]h"]h$]h&]entries](singleiommu_destroy (C struct)c.iommu_destroyhNtauh1jFhjhhhj8hNubhdesc)}(hhh](hdesc_signature)}(h iommu_destroyh]hdesc_signature_line)}(hstruct iommu_destroyh](hdesc_sig_keyword)}(hstructh]hstruct}(hjjhhhNhNubah}(h]h ]kah"]h$]h&]uh1jhhjdhhhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhK&ubhdesc_sig_space)}(h h]h }(hj|hhhNhNubah}(h]h ]wah"]h$]h&]uh1jzhjdhhhjyhK&ubh desc_name)}(h iommu_destroyh]h desc_sig_name)}(hj`h]h iommu_destroy}(hjhhhNhNubah}(h]h ]nah"]h$]h&]uh1jhjubah}(h]h ](sig-namedescnameeh"]h$]h&]hhuh1jhjdhhhjyhK&ubeh}(h]h ]h"]h$]h&]hhƌ add_permalinkuh1jbsphinx_line_type declaratorhj^hhhjyhK&ubah}(h]jUah ](sig sig-objecteh"]h$]h&] is_multiline _toc_parts) _toc_namehuh1j\hjyhK&hjYhhubh desc_content)}(hhh]h)}(hioctl(IOMMU_DESTROY)h]hioctl(IOMMU_DESTROY)}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhK?hjhhubah}(h]h ]h"]h$]h&]uh1jhjYhhhjyhK&ubeh}(h]h ](cstructeh"]h$]h&]domainjobjtypejdesctypejnoindex noindexentrynocontentsentryuh1jWhhhjhj8hNubh container)}(h**Definition**:: struct iommu_destroy { __u32 size; __u32 id; }; **Members** ``size`` sizeof(struct iommu_destroy) ``id`` iommufd object ID to destroy. Can be any destroyable object type.h](h)}(h**Definition**::h](j>)}(h**Definition**h]h Definition}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j=hjubh:}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhKChjubj)}(h7struct iommu_destroy { __u32 size; __u32 id; };h]h7struct iommu_destroy { __u32 size; __u32 id; };}hj sbah}(h]h ]h"]h$]h&]hhuh1jhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhKEhjubh)}(h **Members**h]j>)}(hj h]hMembers}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1j=hj ubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhKJhjubhdefinition_list)}(hhh](hdefinition_list_item)}(h&``size`` sizeof(struct iommu_destroy) h](hterm)}(h``size``h]hliteral)}(hj> h]hsize}(hjB hhhNhNubah}(h]h ]h"]h$]h&]uh1j@ hj< ubah}(h]h ]h"]h$]h&]uh1j: hc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhKAhj6 ubh definition)}(hhh]h)}(hsizeof(struct iommu_destroy)h]hsizeof(struct iommu_destroy)}(hj[ hhhNhNubah}(h]h ]h"]h$]h&]uh1hhjU hKAhjX ubah}(h]h ]h"]h$]h&]uh1jV hj6 ubeh}(h]h ]h"]h$]h&]uh1j4 hjU hKAhj1 ubj5 )}(hH``id`` iommufd object ID to destroy. Can be any destroyable object type.h](j; )}(h``id``h]jA )}(hj{ h]hid}(hj} hhhNhNubah}(h]h ]h"]h$]h&]uh1j@ hjy ubah}(h]h ]h"]h$]h&]uh1j: hc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhKAhju ubjW )}(hhh]h)}(hAiommufd object ID to destroy. Can be any destroyable object type.h]hAiommufd object ID to destroy. Can be any destroyable object type.}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhKBhj ubah}(h]h ]h"]h$]h&]uh1jV hju ubeh}(h]h ]h"]h$]h&]uh1j4 hj hKAhj1 ubeh}(h]h ]h"]h$]h&]uh1j/ hjubeh}(h]h ] kernelindentah"]h$]h&]uh1jhjhhhj8hNubh)}(h**Description**h]j>)}(hj h]h Description}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1j=hj ubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhKEhjhhubh)}(h'Destroy any object held within iommufd.h]h'Destroy any object held within iommufd.}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhKBhjhhubjG)}(hhh]h}(h]h ]h"]h$]h&]entries](jSiommu_ioas_alloc (C struct)c.iommu_ioas_allochNtauh1jFhjhhhj8hNubjX)}(hhh](j])}(hiommu_ioas_alloch]jc)}(hstruct iommu_ioas_alloch](ji)}(hjlh]hstruct}(hj hhhNhNubah}(h]h ]juah"]h$]h&]uh1jhhj hhhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhKGubj{)}(h h]h }(hj hhhNhNubah}(h]h ]jah"]h$]h&]uh1jzhj hhhj hKGubj)}(hiommu_ioas_alloch]j)}(hj h]hiommu_ioas_alloc}(hj hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj ubah}(h]h ](jjeh"]h$]h&]hhuh1jhj hhhj hKGubeh}(h]h ]h"]h$]h&]hhjuh1jbjjhj hhhj hKGubah}(h]j ah ](jjeh"]h$]h&]jj)jhuh1j\hj hKGhj hhubj)}(hhh]h)}(hioctl(IOMMU_IOAS_ALLOC)h]hioctl(IOMMU_IOAS_ALLOC)}(hj> hhhNhNubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhKLhj; hhubah}(h]h ]h"]h$]h&]uh1jhj hhhj hKGubeh}(h]h ](jstructeh"]h$]h&]jjjjV jjV jjjuh1jWhhhjhj8hNubj)}(h**Definition**:: struct iommu_ioas_alloc { __u32 size; __u32 flags; __u32 out_ioas_id; }; **Members** ``size`` sizeof(struct iommu_ioas_alloc) ``flags`` Must be 0 ``out_ioas_id`` Output IOAS ID for the allocated objecth](h)}(h**Definition**::h](j>)}(h**Definition**h]h Definition}(hjb hhhNhNubah}(h]h ]h"]h$]h&]uh1j=hj^ ubh:}(hj^ hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhKPhjZ ubj)}(hTstruct iommu_ioas_alloc { __u32 size; __u32 flags; __u32 out_ioas_id; };h]hTstruct iommu_ioas_alloc { __u32 size; __u32 flags; __u32 out_ioas_id; };}hj{ sbah}(h]h ]h"]h$]h&]hhuh1jhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhKRhjZ ubh)}(h **Members**h]j>)}(hj h]hMembers}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1j=hj ubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhKXhjZ ubj0 )}(hhh](j5 )}(h)``size`` sizeof(struct iommu_ioas_alloc) h](j; )}(h``size``h]jA )}(hj h]hsize}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1j@ hj ubah}(h]h ]h"]h$]h&]uh1j: hc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhKNhj ubjW )}(hhh]h)}(hsizeof(struct iommu_ioas_alloc)h]hsizeof(struct iommu_ioas_alloc)}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj hKNhj ubah}(h]h ]h"]h$]h&]uh1jV hj ubeh}(h]h ]h"]h$]h&]uh1j4 hj hKNhj ubj5 )}(h``flags`` Must be 0 h](j; )}(h ``flags``h]jA )}(hj h]hflags}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1j@ hj ubah}(h]h ]h"]h$]h&]uh1j: hc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhKOhj ubjW )}(hhh]h)}(h Must be 0h]h Must be 0}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj hKOhj ubah}(h]h ]h"]h$]h&]uh1jV hj ubeh}(h]h ]h"]h$]h&]uh1j4 hj hKOhj ubj5 )}(h7``out_ioas_id`` Output IOAS ID for the allocated objecth](j; )}(h``out_ioas_id``h]jA )}(hj h]h out_ioas_id}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1j@ hj ubah}(h]h ]h"]h$]h&]uh1j: hc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhKOhj ubjW )}(hhh]h)}(h'Output IOAS ID for the allocated objecth]h'Output IOAS ID for the allocated object}(hj6 hhhNhNubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhKPhj3 ubah}(h]h ]h"]h$]h&]uh1jV hj ubeh}(h]h ]h"]h$]h&]uh1j4 hj2 hKOhj ubeh}(h]h ]h"]h$]h&]uh1j/ hjZ ubeh}(h]h ] kernelindentah"]h$]h&]uh1jhjhhhj8hNubh)}(h**Description**h]j>)}(hj` h]h Description}(hjb hhhNhNubah}(h]h ]h"]h$]h&]uh1j=hj^ ubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhKShjhhubh)}(h_Allocate an IO Address Space (IOAS) which holds an IO Virtual Address (IOVA) to memory mapping.h]h_Allocate an IO Address Space (IOAS) which holds an IO Virtual Address (IOVA) to memory mapping.}(hjv hhhNhNubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhKPhjhhubjG)}(hhh]h}(h]h ]h"]h$]h&]entries](jSiommu_iova_range (C struct)c.iommu_iova_rangehNtauh1jFhjhhhj8hNubjX)}(hhh](j])}(hiommu_iova_rangeh]jc)}(hstruct iommu_iova_rangeh](ji)}(hjlh]hstruct}(hj hhhNhNubah}(h]h ]juah"]h$]h&]uh1jhhj hhhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhKVubj{)}(h h]h }(hj hhhNhNubah}(h]h ]jah"]h$]h&]uh1jzhj hhhj hKVubj)}(hiommu_iova_rangeh]j)}(hj h]hiommu_iova_range}(hj hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj ubah}(h]h ](jjeh"]h$]h&]hhuh1jhj hhhj hKVubeh}(h]h ]h"]h$]h&]hhjuh1jbjjhj hhhj hKVubah}(h]j ah ](jjeh"]h$]h&]jj)jhuh1j\hj hKVhj hhubj)}(hhh]h)}(hioctl(IOMMU_IOVA_RANGE)h]hioctl(IOMMU_IOVA_RANGE)}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhK\hj hhubah}(h]h ]h"]h$]h&]uh1jhj hhhj hKVubeh}(h]h ](jstructeh"]h$]h&]jjjj jj jjjuh1jWhhhjhj8hNubj)}(h**Definition**:: struct iommu_iova_range { __aligned_u64 start; __aligned_u64 last; }; **Members** ``start`` First IOVA ``last`` Inclusive last IOVAh](h)}(h**Definition**::h](j>)}(h**Definition**h]h Definition}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1j=hj ubh:}(hj hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhK`hj ubj)}(hMstruct iommu_iova_range { __aligned_u64 start; __aligned_u64 last; };h]hMstruct iommu_iova_range { __aligned_u64 start; __aligned_u64 last; };}hj sbah}(h]h ]h"]h$]h&]hhuh1jhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhKbhj ubh)}(h **Members**h]j>)}(hj. h]hMembers}(hj0 hhhNhNubah}(h]h ]h"]h$]h&]uh1j=hj, ubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhKghj ubj0 )}(hhh](j5 )}(h``start`` First IOVA h](j; )}(h ``start``h]jA )}(hjM h]hstart}(hjO hhhNhNubah}(h]h ]h"]h$]h&]uh1j@ hjK ubah}(h]h ]h"]h$]h&]uh1j: hc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhK^hjG ubjW )}(hhh]h)}(h First IOVAh]h First IOVA}(hjf hhhNhNubah}(h]h ]h"]h$]h&]uh1hhjb hK^hjc ubah}(h]h ]h"]h$]h&]uh1jV hjG ubeh}(h]h ]h"]h$]h&]uh1j4 hjb hK^hjD ubj5 )}(h``last`` Inclusive last IOVAh](j; )}(h``last``h]jA )}(hj h]hlast}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1j@ hj ubah}(h]h ]h"]h$]h&]uh1j: hc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhK^hj ubjW )}(hhh]h)}(hInclusive last IOVAh]hInclusive last IOVA}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhK_hj ubah}(h]h ]h"]h$]h&]uh1jV hj ubeh}(h]h ]h"]h$]h&]uh1j4 hj hK^hjD ubeh}(h]h ]h"]h$]h&]uh1j/ hj ubeh}(h]h ] kernelindentah"]h$]h&]uh1jhjhhhj8hNubh)}(h**Description**h]j>)}(hj h]h Description}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1j=hj ubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhKbhjhhubh)}(hAn interval in IOVA space.h]hAn interval in IOVA space.}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhK_hjhhubjG)}(hhh]h}(h]h ]h"]h$]h&]entries](jS!iommu_ioas_iova_ranges (C struct)c.iommu_ioas_iova_rangeshNtauh1jFhjhhhj8hNubjX)}(hhh](j])}(hiommu_ioas_iova_rangesh]jc)}(hstruct iommu_ioas_iova_rangesh](ji)}(hjlh]hstruct}(hj hhhNhNubah}(h]h ]juah"]h$]h&]uh1jhhj hhhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhKdubj{)}(h h]h }(hj hhhNhNubah}(h]h ]jah"]h$]h&]uh1jzhj hhhj hKdubj)}(hiommu_ioas_iova_rangesh]j)}(hj h]hiommu_ioas_iova_ranges}(hj' hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj# ubah}(h]h ](jjeh"]h$]h&]hhuh1jhj hhhj hKdubeh}(h]h ]h"]h$]h&]hhjuh1jbjjhj hhhj hKdubah}(h]j ah ](jjeh"]h$]h&]jj)jhuh1j\hj hKdhj hhubj)}(hhh]h)}(hioctl(IOMMU_IOAS_IOVA_RANGES)h]hioctl(IOMMU_IOAS_IOVA_RANGES)}(hjI hhhNhNubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhKhhjF hhubah}(h]h ]h"]h$]h&]uh1jhj hhhj hKdubeh}(h]h ](jstructeh"]h$]h&]jjjja jja jjjuh1jWhhhjhj8hNubj)}(hX2**Definition**:: struct iommu_ioas_iova_ranges { __u32 size; __u32 ioas_id; __u32 num_iovas; __u32 __reserved; __aligned_u64 allowed_iovas; __aligned_u64 out_iova_alignment; }; **Members** ``size`` sizeof(struct iommu_ioas_iova_ranges) ``ioas_id`` IOAS ID to read ranges from ``num_iovas`` Input/Output total number of ranges in the IOAS ``__reserved`` Must be 0 ``allowed_iovas`` Pointer to the output array of struct iommu_iova_range ``out_iova_alignment`` Minimum alignment required for mapping IOVAh](h)}(h**Definition**::h](j>)}(h**Definition**h]h Definition}(hjm hhhNhNubah}(h]h ]h"]h$]h&]uh1j=hji ubh:}(hji hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhKlhje ubj)}(hstruct iommu_ioas_iova_ranges { __u32 size; __u32 ioas_id; __u32 num_iovas; __u32 __reserved; __aligned_u64 allowed_iovas; __aligned_u64 out_iova_alignment; };h]hstruct iommu_ioas_iova_ranges { __u32 size; __u32 ioas_id; __u32 num_iovas; __u32 __reserved; __aligned_u64 allowed_iovas; __aligned_u64 out_iova_alignment; };}hj sbah}(h]h ]h"]h$]h&]hhuh1jhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhKnhje ubh)}(h **Members**h]j>)}(hj h]hMembers}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1j=hj ubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhKwhje ubj0 )}(hhh](j5 )}(h/``size`` sizeof(struct iommu_ioas_iova_ranges) h](j; )}(h``size``h]jA )}(hj h]hsize}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1j@ hj ubah}(h]h ]h"]h$]h&]uh1j: hc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhKjhj ubjW )}(hhh]h)}(h%sizeof(struct iommu_ioas_iova_ranges)h]h%sizeof(struct iommu_ioas_iova_ranges)}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj hKjhj ubah}(h]h ]h"]h$]h&]uh1jV hj ubeh}(h]h ]h"]h$]h&]uh1j4 hj hKjhj ubj5 )}(h(``ioas_id`` IOAS ID to read ranges from h](j; )}(h ``ioas_id``h]jA )}(hj h]hioas_id}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1j@ hj ubah}(h]h ]h"]h$]h&]uh1j: hc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhKkhj ubjW )}(hhh]h)}(hIOAS ID to read ranges fromh]hIOAS ID to read ranges from}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhKkhjubah}(h]h ]h"]h$]h&]uh1jV hj ubeh}(h]h ]h"]h$]h&]uh1j4 hjhKkhj ubj5 )}(h>``num_iovas`` Input/Output total number of ranges in the IOAS h](j; )}(h ``num_iovas``h]jA )}(hj(h]h num_iovas}(hj*hhhNhNubah}(h]h ]h"]h$]h&]uh1j@ hj&ubah}(h]h ]h"]h$]h&]uh1j: hc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhKlhj"ubjW )}(hhh]h)}(h/Input/Output total number of ranges in the IOASh]h/Input/Output total number of ranges in the IOAS}(hjAhhhNhNubah}(h]h ]h"]h$]h&]uh1hhj=hKlhj>ubah}(h]h ]h"]h$]h&]uh1jV hj"ubeh}(h]h ]h"]h$]h&]uh1j4 hj=hKlhj ubj5 )}(h``__reserved`` Must be 0 h](j; )}(h``__reserved``h]jA )}(hjah]h __reserved}(hjchhhNhNubah}(h]h ]h"]h$]h&]uh1j@ hj_ubah}(h]h ]h"]h$]h&]uh1j: hc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhKmhj[ubjW )}(hhh]h)}(h Must be 0h]h Must be 0}(hjzhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjvhKmhjwubah}(h]h ]h"]h$]h&]uh1jV hj[ubeh}(h]h ]h"]h$]h&]uh1j4 hjvhKmhj ubj5 )}(hI``allowed_iovas`` Pointer to the output array of struct iommu_iova_range h](j; )}(h``allowed_iovas``h]jA )}(hjh]h allowed_iovas}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j@ hjubah}(h]h ]h"]h$]h&]uh1j: hc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhKnhjubjW )}(hhh]h)}(h6Pointer to the output array of struct iommu_iova_rangeh]h6Pointer to the output array of struct iommu_iova_range}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhKnhjubah}(h]h ]h"]h$]h&]uh1jV hjubeh}(h]h ]h"]h$]h&]uh1j4 hjhKnhj ubj5 )}(hB``out_iova_alignment`` Minimum alignment required for mapping IOVAh](j; )}(h``out_iova_alignment``h]jA )}(hjh]hout_iova_alignment}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j@ hjubah}(h]h ]h"]h$]h&]uh1j: hc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhKnhjubjW )}(hhh]h)}(h+Minimum alignment required for mapping IOVAh]h+Minimum alignment required for mapping IOVA}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhKohjubah}(h]h ]h"]h$]h&]uh1jV hjubeh}(h]h ]h"]h$]h&]uh1j4 hjhKnhj ubeh}(h]h ]h"]h$]h&]uh1j/ hje ubeh}(h]h ] kernelindentah"]h$]h&]uh1jhjhhhj8hNubh)}(h**Description**h]j>)}(hjh]h Description}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j=hjubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhKrhjhhubh)}(hQuery an IOAS for ranges of allowed IOVAs. Mapping IOVA outside these ranges is not allowed. num_iovas will be set to the total number of iovas and the allowed_iovas[] will be filled in as space permits.h]hQuery an IOAS for ranges of allowed IOVAs. Mapping IOVA outside these ranges is not allowed. num_iovas will be set to the total number of iovas and the allowed_iovas[] will be filled in as space permits.}(hj,hhhNhNubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhKohjhhubh)}(hXThe allowed ranges are dependent on the HW path the DMA operation takes, and can change during the lifetime of the IOAS. A fresh empty IOAS will have a full range, and each attached device will narrow the ranges based on that device's HW restrictions. Detaching a device can widen the ranges. Userspace should query ranges after every attach/detach to know what IOVAs are valid for mapping.h]hXThe allowed ranges are dependent on the HW path the DMA operation takes, and can change during the lifetime of the IOAS. A fresh empty IOAS will have a full range, and each attached device will narrow the ranges based on that device’s HW restrictions. Detaching a device can widen the ranges. Userspace should query ranges after every attach/detach to know what IOVAs are valid for mapping.}(hj;hhhNhNubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhKshjhhubh)}(hX*On input num_iovas is the length of the allowed_iovas array. On output it is the total number of iovas filled in. The ioctl will return -EMSGSIZE and set num_iovas to the required value if num_iovas is too small. In this case the caller should allocate a larger output array and re-issue the ioctl.h]hX*On input num_iovas is the length of the allowed_iovas array. On output it is the total number of iovas filled in. The ioctl will return -EMSGSIZE and set num_iovas to the required value if num_iovas is too small. In this case the caller should allocate a larger output array and re-issue the ioctl.}(hjJhhhNhNubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhKzhjhhubh)}(huout_iova_alignment returns the minimum IOVA alignment that can be given to IOMMU_IOAS_MAP/COPY. IOVA's must satisfy::h]hvout_iova_alignment returns the minimum IOVA alignment that can be given to IOMMU_IOAS_MAP/COPY. IOVA’s must satisfy:}(hjYhhhNhNubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhKhjhhubj)}(hZstarting_iova % out_iova_alignment == 0 (starting_iova + length) % out_iova_alignment == 0h]hZstarting_iova % out_iova_alignment == 0 (starting_iova + length) % out_iova_alignment == 0}hjhsbah}(h]h ]h"]h$]h&]hhuh1jhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhKhjhhubh)}(hjout_iova_alignment can be 1 indicating any IOVA is allowed. It cannot be higher than the system PAGE_SIZE.h]hjout_iova_alignment can be 1 indicating any IOVA is allowed. It cannot be higher than the system PAGE_SIZE.}(hjwhhhNhNubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhKhjhhubjG)}(hhh]h}(h]h ]h"]h$]h&]entries](jS!iommu_ioas_allow_iovas (C struct)c.iommu_ioas_allow_iovashNtauh1jFhjhhhj8hNubjX)}(hhh](j])}(hiommu_ioas_allow_iovash]jc)}(hstruct iommu_ioas_allow_iovash](ji)}(hjlh]hstruct}(hjhhhNhNubah}(h]h ]juah"]h$]h&]uh1jhhjhhhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhKubj{)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jzhjhhhjhKubj)}(hiommu_ioas_allow_iovash]j)}(hjh]hiommu_ioas_allow_iovas}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubah}(h]h ](jjeh"]h$]h&]hhuh1jhjhhhjhKubeh}(h]h ]h"]h$]h&]hhjuh1jbjjhjhhhjhKubah}(h]jah ](jjeh"]h$]h&]jj)jhuh1j\hjhKhjhhubj)}(hhh]h)}(hioctl(IOMMU_IOAS_ALLOW_IOVAS)h]hioctl(IOMMU_IOAS_ALLOW_IOVAS)}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhKhjhhubah}(h]h ]h"]h$]h&]uh1jhjhhhjhKubeh}(h]h ](jstructeh"]h$]h&]jjjjjjjjjuh1jWhhhjhj8hNubj)}(hX**Definition**:: struct iommu_ioas_allow_iovas { __u32 size; __u32 ioas_id; __u32 num_iovas; __u32 __reserved; __aligned_u64 allowed_iovas; }; **Members** ``size`` sizeof(struct iommu_ioas_allow_iovas) ``ioas_id`` IOAS ID to allow IOVAs from ``num_iovas`` Input/Output total number of ranges in the IOAS ``__reserved`` Must be 0 ``allowed_iovas`` Pointer to array of struct iommu_iova_rangeh](h)}(h**Definition**::h](j>)}(h**Definition**h]h Definition}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j=hjubh:}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhKhjubj)}(hstruct iommu_ioas_allow_iovas { __u32 size; __u32 ioas_id; __u32 num_iovas; __u32 __reserved; __aligned_u64 allowed_iovas; };h]hstruct iommu_ioas_allow_iovas { __u32 size; __u32 ioas_id; __u32 num_iovas; __u32 __reserved; __aligned_u64 allowed_iovas; };}hjsbah}(h]h ]h"]h$]h&]hhuh1jhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhKhjubh)}(h **Members**h]j>)}(hj/h]hMembers}(hj1hhhNhNubah}(h]h ]h"]h$]h&]uh1j=hj-ubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhKhjubj0 )}(hhh](j5 )}(h/``size`` sizeof(struct iommu_ioas_allow_iovas) h](j; )}(h``size``h]jA )}(hjNh]hsize}(hjPhhhNhNubah}(h]h ]h"]h$]h&]uh1j@ hjLubah}(h]h ]h"]h$]h&]uh1j: hc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhKhjHubjW )}(hhh]h)}(h%sizeof(struct iommu_ioas_allow_iovas)h]h%sizeof(struct iommu_ioas_allow_iovas)}(hjghhhNhNubah}(h]h ]h"]h$]h&]uh1hhjchKhjdubah}(h]h ]h"]h$]h&]uh1jV hjHubeh}(h]h ]h"]h$]h&]uh1j4 hjchKhjEubj5 )}(h(``ioas_id`` IOAS ID to allow IOVAs from h](j; )}(h ``ioas_id``h]jA )}(hjh]hioas_id}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j@ hjubah}(h]h ]h"]h$]h&]uh1j: hc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhKhjubjW )}(hhh]h)}(hIOAS ID to allow IOVAs fromh]hIOAS ID to allow IOVAs from}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhKhjubah}(h]h ]h"]h$]h&]uh1jV hjubeh}(h]h ]h"]h$]h&]uh1j4 hjhKhjEubj5 )}(h>``num_iovas`` Input/Output total number of ranges in the IOAS h](j; )}(h ``num_iovas``h]jA )}(hjh]h num_iovas}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j@ hjubah}(h]h ]h"]h$]h&]uh1j: hc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhKhjubjW )}(hhh]h)}(h/Input/Output total number of ranges in the IOASh]h/Input/Output total number of ranges in the IOAS}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhKhjubah}(h]h ]h"]h$]h&]uh1jV hjubeh}(h]h ]h"]h$]h&]uh1j4 hjhKhjEubj5 )}(h``__reserved`` Must be 0 h](j; )}(h``__reserved``h]jA )}(hjh]h __reserved}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j@ hjubah}(h]h ]h"]h$]h&]uh1j: hc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhKhjubjW )}(hhh]h)}(h Must be 0h]h Must be 0}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhKhjubah}(h]h ]h"]h$]h&]uh1jV hjubeh}(h]h ]h"]h$]h&]uh1j4 hjhKhjEubj5 )}(h=``allowed_iovas`` Pointer to array of struct iommu_iova_rangeh](j; )}(h``allowed_iovas``h]jA )}(hj2h]h allowed_iovas}(hj4hhhNhNubah}(h]h ]h"]h$]h&]uh1j@ hj0ubah}(h]h ]h"]h$]h&]uh1j: hc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhKhj,ubjW )}(hhh]h)}(h+Pointer to array of struct iommu_iova_rangeh]h+Pointer to array of struct iommu_iova_range}(hjKhhhNhNubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhKhjHubah}(h]h ]h"]h$]h&]uh1jV hj,ubeh}(h]h ]h"]h$]h&]uh1j4 hjGhKhjEubeh}(h]h ]h"]h$]h&]uh1j/ hjubeh}(h]h ] kernelindentah"]h$]h&]uh1jhjhhhj8hNubh)}(h**Description**h]j>)}(hjuh]h Description}(hjwhhhNhNubah}(h]h ]h"]h$]h&]uh1j=hjsubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhKhjhhubh)}(hX"Ensure a range of IOVAs are always available for allocation. If this call succeeds then IOMMU_IOAS_IOVA_RANGES will never return a list of IOVA ranges that are narrower than the ranges provided here. This call will fail if IOMMU_IOAS_IOVA_RANGES is currently narrower than the given ranges.h]hX"Ensure a range of IOVAs are always available for allocation. If this call succeeds then IOMMU_IOAS_IOVA_RANGES will never return a list of IOVA ranges that are narrower than the ranges provided here. This call will fail if IOMMU_IOAS_IOVA_RANGES is currently narrower than the given ranges.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhKhjhhubh)}(hX3When an IOAS is first created the IOVA_RANGES will be maximally sized, and as devices are attached the IOVA will narrow based on the device restrictions. When an allowed range is specified any narrowing will be refused, ie device attachment can fail if the device requires limiting within the allowed range.h]hX3When an IOAS is first created the IOVA_RANGES will be maximally sized, and as devices are attached the IOVA will narrow based on the device restrictions. When an allowed range is specified any narrowing will be refused, ie device attachment can fail if the device requires limiting within the allowed range.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhKhjhhubh)}(h}Automatic IOVA allocation is also impacted by this call. MAP will only allocate within the allowed IOVAs if they are present.h]h}Automatic IOVA allocation is also impacted by this call. MAP will only allocate within the allowed IOVAs if they are present.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhKhjhhubh)}(h?This call replaces the entire allowed list with the given list.h]h?This call replaces the entire allowed list with the given list.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhKhjhhubjG)}(hhh]h}(h]h ]h"]h$]h&]entries](jSiommufd_ioas_map_flags (C enum)c.iommufd_ioas_map_flagshNtauh1jFhjhhhj8hNubjX)}(hhh](j])}(hiommufd_ioas_map_flagsh]jc)}(henum iommufd_ioas_map_flagsh](ji)}(henumh]henum}(hjhhhNhNubah}(h]h ]juah"]h$]h&]uh1jhhjhhhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhKubj{)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jzhjhhhjhKubj)}(hiommufd_ioas_map_flagsh]j)}(hjh]hiommufd_ioas_map_flags}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubah}(h]h ](jjeh"]h$]h&]hhuh1jhjhhhjhKubeh}(h]h ]h"]h$]h&]hhjuh1jbjjhjhhhjhKubah}(h]jah ](jjeh"]h$]h&]jj)jhuh1j\hjhKhjhhubj)}(hhh]h)}(hFlags for map and copyh]hFlags for map and copy}(hj#hhhNhNubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhKhj hhubah}(h]h ]h"]h$]h&]uh1jhjhhhjhKubeh}(h]h ](jenumeh"]h$]h&]jjjj;jj;jjjuh1jWhhhjhj8hNubj)}(hX **Constants** ``IOMMU_IOAS_MAP_FIXED_IOVA`` If clear the kernel will compute an appropriate IOVA to place the mapping at ``IOMMU_IOAS_MAP_WRITEABLE`` DMA is allowed to write to this mapping ``IOMMU_IOAS_MAP_READABLE`` DMA is allowed to read from this mappingh](h)}(h **Constants**h]j>)}(hjEh]h Constants}(hjGhhhNhNubah}(h]h ]h"]h$]h&]uh1j=hjCubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhKhj?ubj0 )}(hhh](j5 )}(hk``IOMMU_IOAS_MAP_FIXED_IOVA`` If clear the kernel will compute an appropriate IOVA to place the mapping at h](j; )}(h``IOMMU_IOAS_MAP_FIXED_IOVA``h]jA )}(hjdh]hIOMMU_IOAS_MAP_FIXED_IOVA}(hjfhhhNhNubah}(h]h ]h"]h$]h&]uh1j@ hjbubah}(h]h ]h"]h$]h&]uh1j: hc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhKhj^ubjW )}(hhh]h)}(hLIf clear the kernel will compute an appropriate IOVA to place the mapping ath]hLIf clear the kernel will compute an appropriate IOVA to place the mapping at}(hj}hhhNhNubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhKhjzubah}(h]h ]h"]h$]h&]uh1jV hj^ubeh}(h]h ]h"]h$]h&]uh1j4 hjyhKhj[ubj5 )}(hE``IOMMU_IOAS_MAP_WRITEABLE`` DMA is allowed to write to this mapping h](j; )}(h``IOMMU_IOAS_MAP_WRITEABLE``h]jA )}(hjh]hIOMMU_IOAS_MAP_WRITEABLE}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j@ hjubah}(h]h ]h"]h$]h&]uh1j: hc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhKhjubjW )}(hhh]h)}(h'DMA is allowed to write to this mappingh]h'DMA is allowed to write to this mapping}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhKhjubah}(h]h ]h"]h$]h&]uh1jV hjubeh}(h]h ]h"]h$]h&]uh1j4 hjhKhj[ubj5 )}(hD``IOMMU_IOAS_MAP_READABLE`` DMA is allowed to read from this mappingh](j; )}(h``IOMMU_IOAS_MAP_READABLE``h]jA )}(hjh]hIOMMU_IOAS_MAP_READABLE}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j@ hjubah}(h]h ]h"]h$]h&]uh1j: hc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhKhjubjW )}(hhh]h)}(h(DMA is allowed to read from this mappingh]h(DMA is allowed to read from this mapping}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhKhjubah}(h]h ]h"]h$]h&]uh1jV hjubeh}(h]h ]h"]h$]h&]uh1j4 hjhKhj[ubeh}(h]h ]h"]h$]h&]uh1j/ hj?ubeh}(h]h ] kernelindentah"]h$]h&]uh1jhjhhhj8hNubjG)}(hhh]h}(h]h ]h"]h$]h&]entries](jSiommu_ioas_map (C struct)c.iommu_ioas_maphNtauh1jFhjhhhj8hNubjX)}(hhh](j])}(hiommu_ioas_maph]jc)}(hstruct iommu_ioas_maph](ji)}(hjlh]hstruct}(hj1hhhNhNubah}(h]h ]juah"]h$]h&]uh1jhhj-hhhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhKubj{)}(h h]h }(hj?hhhNhNubah}(h]h ]jah"]h$]h&]uh1jzhj-hhhj>hKubj)}(hiommu_ioas_maph]j)}(hj+h]hiommu_ioas_map}(hjQhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjMubah}(h]h ](jjeh"]h$]h&]hhuh1jhj-hhhj>hKubeh}(h]h ]h"]h$]h&]hhjuh1jbjjhj)hhhj>hKubah}(h]j$ah ](jjeh"]h$]h&]jj)jhuh1j\hj>hKhj&hhubj)}(hhh]h)}(hioctl(IOMMU_IOAS_MAP)h]hioctl(IOMMU_IOAS_MAP)}(hjshhhNhNubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhKhjphhubah}(h]h ]h"]h$]h&]uh1jhj&hhhj>hKubeh}(h]h ](jstructeh"]h$]h&]jjjjjjjjjuh1jWhhhjhj8hNubj)}(hXc**Definition**:: struct iommu_ioas_map { __u32 size; __u32 flags; __u32 ioas_id; __u32 __reserved; __aligned_u64 user_va; __aligned_u64 length; __aligned_u64 iova; }; **Members** ``size`` sizeof(struct iommu_ioas_map) ``flags`` Combination of enum iommufd_ioas_map_flags ``ioas_id`` IOAS ID to change the mapping of ``__reserved`` Must be 0 ``user_va`` Userspace pointer to start mapping from ``length`` Number of bytes to map ``iova`` IOVA the mapping was placed at. If IOMMU_IOAS_MAP_FIXED_IOVA is set then this must be provided as input.h](h)}(h**Definition**::h](j>)}(h**Definition**h]h Definition}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j=hjubh:}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhKhjubj)}(hstruct iommu_ioas_map { __u32 size; __u32 flags; __u32 ioas_id; __u32 __reserved; __aligned_u64 user_va; __aligned_u64 length; __aligned_u64 iova; };h]hstruct iommu_ioas_map { __u32 size; __u32 flags; __u32 ioas_id; __u32 __reserved; __aligned_u64 user_va; __aligned_u64 length; __aligned_u64 iova; };}hjsbah}(h]h ]h"]h$]h&]hhuh1jhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhKhjubh)}(h **Members**h]j>)}(hjh]hMembers}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j=hjubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhKhjubj0 )}(hhh](j5 )}(h'``size`` sizeof(struct iommu_ioas_map) h](j; )}(h``size``h]jA )}(hjh]hsize}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j@ hjubah}(h]h ]h"]h$]h&]uh1j: hc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhKhjubjW )}(hhh]h)}(hsizeof(struct iommu_ioas_map)h]hsizeof(struct iommu_ioas_map)}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhKhjubah}(h]h ]h"]h$]h&]uh1jV hjubeh}(h]h ]h"]h$]h&]uh1j4 hjhKhjubj5 )}(h5``flags`` Combination of enum iommufd_ioas_map_flags h](j; )}(h ``flags``h]jA )}(hjh]hflags}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j@ hjubah}(h]h ]h"]h$]h&]uh1j: hc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhKhjubjW )}(hhh]h)}(h*Combination of enum iommufd_ioas_map_flagsh]h*Combination of enum iommufd_ioas_map_flags}(hj2hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj.hKhj/ubah}(h]h ]h"]h$]h&]uh1jV hjubeh}(h]h ]h"]h$]h&]uh1j4 hj.hKhjubj5 )}(h-``ioas_id`` IOAS ID to change the mapping of h](j; )}(h ``ioas_id``h]jA )}(hjRh]hioas_id}(hjThhhNhNubah}(h]h ]h"]h$]h&]uh1j@ hjPubah}(h]h ]h"]h$]h&]uh1j: hc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhKhjLubjW )}(hhh]h)}(h IOAS ID to change the mapping ofh]h IOAS ID to change the mapping of}(hjkhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjghKhjhubah}(h]h ]h"]h$]h&]uh1jV hjLubeh}(h]h ]h"]h$]h&]uh1j4 hjghKhjubj5 )}(h``__reserved`` Must be 0 h](j; )}(h``__reserved``h]jA )}(hjh]h __reserved}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j@ hjubah}(h]h ]h"]h$]h&]uh1j: hc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhKhjubjW )}(hhh]h)}(h Must be 0h]h Must be 0}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhKhjubah}(h]h ]h"]h$]h&]uh1jV hjubeh}(h]h ]h"]h$]h&]uh1j4 hjhKhjubj5 )}(h4``user_va`` Userspace pointer to start mapping from h](j; )}(h ``user_va``h]jA )}(hjh]huser_va}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j@ hjubah}(h]h ]h"]h$]h&]uh1j: hc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhKhjubjW )}(hhh]h)}(h'Userspace pointer to start mapping fromh]h'Userspace pointer to start mapping from}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhKhjubah}(h]h ]h"]h$]h&]uh1jV hjubeh}(h]h ]h"]h$]h&]uh1j4 hjhKhjubj5 )}(h"``length`` Number of bytes to map h](j; )}(h ``length``h]jA )}(hjh]hlength}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j@ hjubah}(h]h ]h"]h$]h&]uh1j: hc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhKhjubjW )}(hhh]h)}(hNumber of bytes to maph]hNumber of bytes to map}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhKhjubah}(h]h ]h"]h$]h&]uh1jV hjubeh}(h]h ]h"]h$]h&]uh1j4 hjhKhjubj5 )}(hq``iova`` IOVA the mapping was placed at. If IOMMU_IOAS_MAP_FIXED_IOVA is set then this must be provided as input.h](j; )}(h``iova``h]jA )}(hj6h]hiova}(hj8hhhNhNubah}(h]h ]h"]h$]h&]uh1j@ hj4ubah}(h]h ]h"]h$]h&]uh1j: hc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhKhj0ubjW )}(hhh]h)}(hhIOVA the mapping was placed at. If IOMMU_IOAS_MAP_FIXED_IOVA is set then this must be provided as input.h]hhIOVA the mapping was placed at. If IOMMU_IOAS_MAP_FIXED_IOVA is set then this must be provided as input.}(hjOhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjKhKhjLubah}(h]h ]h"]h$]h&]uh1jV hj0ubeh}(h]h ]h"]h$]h&]uh1j4 hjKhKhjubeh}(h]h ]h"]h$]h&]uh1j/ hjubeh}(h]h ] kernelindentah"]h$]h&]uh1jhjhhhj8hNubh)}(h**Description**h]j>)}(hjxh]h Description}(hjzhhhNhNubah}(h]h ]h"]h$]h&]uh1j=hjvubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhKhjhhubh)}(hSet an IOVA mapping from a user pointer. If FIXED_IOVA is specified then the mapping will be established at iova, otherwise a suitable location based on the reserved and allowed lists will be automatically selected and returned in iova.h]hSet an IOVA mapping from a user pointer. If FIXED_IOVA is specified then the mapping will be established at iova, otherwise a suitable location based on the reserved and allowed lists will be automatically selected and returned in iova.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhKhjhhubh)}(hyIf IOMMU_IOAS_MAP_FIXED_IOVA is specified then the iova range must currently be unused, existing IOVA cannot be replaced.h]hyIf IOMMU_IOAS_MAP_FIXED_IOVA is specified then the iova range must currently be unused, existing IOVA cannot be replaced.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhKhjhhubjG)}(hhh]h}(h]h ]h"]h$]h&]entries](jSiommu_ioas_map_file (C struct)c.iommu_ioas_map_filehNtauh1jFhjhhhj8hNubjX)}(hhh](j])}(hiommu_ioas_map_fileh]jc)}(hstruct iommu_ioas_map_fileh](ji)}(hjlh]hstruct}(hjhhhNhNubah}(h]h ]juah"]h$]h&]uh1jhhjhhhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhKubj{)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jzhjhhhjhKubj)}(hiommu_ioas_map_fileh]j)}(hjh]hiommu_ioas_map_file}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubah}(h]h ](jjeh"]h$]h&]hhuh1jhjhhhjhKubeh}(h]h ]h"]h$]h&]hhjuh1jbjjhjhhhjhKubah}(h]jah ](jjeh"]h$]h&]jj)jhuh1j\hjhKhjhhubj)}(hhh]h)}(hioctl(IOMMU_IOAS_MAP_FILE)h]hioctl(IOMMU_IOAS_MAP_FILE)}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhKhjhhubah}(h]h ]h"]h$]h&]uh1jhjhhhjhKubeh}(h]h ](jstructeh"]h$]h&]jjjjjjjjjuh1jWhhhjhj8hNubj)}(hX**Definition**:: struct iommu_ioas_map_file { __u32 size; __u32 flags; __u32 ioas_id; __s32 fd; __aligned_u64 start; __aligned_u64 length; __aligned_u64 iova; }; **Members** ``size`` sizeof(struct iommu_ioas_map_file) ``flags`` same as for iommu_ioas_map ``ioas_id`` same as for iommu_ioas_map ``fd`` the memfd to map ``start`` byte offset from start of file to map from ``length`` same as for iommu_ioas_map ``iova`` same as for iommu_ioas_maph](h)}(h**Definition**::h](j>)}(h**Definition**h]h Definition}(hj+hhhNhNubah}(h]h ]h"]h$]h&]uh1j=hj'ubh:}(hj'hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhKhj#ubj)}(hstruct iommu_ioas_map_file { __u32 size; __u32 flags; __u32 ioas_id; __s32 fd; __aligned_u64 start; __aligned_u64 length; __aligned_u64 iova; };h]hstruct iommu_ioas_map_file { __u32 size; __u32 flags; __u32 ioas_id; __s32 fd; __aligned_u64 start; __aligned_u64 length; __aligned_u64 iova; };}hjDsbah}(h]h ]h"]h$]h&]hhuh1jhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhKhj#ubh)}(h **Members**h]j>)}(hjUh]hMembers}(hjWhhhNhNubah}(h]h ]h"]h$]h&]uh1j=hjSubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhKhj#ubj0 )}(hhh](j5 )}(h,``size`` sizeof(struct iommu_ioas_map_file) h](j; )}(h``size``h]jA )}(hjth]hsize}(hjvhhhNhNubah}(h]h ]h"]h$]h&]uh1j@ hjrubah}(h]h ]h"]h$]h&]uh1j: hc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhKhjnubjW )}(hhh]h)}(h"sizeof(struct iommu_ioas_map_file)h]h"sizeof(struct iommu_ioas_map_file)}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhKhjubah}(h]h ]h"]h$]h&]uh1jV hjnubeh}(h]h ]h"]h$]h&]uh1j4 hjhKhjkubj5 )}(h%``flags`` same as for iommu_ioas_map h](j; )}(h ``flags``h]jA )}(hjh]hflags}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j@ hjubah}(h]h ]h"]h$]h&]uh1j: hc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhKhjubjW )}(hhh]h)}(hsame as for iommu_ioas_maph]hsame as for iommu_ioas_map}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhKhjubah}(h]h ]h"]h$]h&]uh1jV hjubeh}(h]h ]h"]h$]h&]uh1j4 hjhKhjkubj5 )}(h'``ioas_id`` same as for iommu_ioas_map h](j; )}(h ``ioas_id``h]jA )}(hjh]hioas_id}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j@ hjubah}(h]h ]h"]h$]h&]uh1j: hc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhKhjubjW )}(hhh]h)}(hsame as for iommu_ioas_maph]hsame as for iommu_ioas_map}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhKhjubah}(h]h ]h"]h$]h&]uh1jV hjubeh}(h]h ]h"]h$]h&]uh1j4 hjhKhjkubj5 )}(h``fd`` the memfd to map h](j; )}(h``fd``h]jA )}(hjh]hfd}(hj!hhhNhNubah}(h]h ]h"]h$]h&]uh1j@ hjubah}(h]h ]h"]h$]h&]uh1j: hc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhKhjubjW )}(hhh]h)}(hthe memfd to maph]hthe memfd to map}(hj8hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj4hKhj5ubah}(h]h ]h"]h$]h&]uh1jV hjubeh}(h]h ]h"]h$]h&]uh1j4 hj4hKhjkubj5 )}(h5``start`` byte offset from start of file to map from h](j; )}(h ``start``h]jA )}(hjXh]hstart}(hjZhhhNhNubah}(h]h ]h"]h$]h&]uh1j@ hjVubah}(h]h ]h"]h$]h&]uh1j: hc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhKhjRubjW )}(hhh]h)}(h*byte offset from start of file to map fromh]h*byte offset from start of file to map from}(hjqhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjmhKhjnubah}(h]h ]h"]h$]h&]uh1jV hjRubeh}(h]h ]h"]h$]h&]uh1j4 hjmhKhjkubj5 )}(h&``length`` same as for iommu_ioas_map h](j; )}(h ``length``h]jA )}(hjh]hlength}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j@ hjubah}(h]h ]h"]h$]h&]uh1j: hc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhKhjubjW )}(hhh]h)}(hsame as for iommu_ioas_maph]hsame as for iommu_ioas_map}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhKhjubah}(h]h ]h"]h$]h&]uh1jV hjubeh}(h]h ]h"]h$]h&]uh1j4 hjhKhjkubj5 )}(h#``iova`` same as for iommu_ioas_maph](j; )}(h``iova``h]jA )}(hjh]hiova}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j@ hjubah}(h]h ]h"]h$]h&]uh1j: hc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhKhjubjW )}(hhh]h)}(hsame as for iommu_ioas_maph]hsame as for iommu_ioas_map}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhKhjubah}(h]h ]h"]h$]h&]uh1jV hjubeh}(h]h ]h"]h$]h&]uh1j4 hjhKhjkubeh}(h]h ]h"]h$]h&]uh1j/ hj#ubeh}(h]h ] kernelindentah"]h$]h&]uh1jhjhhhj8hNubh)}(h**Description**h]j>)}(hj h]h Description}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j=hj ubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhKhjhhubh)}(hhSet an IOVA mapping from a memfd file. All other arguments and semantics match those of IOMMU_IOAS_MAP.h]hhSet an IOVA mapping from a memfd file. All other arguments and semantics match those of IOMMU_IOAS_MAP.}(hj#hhhNhNubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhKhjhhubjG)}(hhh]h}(h]h ]h"]h$]h&]entries](jSiommu_ioas_copy (C struct)c.iommu_ioas_copyhNtauh1jFhjhhhj8hNubjX)}(hhh](j])}(hiommu_ioas_copyh]jc)}(hstruct iommu_ioas_copyh](ji)}(hjlh]hstruct}(hjKhhhNhNubah}(h]h ]juah"]h$]h&]uh1jhhjGhhhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhKubj{)}(h h]h }(hjYhhhNhNubah}(h]h ]jah"]h$]h&]uh1jzhjGhhhjXhKubj)}(hiommu_ioas_copyh]j)}(hjEh]hiommu_ioas_copy}(hjkhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjgubah}(h]h ](jjeh"]h$]h&]hhuh1jhjGhhhjXhKubeh}(h]h ]h"]h$]h&]hhjuh1jbjjhjChhhjXhKubah}(h]j>ah ](jjeh"]h$]h&]jj)jhuh1j\hjXhKhj@hhubj)}(hhh]h)}(hioctl(IOMMU_IOAS_COPY)h]hioctl(IOMMU_IOAS_COPY)}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhKhjhhubah}(h]h ]h"]h$]h&]uh1jhj@hhhjXhKubeh}(h]h ](jstructeh"]h$]h&]jjjjjjjjjuh1jWhhhjhj8hNubj)}(hX|**Definition**:: struct iommu_ioas_copy { __u32 size; __u32 flags; __u32 dst_ioas_id; __u32 src_ioas_id; __aligned_u64 length; __aligned_u64 dst_iova; __aligned_u64 src_iova; }; **Members** ``size`` sizeof(struct iommu_ioas_copy) ``flags`` Combination of enum iommufd_ioas_map_flags ``dst_ioas_id`` IOAS ID to change the mapping of ``src_ioas_id`` IOAS ID to copy from ``length`` Number of bytes to copy and map ``dst_iova`` IOVA the mapping was placed at. If IOMMU_IOAS_MAP_FIXED_IOVA is set then this must be provided as input. ``src_iova`` IOVA to start the copyh](h)}(h**Definition**::h](j>)}(h**Definition**h]h Definition}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j=hjubh:}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhKhjubj)}(hstruct iommu_ioas_copy { __u32 size; __u32 flags; __u32 dst_ioas_id; __u32 src_ioas_id; __aligned_u64 length; __aligned_u64 dst_iova; __aligned_u64 src_iova; };h]hstruct iommu_ioas_copy { __u32 size; __u32 flags; __u32 dst_ioas_id; __u32 src_ioas_id; __aligned_u64 length; __aligned_u64 dst_iova; __aligned_u64 src_iova; };}hjsbah}(h]h ]h"]h$]h&]hhuh1jhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhKhjubh)}(h **Members**h]j>)}(hjh]hMembers}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j=hjubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMhjubj0 )}(hhh](j5 )}(h(``size`` sizeof(struct iommu_ioas_copy) h](j; )}(h``size``h]jA )}(hjh]hsize}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j@ hjubah}(h]h ]h"]h$]h&]uh1j: hc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhKhjubjW )}(hhh]h)}(hsizeof(struct iommu_ioas_copy)h]hsizeof(struct iommu_ioas_copy)}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhKhjubah}(h]h ]h"]h$]h&]uh1jV hjubeh}(h]h ]h"]h$]h&]uh1j4 hjhKhjubj5 )}(h5``flags`` Combination of enum iommufd_ioas_map_flags h](j; )}(h ``flags``h]jA )}(hj3h]hflags}(hj5hhhNhNubah}(h]h ]h"]h$]h&]uh1j@ hj1ubah}(h]h ]h"]h$]h&]uh1j: hc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhKhj-ubjW )}(hhh]h)}(h*Combination of enum iommufd_ioas_map_flagsh]h*Combination of enum iommufd_ioas_map_flags}(hjLhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjHhKhjIubah}(h]h ]h"]h$]h&]uh1jV hj-ubeh}(h]h ]h"]h$]h&]uh1j4 hjHhKhjubj5 )}(h1``dst_ioas_id`` IOAS ID to change the mapping of h](j; )}(h``dst_ioas_id``h]jA )}(hjlh]h dst_ioas_id}(hjnhhhNhNubah}(h]h ]h"]h$]h&]uh1j@ hjjubah}(h]h ]h"]h$]h&]uh1j: hc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhKhjfubjW )}(hhh]h)}(h IOAS ID to change the mapping ofh]h IOAS ID to change the mapping of}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhKhjubah}(h]h ]h"]h$]h&]uh1jV hjfubeh}(h]h ]h"]h$]h&]uh1j4 hjhKhjubj5 )}(h%``src_ioas_id`` IOAS ID to copy from h](j; )}(h``src_ioas_id``h]jA )}(hjh]h src_ioas_id}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j@ hjubah}(h]h ]h"]h$]h&]uh1j: hc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhKhjubjW )}(hhh]h)}(hIOAS ID to copy fromh]hIOAS ID to copy from}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhKhjubah}(h]h ]h"]h$]h&]uh1jV hjubeh}(h]h ]h"]h$]h&]uh1j4 hjhKhjubj5 )}(h+``length`` Number of bytes to copy and map h](j; )}(h ``length``h]jA )}(hjh]hlength}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j@ hjubah}(h]h ]h"]h$]h&]uh1j: hc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhKhjubjW )}(hhh]h)}(hNumber of bytes to copy and maph]hNumber of bytes to copy and map}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhKhjubah}(h]h ]h"]h$]h&]uh1jV hjubeh}(h]h ]h"]h$]h&]uh1j4 hjhKhjubj5 )}(hv``dst_iova`` IOVA the mapping was placed at. If IOMMU_IOAS_MAP_FIXED_IOVA is set then this must be provided as input. h](j; )}(h ``dst_iova``h]jA )}(hjh]hdst_iova}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j@ hjubah}(h]h ]h"]h$]h&]uh1j: hc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhKhjubjW )}(hhh]h)}(hhIOVA the mapping was placed at. If IOMMU_IOAS_MAP_FIXED_IOVA is set then this must be provided as input.h]hhIOVA the mapping was placed at. If IOMMU_IOAS_MAP_FIXED_IOVA is set then this must be provided as input.}(hj0hhhNhNubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhKhj-ubah}(h]h ]h"]h$]h&]uh1jV hjubeh}(h]h ]h"]h$]h&]uh1j4 hj,hKhjubj5 )}(h#``src_iova`` IOVA to start the copyh](j; )}(h ``src_iova``h]jA )}(hjQh]hsrc_iova}(hjShhhNhNubah}(h]h ]h"]h$]h&]uh1j@ hjOubah}(h]h ]h"]h$]h&]uh1j: hc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhKhjKubjW )}(hhh]h)}(hIOVA to start the copyh]hIOVA to start the copy}(hjjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMhjgubah}(h]h ]h"]h$]h&]uh1jV hjKubeh}(h]h ]h"]h$]h&]uh1j4 hjfhKhjubeh}(h]h ]h"]h$]h&]uh1j/ hjubeh}(h]h ] kernelindentah"]h$]h&]uh1jhjhhhj8hNubh)}(h**Description**h]j>)}(hjh]h Description}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j=hjubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMhjhhubh)}(hCopy an already existing mapping from src_ioas_id and establish it in dst_ioas_id. The src iova/length must exactly match a range used with IOMMU_IOAS_MAP.h]hCopy an already existing mapping from src_ioas_id and establish it in dst_ioas_id. The src iova/length must exactly match a range used with IOMMU_IOAS_MAP.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMhjhhubh)}(hXThis may be used to efficiently clone a subset of an IOAS to another, or as a kind of 'cache' to speed up mapping. Copy has an efficiency advantage over establishing equivalent new mappings, as internal resources are shared, and the kernel will pin the user memory only once.h]hXThis may be used to efficiently clone a subset of an IOAS to another, or as a kind of ‘cache’ to speed up mapping. Copy has an efficiency advantage over establishing equivalent new mappings, as internal resources are shared, and the kernel will pin the user memory only once.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMhjhhubjG)}(hhh]h}(h]h ]h"]h$]h&]entries](jSiommu_ioas_unmap (C struct)c.iommu_ioas_unmaphNtauh1jFhjhhhj8hNubjX)}(hhh](j])}(hiommu_ioas_unmaph]jc)}(hstruct iommu_ioas_unmaph](ji)}(hjlh]hstruct}(hjhhhNhNubah}(h]h ]juah"]h$]h&]uh1jhhjhhhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhM ubj{)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jzhjhhhjhM ubj)}(hiommu_ioas_unmaph]j)}(hjh]hiommu_ioas_unmap}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubah}(h]h ](jjeh"]h$]h&]hhuh1jhjhhhjhM ubeh}(h]h ]h"]h$]h&]hhjuh1jbjjhjhhhjhM ubah}(h]jah ](jjeh"]h$]h&]jj)jhuh1j\hjhM hjhhubj)}(hhh]h)}(hioctl(IOMMU_IOAS_UNMAP)h]hioctl(IOMMU_IOAS_UNMAP)}(hj#hhhNhNubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMhj hhubah}(h]h ]h"]h$]h&]uh1jhjhhhjhM ubeh}(h]h ](jstructeh"]h$]h&]jjjj;jj;jjjuh1jWhhhjhj8hNubj)}(hXn**Definition**:: struct iommu_ioas_unmap { __u32 size; __u32 ioas_id; __aligned_u64 iova; __aligned_u64 length; }; **Members** ``size`` sizeof(struct iommu_ioas_unmap) ``ioas_id`` IOAS ID to change the mapping of ``iova`` IOVA to start the unmapping at ``length`` Number of bytes to unmap, and return back the bytes unmappedh](h)}(h**Definition**::h](j>)}(h**Definition**h]h Definition}(hjGhhhNhNubah}(h]h ]h"]h$]h&]uh1j=hjCubh:}(hjChhhNhNubeh}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMhj?ubj)}(hqstruct iommu_ioas_unmap { __u32 size; __u32 ioas_id; __aligned_u64 iova; __aligned_u64 length; };h]hqstruct iommu_ioas_unmap { __u32 size; __u32 ioas_id; __aligned_u64 iova; __aligned_u64 length; };}hj`sbah}(h]h ]h"]h$]h&]hhuh1jhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMhj?ubh)}(h **Members**h]j>)}(hjqh]hMembers}(hjshhhNhNubah}(h]h ]h"]h$]h&]uh1j=hjoubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhM#hj?ubj0 )}(hhh](j5 )}(h)``size`` sizeof(struct iommu_ioas_unmap) h](j; )}(h``size``h]jA )}(hjh]hsize}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j@ hjubah}(h]h ]h"]h$]h&]uh1j: hc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMhjubjW )}(hhh]h)}(hsizeof(struct iommu_ioas_unmap)h]hsizeof(struct iommu_ioas_unmap)}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhMhjubah}(h]h ]h"]h$]h&]uh1jV hjubeh}(h]h ]h"]h$]h&]uh1j4 hjhMhjubj5 )}(h-``ioas_id`` IOAS ID to change the mapping of h](j; )}(h ``ioas_id``h]jA )}(hjh]hioas_id}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j@ hjubah}(h]h ]h"]h$]h&]uh1j: hc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMhjubjW )}(hhh]h)}(h IOAS ID to change the mapping ofh]h IOAS ID to change the mapping of}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhMhjubah}(h]h ]h"]h$]h&]uh1jV hjubeh}(h]h ]h"]h$]h&]uh1j4 hjhMhjubj5 )}(h(``iova`` IOVA to start the unmapping at h](j; )}(h``iova``h]jA )}(hjh]hiova}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j@ hjubah}(h]h ]h"]h$]h&]uh1j: hc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMhjubjW )}(hhh]h)}(hIOVA to start the unmapping ath]hIOVA to start the unmapping at}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhMhjubah}(h]h ]h"]h$]h&]uh1jV hjubeh}(h]h ]h"]h$]h&]uh1j4 hjhMhjubj5 )}(hG``length`` Number of bytes to unmap, and return back the bytes unmappedh](j; )}(h ``length``h]jA )}(hj;h]hlength}(hj=hhhNhNubah}(h]h ]h"]h$]h&]uh1j@ hj9ubah}(h]h ]h"]h$]h&]uh1j: hc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMhj5ubjW )}(hhh]h)}(h)}(hj~h]h Description}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j=hj|ubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMhjhhubh)}(hUnmap an IOVA range. The iova/length must be a superset of a previously mapped range used with IOMMU_IOAS_MAP or IOMMU_IOAS_COPY. Splitting or truncating ranges is not allowed. The values 0 to U64_MAX will unmap everything.h]hUnmap an IOVA range. The iova/length must be a superset of a previously mapped range used with IOMMU_IOAS_MAP or IOMMU_IOAS_COPY. Splitting or truncating ranges is not allowed. The values 0 to U64_MAX will unmap everything.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMhjhhubjG)}(hhh]h}(h]h ]h"]h$]h&]entries](jSiommufd_option (C enum)c.iommufd_optionhNtauh1jFhjhhhj8hNubjX)}(hhh](j])}(hiommufd_optionh]jc)}(henum iommufd_optionh](ji)}(hjh]henum}(hjhhhNhNubah}(h]h ]juah"]h$]h&]uh1jhhjhhhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhM#ubj{)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jzhjhhhjhM#ubj)}(hiommufd_optionh]j)}(hjh]hiommufd_option}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubah}(h]h ](jjeh"]h$]h&]hhuh1jhjhhhjhM#ubeh}(h]h ]h"]h$]h&]hhjuh1jbjjhjhhhjhM#ubah}(h]jah ](jjeh"]h$]h&]jj)jhuh1j\hjhM#hjhhubj)}(hhh]h)}(hBioctl(IOMMU_OPTION_RLIMIT_MODE) and ioctl(IOMMU_OPTION_HUGE_PAGES)h]hBioctl(IOMMU_OPTION_RLIMIT_MODE) and ioctl(IOMMU_OPTION_HUGE_PAGES)}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhM*hjhhubah}(h]h ]h"]h$]h&]uh1jhjhhhjhM#ubeh}(h]h ](jenumeh"]h$]h&]jjjjjjjjjuh1jWhhhjhj8hNubj)}(hX**Constants** ``IOMMU_OPTION_RLIMIT_MODE`` Change how RLIMIT_MEMLOCK accounting works. The caller must have privilege to invoke this. Value 0 (default) is user based accounting, 1 uses process based accounting. Global option, object_id must be 0 ``IOMMU_OPTION_HUGE_PAGES`` Value 1 (default) allows contiguous pages to be combined when generating iommu mappings. Value 0 disables combining, everything is mapped to PAGE_SIZE. This can be useful for benchmarking. This is a per-IOAS option, the object_id must be the IOAS ID.h](h)}(h **Constants**h]j>)}(hj h]h Constants}(hj"hhhNhNubah}(h]h ]h"]h$]h&]uh1j=hjubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhM.hjubj0 )}(hhh](j5 )}(h``IOMMU_OPTION_RLIMIT_MODE`` Change how RLIMIT_MEMLOCK accounting works. The caller must have privilege to invoke this. Value 0 (default) is user based accounting, 1 uses process based accounting. Global option, object_id must be 0 h](j; )}(h``IOMMU_OPTION_RLIMIT_MODE``h]jA )}(hj?h]hIOMMU_OPTION_RLIMIT_MODE}(hjAhhhNhNubah}(h]h ]h"]h$]h&]uh1j@ hj=ubah}(h]h ]h"]h$]h&]uh1j: hc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhM3hj9ubjW )}(hhh]h)}(hChange how RLIMIT_MEMLOCK accounting works. The caller must have privilege to invoke this. Value 0 (default) is user based accounting, 1 uses process based accounting. Global option, object_id must be 0h]hChange how RLIMIT_MEMLOCK accounting works. The caller must have privilege to invoke this. Value 0 (default) is user based accounting, 1 uses process based accounting. Global option, object_id must be 0}(hjXhhhNhNubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhM1hjUubah}(h]h ]h"]h$]h&]uh1jV hj9ubeh}(h]h ]h"]h$]h&]uh1j4 hjThM3hj6ubj5 )}(hX``IOMMU_OPTION_HUGE_PAGES`` Value 1 (default) allows contiguous pages to be combined when generating iommu mappings. Value 0 disables combining, everything is mapped to PAGE_SIZE. This can be useful for benchmarking. This is a per-IOAS option, the object_id must be the IOAS ID.h](j; )}(h``IOMMU_OPTION_HUGE_PAGES``h]jA )}(hjyh]hIOMMU_OPTION_HUGE_PAGES}(hj{hhhNhNubah}(h]h ]h"]h$]h&]uh1j@ hjwubah}(h]h ]h"]h$]h&]uh1j: hc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhM8hjsubjW )}(hhh]h)}(hValue 1 (default) allows contiguous pages to be combined when generating iommu mappings. Value 0 disables combining, everything is mapped to PAGE_SIZE. This can be useful for benchmarking. This is a per-IOAS option, the object_id must be the IOAS ID.h]hValue 1 (default) allows contiguous pages to be combined when generating iommu mappings. Value 0 disables combining, everything is mapped to PAGE_SIZE. This can be useful for benchmarking. This is a per-IOAS option, the object_id must be the IOAS ID.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhM6hjubah}(h]h ]h"]h$]h&]uh1jV hjsubeh}(h]h ]h"]h$]h&]uh1j4 hjhM8hj6ubeh}(h]h ]h"]h$]h&]uh1j/ hjubeh}(h]h ] kernelindentah"]h$]h&]uh1jhjhhhj8hNubjG)}(hhh]h}(h]h ]h"]h$]h&]entries](jSiommufd_option_ops (C enum)c.iommufd_option_opshNtauh1jFhjhhhj8hNubjX)}(hhh](j])}(hiommufd_option_opsh]jc)}(henum iommufd_option_opsh](ji)}(hjh]henum}(hjhhhNhNubah}(h]h ]juah"]h$]h&]uh1jhhjhhhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhM>ubj{)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jzhjhhhjhM>ubj)}(hiommufd_option_opsh]j)}(hjh]hiommufd_option_ops}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubah}(h]h ](jjeh"]h$]h&]hhuh1jhjhhhjhM>ubeh}(h]h ]h"]h$]h&]hhjuh1jbjjhjhhhjhM>ubah}(h]jah ](jjeh"]h$]h&]jj)jhuh1j\hjhM>hjhhubj)}(hhh]h)}(h9ioctl(IOMMU_OPTION_OP_SET) and ioctl(IOMMU_OPTION_OP_GET)h]h9ioctl(IOMMU_OPTION_OP_SET) and ioctl(IOMMU_OPTION_OP_GET)}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhM<hjhhubah}(h]h ]h"]h$]h&]uh1jhjhhhjhM>ubeh}(h]h ](jenumeh"]h$]h&]jjjj-jj-jjjuh1jWhhhjhj8hNubj)}(hq**Constants** ``IOMMU_OPTION_OP_SET`` Set the option's value ``IOMMU_OPTION_OP_GET`` Get the option's valueh](h)}(h **Constants**h]j>)}(hj7h]h Constants}(hj9hhhNhNubah}(h]h ]h"]h$]h&]uh1j=hj5ubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhM@hj1ubj0 )}(hhh](j5 )}(h/``IOMMU_OPTION_OP_SET`` Set the option's value h](j; )}(h``IOMMU_OPTION_OP_SET``h]jA )}(hjVh]hIOMMU_OPTION_OP_SET}(hjXhhhNhNubah}(h]h ]h"]h$]h&]uh1j@ hjTubah}(h]h ]h"]h$]h&]uh1j: hc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMChjPubjW )}(hhh]h)}(hSet the option's valueh]hSet the option’s value}(hjohhhNhNubah}(h]h ]h"]h$]h&]uh1hhjkhMChjlubah}(h]h ]h"]h$]h&]uh1jV hjPubeh}(h]h ]h"]h$]h&]uh1j4 hjkhMChjMubj5 )}(h.``IOMMU_OPTION_OP_GET`` Get the option's valueh](j; )}(h``IOMMU_OPTION_OP_GET``h]jA )}(hjh]hIOMMU_OPTION_OP_GET}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j@ hjubah}(h]h ]h"]h$]h&]uh1j: hc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMEhjubjW )}(hhh]h)}(hGet the option's valueh]hGet the option’s value}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMFhjubah}(h]h ]h"]h$]h&]uh1jV hjubeh}(h]h ]h"]h$]h&]uh1j4 hjhMEhjMubeh}(h]h ]h"]h$]h&]uh1j/ hj1ubeh}(h]h ] kernelindentah"]h$]h&]uh1jhjhhhj8hNubjG)}(hhh]h}(h]h ]h"]h$]h&]entries](jSiommu_option (C struct)c.iommu_optionhNtauh1jFhjhhhj8hNubjX)}(hhh](j])}(h iommu_optionh]jc)}(hstruct iommu_optionh](ji)}(hjlh]hstruct}(hjhhhNhNubah}(h]h ]juah"]h$]h&]uh1jhhjhhhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMKubj{)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jzhjhhhjhMKubj)}(h iommu_optionh]j)}(hjh]h iommu_option}(hj hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubah}(h]h ](jjeh"]h$]h&]hhuh1jhjhhhjhMKubeh}(h]h ]h"]h$]h&]hhjuh1jbjjhjhhhjhMKubah}(h]jah ](jjeh"]h$]h&]jj)jhuh1j\hjhMKhjhhubj)}(hhh]h)}(hiommu option multiplexerh]hiommu option multiplexer}(hj+hhhNhNubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMGhj(hhubah}(h]h ]h"]h$]h&]uh1jhjhhhjhMKubeh}(h]h ](jstructeh"]h$]h&]jjjjCjjCjjjuh1jWhhhjhj8hNubj)}(hX**Definition**:: struct iommu_option { __u32 size; __u32 option_id; __u16 op; __u16 __reserved; __u32 object_id; __aligned_u64 val64; }; **Members** ``size`` sizeof(struct iommu_option) ``option_id`` One of enum iommufd_option ``op`` One of enum iommufd_option_ops ``__reserved`` Must be 0 ``object_id`` ID of the object if required ``val64`` Option value to set or value returned on geth](h)}(h**Definition**::h](j>)}(h**Definition**h]h Definition}(hjOhhhNhNubah}(h]h ]h"]h$]h&]uh1j=hjKubh:}(hjKhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMKhjGubj)}(hstruct iommu_option { __u32 size; __u32 option_id; __u16 op; __u16 __reserved; __u32 object_id; __aligned_u64 val64; };h]hstruct iommu_option { __u32 size; __u32 option_id; __u16 op; __u16 __reserved; __u32 object_id; __aligned_u64 val64; };}hjhsbah}(h]h ]h"]h$]h&]hhuh1jhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMMhjGubh)}(h **Members**h]j>)}(hjyh]hMembers}(hj{hhhNhNubah}(h]h ]h"]h$]h&]uh1j=hjwubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMVhjGubj0 )}(hhh](j5 )}(h%``size`` sizeof(struct iommu_option) h](j; )}(h``size``h]jA )}(hjh]hsize}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j@ hjubah}(h]h ]h"]h$]h&]uh1j: hc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMIhjubjW )}(hhh]h)}(hsizeof(struct iommu_option)h]hsizeof(struct iommu_option)}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhMIhjubah}(h]h ]h"]h$]h&]uh1jV hjubeh}(h]h ]h"]h$]h&]uh1j4 hjhMIhjubj5 )}(h)``option_id`` One of enum iommufd_option h](j; )}(h ``option_id``h]jA )}(hjh]h option_id}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j@ hjubah}(h]h ]h"]h$]h&]uh1j: hc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMJhjubjW )}(hhh]h)}(hOne of enum iommufd_optionh]hOne of enum iommufd_option}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhMJhjubah}(h]h ]h"]h$]h&]uh1jV hjubeh}(h]h ]h"]h$]h&]uh1j4 hjhMJhjubj5 )}(h&``op`` One of enum iommufd_option_ops h](j; )}(h``op``h]jA )}(hj h]hop}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1j@ hj ubah}(h]h ]h"]h$]h&]uh1j: hc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMKhj ubjW )}(hhh]h)}(hOne of enum iommufd_option_opsh]hOne of enum iommufd_option_ops}(hj# hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj hMKhj ubah}(h]h ]h"]h$]h&]uh1jV hj ubeh}(h]h ]h"]h$]h&]uh1j4 hj hMKhjubj5 )}(h``__reserved`` Must be 0 h](j; )}(h``__reserved``h]jA )}(hjC h]h __reserved}(hjE hhhNhNubah}(h]h ]h"]h$]h&]uh1j@ hjA ubah}(h]h ]h"]h$]h&]uh1j: hc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMLhj= ubjW )}(hhh]h)}(h Must be 0h]h Must be 0}(hj\ hhhNhNubah}(h]h ]h"]h$]h&]uh1hhjX hMLhjY ubah}(h]h ]h"]h$]h&]uh1jV hj= ubeh}(h]h ]h"]h$]h&]uh1j4 hjX hMLhjubj5 )}(h+``object_id`` ID of the object if required h](j; )}(h ``object_id``h]jA )}(hj| h]h object_id}(hj~ hhhNhNubah}(h]h ]h"]h$]h&]uh1j@ hjz ubah}(h]h ]h"]h$]h&]uh1j: hc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMMhjv ubjW )}(hhh]h)}(hID of the object if requiredh]hID of the object if required}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj hMMhj ubah}(h]h ]h"]h$]h&]uh1jV hjv ubeh}(h]h ]h"]h$]h&]uh1j4 hj hMMhjubj5 )}(h6``val64`` Option value to set or value returned on geth](j; )}(h ``val64``h]jA )}(hj h]hval64}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1j@ hj ubah}(h]h ]h"]h$]h&]uh1j: hc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMMhj ubjW )}(hhh]h)}(h,Option value to set or value returned on geth]h,Option value to set or value returned on get}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMNhj ubah}(h]h ]h"]h$]h&]uh1jV hj ubeh}(h]h ]h"]h$]h&]uh1j4 hj hMMhjubeh}(h]h ]h"]h$]h&]uh1j/ hjGubeh}(h]h ] kernelindentah"]h$]h&]uh1jhjhhhj8hNubh)}(h**Description**h]j>)}(hj h]h Description}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1j=hj ubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMQhjhhubh)}(hChange a simple option value. This multiplexor allows controlling options on objects. IOMMU_OPTION_OP_SET will load an option and IOMMU_OPTION_OP_GET will return the current value.h]hChange a simple option value. This multiplexor allows controlling options on objects. IOMMU_OPTION_OP_SET will load an option and IOMMU_OPTION_OP_GET will return the current value.}(hj!hhhNhNubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMNhjhhubjG)}(hhh]h}(h]h ]h"]h$]h&]entries](jSiommufd_vfio_ioas_op (C enum)c.iommufd_vfio_ioas_ophNtauh1jFhjhhhj8hNubjX)}(hhh](j])}(hiommufd_vfio_ioas_oph]jc)}(henum iommufd_vfio_ioas_oph](ji)}(hjh]henum}(hj6!hhhNhNubah}(h]h ]juah"]h$]h&]uh1jhhj2!hhhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMUubj{)}(h h]h }(hjD!hhhNhNubah}(h]h ]jah"]h$]h&]uh1jzhj2!hhhjC!hMUubj)}(hiommufd_vfio_ioas_oph]j)}(hj0!h]hiommufd_vfio_ioas_op}(hjV!hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjR!ubah}(h]h ](jjeh"]h$]h&]hhuh1jhj2!hhhjC!hMUubeh}(h]h ]h"]h$]h&]hhjuh1jbjjhj.!hhhjC!hMUubah}(h]j)!ah ](jjeh"]h$]h&]jj)jhuh1j\hjC!hMUhj+!hhubj)}(hhh]h)}(hIOMMU_VFIO_IOAS_* ioctlsh]hIOMMU_VFIO_IOAS_* ioctls}(hjx!hhhNhNubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhM^hju!hhubah}(h]h ]h"]h$]h&]uh1jhj+!hhhjC!hMUubeh}(h]h ](jenumeh"]h$]h&]jjjj!jj!jjjuh1jWhhhjhj8hNubj)}(h**Constants** ``IOMMU_VFIO_IOAS_GET`` Get the current compatibility IOAS ``IOMMU_VFIO_IOAS_SET`` Change the current compatibility IOAS ``IOMMU_VFIO_IOAS_CLEAR`` Disable VFIO compatibilityh](h)}(h **Constants**h]j>)}(hj!h]h Constants}(hj!hhhNhNubah}(h]h ]h"]h$]h&]uh1j=hj!ubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMbhj!ubj0 )}(hhh](j5 )}(h;``IOMMU_VFIO_IOAS_GET`` Get the current compatibility IOAS h](j; )}(h``IOMMU_VFIO_IOAS_GET``h]jA )}(hj!h]hIOMMU_VFIO_IOAS_GET}(hj!hhhNhNubah}(h]h ]h"]h$]h&]uh1j@ hj!ubah}(h]h ]h"]h$]h&]uh1j: hc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMehj!ubjW )}(hhh]h)}(h"Get the current compatibility IOASh]h"Get the current compatibility IOAS}(hj!hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj!hMehj!ubah}(h]h ]h"]h$]h&]uh1jV hj!ubeh}(h]h ]h"]h$]h&]uh1j4 hj!hMehj!ubj5 )}(h>``IOMMU_VFIO_IOAS_SET`` Change the current compatibility IOAS h](j; )}(h``IOMMU_VFIO_IOAS_SET``h]jA )}(hj!h]hIOMMU_VFIO_IOAS_SET}(hj!hhhNhNubah}(h]h ]h"]h$]h&]uh1j@ hj!ubah}(h]h ]h"]h$]h&]uh1j: hc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMhhj!ubjW )}(hhh]h)}(h%Change the current compatibility IOASh]h%Change the current compatibility IOAS}(hj "hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj"hMhhj"ubah}(h]h ]h"]h$]h&]uh1jV hj!ubeh}(h]h ]h"]h$]h&]uh1j4 hj"hMhhj!ubj5 )}(h4``IOMMU_VFIO_IOAS_CLEAR`` Disable VFIO compatibilityh](j; )}(h``IOMMU_VFIO_IOAS_CLEAR``h]jA )}(hj+"h]hIOMMU_VFIO_IOAS_CLEAR}(hj-"hhhNhNubah}(h]h ]h"]h$]h&]uh1j@ hj)"ubah}(h]h ]h"]h$]h&]uh1j: hc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMjhj%"ubjW )}(hhh]h)}(hDisable VFIO compatibilityh]hDisable VFIO compatibility}(hjD"hhhNhNubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMkhjA"ubah}(h]h ]h"]h$]h&]uh1jV hj%"ubeh}(h]h ]h"]h$]h&]uh1j4 hj@"hMjhj!ubeh}(h]h ]h"]h$]h&]uh1j/ hj!ubeh}(h]h ] kernelindentah"]h$]h&]uh1jhjhhhj8hNubjG)}(hhh]h}(h]h ]h"]h$]h&]entries](jSiommu_vfio_ioas (C struct)c.iommu_vfio_ioashNtauh1jFhjhhhj8hNubjX)}(hhh](j])}(hiommu_vfio_ioash]jc)}(hstruct iommu_vfio_ioash](ji)}(hjlh]hstruct}(hj"hhhNhNubah}(h]h ]juah"]h$]h&]uh1jhhj"hhhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMpubj{)}(h h]h }(hj"hhhNhNubah}(h]h ]jah"]h$]h&]uh1jzhj"hhhj"hMpubj)}(hiommu_vfio_ioash]j)}(hj"h]hiommu_vfio_ioas}(hj"hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj"ubah}(h]h ](jjeh"]h$]h&]hhuh1jhj"hhhj"hMpubeh}(h]h ]h"]h$]h&]hhjuh1jbjjhj}"hhhj"hMpubah}(h]jx"ah ](jjeh"]h$]h&]jj)jhuh1j\hj"hMphjz"hhubj)}(hhh]h)}(hioctl(IOMMU_VFIO_IOAS)h]hioctl(IOMMU_VFIO_IOAS)}(hj"hhhNhNubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMjhj"hhubah}(h]h ]h"]h$]h&]uh1jhjz"hhhj"hMpubeh}(h]h ](jstructeh"]h$]h&]jjjj"jj"jjjuh1jWhhhjhj8hNubj)}(hXq**Definition**:: struct iommu_vfio_ioas { __u32 size; __u32 ioas_id; __u16 op; __u16 __reserved; }; **Members** ``size`` sizeof(struct iommu_vfio_ioas) ``ioas_id`` For IOMMU_VFIO_IOAS_SET the input IOAS ID to set For IOMMU_VFIO_IOAS_GET will output the IOAS ID ``op`` One of enum iommufd_vfio_ioas_op ``__reserved`` Must be 0h](h)}(h**Definition**::h](j>)}(h**Definition**h]h Definition}(hj"hhhNhNubah}(h]h ]h"]h$]h&]uh1j=hj"ubh:}(hj"hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMnhj"ubj)}(hbstruct iommu_vfio_ioas { __u32 size; __u32 ioas_id; __u16 op; __u16 __reserved; };h]hbstruct iommu_vfio_ioas { __u32 size; __u32 ioas_id; __u16 op; __u16 __reserved; };}hj#sbah}(h]h ]h"]h$]h&]hhuh1jhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMphj"ubh)}(h **Members**h]j>)}(hj#h]hMembers}(hj#hhhNhNubah}(h]h ]h"]h$]h&]uh1j=hj#ubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMwhj"ubj0 )}(hhh](j5 )}(h(``size`` sizeof(struct iommu_vfio_ioas) h](j; )}(h``size``h]jA )}(hj4#h]hsize}(hj6#hhhNhNubah}(h]h ]h"]h$]h&]uh1j@ hj2#ubah}(h]h ]h"]h$]h&]uh1j: hc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMlhj.#ubjW )}(hhh]h)}(hsizeof(struct iommu_vfio_ioas)h]hsizeof(struct iommu_vfio_ioas)}(hjM#hhhNhNubah}(h]h ]h"]h$]h&]uh1hhjI#hMlhjJ#ubah}(h]h ]h"]h$]h&]uh1jV hj.#ubeh}(h]h ]h"]h$]h&]uh1j4 hjI#hMlhj+#ubj5 )}(hm``ioas_id`` For IOMMU_VFIO_IOAS_SET the input IOAS ID to set For IOMMU_VFIO_IOAS_GET will output the IOAS ID h](j; )}(h ``ioas_id``h]jA )}(hjm#h]hioas_id}(hjo#hhhNhNubah}(h]h ]h"]h$]h&]uh1j@ hjk#ubah}(h]h ]h"]h$]h&]uh1j: hc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMnhjg#ubjW )}(hhh]h)}(h`For IOMMU_VFIO_IOAS_SET the input IOAS ID to set For IOMMU_VFIO_IOAS_GET will output the IOAS IDh]h`For IOMMU_VFIO_IOAS_SET the input IOAS ID to set For IOMMU_VFIO_IOAS_GET will output the IOAS ID}(hj#hhhNhNubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMmhj#ubah}(h]h ]h"]h$]h&]uh1jV hjg#ubeh}(h]h ]h"]h$]h&]uh1j4 hj#hMnhj+#ubj5 )}(h(``op`` One of enum iommufd_vfio_ioas_op h](j; )}(h``op``h]jA )}(hj#h]hop}(hj#hhhNhNubah}(h]h ]h"]h$]h&]uh1j@ hj#ubah}(h]h ]h"]h$]h&]uh1j: hc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMohj#ubjW )}(hhh]h)}(h One of enum iommufd_vfio_ioas_oph]h One of enum iommufd_vfio_ioas_op}(hj#hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj#hMohj#ubah}(h]h ]h"]h$]h&]uh1jV hj#ubeh}(h]h ]h"]h$]h&]uh1j4 hj#hMohj+#ubj5 )}(h``__reserved`` Must be 0h](j; )}(h``__reserved``h]jA )}(hj#h]h __reserved}(hj#hhhNhNubah}(h]h ]h"]h$]h&]uh1j@ hj#ubah}(h]h ]h"]h$]h&]uh1j: hc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMohj#ubjW )}(hhh]h)}(h Must be 0h]h Must be 0}(hj#hhhNhNubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMphj#ubah}(h]h ]h"]h$]h&]uh1jV hj#ubeh}(h]h ]h"]h$]h&]uh1j4 hj#hMohj+#ubeh}(h]h ]h"]h$]h&]uh1j/ hj"ubeh}(h]h ] kernelindentah"]h$]h&]uh1jhjhhhj8hNubh)}(h**Description**h]j>)}(hj#$h]h Description}(hj%$hhhNhNubah}(h]h ]h"]h$]h&]uh1j=hj!$ubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMshjhhubh)}(hXThe VFIO compatibility support uses a single ioas because VFIO APIs do not support the ID field. Set or Get the IOAS that VFIO compatibility will use. When VFIO_GROUP_SET_CONTAINER is used on an iommufd it will get the compatibility ioas, either by taking what is already set, or auto creating one. From then on VFIO will continue to use that ioas and is not effected by this ioctl. SET or CLEAR does not destroy any auto-created IOAS.h]hXThe VFIO compatibility support uses a single ioas because VFIO APIs do not support the ID field. Set or Get the IOAS that VFIO compatibility will use. When VFIO_GROUP_SET_CONTAINER is used on an iommufd it will get the compatibility ioas, either by taking what is already set, or auto creating one. From then on VFIO will continue to use that ioas and is not effected by this ioctl. SET or CLEAR does not destroy any auto-created IOAS.}(hj9$hhhNhNubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMphjhhubjG)}(hhh]h}(h]h ]h"]h$]h&]entries](jS!iommufd_hwpt_alloc_flags (C enum)c.iommufd_hwpt_alloc_flagshNtauh1jFhjhhhj8hNubjX)}(hhh](j])}(hiommufd_hwpt_alloc_flagsh]jc)}(henum iommufd_hwpt_alloc_flagsh](ji)}(hjh]henum}(hja$hhhNhNubah}(h]h ]juah"]h$]h&]uh1jhhj]$hhhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMzubj{)}(h h]h }(hjo$hhhNhNubah}(h]h ]jah"]h$]h&]uh1jzhj]$hhhjn$hMzubj)}(hiommufd_hwpt_alloc_flagsh]j)}(hj[$h]hiommufd_hwpt_alloc_flags}(hj$hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj}$ubah}(h]h ](jjeh"]h$]h&]hhuh1jhj]$hhhjn$hMzubeh}(h]h ]h"]h$]h&]hhjuh1jbjjhjY$hhhjn$hMzubah}(h]jT$ah ](jjeh"]h$]h&]jj)jhuh1j\hjn$hMzhjV$hhubj)}(hhh]h)}(hFlags for HWPT allocationh]hFlags for HWPT allocation}(hj$hhhNhNubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMhj$hhubah}(h]h ]h"]h$]h&]uh1jhjV$hhhjn$hMzubeh}(h]h ](jenumeh"]h$]h&]jjjj$jj$jjjuh1jWhhhjhj8hNubj)}(hX **Constants** ``IOMMU_HWPT_ALLOC_NEST_PARENT`` If set, allocate a HWPT that can serve as the parent HWPT in a nesting configuration. ``IOMMU_HWPT_ALLOC_DIRTY_TRACKING`` Dirty tracking support for device IOMMU is enforced on device attachment ``IOMMU_HWPT_FAULT_ID_VALID`` The fault_id field of hwpt allocation data is valid. ``IOMMU_HWPT_ALLOC_PASID`` Requests a domain that can be used with PASID. The domain can be attached to any PASID on the device. Any domain attached to the non-PASID part of the device must also be flagged, otherwise attaching a PASID will blocked. For the user that wants to attach PASID, ioas is not recommended for both the non-PASID part and PASID part of the device. If IOMMU does not support PASID it will return error (-EOPNOTSUPP).h](h)}(h **Constants**h]j>)}(hj$h]h Constants}(hj$hhhNhNubah}(h]h ]h"]h$]h&]uh1j=hj$ubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMhj$ubj0 )}(hhh](j5 )}(hw``IOMMU_HWPT_ALLOC_NEST_PARENT`` If set, allocate a HWPT that can serve as the parent HWPT in a nesting configuration. h](j; )}(h ``IOMMU_HWPT_ALLOC_NEST_PARENT``h]jA )}(hj$h]hIOMMU_HWPT_ALLOC_NEST_PARENT}(hj$hhhNhNubah}(h]h ]h"]h$]h&]uh1j@ hj$ubah}(h]h ]h"]h$]h&]uh1j: hc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMhj$ubjW )}(hhh]h)}(hUIf set, allocate a HWPT that can serve as the parent HWPT in a nesting configuration.h]hUIf set, allocate a HWPT that can serve as the parent HWPT in a nesting configuration.}(hj$hhhNhNubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMhj$ubah}(h]h ]h"]h$]h&]uh1jV hj$ubeh}(h]h ]h"]h$]h&]uh1j4 hj$hMhj$ubj5 )}(hm``IOMMU_HWPT_ALLOC_DIRTY_TRACKING`` Dirty tracking support for device IOMMU is enforced on device attachment h](j; )}(h#``IOMMU_HWPT_ALLOC_DIRTY_TRACKING``h]jA )}(hj%h]hIOMMU_HWPT_ALLOC_DIRTY_TRACKING}(hj %hhhNhNubah}(h]h ]h"]h$]h&]uh1j@ hj%ubah}(h]h ]h"]h$]h&]uh1j: hc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMhj%ubjW )}(hhh]h)}(hHDirty tracking support for device IOMMU is enforced on device attachmenth]hHDirty tracking support for device IOMMU is enforced on device attachment}(hj7%hhhNhNubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMhj4%ubah}(h]h ]h"]h$]h&]uh1jV hj%ubeh}(h]h ]h"]h$]h&]uh1j4 hj3%hMhj$ubj5 )}(hS``IOMMU_HWPT_FAULT_ID_VALID`` The fault_id field of hwpt allocation data is valid. h](j; )}(h``IOMMU_HWPT_FAULT_ID_VALID``h]jA )}(hjX%h]hIOMMU_HWPT_FAULT_ID_VALID}(hjZ%hhhNhNubah}(h]h ]h"]h$]h&]uh1j@ hjV%ubah}(h]h ]h"]h$]h&]uh1j: hc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMhjR%ubjW )}(hhh]h)}(h4The fault_id field of hwpt allocation data is valid.h]h4The fault_id field of hwpt allocation data is valid.}(hjq%hhhNhNubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMhjn%ubah}(h]h ]h"]h$]h&]uh1jV hjR%ubeh}(h]h ]h"]h$]h&]uh1j4 hjm%hMhj$ubj5 )}(hX``IOMMU_HWPT_ALLOC_PASID`` Requests a domain that can be used with PASID. The domain can be attached to any PASID on the device. Any domain attached to the non-PASID part of the device must also be flagged, otherwise attaching a PASID will blocked. For the user that wants to attach PASID, ioas is not recommended for both the non-PASID part and PASID part of the device. If IOMMU does not support PASID it will return error (-EOPNOTSUPP).h](j; )}(h``IOMMU_HWPT_ALLOC_PASID``h]jA )}(hj%h]hIOMMU_HWPT_ALLOC_PASID}(hj%hhhNhNubah}(h]h ]h"]h$]h&]uh1j@ hj%ubah}(h]h ]h"]h$]h&]uh1j: hc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMhj%ubjW )}(hhh]h)}(hXRequests a domain that can be used with PASID. The domain can be attached to any PASID on the device. Any domain attached to the non-PASID part of the device must also be flagged, otherwise attaching a PASID will blocked. For the user that wants to attach PASID, ioas is not recommended for both the non-PASID part and PASID part of the device. If IOMMU does not support PASID it will return error (-EOPNOTSUPP).h]hXRequests a domain that can be used with PASID. The domain can be attached to any PASID on the device. Any domain attached to the non-PASID part of the device must also be flagged, otherwise attaching a PASID will blocked. For the user that wants to attach PASID, ioas is not recommended for both the non-PASID part and PASID part of the device. If IOMMU does not support PASID it will return error (-EOPNOTSUPP).}(hj%hhhNhNubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMhj%ubah}(h]h ]h"]h$]h&]uh1jV hj%ubeh}(h]h ]h"]h$]h&]uh1j4 hj%hMhj$ubeh}(h]h ]h"]h$]h&]uh1j/ hj$ubeh}(h]h ] kernelindentah"]h$]h&]uh1jhjhhhj8hNubjG)}(hhh]h}(h]h ]h"]h$]h&]entries](jS iommu_hwpt_vtd_s1_flags (C enum)c.iommu_hwpt_vtd_s1_flagshNtauh1jFhjhhhj8hNubjX)}(hhh](j])}(hiommu_hwpt_vtd_s1_flagsh]jc)}(henum iommu_hwpt_vtd_s1_flagsh](ji)}(hjh]henum}(hj%hhhNhNubah}(h]h ]juah"]h$]h&]uh1jhhj%hhhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMubj{)}(h h]h }(hj%hhhNhNubah}(h]h ]jah"]h$]h&]uh1jzhj%hhhj%hMubj)}(hiommu_hwpt_vtd_s1_flagsh]j)}(hj%h]hiommu_hwpt_vtd_s1_flags}(hj &hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj&ubah}(h]h ](jjeh"]h$]h&]hhuh1jhj%hhhj%hMubeh}(h]h ]h"]h$]h&]hhjuh1jbjjhj%hhhj%hMubah}(h]j%ah ](jjeh"]h$]h&]jj)jhuh1j\hj%hMhj%hhubj)}(hhh]h)}(h.Intel VT-d stage-1 page table entry attributesh]h.Intel VT-d stage-1 page table entry attributes}(hj.&hhhNhNubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMhj+&hhubah}(h]h ]h"]h$]h&]uh1jhj%hhhj%hMubeh}(h]h ](jenumeh"]h$]h&]jjjjF&jjF&jjjuh1jWhhhjhj8hNubj)}(h**Constants** ``IOMMU_VTD_S1_SRE`` Supervisor request ``IOMMU_VTD_S1_EAFE`` Extended access enable ``IOMMU_VTD_S1_WPE`` Write protect enableh](h)}(h **Constants**h]j>)}(hjP&h]h Constants}(hjR&hhhNhNubah}(h]h ]h"]h$]h&]uh1j=hjN&ubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMhjJ&ubj0 )}(hhh](j5 )}(h(``IOMMU_VTD_S1_SRE`` Supervisor request h](j; )}(h``IOMMU_VTD_S1_SRE``h]jA )}(hjo&h]hIOMMU_VTD_S1_SRE}(hjq&hhhNhNubah}(h]h ]h"]h$]h&]uh1j@ hjm&ubah}(h]h ]h"]h$]h&]uh1j: hc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMhji&ubjW )}(hhh]h)}(hSupervisor requesth]hSupervisor request}(hj&hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj&hMhj&ubah}(h]h ]h"]h$]h&]uh1jV hji&ubeh}(h]h ]h"]h$]h&]uh1j4 hj&hMhjf&ubj5 )}(h-``IOMMU_VTD_S1_EAFE`` Extended access enable h](j; )}(h``IOMMU_VTD_S1_EAFE``h]jA )}(hj&h]hIOMMU_VTD_S1_EAFE}(hj&hhhNhNubah}(h]h ]h"]h$]h&]uh1j@ hj&ubah}(h]h ]h"]h$]h&]uh1j: hc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMhj&ubjW )}(hhh]h)}(hExtended access enableh]hExtended access enable}(hj&hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj&hMhj&ubah}(h]h ]h"]h$]h&]uh1jV hj&ubeh}(h]h ]h"]h$]h&]uh1j4 hj&hMhjf&ubj5 )}(h)``IOMMU_VTD_S1_WPE`` Write protect enableh](j; )}(h``IOMMU_VTD_S1_WPE``h]jA )}(hj&h]hIOMMU_VTD_S1_WPE}(hj&hhhNhNubah}(h]h ]h"]h$]h&]uh1j@ hj&ubah}(h]h ]h"]h$]h&]uh1j: hc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMhj&ubjW )}(hhh]h)}(hWrite protect enableh]hWrite protect enable}(hj&hhhNhNubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMhj&ubah}(h]h ]h"]h$]h&]uh1jV hj&ubeh}(h]h ]h"]h$]h&]uh1j4 hj&hMhjf&ubeh}(h]h ]h"]h$]h&]uh1j/ hjJ&ubeh}(h]h ] kernelindentah"]h$]h&]uh1jhjhhhj8hNubjG)}(hhh]h}(h]h ]h"]h$]h&]entries](jSiommu_hwpt_vtd_s1 (C struct)c.iommu_hwpt_vtd_s1hNtauh1jFhjhhhj8hNubjX)}(hhh](j])}(hiommu_hwpt_vtd_s1h]jc)}(hstruct iommu_hwpt_vtd_s1h](ji)}(hjlh]hstruct}(hj;'hhhNhNubah}(h]h ]juah"]h$]h&]uh1jhhj7'hhhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMubj{)}(h h]h }(hjI'hhhNhNubah}(h]h ]jah"]h$]h&]uh1jzhj7'hhhjH'hMubj)}(hiommu_hwpt_vtd_s1h]j)}(hj5'h]hiommu_hwpt_vtd_s1}(hj['hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjW'ubah}(h]h ](jjeh"]h$]h&]hhuh1jhj7'hhhjH'hMubeh}(h]h ]h"]h$]h&]hhjuh1jbjjhj3'hhhjH'hMubah}(h]j.'ah ](jjeh"]h$]h&]jj)jhuh1j\hjH'hMhj0'hhubj)}(hhh]h)}(h;Intel VT-d stage-1 page table info (IOMMU_HWPT_DATA_VTD_S1)h]h;Intel VT-d stage-1 page table info (IOMMU_HWPT_DATA_VTD_S1)}(hj}'hhhNhNubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMhjz'hhubah}(h]h ]h"]h$]h&]uh1jhj0'hhhjH'hMubeh}(h]h ](jstructeh"]h$]h&]jjjj'jj'jjjuh1jWhhhjhj8hNubj)}(hX|**Definition**:: struct iommu_hwpt_vtd_s1 { __aligned_u64 flags; __aligned_u64 pgtbl_addr; __u32 addr_width; __u32 __reserved; }; **Members** ``flags`` Combination of enum iommu_hwpt_vtd_s1_flags ``pgtbl_addr`` The base address of the stage-1 page table. ``addr_width`` The address width of the stage-1 page table ``__reserved`` Must be 0h](h)}(h**Definition**::h](j>)}(h**Definition**h]h Definition}(hj'hhhNhNubah}(h]h ]h"]h$]h&]uh1j=hj'ubh:}(hj'hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMhj'ubj)}(hstruct iommu_hwpt_vtd_s1 { __aligned_u64 flags; __aligned_u64 pgtbl_addr; __u32 addr_width; __u32 __reserved; };h]hstruct iommu_hwpt_vtd_s1 { __aligned_u64 flags; __aligned_u64 pgtbl_addr; __u32 addr_width; __u32 __reserved; };}hj'sbah}(h]h ]h"]h$]h&]hhuh1jhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMhj'ubh)}(h **Members**h]j>)}(hj'h]hMembers}(hj'hhhNhNubah}(h]h ]h"]h$]h&]uh1j=hj'ubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMhj'ubj0 )}(hhh](j5 )}(h6``flags`` Combination of enum iommu_hwpt_vtd_s1_flags h](j; )}(h ``flags``h]jA )}(hj'h]hflags}(hj'hhhNhNubah}(h]h ]h"]h$]h&]uh1j@ hj'ubah}(h]h ]h"]h$]h&]uh1j: hc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMhj'ubjW )}(hhh]h)}(h+Combination of enum iommu_hwpt_vtd_s1_flagsh]h+Combination of enum iommu_hwpt_vtd_s1_flags}(hj(hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj'hMhj(ubah}(h]h ]h"]h$]h&]uh1jV hj'ubeh}(h]h ]h"]h$]h&]uh1j4 hj'hMhj'ubj5 )}(h;``pgtbl_addr`` The base address of the stage-1 page table. h](j; )}(h``pgtbl_addr``h]jA )}(hj#(h]h pgtbl_addr}(hj%(hhhNhNubah}(h]h ]h"]h$]h&]uh1j@ hj!(ubah}(h]h ]h"]h$]h&]uh1j: hc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMhj(ubjW )}(hhh]h)}(h+The base address of the stage-1 page table.h]h+The base address of the stage-1 page table.}(hj<(hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj8(hMhj9(ubah}(h]h ]h"]h$]h&]uh1jV hj(ubeh}(h]h ]h"]h$]h&]uh1j4 hj8(hMhj'ubj5 )}(h;``addr_width`` The address width of the stage-1 page table h](j; )}(h``addr_width``h]jA )}(hj\(h]h addr_width}(hj^(hhhNhNubah}(h]h ]h"]h$]h&]uh1j@ hjZ(ubah}(h]h ]h"]h$]h&]uh1j: hc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMhjV(ubjW )}(hhh]h)}(h+The address width of the stage-1 page tableh]h+The address width of the stage-1 page table}(hju(hhhNhNubah}(h]h ]h"]h$]h&]uh1hhjq(hMhjr(ubah}(h]h ]h"]h$]h&]uh1jV hjV(ubeh}(h]h ]h"]h$]h&]uh1j4 hjq(hMhj'ubj5 )}(h``__reserved`` Must be 0h](j; )}(h``__reserved``h]jA )}(hj(h]h __reserved}(hj(hhhNhNubah}(h]h ]h"]h$]h&]uh1j@ hj(ubah}(h]h ]h"]h$]h&]uh1j: hc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMhj(ubjW )}(hhh]h)}(h Must be 0h]h Must be 0}(hj(hhhNhNubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMhj(ubah}(h]h ]h"]h$]h&]uh1jV hj(ubeh}(h]h ]h"]h$]h&]uh1j4 hj(hMhj'ubeh}(h]h ]h"]h$]h&]uh1j/ hj'ubeh}(h]h ] kernelindentah"]h$]h&]uh1jhjhhhj8hNubjG)}(hhh]h}(h]h ]h"]h$]h&]entries](jS iommu_hwpt_arm_smmuv3 (C struct)c.iommu_hwpt_arm_smmuv3hNtauh1jFhjhhhj8hNubjX)}(hhh](j])}(hiommu_hwpt_arm_smmuv3h]jc)}(hstruct iommu_hwpt_arm_smmuv3h](ji)}(hjlh]hstruct}(hj(hhhNhNubah}(h]h ]juah"]h$]h&]uh1jhhj(hhhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMubj{)}(h h]h }(hj(hhhNhNubah}(h]h ]jah"]h$]h&]uh1jzhj(hhhj(hMubj)}(hiommu_hwpt_arm_smmuv3h]j)}(hj(h]hiommu_hwpt_arm_smmuv3}(hj)hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj )ubah}(h]h ](jjeh"]h$]h&]hhuh1jhj(hhhj(hMubeh}(h]h ]h"]h$]h&]hhjuh1jbjjhj(hhhj(hMubah}(h]j(ah ](jjeh"]h$]h&]jj)jhuh1j\hj(hMhj(hhubj)}(hhh]h)}(h2ARM SMMUv3 nested STE (IOMMU_HWPT_DATA_ARM_SMMUV3)h]h2ARM SMMUv3 nested STE (IOMMU_HWPT_DATA_ARM_SMMUV3)}(hj1)hhhNhNubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMhj.)hhubah}(h]h ]h"]h$]h&]uh1jhj(hhhj(hMubeh}(h]h ](jstructeh"]h$]h&]jjjjI)jjI)jjjuh1jWhhhjhj8hNubj)}(hX**Definition**:: struct iommu_hwpt_arm_smmuv3 { __aligned_le64 ste[2]; }; **Members** ``ste`` The first two double words of the user space Stream Table Entry for the translation. Must be little-endian. Allowed fields: (Refer to "5.2 Stream Table Entry" in SMMUv3 HW Spec) - word-0: V, Cfg, S1Fmt, S1ContextPtr, S1CDMax - word-1: EATS, S1DSS, S1CIR, S1COR, S1CSH, S1STALLDh](h)}(h**Definition**::h](j>)}(h**Definition**h]h Definition}(hjU)hhhNhNubah}(h]h ]h"]h$]h&]uh1j=hjQ)ubh:}(hjQ)hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMhjM)ubj)}(h)}(hj)h]hMembers}(hj)hhhNhNubah}(h]h ]h"]h$]h&]uh1j=hj})ubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMhjM)ubj0 )}(hhh]j5 )}(hX``ste`` The first two double words of the user space Stream Table Entry for the translation. Must be little-endian. Allowed fields: (Refer to "5.2 Stream Table Entry" in SMMUv3 HW Spec) - word-0: V, Cfg, S1Fmt, S1ContextPtr, S1CDMax - word-1: EATS, S1DSS, S1CIR, S1COR, S1CSH, S1STALLDh](j; )}(h``ste``h]jA )}(hj)h]hste}(hj)hhhNhNubah}(h]h ]h"]h$]h&]uh1j@ hj)ubah}(h]h ]h"]h$]h&]uh1j: hc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMhj)ubjW )}(hhh]h)}(hXThe first two double words of the user space Stream Table Entry for the translation. Must be little-endian. Allowed fields: (Refer to "5.2 Stream Table Entry" in SMMUv3 HW Spec) - word-0: V, Cfg, S1Fmt, S1ContextPtr, S1CDMax - word-1: EATS, S1DSS, S1CIR, S1COR, S1CSH, S1STALLDh]hXThe first two double words of the user space Stream Table Entry for the translation. Must be little-endian. Allowed fields: (Refer to “5.2 Stream Table Entry” in SMMUv3 HW Spec) - word-0: V, Cfg, S1Fmt, S1ContextPtr, S1CDMax - word-1: EATS, S1DSS, S1CIR, S1COR, S1CSH, S1STALLD}(hj)hhhNhNubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMhj)ubah}(h]h ]h"]h$]h&]uh1jV hj)ubeh}(h]h ]h"]h$]h&]uh1j4 hj)hMhj)ubah}(h]h ]h"]h$]h&]uh1j/ hjM)ubeh}(h]h ] kernelindentah"]h$]h&]uh1jhjhhhj8hNubh)}(h**Description**h]j>)}(hj)h]h Description}(hj)hhhNhNubah}(h]h ]h"]h$]h&]uh1j=hj)ubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMhjhhubh)}(hXC-EIO will be returned if **ste** is not legal or contains any non-allowed field. Cfg can be used to select a S1, Bypass or Abort configuration. A Bypass nested domain will translate the same as the nesting parent. The S1 will install a Context Descriptor Table pointing at userspace memory translated by the nesting parent.h](h-EIO will be returned if }(hj)hhhNhNubj>)}(h**ste**h]hste}(hj)hhhNhNubah}(h]h ]h"]h$]h&]uh1j=hj)ubhX# is not legal or contains any non-allowed field. Cfg can be used to select a S1, Bypass or Abort configuration. A Bypass nested domain will translate the same as the nesting parent. The S1 will install a Context Descriptor Table pointing at userspace memory translated by the nesting parent.}(hj)hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMhjhhubh)}(hIt's suggested to allocate a vDEVICE object carrying vSID and then re-attach the nested domain, as soon as the vSID is available in the VMM level:h]hIt’s suggested to allocate a vDEVICE object carrying vSID and then re-attach the nested domain, as soon as the vSID is available in the VMM level:}(hj*hhhNhNubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMhjhhubj)}(hhh](j)}(hwhen Cfg=translate, a vDEVICE must be allocated prior to attaching to the allocated nested domain, as CD/ATS invalidations and vevents need a vSID.h]h)}(hwhen Cfg=translate, a vDEVICE must be allocated prior to attaching to the allocated nested domain, as CD/ATS invalidations and vevents need a vSID.h]hwhen Cfg=translate, a vDEVICE must be allocated prior to attaching to the allocated nested domain, as CD/ATS invalidations and vevents need a vSID.}(hj.*hhhNhNubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMhj**ubah}(h]h ]h"]h$]h&]uh1jhj'*ubj)}(hX(when Cfg=bypass/abort, a vDEVICE is not enforced during the nested domain attachment, to support a GBPA case where VM sets CR0.SMMUEN=0. However, if VM sets CR0.SMMUEN=1 while missing a vDEVICE object, kernel would fail to report events to the VM. E.g. F_TRANSLATION when guest STE.Cfg=abort. h]h)}(hX$when Cfg=bypass/abort, a vDEVICE is not enforced during the nested domain attachment, to support a GBPA case where VM sets CR0.SMMUEN=0. However, if VM sets CR0.SMMUEN=1 while missing a vDEVICE object, kernel would fail to report events to the VM. E.g. F_TRANSLATION when guest STE.Cfg=abort.(h]hX$when Cfg=bypass/abort, a vDEVICE is not enforced during the nested domain attachment, to support a GBPA case where VM sets CR0.SMMUEN=0. However, if VM sets CR0.SMMUEN=1 while missing a vDEVICE object, kernel would fail to report events to the VM. E.g. F_TRANSLATION when guest STE.Cfg=abort.}(hjG*hhhNhNubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMhjC*ubah}(h]h ]h"]h$]h&]uh1jhj'*ubeh}(h]h ]h"]h$]h&]jjuh1jhj<*hMhjhhubjG)}(hhh]h}(h]h ]h"]h$]h&]entries](jSiommu_hwpt_amd_guest (C struct)c.iommu_hwpt_amd_guesthNtauh1jFhjhhhj8hNubjX)}(hhh](j])}(hiommu_hwpt_amd_guesth]jc)}(hstruct iommu_hwpt_amd_guesth](ji)}(hjlh]hstruct}(hj{*hhhNhNubah}(h]h ]juah"]h$]h&]uh1jhhjw*hhhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMubj{)}(h h]h }(hj*hhhNhNubah}(h]h ]jah"]h$]h&]uh1jzhjw*hhhj*hMubj)}(hiommu_hwpt_amd_guesth]j)}(hju*h]hiommu_hwpt_amd_guest}(hj*hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj*ubah}(h]h ](jjeh"]h$]h&]hhuh1jhjw*hhhj*hMubeh}(h]h ]h"]h$]h&]hhjuh1jbjjhjs*hhhj*hMubah}(h]jn*ah ](jjeh"]h$]h&]jj)jhuh1j\hj*hMhjp*hhubj)}(hhh]h)}(h?AMD IOMMU guest I/O page table data (IOMMU_HWPT_DATA_AMD_GUEST)h]h?AMD IOMMU guest I/O page table data (IOMMU_HWPT_DATA_AMD_GUEST)}(hj*hhhNhNubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMhj*hhubah}(h]h ]h"]h$]h&]uh1jhjp*hhhj*hMubeh}(h]h ](jstructeh"]h$]h&]jjjj*jj*jjjuh1jWhhhjhj8hNubj)}(h**Definition**:: struct iommu_hwpt_amd_guest { __aligned_u64 dte[4]; }; **Members** ``dte`` Guest Device Table Entry (DTE)h](h)}(h**Definition**::h](j>)}(h**Definition**h]h Definition}(hj*hhhNhNubah}(h]h ]h"]h$]h&]uh1j=hj*ubh:}(hj*hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMhj*ubj)}(h:struct iommu_hwpt_amd_guest { __aligned_u64 dte[4]; };h]h:struct iommu_hwpt_amd_guest { __aligned_u64 dte[4]; };}hj*sbah}(h]h ]h"]h$]h&]hhuh1jhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMhj*ubh)}(h **Members**h]j>)}(hj +h]hMembers}(hj +hhhNhNubah}(h]h ]h"]h$]h&]uh1j=hj +ubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMhj*ubj0 )}(hhh]j5 )}(h&``dte`` Guest Device Table Entry (DTE)h](j; )}(h``dte``h]jA )}(hj*+h]hdte}(hj,+hhhNhNubah}(h]h ]h"]h$]h&]uh1j@ hj(+ubah}(h]h ]h"]h$]h&]uh1j: hc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMhj$+ubjW )}(hhh]h)}(hGuest Device Table Entry (DTE)h]hGuest Device Table Entry (DTE)}(hjC+hhhNhNubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMhj@+ubah}(h]h ]h"]h$]h&]uh1jV hj$+ubeh}(h]h ]h"]h$]h&]uh1j4 hj?+hMhj!+ubah}(h]h ]h"]h$]h&]uh1j/ hj*ubeh}(h]h ] kernelindentah"]h$]h&]uh1jhjhhhj8hNubjG)}(hhh]h}(h]h ]h"]h$]h&]entries](jSiommu_hwpt_data_type (C enum)c.iommu_hwpt_data_typehNtauh1jFhjhhhj8hNubjX)}(hhh](j])}(hiommu_hwpt_data_typeh]jc)}(henum iommu_hwpt_data_typeh](ji)}(hjh]henum}(hj+hhhNhNubah}(h]h ]juah"]h$]h&]uh1jhhj+hhhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMubj{)}(h h]h }(hj+hhhNhNubah}(h]h ]jah"]h$]h&]uh1jzhj+hhhj+hMubj)}(hiommu_hwpt_data_typeh]j)}(hj~+h]hiommu_hwpt_data_type}(hj+hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj+ubah}(h]h ](jjeh"]h$]h&]hhuh1jhj+hhhj+hMubeh}(h]h ]h"]h$]h&]hhjuh1jbjjhj|+hhhj+hMubah}(h]jw+ah ](jjeh"]h$]h&]jj)jhuh1j\hj+hMhjy+hhubj)}(hhh]h)}(hIOMMU HWPT Data Typeh]hIOMMU HWPT Data Type}(hj+hhhNhNubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMhj+hhubah}(h]h ]h"]h$]h&]uh1jhjy+hhhj+hMubeh}(h]h ](jenumeh"]h$]h&]jjjj+jj+jjjuh1jWhhhjhj8hNubj)}(h**Constants** ``IOMMU_HWPT_DATA_NONE`` no data ``IOMMU_HWPT_DATA_VTD_S1`` Intel VT-d stage-1 page table ``IOMMU_HWPT_DATA_ARM_SMMUV3`` ARM SMMUv3 Context Descriptor Table ``IOMMU_HWPT_DATA_AMD_GUEST`` AMD IOMMU guest page tableh](h)}(h **Constants**h]j>)}(hj+h]h Constants}(hj+hhhNhNubah}(h]h ]h"]h$]h&]uh1j=hj+ubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMhj+ubj0 )}(hhh](j5 )}(h!``IOMMU_HWPT_DATA_NONE`` no data h](j; )}(h``IOMMU_HWPT_DATA_NONE``h]jA )}(hj,h]hIOMMU_HWPT_DATA_NONE}(hj ,hhhNhNubah}(h]h ]h"]h$]h&]uh1j@ hj,ubah}(h]h ]h"]h$]h&]uh1j: hc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMhj,ubjW )}(hhh]h)}(hno datah]hno data}(hj ,hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj,hMhj,ubah}(h]h ]h"]h$]h&]uh1jV hj,ubeh}(h]h ]h"]h$]h&]uh1j4 hj,hMhj+ubj5 )}(h9``IOMMU_HWPT_DATA_VTD_S1`` Intel VT-d stage-1 page table h](j; )}(h``IOMMU_HWPT_DATA_VTD_S1``h]jA )}(hj@,h]hIOMMU_HWPT_DATA_VTD_S1}(hjB,hhhNhNubah}(h]h ]h"]h$]h&]uh1j@ hj>,ubah}(h]h ]h"]h$]h&]uh1j: hc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMhj:,ubjW )}(hhh]h)}(hIntel VT-d stage-1 page tableh]hIntel VT-d stage-1 page table}(hjY,hhhNhNubah}(h]h ]h"]h$]h&]uh1hhjU,hMhjV,ubah}(h]h ]h"]h$]h&]uh1jV hj:,ubeh}(h]h ]h"]h$]h&]uh1j4 hjU,hMhj+ubj5 )}(hC``IOMMU_HWPT_DATA_ARM_SMMUV3`` ARM SMMUv3 Context Descriptor Table h](j; )}(h``IOMMU_HWPT_DATA_ARM_SMMUV3``h]jA )}(hjy,h]hIOMMU_HWPT_DATA_ARM_SMMUV3}(hj{,hhhNhNubah}(h]h ]h"]h$]h&]uh1j@ hjw,ubah}(h]h ]h"]h$]h&]uh1j: hc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMhjs,ubjW )}(hhh]h)}(h#ARM SMMUv3 Context Descriptor Tableh]h#ARM SMMUv3 Context Descriptor Table}(hj,hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj,hMhj,ubah}(h]h ]h"]h$]h&]uh1jV hjs,ubeh}(h]h ]h"]h$]h&]uh1j4 hj,hMhj+ubj5 )}(h8``IOMMU_HWPT_DATA_AMD_GUEST`` AMD IOMMU guest page tableh](j; )}(h``IOMMU_HWPT_DATA_AMD_GUEST``h]jA )}(hj,h]hIOMMU_HWPT_DATA_AMD_GUEST}(hj,hhhNhNubah}(h]h ]h"]h$]h&]uh1j@ hj,ubah}(h]h ]h"]h$]h&]uh1j: hc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMhj,ubjW )}(hhh]h)}(hAMD IOMMU guest page tableh]hAMD IOMMU guest page table}(hj,hhhNhNubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMhj,ubah}(h]h ]h"]h$]h&]uh1jV hj,ubeh}(h]h ]h"]h$]h&]uh1j4 hj,hMhj+ubeh}(h]h ]h"]h$]h&]uh1j/ hj+ubeh}(h]h ] kernelindentah"]h$]h&]uh1jhjhhhj8hNubjG)}(hhh]h}(h]h ]h"]h$]h&]entries](jSiommu_hwpt_alloc (C struct)c.iommu_hwpt_allochNtauh1jFhjhhhj8hNubjX)}(hhh](j])}(hiommu_hwpt_alloch]jc)}(hstruct iommu_hwpt_alloch](ji)}(hjlh]hstruct}(hj -hhhNhNubah}(h]h ]juah"]h$]h&]uh1jhhj-hhhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMubj{)}(h h]h }(hj-hhhNhNubah}(h]h ]jah"]h$]h&]uh1jzhj-hhhj-hMubj)}(hiommu_hwpt_alloch]j)}(hj-h]hiommu_hwpt_alloc}(hj,-hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj(-ubah}(h]h ](jjeh"]h$]h&]hhuh1jhj-hhhj-hMubeh}(h]h ]h"]h$]h&]hhjuh1jbjjhj-hhhj-hMubah}(h]j,ah ](jjeh"]h$]h&]jj)jhuh1j\hj-hMhj-hhubj)}(hhh]h)}(hioctl(IOMMU_HWPT_ALLOC)h]hioctl(IOMMU_HWPT_ALLOC)}(hjN-hhhNhNubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMhjK-hhubah}(h]h ]h"]h$]h&]uh1jhj-hhhj-hMubeh}(h]h ](jstructeh"]h$]h&]jjjjf-jjf-jjjuh1jWhhhjhj8hNubj)}(hX**Definition**:: struct iommu_hwpt_alloc { __u32 size; __u32 flags; __u32 dev_id; __u32 pt_id; __u32 out_hwpt_id; __u32 __reserved; __u32 data_type; __u32 data_len; __aligned_u64 data_uptr; __u32 fault_id; __u32 __reserved2; }; **Members** ``size`` sizeof(struct iommu_hwpt_alloc) ``flags`` Combination of enum iommufd_hwpt_alloc_flags ``dev_id`` The device to allocate this HWPT for ``pt_id`` The IOAS or HWPT or vIOMMU to connect this HWPT to ``out_hwpt_id`` The ID of the new HWPT ``__reserved`` Must be 0 ``data_type`` One of enum iommu_hwpt_data_type ``data_len`` Length of the type specific data ``data_uptr`` User pointer to the type specific data ``fault_id`` The ID of IOMMUFD_FAULT object. Valid only if flags field of IOMMU_HWPT_FAULT_ID_VALID is set. ``__reserved2`` Padding to 64-bit alignment. Must be 0.h](h)}(h**Definition**::h](j>)}(h**Definition**h]h Definition}(hjr-hhhNhNubah}(h]h ]h"]h$]h&]uh1j=hjn-ubh:}(hjn-hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMhjj-ubj)}(hstruct iommu_hwpt_alloc { __u32 size; __u32 flags; __u32 dev_id; __u32 pt_id; __u32 out_hwpt_id; __u32 __reserved; __u32 data_type; __u32 data_len; __aligned_u64 data_uptr; __u32 fault_id; __u32 __reserved2; };h]hstruct iommu_hwpt_alloc { __u32 size; __u32 flags; __u32 dev_id; __u32 pt_id; __u32 out_hwpt_id; __u32 __reserved; __u32 data_type; __u32 data_len; __aligned_u64 data_uptr; __u32 fault_id; __u32 __reserved2; };}hj-sbah}(h]h ]h"]h$]h&]hhuh1jhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMhjj-ubh)}(h **Members**h]j>)}(hj-h]hMembers}(hj-hhhNhNubah}(h]h ]h"]h$]h&]uh1j=hj-ubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMhjj-ubj0 )}(hhh](j5 )}(h)``size`` sizeof(struct iommu_hwpt_alloc) h](j; )}(h``size``h]jA )}(hj-h]hsize}(hj-hhhNhNubah}(h]h ]h"]h$]h&]uh1j@ hj-ubah}(h]h ]h"]h$]h&]uh1j: hc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMhj-ubjW )}(hhh]h)}(hsizeof(struct iommu_hwpt_alloc)h]hsizeof(struct iommu_hwpt_alloc)}(hj-hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj-hMhj-ubah}(h]h ]h"]h$]h&]uh1jV hj-ubeh}(h]h ]h"]h$]h&]uh1j4 hj-hMhj-ubj5 )}(h7``flags`` Combination of enum iommufd_hwpt_alloc_flags h](j; )}(h ``flags``h]jA )}(hj-h]hflags}(hj-hhhNhNubah}(h]h ]h"]h$]h&]uh1j@ hj-ubah}(h]h ]h"]h$]h&]uh1j: hc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMhj-ubjW )}(hhh]h)}(h,Combination of enum iommufd_hwpt_alloc_flagsh]h,Combination of enum iommufd_hwpt_alloc_flags}(hj .hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj .hMhj .ubah}(h]h ]h"]h$]h&]uh1jV hj-ubeh}(h]h ]h"]h$]h&]uh1j4 hj .hMhj-ubj5 )}(h0``dev_id`` The device to allocate this HWPT for h](j; )}(h ``dev_id``h]jA )}(hj-.h]hdev_id}(hj/.hhhNhNubah}(h]h ]h"]h$]h&]uh1j@ hj+.ubah}(h]h ]h"]h$]h&]uh1j: hc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMhj'.ubjW )}(hhh]h)}(h$The device to allocate this HWPT forh]h$The device to allocate this HWPT for}(hjF.hhhNhNubah}(h]h ]h"]h$]h&]uh1hhjB.hMhjC.ubah}(h]h ]h"]h$]h&]uh1jV hj'.ubeh}(h]h ]h"]h$]h&]uh1j4 hjB.hMhj-ubj5 )}(h=``pt_id`` The IOAS or HWPT or vIOMMU to connect this HWPT to h](j; )}(h ``pt_id``h]jA )}(hjf.h]hpt_id}(hjh.hhhNhNubah}(h]h ]h"]h$]h&]uh1j@ hjd.ubah}(h]h ]h"]h$]h&]uh1j: hc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMhj`.ubjW )}(hhh]h)}(h2The IOAS or HWPT or vIOMMU to connect this HWPT toh]h2The IOAS or HWPT or vIOMMU to connect this HWPT to}(hj.hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj{.hMhj|.ubah}(h]h ]h"]h$]h&]uh1jV hj`.ubeh}(h]h ]h"]h$]h&]uh1j4 hj{.hMhj-ubj5 )}(h'``out_hwpt_id`` The ID of the new HWPT h](j; )}(h``out_hwpt_id``h]jA )}(hj.h]h out_hwpt_id}(hj.hhhNhNubah}(h]h ]h"]h$]h&]uh1j@ hj.ubah}(h]h ]h"]h$]h&]uh1j: hc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMhj.ubjW )}(hhh]h)}(hThe ID of the new HWPTh]hThe ID of the new HWPT}(hj.hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj.hMhj.ubah}(h]h ]h"]h$]h&]uh1jV hj.ubeh}(h]h ]h"]h$]h&]uh1j4 hj.hMhj-ubj5 )}(h``__reserved`` Must be 0 h](j; )}(h``__reserved``h]jA )}(hj.h]h __reserved}(hj.hhhNhNubah}(h]h ]h"]h$]h&]uh1j@ hj.ubah}(h]h ]h"]h$]h&]uh1j: hc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMhj.ubjW )}(hhh]h)}(h Must be 0h]h Must be 0}(hj.hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj.hMhj.ubah}(h]h ]h"]h$]h&]uh1jV hj.ubeh}(h]h ]h"]h$]h&]uh1j4 hj.hMhj-ubj5 )}(h/``data_type`` One of enum iommu_hwpt_data_type h](j; )}(h ``data_type``h]jA )}(hj/h]h data_type}(hj/hhhNhNubah}(h]h ]h"]h$]h&]uh1j@ hj/ubah}(h]h ]h"]h$]h&]uh1j: hc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMhj /ubjW )}(hhh]h)}(h One of enum iommu_hwpt_data_typeh]h One of enum iommu_hwpt_data_type}(hj*/hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj&/hMhj'/ubah}(h]h ]h"]h$]h&]uh1jV hj /ubeh}(h]h ]h"]h$]h&]uh1j4 hj&/hMhj-ubj5 )}(h.``data_len`` Length of the type specific data h](j; )}(h ``data_len``h]jA )}(hjJ/h]hdata_len}(hjL/hhhNhNubah}(h]h ]h"]h$]h&]uh1j@ hjH/ubah}(h]h ]h"]h$]h&]uh1j: hc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMhjD/ubjW )}(hhh]h)}(h Length of the type specific datah]h Length of the type specific data}(hjc/hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj_/hMhj`/ubah}(h]h ]h"]h$]h&]uh1jV hjD/ubeh}(h]h ]h"]h$]h&]uh1j4 hj_/hMhj-ubj5 )}(h5``data_uptr`` User pointer to the type specific data h](j; )}(h ``data_uptr``h]jA )}(hj/h]h data_uptr}(hj/hhhNhNubah}(h]h ]h"]h$]h&]uh1j@ hj/ubah}(h]h ]h"]h$]h&]uh1j: hc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMhj}/ubjW )}(hhh]h)}(h&User pointer to the type specific datah]h&User pointer to the type specific data}(hj/hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj/hMhj/ubah}(h]h ]h"]h$]h&]uh1jV hj}/ubeh}(h]h ]h"]h$]h&]uh1j4 hj/hMhj-ubj5 )}(hl``fault_id`` The ID of IOMMUFD_FAULT object. Valid only if flags field of IOMMU_HWPT_FAULT_ID_VALID is set. h](j; )}(h ``fault_id``h]jA )}(hj/h]hfault_id}(hj/hhhNhNubah}(h]h ]h"]h$]h&]uh1j@ hj/ubah}(h]h ]h"]h$]h&]uh1j: hc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMhj/ubjW )}(hhh]h)}(h^The ID of IOMMUFD_FAULT object. Valid only if flags field of IOMMU_HWPT_FAULT_ID_VALID is set.h]h^The ID of IOMMUFD_FAULT object. Valid only if flags field of IOMMU_HWPT_FAULT_ID_VALID is set.}(hj/hhhNhNubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMhj/ubah}(h]h ]h"]h$]h&]uh1jV hj/ubeh}(h]h ]h"]h$]h&]uh1j4 hj/hMhj-ubj5 )}(h7``__reserved2`` Padding to 64-bit alignment. Must be 0.h](j; )}(h``__reserved2``h]jA )}(hj/h]h __reserved2}(hj/hhhNhNubah}(h]h ]h"]h$]h&]uh1j@ hj/ubah}(h]h ]h"]h$]h&]uh1j: hc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMhj/ubjW )}(hhh]h)}(h'Padding to 64-bit alignment. Must be 0.h]h'Padding to 64-bit alignment. Must be 0.}(hj0hhhNhNubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMhj 0ubah}(h]h ]h"]h$]h&]uh1jV hj/ubeh}(h]h ]h"]h$]h&]uh1j4 hj 0hMhj-ubeh}(h]h ]h"]h$]h&]uh1j/ hjj-ubeh}(h]h ] kernelindentah"]h$]h&]uh1jhjhhhj8hNubh)}(h**Description**h]j>)}(hj90h]h Description}(hj;0hhhNhNubah}(h]h ]h"]h$]h&]uh1j=hj70ubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMhjhhubh)}(hExplicitly allocate a hardware page table object. This is the same object type that is returned by iommufd_device_attach() and represents the underlying iommu driver's iommu_domain kernel object.h]hExplicitly allocate a hardware page table object. This is the same object type that is returned by iommufd_device_attach() and represents the underlying iommu driver’s iommu_domain kernel object.}(hjO0hhhNhNubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMhjhhubh)}(hX'A kernel-managed HWPT will be created with the mappings from the given IOAS via the **pt_id**. The **data_type** for this allocation must be set to IOMMU_HWPT_DATA_NONE. The HWPT can be allocated as a parent HWPT for a nesting configuration by passing IOMMU_HWPT_ALLOC_NEST_PARENT via **flags**.h](hTA kernel-managed HWPT will be created with the mappings from the given IOAS via the }(hj^0hhhNhNubj>)}(h **pt_id**h]hpt_id}(hjf0hhhNhNubah}(h]h ]h"]h$]h&]uh1j=hj^0ubh. The }(hj^0hhhNhNubj>)}(h **data_type**h]h data_type}(hjx0hhhNhNubah}(h]h ]h"]h$]h&]uh1j=hj^0ubh for this allocation must be set to IOMMU_HWPT_DATA_NONE. The HWPT can be allocated as a parent HWPT for a nesting configuration by passing IOMMU_HWPT_ALLOC_NEST_PARENT via }(hj^0hhhNhNubj>)}(h **flags**h]hflags}(hj0hhhNhNubah}(h]h ]h"]h$]h&]uh1j=hj^0ubh.}(hj^0hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMhjhhubh)}(hXA user-managed nested HWPT will be created from a given vIOMMU (wrapping a parent HWPT) or a parent HWPT via **pt_id**, in which the parent HWPT must be allocated previously via the same ioctl from a given IOAS (**pt_id**). In this case, the **data_type** must be set to a pre-defined type corresponding to an I/O page table type supported by the underlying IOMMU hardware. The device via **dev_id** and the vIOMMU via **pt_id** must be associated to the same IOMMU instance.h](hmA user-managed nested HWPT will be created from a given vIOMMU (wrapping a parent HWPT) or a parent HWPT via }(hj0hhhNhNubj>)}(h **pt_id**h]hpt_id}(hj0hhhNhNubah}(h]h ]h"]h$]h&]uh1j=hj0ubh^, in which the parent HWPT must be allocated previously via the same ioctl from a given IOAS (}(hj0hhhNhNubj>)}(h **pt_id**h]hpt_id}(hj0hhhNhNubah}(h]h ]h"]h$]h&]uh1j=hj0ubh). In this case, the }(hj0hhhNhNubj>)}(h **data_type**h]h data_type}(hj0hhhNhNubah}(h]h ]h"]h$]h&]uh1j=hj0ubh must be set to a pre-defined type corresponding to an I/O page table type supported by the underlying IOMMU hardware. The device via }(hj0hhhNhNubj>)}(h **dev_id**h]hdev_id}(hj0hhhNhNubah}(h]h ]h"]h$]h&]uh1j=hj0ubh and the vIOMMU via }(hj0hhhNhNubj>)}(h **pt_id**h]hpt_id}(hj0hhhNhNubah}(h]h ]h"]h$]h&]uh1j=hj0ubh/ must be associated to the same IOMMU instance.}(hj0hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMhjhhubh)}(hIf the **data_type** is set to IOMMU_HWPT_DATA_NONE, **data_len** and **data_uptr** should be zero. Otherwise, both **data_len** and **data_uptr** must be given.h](hIf the }(hj 1hhhNhNubj>)}(h **data_type**h]h data_type}(hj1hhhNhNubah}(h]h ]h"]h$]h&]uh1j=hj 1ubh! is set to IOMMU_HWPT_DATA_NONE, }(hj 1hhhNhNubj>)}(h **data_len**h]hdata_len}(hj&1hhhNhNubah}(h]h ]h"]h$]h&]uh1j=hj 1ubh and }(hj 1hhhNhNubj>)}(h **data_uptr**h]h data_uptr}(hj81hhhNhNubah}(h]h ]h"]h$]h&]uh1j=hj 1ubh! should be zero. Otherwise, both }(hj 1hhhNhNubj>)}(h **data_len**h]hdata_len}(hjJ1hhhNhNubah}(h]h ]h"]h$]h&]uh1j=hj 1ubh and }(hj 1hhhNhNubj>)}(h **data_uptr**h]h data_uptr}(hj\1hhhNhNubah}(h]h ]h"]h$]h&]uh1j=hj 1ubh must be given.}(hj 1hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhM hjhhubjG)}(hhh]h}(h]h ]h"]h$]h&]entries](jS iommu_hw_info_vtd_flags (C enum)c.iommu_hw_info_vtd_flagshNtauh1jFhjhhhj8hNubjX)}(hhh](j])}(hiommu_hw_info_vtd_flagsh]jc)}(henum iommu_hw_info_vtd_flagsh](ji)}(hjh]henum}(hj1hhhNhNubah}(h]h ]juah"]h$]h&]uh1jhhj1hhhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMubj{)}(h h]h }(hj1hhhNhNubah}(h]h ]jah"]h$]h&]uh1jzhj1hhhj1hMubj)}(hiommu_hw_info_vtd_flagsh]j)}(hj1h]hiommu_hw_info_vtd_flags}(hj1hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj1ubah}(h]h ](jjeh"]h$]h&]hhuh1jhj1hhhj1hMubeh}(h]h ]h"]h$]h&]hhjuh1jbjjhj1hhhj1hMubah}(h]j1ah ](jjeh"]h$]h&]jj)jhuh1j\hj1hMhj1hhubj)}(hhh]h)}(hFlags for VT-d hw_infoh]hFlags for VT-d hw_info}(hj1hhhNhNubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMhj1hhubah}(h]h ]h"]h$]h&]uh1jhj1hhhj1hMubeh}(h]h ](jenumeh"]h$]h&]jjjj1jj1jjjuh1jWhhhjhj8hNubj)}(h**Constants** ``IOMMU_HW_INFO_VTD_ERRATA_772415_SPR17`` If set, disallow read-only mappings on a nested_parent domain. https://www.intel.com/content/www/us/en/content-details/772415/content-details.htmlh](h)}(h **Constants**h]j>)}(hj1h]h Constants}(hj1hhhNhNubah}(h]h ]h"]h$]h&]uh1j=hj1ubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhM#hj1ubj0 )}(hhh]j5 )}(h``IOMMU_HW_INFO_VTD_ERRATA_772415_SPR17`` If set, disallow read-only mappings on a nested_parent domain. https://www.intel.com/content/www/us/en/content-details/772415/content-details.htmlh](j; )}(h)``IOMMU_HW_INFO_VTD_ERRATA_772415_SPR17``h]jA )}(hj2h]h%IOMMU_HW_INFO_VTD_ERRATA_772415_SPR17}(hj2hhhNhNubah}(h]h ]h"]h$]h&]uh1j@ hj2ubah}(h]h ]h"]h$]h&]uh1j: hc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhM'hj 2ubjW )}(hhh]h)}(hIf set, disallow read-only mappings on a nested_parent domain. https://www.intel.com/content/www/us/en/content-details/772415/content-details.htmlh](h?If set, disallow read-only mappings on a nested_parent domain. }(hj*2hhhNhNubh reference)}(hShttps://www.intel.com/content/www/us/en/content-details/772415/content-details.htmlh]hShttps://www.intel.com/content/www/us/en/content-details/772415/content-details.html}(hj42hhhNhNubah}(h]h ]h"]h$]h&]refurij62uh1j22hj*2ubeh}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhM&hj'2ubah}(h]h ]h"]h$]h&]uh1jV hj 2ubeh}(h]h ]h"]h$]h&]uh1j4 hj&2hM'hj2ubah}(h]h ]h"]h$]h&]uh1j/ hj1ubeh}(h]h ] kernelindentah"]h$]h&]uh1jhjhhhj8hNubjG)}(hhh]h}(h]h ]h"]h$]h&]entries](jSiommu_hw_info_vtd (C struct)c.iommu_hw_info_vtdhNtauh1jFhjhhhj8hNubjX)}(hhh](j])}(hiommu_hw_info_vtdh]jc)}(hstruct iommu_hw_info_vtdh](ji)}(hjlh]hstruct}(hj|2hhhNhNubah}(h]h ]juah"]h$]h&]uh1jhhjx2hhhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhM-ubj{)}(h h]h }(hj2hhhNhNubah}(h]h ]jah"]h$]h&]uh1jzhjx2hhhj2hM-ubj)}(hiommu_hw_info_vtdh]j)}(hjv2h]hiommu_hw_info_vtd}(hj2hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj2ubah}(h]h ](jjeh"]h$]h&]hhuh1jhjx2hhhj2hM-ubeh}(h]h ]h"]h$]h&]hhjuh1jbjjhjt2hhhj2hM-ubah}(h]jo2ah ](jjeh"]h$]h&]jj)jhuh1j\hj2hM-hjq2hhubj)}(hhh]h)}(hIntel VT-d hardware informationh]hIntel VT-d hardware information}(hj2hhhNhNubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhM)hj2hhubah}(h]h ]h"]h$]h&]uh1jhjq2hhhj2hM-ubeh}(h]h ](jstructeh"]h$]h&]jjjj2jj2jjjuh1jWhhhjhj8hNubj)}(hX**Definition**:: struct iommu_hw_info_vtd { __u32 flags; __u32 __reserved; __aligned_u64 cap_reg; __aligned_u64 ecap_reg; }; **Members** ``flags`` Combination of enum iommu_hw_info_vtd_flags ``__reserved`` Must be 0 ``cap_reg`` Value of Intel VT-d capability register defined in VT-d spec section 11.4.2 Capability Register. ``ecap_reg`` Value of Intel VT-d capability register defined in VT-d spec section 11.4.3 Extended Capability Register.h](h)}(h**Definition**::h](j>)}(h**Definition**h]h Definition}(hj2hhhNhNubah}(h]h ]h"]h$]h&]uh1j=hj2ubh:}(hj2hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhM-hj2ubj)}(h{struct iommu_hw_info_vtd { __u32 flags; __u32 __reserved; __aligned_u64 cap_reg; __aligned_u64 ecap_reg; };h]h{struct iommu_hw_info_vtd { __u32 flags; __u32 __reserved; __aligned_u64 cap_reg; __aligned_u64 ecap_reg; };}hj2sbah}(h]h ]h"]h$]h&]hhuh1jhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhM/hj2ubh)}(h **Members**h]j>)}(hj 3h]hMembers}(hj3hhhNhNubah}(h]h ]h"]h$]h&]uh1j=hj 3ubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhM6hj2ubj0 )}(hhh](j5 )}(h6``flags`` Combination of enum iommu_hw_info_vtd_flags h](j; )}(h ``flags``h]jA )}(hj+3h]hflags}(hj-3hhhNhNubah}(h]h ]h"]h$]h&]uh1j@ hj)3ubah}(h]h ]h"]h$]h&]uh1j: hc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhM,hj%3ubjW )}(hhh]h)}(h+Combination of enum iommu_hw_info_vtd_flagsh]h+Combination of enum iommu_hw_info_vtd_flags}(hjD3hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj@3hM,hjA3ubah}(h]h ]h"]h$]h&]uh1jV hj%3ubeh}(h]h ]h"]h$]h&]uh1j4 hj@3hM,hj"3ubj5 )}(h``__reserved`` Must be 0 h](j; )}(h``__reserved``h]jA )}(hjd3h]h __reserved}(hjf3hhhNhNubah}(h]h ]h"]h$]h&]uh1j@ hjb3ubah}(h]h ]h"]h$]h&]uh1j: hc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhM-hj^3ubjW )}(hhh]h)}(h Must be 0h]h Must be 0}(hj}3hhhNhNubah}(h]h ]h"]h$]h&]uh1hhjy3hM-hjz3ubah}(h]h ]h"]h$]h&]uh1jV hj^3ubeh}(h]h ]h"]h$]h&]uh1j4 hjy3hM-hj"3ubj5 )}(hm``cap_reg`` Value of Intel VT-d capability register defined in VT-d spec section 11.4.2 Capability Register. h](j; )}(h ``cap_reg``h]jA )}(hj3h]hcap_reg}(hj3hhhNhNubah}(h]h ]h"]h$]h&]uh1j@ hj3ubah}(h]h ]h"]h$]h&]uh1j: hc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhM0hj3ubjW )}(hhh]h)}(h`Value of Intel VT-d capability register defined in VT-d spec section 11.4.2 Capability Register.h]h`Value of Intel VT-d capability register defined in VT-d spec section 11.4.2 Capability Register.}(hj3hhhNhNubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhM/hj3ubah}(h]h ]h"]h$]h&]uh1jV hj3ubeh}(h]h ]h"]h$]h&]uh1j4 hj3hM0hj"3ubj5 )}(hv``ecap_reg`` Value of Intel VT-d capability register defined in VT-d spec section 11.4.3 Extended Capability Register.h](j; )}(h ``ecap_reg``h]jA )}(hj3h]hecap_reg}(hj3hhhNhNubah}(h]h ]h"]h$]h&]uh1j@ hj3ubah}(h]h ]h"]h$]h&]uh1j: hc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhM1hj3ubjW )}(hhh]h)}(hiValue of Intel VT-d capability register defined in VT-d spec section 11.4.3 Extended Capability Register.h]hiValue of Intel VT-d capability register defined in VT-d spec section 11.4.3 Extended Capability Register.}(hj3hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj3hM1hj3ubah}(h]h ]h"]h$]h&]uh1jV hj3ubeh}(h]h ]h"]h$]h&]uh1j4 hj3hM1hj"3ubeh}(h]h ]h"]h$]h&]uh1j/ hj2ubeh}(h]h ] kernelindentah"]h$]h&]uh1jhjhhhj8hNubh)}(h**Description**h]j>)}(hj4h]h Description}(hj4hhhNhNubah}(h]h ]h"]h$]h&]uh1j=hj4ubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhM5hjhhubh)}(hSUser needs to understand the Intel VT-d specification to decode the register value.h]hSUser needs to understand the Intel VT-d specification to decode the register value.}(hj/4hhhNhNubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhM2hjhhubjG)}(hhh]h}(h]h ]h"]h$]h&]entries](jS#iommu_hw_info_arm_smmuv3 (C struct)c.iommu_hw_info_arm_smmuv3hNtauh1jFhjhhhj8hNubjX)}(hhh](j])}(hiommu_hw_info_arm_smmuv3h]jc)}(hstruct iommu_hw_info_arm_smmuv3h](ji)}(hjlh]hstruct}(hjW4hhhNhNubah}(h]h ]juah"]h$]h&]uh1jhhjS4hhhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhM8ubj{)}(h h]h }(hje4hhhNhNubah}(h]h ]jah"]h$]h&]uh1jzhjS4hhhjd4hM8ubj)}(hiommu_hw_info_arm_smmuv3h]j)}(hjQ4h]hiommu_hw_info_arm_smmuv3}(hjw4hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjs4ubah}(h]h ](jjeh"]h$]h&]hhuh1jhjS4hhhjd4hM8ubeh}(h]h ]h"]h$]h&]hhjuh1jbjjhjO4hhhjd4hM8ubah}(h]jJ4ah ](jjeh"]h$]h&]jj)jhuh1j\hjd4hM8hjL4hhubj)}(hhh]h)}(h?ARM SMMUv3 hardware information (IOMMU_HW_INFO_TYPE_ARM_SMMUV3)h]h?ARM SMMUv3 hardware information (IOMMU_HW_INFO_TYPE_ARM_SMMUV3)}(hj4hhhNhNubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhM>hj4hhubah}(h]h ]h"]h$]h&]uh1jhjL4hhhjd4hM8ubeh}(h]h ](jstructeh"]h$]h&]jjjj4jj4jjjuh1jWhhhjhj8hNubj)}(hX**Definition**:: struct iommu_hw_info_arm_smmuv3 { __u32 flags; __u32 __reserved; __u32 idr[6]; __u32 iidr; __u32 aidr; }; **Members** ``flags`` Must be set to 0 ``__reserved`` Must be 0 ``idr`` Implemented features for ARM SMMU Non-secure programming interface ``iidr`` Information about the implementation and implementer of ARM SMMU, and architecture version supported ``aidr`` ARM SMMU architecture versionh](h)}(h**Definition**::h](j>)}(h**Definition**h]h Definition}(hj4hhhNhNubah}(h]h ]h"]h$]h&]uh1j=hj4ubh:}(hj4hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMBhj4ubj)}(h}struct iommu_hw_info_arm_smmuv3 { __u32 flags; __u32 __reserved; __u32 idr[6]; __u32 iidr; __u32 aidr; };h]h}struct iommu_hw_info_arm_smmuv3 { __u32 flags; __u32 __reserved; __u32 idr[6]; __u32 iidr; __u32 aidr; };}hj4sbah}(h]h ]h"]h$]h&]hhuh1jhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMDhj4ubh)}(h **Members**h]j>)}(hj4h]hMembers}(hj4hhhNhNubah}(h]h ]h"]h$]h&]uh1j=hj4ubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMLhj4ubj0 )}(hhh](j5 )}(h``flags`` Must be set to 0 h](j; )}(h ``flags``h]jA )}(hj5h]hflags}(hj5hhhNhNubah}(h]h ]h"]h$]h&]uh1j@ hj5ubah}(h]h ]h"]h$]h&]uh1j: hc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMBhj5ubjW )}(hhh]h)}(hMust be set to 0h]hMust be set to 0}(hj5hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj5hMBhj5ubah}(h]h ]h"]h$]h&]uh1jV hj5ubeh}(h]h ]h"]h$]h&]uh1j4 hj5hMBhj4ubj5 )}(h``__reserved`` Must be 0 h](j; )}(h``__reserved``h]jA )}(hj?5h]h __reserved}(hjA5hhhNhNubah}(h]h ]h"]h$]h&]uh1j@ hj=5ubah}(h]h ]h"]h$]h&]uh1j: hc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMChj95ubjW )}(hhh]h)}(h Must be 0h]h Must be 0}(hjX5hhhNhNubah}(h]h ]h"]h$]h&]uh1hhjT5hMChjU5ubah}(h]h ]h"]h$]h&]uh1jV hj95ubeh}(h]h ]h"]h$]h&]uh1j4 hjT5hMChj4ubj5 )}(hK``idr`` Implemented features for ARM SMMU Non-secure programming interface h](j; )}(h``idr``h]jA )}(hjx5h]hidr}(hjz5hhhNhNubah}(h]h ]h"]h$]h&]uh1j@ hjv5ubah}(h]h ]h"]h$]h&]uh1j: hc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMDhjr5ubjW )}(hhh]h)}(hBImplemented features for ARM SMMU Non-secure programming interfaceh]hBImplemented features for ARM SMMU Non-secure programming interface}(hj5hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj5hMDhj5ubah}(h]h ]h"]h$]h&]uh1jV hjr5ubeh}(h]h ]h"]h$]h&]uh1j4 hj5hMDhj4ubj5 )}(hn``iidr`` Information about the implementation and implementer of ARM SMMU, and architecture version supported h](j; )}(h``iidr``h]jA )}(hj5h]hiidr}(hj5hhhNhNubah}(h]h ]h"]h$]h&]uh1j@ hj5ubah}(h]h ]h"]h$]h&]uh1j: hc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMFhj5ubjW )}(hhh]h)}(hdInformation about the implementation and implementer of ARM SMMU, and architecture version supportedh]hdInformation about the implementation and implementer of ARM SMMU, and architecture version supported}(hj5hhhNhNubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMEhj5ubah}(h]h ]h"]h$]h&]uh1jV hj5ubeh}(h]h ]h"]h$]h&]uh1j4 hj5hMFhj4ubj5 )}(h&``aidr`` ARM SMMU architecture versionh](j; )}(h``aidr``h]jA )}(hj5h]haidr}(hj5hhhNhNubah}(h]h ]h"]h$]h&]uh1j@ hj5ubah}(h]h ]h"]h$]h&]uh1j: hc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMFhj5ubjW )}(hhh]h)}(hARM SMMU architecture versionh]hARM SMMU architecture version}(hj6hhhNhNubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMGhj6ubah}(h]h ]h"]h$]h&]uh1jV hj5ubeh}(h]h ]h"]h$]h&]uh1j4 hj6hMFhj4ubeh}(h]h ]h"]h$]h&]uh1j/ hj4ubeh}(h]h ] kernelindentah"]h$]h&]uh1jhjhhhj8hNubh)}(h**Description**h]j>)}(hj.6h]h Description}(hj06hhhNhNubah}(h]h ]h"]h$]h&]uh1j=hj,6ubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMJhjhhubh)}(hwFor the details of **idr**, **iidr** and **aidr**, please refer to the chapters from 6.3.1 to 6.3.6 in the SMMUv3 Spec.h](hFor the details of }(hjD6hhhNhNubj>)}(h**idr**h]hidr}(hjL6hhhNhNubah}(h]h ]h"]h$]h&]uh1j=hjD6ubh, }(hjD6hhhNhNubj>)}(h**iidr**h]hiidr}(hj^6hhhNhNubah}(h]h ]h"]h$]h&]uh1j=hjD6ubh and }(hjD6hhhNhNubj>)}(h**aidr**h]haidr}(hjp6hhhNhNubah}(h]h ]h"]h$]h&]uh1j=hjD6ubhF, please refer to the chapters from 6.3.1 to 6.3.6 in the SMMUv3 Spec.}(hjD6hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMGhjhhubh)}(hThis reports the raw HW capability, and not all bits are meaningful to be read by userspace. Only the following fields should be used:h]hThis reports the raw HW capability, and not all bits are meaningful to be read by userspace. Only the following fields should be used:}(hj6hhhNhNubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMJhjhhubh)}(hidr[0]: ST_LEVEL, TERM_MODEL, STALL_MODEL, TTENDIAN , CD2L, ASID16, TTF idr[1]: SIDSIZE, SSIDSIZE idr[3]: BBML, RIL idr[5]: VAX, GRAN64K, GRAN16K, GRAN4Kh]hidr[0]: ST_LEVEL, TERM_MODEL, STALL_MODEL, TTENDIAN , CD2L, ASID16, TTF idr[1]: SIDSIZE, SSIDSIZE idr[3]: BBML, RIL idr[5]: VAX, GRAN64K, GRAN16K, GRAN4K}(hj6hhhNhNubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMMhjhhubj)}(hhh](j)}(h@S1P should be assumed to be true if a NESTED HWPT can be createdh]h)}(hj6h]h@S1P should be assumed to be true if a NESTED HWPT can be created}(hj6hhhNhNubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMRhj6ubah}(h]h ]h"]h$]h&]uh1jhj6ubj)}(hQVFIO/iommufd only support platforms with COHACC, it should be assumed to be true.h]h)}(hQVFIO/iommufd only support platforms with COHACC, it should be assumed to be true.h]hQVFIO/iommufd only support platforms with COHACC, it should be assumed to be true.}(hj6hhhNhNubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMShj6ubah}(h]h ]h"]h$]h&]uh1jhj6ubj)}(h~ATS is a per-device property. If the VMM describes any devices as ATS capable in ACPI/DT it should set the corresponding idr. h]h)}(h}ATS is a per-device property. If the VMM describes any devices as ATS capable in ACPI/DT it should set the corresponding idr.h]h}ATS is a per-device property. If the VMM describes any devices as ATS capable in ACPI/DT it should set the corresponding idr.}(hj6hhhNhNubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMUhj6ubah}(h]h ]h"]h$]h&]uh1jhj6ubeh}(h]h ]h"]h$]h&]jjuh1jhj6hMRhjhhubh)}(hX-This list may expand in future (eg E0PD, AIE, PBHA, D128, DS etc). It is important that VMMs do not read bits outside the list to allow for compatibility with future kernels. Several features in the SMMUv3 architecture are not currently supported by the kernel for nesting: HTTU, BTM, MPAM and others.h]hX-This list may expand in future (eg E0PD, AIE, PBHA, D128, DS etc). It is important that VMMs do not read bits outside the list to allow for compatibility with future kernels. Several features in the SMMUv3 architecture are not currently supported by the kernel for nesting: HTTU, BTM, MPAM and others.}(hj6hhhNhNubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMXhjhhubjG)}(hhh]h}(h]h ]h"]h$]h&]entries](jS'iommu_hw_info_tegra241_cmdqv (C struct)c.iommu_hw_info_tegra241_cmdqvhNtauh1jFhjhhhj8hNubjX)}(hhh](j])}(hiommu_hw_info_tegra241_cmdqvh]jc)}(h#struct iommu_hw_info_tegra241_cmdqvh](ji)}(hjlh]hstruct}(hj"7hhhNhNubah}(h]h ]juah"]h$]h&]uh1jhhj7hhhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMaubj{)}(h h]h }(hj07hhhNhNubah}(h]h ]jah"]h$]h&]uh1jzhj7hhhj/7hMaubj)}(hiommu_hw_info_tegra241_cmdqvh]j)}(hj7h]hiommu_hw_info_tegra241_cmdqv}(hjB7hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj>7ubah}(h]h ](jjeh"]h$]h&]hhuh1jhj7hhhj/7hMaubeh}(h]h ]h"]h$]h&]hhjuh1jbjjhj7hhhj/7hMaubah}(h]j7ah ](jjeh"]h$]h&]jj)jhuh1j\hj/7hMahj7hhubj)}(hhh]h)}(hNNVIDIA Tegra241 CMDQV Hardware Information (IOMMU_HW_INFO_TYPE_TEGRA241_CMDQV)h]hNNVIDIA Tegra241 CMDQV Hardware Information (IOMMU_HW_INFO_TYPE_TEGRA241_CMDQV)}(hjd7hhhNhNubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMhhja7hhubah}(h]h ]h"]h$]h&]uh1jhj7hhhj/7hMaubeh}(h]h ](jstructeh"]h$]h&]jjjj|7jj|7jjjuh1jWhhhjhj8hNubj)}(hX**Definition**:: struct iommu_hw_info_tegra241_cmdqv { __u32 flags; __u8 version; __u8 log2vcmdqs; __u8 log2vsids; __u8 __reserved; }; **Members** ``flags`` Must be 0 ``version`` Version number for the CMDQ-V HW for PARAM bits[03:00] ``log2vcmdqs`` Log2 of the total number of VCMDQs for PARAM bits[07:04] ``log2vsids`` Log2 of the total number of SID replacements for PARAM bits[15:12] ``__reserved`` Must be 0h](h)}(h**Definition**::h](j>)}(h**Definition**h]h Definition}(hj7hhhNhNubah}(h]h ]h"]h$]h&]uh1j=hj7ubh:}(hj7hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMlhj7ubj)}(hstruct iommu_hw_info_tegra241_cmdqv { __u32 flags; __u8 version; __u8 log2vcmdqs; __u8 log2vsids; __u8 __reserved; };h]hstruct iommu_hw_info_tegra241_cmdqv { __u32 flags; __u8 version; __u8 log2vcmdqs; __u8 log2vsids; __u8 __reserved; };}hj7sbah}(h]h ]h"]h$]h&]hhuh1jhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMnhj7ubh)}(h **Members**h]j>)}(hj7h]hMembers}(hj7hhhNhNubah}(h]h ]h"]h$]h&]uh1j=hj7ubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMvhj7ubj0 )}(hhh](j5 )}(h``flags`` Must be 0 h](j; )}(h ``flags``h]jA )}(hj7h]hflags}(hj7hhhNhNubah}(h]h ]h"]h$]h&]uh1j@ hj7ubah}(h]h ]h"]h$]h&]uh1j: hc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMlhj7ubjW )}(hhh]h)}(h Must be 0h]h Must be 0}(hj7hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj7hMlhj7ubah}(h]h ]h"]h$]h&]uh1jV hj7ubeh}(h]h ]h"]h$]h&]uh1j4 hj7hMlhj7ubj5 )}(hC``version`` Version number for the CMDQ-V HW for PARAM bits[03:00] h](j; )}(h ``version``h]jA )}(hj 8h]hversion}(hj 8hhhNhNubah}(h]h ]h"]h$]h&]uh1j@ hj8ubah}(h]h ]h"]h$]h&]uh1j: hc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMmhj8ubjW )}(hhh]h)}(h6Version number for the CMDQ-V HW for PARAM bits[03:00]h]h6Version number for the CMDQ-V HW for PARAM bits[03:00]}(hj#8hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj8hMmhj 8ubah}(h]h ]h"]h$]h&]uh1jV hj8ubeh}(h]h ]h"]h$]h&]uh1j4 hj8hMmhj7ubj5 )}(hH``log2vcmdqs`` Log2 of the total number of VCMDQs for PARAM bits[07:04] h](j; )}(h``log2vcmdqs``h]jA )}(hjC8h]h log2vcmdqs}(hjE8hhhNhNubah}(h]h ]h"]h$]h&]uh1j@ hjA8ubah}(h]h ]h"]h$]h&]uh1j: hc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMnhj=8ubjW )}(hhh]h)}(h8Log2 of the total number of VCMDQs for PARAM bits[07:04]h]h8Log2 of the total number of VCMDQs for PARAM bits[07:04]}(hj\8hhhNhNubah}(h]h ]h"]h$]h&]uh1hhjX8hMnhjY8ubah}(h]h ]h"]h$]h&]uh1jV hj=8ubeh}(h]h ]h"]h$]h&]uh1j4 hjX8hMnhj7ubj5 )}(hQ``log2vsids`` Log2 of the total number of SID replacements for PARAM bits[15:12] h](j; )}(h ``log2vsids``h]jA )}(hj|8h]h log2vsids}(hj~8hhhNhNubah}(h]h ]h"]h$]h&]uh1j@ hjz8ubah}(h]h ]h"]h$]h&]uh1j: hc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMohjv8ubjW )}(hhh]h)}(hBLog2 of the total number of SID replacements for PARAM bits[15:12]h]hBLog2 of the total number of SID replacements for PARAM bits[15:12]}(hj8hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj8hMohj8ubah}(h]h ]h"]h$]h&]uh1jV hjv8ubeh}(h]h ]h"]h$]h&]uh1j4 hj8hMohj7ubj5 )}(h``__reserved`` Must be 0h](j; )}(h``__reserved``h]jA )}(hj8h]h __reserved}(hj8hhhNhNubah}(h]h ]h"]h$]h&]uh1j@ hj8ubah}(h]h ]h"]h$]h&]uh1j: hc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMohj8ubjW )}(hhh]h)}(h Must be 0h]h Must be 0}(hj8hhhNhNubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMphj8ubah}(h]h ]h"]h$]h&]uh1jV hj8ubeh}(h]h ]h"]h$]h&]uh1j4 hj8hMohj7ubeh}(h]h ]h"]h$]h&]uh1j/ hj7ubeh}(h]h ] kernelindentah"]h$]h&]uh1jhjhhhj8hNubh)}(h**Description**h]j>)}(hj8h]h Description}(hj8hhhNhNubah}(h]h ]h"]h$]h&]uh1j=hj8ubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMshjhhubh)}(hVMM can use these fields directly in its emulated global PARAM register. Note that only one Virtual Interface (VINTF) should be exposed to a VM, i.e. PARAM bits[11:08] should be set to 0 for log2 of the total number of VINTFs.h]hVMM can use these fields directly in its emulated global PARAM register. Note that only one Virtual Interface (VINTF) should be exposed to a VM, i.e. PARAM bits[11:08] should be set to 0 for log2 of the total number of VINTFs.}(hj9hhhNhNubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMphjhhubjG)}(hhh]h}(h]h ]h"]h$]h&]entries](jSiommu_hw_info_amd (C struct)c.iommu_hw_info_amdhNtauh1jFhjhhhj8hNubjX)}(hhh](j])}(hiommu_hw_info_amdh]jc)}(hstruct iommu_hw_info_amdh](ji)}(hjlh]hstruct}(hj69hhhNhNubah}(h]h ]juah"]h$]h&]uh1jhhj29hhhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMwubj{)}(h h]h }(hjD9hhhNhNubah}(h]h ]jah"]h$]h&]uh1jzhj29hhhjC9hMwubj)}(hiommu_hw_info_amdh]j)}(hj09h]hiommu_hw_info_amd}(hjV9hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjR9ubah}(h]h ](jjeh"]h$]h&]hhuh1jhj29hhhjC9hMwubeh}(h]h ]h"]h$]h&]hhjuh1jbjjhj.9hhhjC9hMwubah}(h]j)9ah ](jjeh"]h$]h&]jj)jhuh1j\hjC9hMwhj+9hhubj)}(hhh]h)}(hAMD IOMMU device infoh]hAMD IOMMU device info}(hjx9hhhNhNubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhM~hju9hhubah}(h]h ]h"]h$]h&]uh1jhj+9hhhjC9hMwubeh}(h]h ](jstructeh"]h$]h&]jjjj9jj9jjjuh1jWhhhjhj8hNubj)}(h**Definition**:: struct iommu_hw_info_amd { __aligned_u64 efr; __aligned_u64 efr2; }; **Members** ``efr`` Value of AMD IOMMU Extended Feature Register (EFR) ``efr2`` Value of AMD IOMMU Extended Feature 2 Register (EFR2)h](h)}(h**Definition**::h](j>)}(h**Definition**h]h Definition}(hj9hhhNhNubah}(h]h ]h"]h$]h&]uh1j=hj9ubh:}(hj9hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMhj9ubj)}(hLstruct iommu_hw_info_amd { __aligned_u64 efr; __aligned_u64 efr2; };h]hLstruct iommu_hw_info_amd { __aligned_u64 efr; __aligned_u64 efr2; };}hj9sbah}(h]h ]h"]h$]h&]hhuh1jhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMhj9ubh)}(h **Members**h]j>)}(hj9h]hMembers}(hj9hhhNhNubah}(h]h ]h"]h$]h&]uh1j=hj9ubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMhj9ubj0 )}(hhh](j5 )}(h;``efr`` Value of AMD IOMMU Extended Feature Register (EFR) h](j; )}(h``efr``h]jA )}(hj9h]hefr}(hj9hhhNhNubah}(h]h ]h"]h$]h&]uh1j@ hj9ubah}(h]h ]h"]h$]h&]uh1j: hc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMhj9ubjW )}(hhh]h)}(h2Value of AMD IOMMU Extended Feature Register (EFR)h]h2Value of AMD IOMMU Extended Feature Register (EFR)}(hj9hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj9hMhj9ubah}(h]h ]h"]h$]h&]uh1jV hj9ubeh}(h]h ]h"]h$]h&]uh1j4 hj9hMhj9ubj5 )}(h>``efr2`` Value of AMD IOMMU Extended Feature 2 Register (EFR2)h](j; )}(h``efr2``h]jA )}(hj:h]hefr2}(hj :hhhNhNubah}(h]h ]h"]h$]h&]uh1j@ hj:ubah}(h]h ]h"]h$]h&]uh1j: hc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMhj:ubjW )}(hhh]h)}(h5Value of AMD IOMMU Extended Feature 2 Register (EFR2)h]h5Value of AMD IOMMU Extended Feature 2 Register (EFR2)}(hj7:hhhNhNubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMhj4:ubah}(h]h ]h"]h$]h&]uh1jV hj:ubeh}(h]h ]h"]h$]h&]uh1j4 hj3:hMhj9ubeh}(h]h ]h"]h$]h&]uh1j/ hj9ubeh}(h]h ] kernelindentah"]h$]h&]uh1jhjhhhj8hNubh)}(h**Description**h]j>)}(hja:h]h Description}(hjc:hhhNhNubah}(h]h ]h"]h$]h&]uh1j=hj_:ubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMhjhhubh)}(hPlease See description of these registers in the following sections of the AMD I/O Virtualization Technology (IOMMU) Specification. (https://docs.amd.com/v/u/en-US/48882_3.10_PUB)h](hPlease See description of these registers in the following sections of the AMD I/O Virtualization Technology (IOMMU) Specification. (}(hjw:hhhNhNubj32)}(h-https://docs.amd.com/v/u/en-US/48882_3.10_PUBh]h-https://docs.amd.com/v/u/en-US/48882_3.10_PUB}(hj:hhhNhNubah}(h]h ]h"]h$]h&]refurij:uh1j22hjw:ubh)}(hjw:hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMhjhhubj)}(hhh](j)}(h1MMIO Offset 0030h IOMMU Extended Feature Registerh]h)}(hj:h]h1MMIO Offset 0030h IOMMU Extended Feature Register}(hj:hhhNhNubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMhj:ubah}(h]h ]h"]h$]h&]uh1jhj:ubj)}(h4MMIO Offset 01A0h IOMMU Extended Feature 2 Register h]h)}(h3MMIO Offset 01A0h IOMMU Extended Feature 2 Registerh]h3MMIO Offset 01A0h IOMMU Extended Feature 2 Register}(hj:hhhNhNubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMhj:ubah}(h]h ]h"]h$]h&]uh1jhj:ubeh}(h]h ]h"]h$]h&]jjuh1jhj:hMhjhhubh)}(h**Note**h]j>)}(hj:h]hNote}(hj:hhhNhNubah}(h]h ]h"]h$]h&]uh1j=hj:ubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMhjhhubh)}(hThe EFR and EFR2 are raw values reported by hardware. VMM is responsible to determine the appropriate flags to be exposed to the VM since cetertain features are not currently supported by the kernel for HW-vIOMMU.h]hThe EFR and EFR2 are raw values reported by hardware. VMM is responsible to determine the appropriate flags to be exposed to the VM since cetertain features are not currently supported by the kernel for HW-vIOMMU.}(hj:hhhNhNubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMhjhhubh)}(hmCurrent VMM-allowed list of feature flags are: - EFR[GTSup, GASup, GioSup, PPRSup, EPHSup, GATS, GLX, PASmax]h]hmCurrent VMM-allowed list of feature flags are: - EFR[GTSup, GASup, GioSup, PPRSup, EPHSup, GATS, GLX, PASmax]}(hj:hhhNhNubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMhjhhubjG)}(hhh]h}(h]h ]h"]h$]h&]entries](jSiommu_hw_info_type (C enum)c.iommu_hw_info_typehNtauh1jFhjhhhj8hNubjX)}(hhh](j])}(hiommu_hw_info_typeh]jc)}(henum iommu_hw_info_typeh](ji)}(hjh]henum}(hj";hhhNhNubah}(h]h ]juah"]h$]h&]uh1jhhj;hhhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMubj{)}(h h]h }(hj0;hhhNhNubah}(h]h ]jah"]h$]h&]uh1jzhj;hhhj/;hMubj)}(hiommu_hw_info_typeh]j)}(hj;h]hiommu_hw_info_type}(hjB;hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj>;ubah}(h]h ](jjeh"]h$]h&]hhuh1jhj;hhhj/;hMubeh}(h]h ]h"]h$]h&]hhjuh1jbjjhj;hhhj/;hMubah}(h]j;ah ](jjeh"]h$]h&]jj)jhuh1j\hj/;hMhj;hhubj)}(hhh]h)}(hIOMMU Hardware Info Typesh]hIOMMU Hardware Info Types}(hjd;hhhNhNubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMhja;hhubah}(h]h ]h"]h$]h&]uh1jhj;hhhj/;hMubeh}(h]h ](jenumeh"]h$]h&]jjjj|;jj|;jjjuh1jWhhhjhj8hNubj)}(hX**Constants** ``IOMMU_HW_INFO_TYPE_NONE`` Output by the drivers that do not report hardware info ``IOMMU_HW_INFO_TYPE_DEFAULT`` Input to request for a default type ``IOMMU_HW_INFO_TYPE_INTEL_VTD`` Intel VT-d iommu info type ``IOMMU_HW_INFO_TYPE_ARM_SMMUV3`` ARM SMMUv3 iommu info type ``IOMMU_HW_INFO_TYPE_TEGRA241_CMDQV`` NVIDIA Tegra241 CMDQV (extension for ARM SMMUv3) info type ``IOMMU_HW_INFO_TYPE_AMD`` AMD IOMMU info typeh](h)}(h **Constants**h]j>)}(hj;h]h Constants}(hj;hhhNhNubah}(h]h ]h"]h$]h&]uh1j=hj;ubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMhj;ubj0 )}(hhh](j5 )}(hS``IOMMU_HW_INFO_TYPE_NONE`` Output by the drivers that do not report hardware info h](j; )}(h``IOMMU_HW_INFO_TYPE_NONE``h]jA )}(hj;h]hIOMMU_HW_INFO_TYPE_NONE}(hj;hhhNhNubah}(h]h ]h"]h$]h&]uh1j@ hj;ubah}(h]h ]h"]h$]h&]uh1j: hc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMhj;ubjW )}(hhh]h)}(h6Output by the drivers that do not report hardware infoh]h6Output by the drivers that do not report hardware info}(hj;hhhNhNubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMhj;ubah}(h]h ]h"]h$]h&]uh1jV hj;ubeh}(h]h ]h"]h$]h&]uh1j4 hj;hMhj;ubj5 )}(hC``IOMMU_HW_INFO_TYPE_DEFAULT`` Input to request for a default type h](j; )}(h``IOMMU_HW_INFO_TYPE_DEFAULT``h]jA )}(hj;h]hIOMMU_HW_INFO_TYPE_DEFAULT}(hj;hhhNhNubah}(h]h ]h"]h$]h&]uh1j@ hj;ubah}(h]h ]h"]h$]h&]uh1j: hc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMhj;ubjW )}(hhh]h)}(h#Input to request for a default typeh]h#Input to request for a default type}(hj;hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj;hMhj;ubah}(h]h ]h"]h$]h&]uh1jV hj;ubeh}(h]h ]h"]h$]h&]uh1j4 hj;hMhj;ubj5 )}(h<``IOMMU_HW_INFO_TYPE_INTEL_VTD`` Intel VT-d iommu info type h](j; )}(h ``IOMMU_HW_INFO_TYPE_INTEL_VTD``h]jA )}(hj<h]hIOMMU_HW_INFO_TYPE_INTEL_VTD}(hj<hhhNhNubah}(h]h ]h"]h$]h&]uh1j@ hj<ubah}(h]h ]h"]h$]h&]uh1j: hc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMhj<ubjW )}(hhh]h)}(hIntel VT-d iommu info typeh]hIntel VT-d iommu info type}(hj1<hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj-<hMhj.<ubah}(h]h ]h"]h$]h&]uh1jV hj<ubeh}(h]h ]h"]h$]h&]uh1j4 hj-<hMhj;ubj5 )}(h=``IOMMU_HW_INFO_TYPE_ARM_SMMUV3`` ARM SMMUv3 iommu info type h](j; )}(h!``IOMMU_HW_INFO_TYPE_ARM_SMMUV3``h]jA )}(hjQ<h]hIOMMU_HW_INFO_TYPE_ARM_SMMUV3}(hjS<hhhNhNubah}(h]h ]h"]h$]h&]uh1j@ hjO<ubah}(h]h ]h"]h$]h&]uh1j: hc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMhjK<ubjW )}(hhh]h)}(hARM SMMUv3 iommu info typeh]hARM SMMUv3 iommu info type}(hjj<hhhNhNubah}(h]h ]h"]h$]h&]uh1hhjf<hMhjg<ubah}(h]h ]h"]h$]h&]uh1jV hjK<ubeh}(h]h ]h"]h$]h&]uh1j4 hjf<hMhj;ubj5 )}(ha``IOMMU_HW_INFO_TYPE_TEGRA241_CMDQV`` NVIDIA Tegra241 CMDQV (extension for ARM SMMUv3) info type h](j; )}(h%``IOMMU_HW_INFO_TYPE_TEGRA241_CMDQV``h]jA )}(hj<h]h!IOMMU_HW_INFO_TYPE_TEGRA241_CMDQV}(hj<hhhNhNubah}(h]h ]h"]h$]h&]uh1j@ hj<ubah}(h]h ]h"]h$]h&]uh1j: hc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMhj<ubjW )}(hhh]h)}(h:NVIDIA Tegra241 CMDQV (extension for ARM SMMUv3) info typeh]h:NVIDIA Tegra241 CMDQV (extension for ARM SMMUv3) info type}(hj<hhhNhNubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMhj<ubah}(h]h ]h"]h$]h&]uh1jV hj<ubeh}(h]h ]h"]h$]h&]uh1j4 hj<hMhj;ubj5 )}(h.``IOMMU_HW_INFO_TYPE_AMD`` AMD IOMMU info typeh](j; )}(h``IOMMU_HW_INFO_TYPE_AMD``h]jA )}(hj<h]hIOMMU_HW_INFO_TYPE_AMD}(hj<hhhNhNubah}(h]h ]h"]h$]h&]uh1j@ hj<ubah}(h]h ]h"]h$]h&]uh1j: hc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMhj<ubjW )}(hhh]h)}(hAMD IOMMU info typeh]hAMD IOMMU info type}(hj<hhhNhNubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMhj<ubah}(h]h ]h"]h$]h&]uh1jV hj<ubeh}(h]h ]h"]h$]h&]uh1j4 hj<hMhj;ubeh}(h]h ]h"]h$]h&]uh1j/ hj;ubeh}(h]h ] kernelindentah"]h$]h&]uh1jhjhhhj8hNubjG)}(hhh]h}(h]h ]h"]h$]h&]entries](jS iommufd_hw_capabilities (C enum)c.iommufd_hw_capabilitieshNtauh1jFhjhhhj8hNubjX)}(hhh](j])}(hiommufd_hw_capabilitiesh]jc)}(henum iommufd_hw_capabilitiesh](ji)}(hjh]henum}(hj=hhhNhNubah}(h]h ]juah"]h$]h&]uh1jhhj=hhhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMubj{)}(h h]h }(hj,=hhhNhNubah}(h]h ]jah"]h$]h&]uh1jzhj=hhhj+=hMubj)}(hiommufd_hw_capabilitiesh]j)}(hj=h]hiommufd_hw_capabilities}(hj>=hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj:=ubah}(h]h ](jjeh"]h$]h&]hhuh1jhj=hhhj+=hMubeh}(h]h ]h"]h$]h&]hhjuh1jbjjhj=hhhj+=hMubah}(h]j=ah ](jjeh"]h$]h&]jj)jhuh1j\hj+=hMhj=hhubj)}(hhh]h}(h]h ]h"]h$]h&]uh1jhj=hhhj+=hMubeh}(h]h ](jenumeh"]h$]h&]jjjji=jji=jjjuh1jWhhhjhj8hNubj)}(hX=**Constants** ``IOMMU_HW_CAP_DIRTY_TRACKING`` IOMMU hardware support for dirty tracking If available, it means the following APIs are supported: ``IOMMU_HW_CAP_PCI_PASID_EXEC`` Execute Permission Supported, user ignores it when the struct iommu_hw_info::out_max_pasid_log2 is zero. ``IOMMU_HW_CAP_PCI_PASID_PRIV`` Privileged Mode Supported, user ignores it when the struct iommu_hw_info::out_max_pasid_log2 is zero. ``IOMMU_HW_CAP_PCI_ATS_NOT_SUPPORTED`` ATS is not supported or cannot be used on this device (absence implies ATS may be enabled)h](h)}(h **Constants**h]j>)}(hjs=h]h Constants}(hju=hhhNhNubah}(h]h ]h"]h$]h&]uh1j=hjq=ubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMhjm=ubj0 )}(hhh](j5 )}(h``IOMMU_HW_CAP_DIRTY_TRACKING`` IOMMU hardware support for dirty tracking If available, it means the following APIs are supported: h](j; )}(h``IOMMU_HW_CAP_DIRTY_TRACKING``h]jA )}(hj=h]hIOMMU_HW_CAP_DIRTY_TRACKING}(hj=hhhNhNubah}(h]h ]h"]h$]h&]uh1j@ hj=ubah}(h]h ]h"]h$]h&]uh1j: hc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMhj=ubjW )}(hhh]h)}(hbIOMMU hardware support for dirty tracking If available, it means the following APIs are supported:h]hbIOMMU hardware support for dirty tracking If available, it means the following APIs are supported:}(hj=hhhNhNubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMhj=ubah}(h]h ]h"]h$]h&]uh1jV hj=ubeh}(h]h ]h"]h$]h&]uh1j4 hj=hMhj=ubj5 )}(h``IOMMU_HW_CAP_PCI_PASID_EXEC`` Execute Permission Supported, user ignores it when the struct iommu_hw_info::out_max_pasid_log2 is zero. h](j; )}(h``IOMMU_HW_CAP_PCI_PASID_EXEC``h]jA )}(hj=h]hIOMMU_HW_CAP_PCI_PASID_EXEC}(hj=hhhNhNubah}(h]h ]h"]h$]h&]uh1j@ hj=ubah}(h]h ]h"]h$]h&]uh1j: hc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMhj=ubjW )}(hhh]h)}(hhExecute Permission Supported, user ignores it when the struct iommu_hw_info::out_max_pasid_log2 is zero.h]hhExecute Permission Supported, user ignores it when the struct iommu_hw_info::out_max_pasid_log2 is zero.}(hj=hhhNhNubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMhj=ubah}(h]h ]h"]h$]h&]uh1jV hj=ubeh}(h]h ]h"]h$]h&]uh1j4 hj=hMhj=ubj5 )}(h``IOMMU_HW_CAP_PCI_PASID_PRIV`` Privileged Mode Supported, user ignores it when the struct iommu_hw_info::out_max_pasid_log2 is zero. h](j; )}(h``IOMMU_HW_CAP_PCI_PASID_PRIV``h]jA )}(hj>h]hIOMMU_HW_CAP_PCI_PASID_PRIV}(hj>hhhNhNubah}(h]h ]h"]h$]h&]uh1j@ hj>ubah}(h]h ]h"]h$]h&]uh1j: hc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMhj>ubjW )}(hhh]h)}(hePrivileged Mode Supported, user ignores it when the struct iommu_hw_info::out_max_pasid_log2 is zero.h]hePrivileged Mode Supported, user ignores it when the struct iommu_hw_info::out_max_pasid_log2 is zero.}(hj>hhhNhNubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMhj>ubah}(h]h ]h"]h$]h&]uh1jV hj>ubeh}(h]h ]h"]h$]h&]uh1j4 hj>hMhj=ubj5 )}(h``IOMMU_HW_CAP_PCI_ATS_NOT_SUPPORTED`` ATS is not supported or cannot be used on this device (absence implies ATS may be enabled)h](j; )}(h&``IOMMU_HW_CAP_PCI_ATS_NOT_SUPPORTED``h]jA )}(hj@>h]h"IOMMU_HW_CAP_PCI_ATS_NOT_SUPPORTED}(hjB>hhhNhNubah}(h]h ]h"]h$]h&]uh1j@ hj>>ubah}(h]h ]h"]h$]h&]uh1j: hc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMhj:>ubjW )}(hhh]h)}(hZATS is not supported or cannot be used on this device (absence implies ATS may be enabled)h]hZATS is not supported or cannot be used on this device (absence implies ATS may be enabled)}(hjY>hhhNhNubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMhjV>ubah}(h]h ]h"]h$]h&]uh1jV hj:>ubeh}(h]h ]h"]h$]h&]uh1j4 hjU>hMhj=ubeh}(h]h ]h"]h$]h&]uh1j/ hjm=ubeh}(h]h ] kernelindentah"]h$]h&]uh1jhjhhhj8hNubh)}(h**Description**h]j>)}(hj>h]h Description}(hj>hhhNhNubah}(h]h ]h"]h$]h&]uh1j=hj>ubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMhjhhubjw)}(h=IOMMU_HWPT_GET_DIRTY_BITMAP IOMMU_HWPT_SET_DIRTY_TRACKING h]h)}(h9IOMMU_HWPT_GET_DIRTY_BITMAP IOMMU_HWPT_SET_DIRTY_TRACKINGh]h9IOMMU_HWPT_GET_DIRTY_BITMAP IOMMU_HWPT_SET_DIRTY_TRACKING}(hj>hhhNhNubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMhj>ubah}(h]h ]h"]h$]h&]uh1jvhj>hMhjhhubjG)}(hhh]h}(h]h ]h"]h$]h&]entries](jSiommufd_hw_info_flags (C enum)c.iommufd_hw_info_flagshNtauh1jFhjhhhj8hNubjX)}(hhh](j])}(hiommufd_hw_info_flagsh]jc)}(henum iommufd_hw_info_flagsh](ji)}(hjh]henum}(hj>hhhNhNubah}(h]h ]juah"]h$]h&]uh1jhhj>hhhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMubj{)}(h h]h }(hj>hhhNhNubah}(h]h ]jah"]h$]h&]uh1jzhj>hhhj>hMubj)}(hiommufd_hw_info_flagsh]j)}(hj>h]hiommufd_hw_info_flags}(hj>hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj>ubah}(h]h ](jjeh"]h$]h&]hhuh1jhj>hhhj>hMubeh}(h]h ]h"]h$]h&]hhjuh1jbjjhj>hhhj>hMubah}(h]j>ah ](jjeh"]h$]h&]jj)jhuh1j\hj>hMhj>hhubj)}(hhh]h)}(hFlags for iommu_hw_infoh]hFlags for iommu_hw_info}(hj ?hhhNhNubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMhj ?hhubah}(h]h ]h"]h$]h&]uh1jhj>hhhj>hMubeh}(h]h ](jenumeh"]h$]h&]jjjj%?jj%?jjjuh1jWhhhjhj8hNubj)}(h**Constants** ``IOMMU_HW_INFO_FLAG_INPUT_TYPE`` If set, **in_data_type** carries an input type for user space to request for a specific infoh](h)}(h **Constants**h]j>)}(hj/?h]h Constants}(hj1?hhhNhNubah}(h]h ]h"]h$]h&]uh1j=hj-?ubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMhj)?ubj0 )}(hhh]j5 )}(h~``IOMMU_HW_INFO_FLAG_INPUT_TYPE`` If set, **in_data_type** carries an input type for user space to request for a specific infoh](j; )}(h!``IOMMU_HW_INFO_FLAG_INPUT_TYPE``h]jA )}(hjN?h]hIOMMU_HW_INFO_FLAG_INPUT_TYPE}(hjP?hhhNhNubah}(h]h ]h"]h$]h&]uh1j@ hjL?ubah}(h]h ]h"]h$]h&]uh1j: hc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMhjH?ubjW )}(hhh]h)}(h\If set, **in_data_type** carries an input type for user space to request for a specific infoh](hIf set, }(hjg?hhhNhNubj>)}(h**in_data_type**h]h in_data_type}(hjo?hhhNhNubah}(h]h ]h"]h$]h&]uh1j=hjg?ubhD carries an input type for user space to request for a specific info}(hjg?hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhjc?hMhjd?ubah}(h]h ]h"]h$]h&]uh1jV hjH?ubeh}(h]h ]h"]h$]h&]uh1j4 hjc?hMhjE?ubah}(h]h ]h"]h$]h&]uh1j/ hj)?ubeh}(h]h ] kernelindentah"]h$]h&]uh1jhjhhhj8hNubjG)}(hhh]h}(h]h ]h"]h$]h&]entries](jSiommu_hw_info (C struct)c.iommu_hw_infohNtauh1jFhjhhhj8hNubjX)}(hhh](j])}(h iommu_hw_infoh]jc)}(hstruct iommu_hw_infoh](ji)}(hjlh]hstruct}(hj?hhhNhNubah}(h]h ]juah"]h$]h&]uh1jhhj?hhhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMubj{)}(h h]h }(hj?hhhNhNubah}(h]h ]jah"]h$]h&]uh1jzhj?hhhj?hMubj)}(h iommu_hw_infoh]j)}(hj?h]h iommu_hw_info}(hj?hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj?ubah}(h]h ](jjeh"]h$]h&]hhuh1jhj?hhhj?hMubeh}(h]h ]h"]h$]h&]hhjuh1jbjjhj?hhhj?hMubah}(h]j?ah ](jjeh"]h$]h&]jj)jhuh1j\hj?hMhj?hhubj)}(hhh]h)}(hioctl(IOMMU_GET_HW_INFO)h]hioctl(IOMMU_GET_HW_INFO)}(hj?hhhNhNubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMhj?hhubah}(h]h ]h"]h$]h&]uh1jhj?hhhj?hMubeh}(h]h ](jstructeh"]h$]h&]jjjj@jj@jjjuh1jWhhhjhj8hNubj)}(hX**Definition**:: struct iommu_hw_info { __u32 size; __u32 flags; __u32 dev_id; __u32 data_len; __aligned_u64 data_uptr; union { __u32 in_data_type; __u32 out_data_type; }; __u8 out_max_pasid_log2; __u8 __reserved[3]; __aligned_u64 out_capabilities; }; **Members** ``size`` sizeof(struct iommu_hw_info) ``flags`` Must be 0 ``dev_id`` The device bound to the iommufd ``data_len`` Input the length of a user buffer in bytes. Output the length of data that kernel supports ``data_uptr`` User pointer to a user-space buffer used by the kernel to fill the iommu type specific hardware information data ``{unnamed_union}`` anonymous ``in_data_type`` This shares the same field with **out_data_type**, making it be a bidirectional field. When IOMMU_HW_INFO_FLAG_INPUT_TYPE is set, an input type carried via this **in_data_type** field will be valid, requesting for the info data to the given type. If IOMMU_HW_INFO_FLAG_INPUT_TYPE is unset, any input value will be seen as IOMMU_HW_INFO_TYPE_DEFAULT ``out_data_type`` Output the iommu hardware info type as defined in the enum iommu_hw_info_type. ``out_max_pasid_log2`` Output the width of PASIDs. 0 means no PASID support. PCI devices turn to out_capabilities to check if the specific capabilities is supported or not. ``__reserved`` Must be 0 ``out_capabilities`` Output the generic iommu capability info type as defined in the enum iommu_hw_capabilities.h](h)}(h**Definition**::h](j>)}(h**Definition**h]h Definition}(hj@hhhNhNubah}(h]h ]h"]h$]h&]uh1j=hj@ubh:}(hj@hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMhj@ubj)}(hX"struct iommu_hw_info { __u32 size; __u32 flags; __u32 dev_id; __u32 data_len; __aligned_u64 data_uptr; union { __u32 in_data_type; __u32 out_data_type; }; __u8 out_max_pasid_log2; __u8 __reserved[3]; __aligned_u64 out_capabilities; };h]hX"struct iommu_hw_info { __u32 size; __u32 flags; __u32 dev_id; __u32 data_len; __aligned_u64 data_uptr; union { __u32 in_data_type; __u32 out_data_type; }; __u8 out_max_pasid_log2; __u8 __reserved[3]; __aligned_u64 out_capabilities; };}hj8@sbah}(h]h ]h"]h$]h&]hhuh1jhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMhj@ubh)}(h **Members**h]j>)}(hjI@h]hMembers}(hjK@hhhNhNubah}(h]h ]h"]h$]h&]uh1j=hjG@ubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMhj@ubj0 )}(hhh](j5 )}(h&``size`` sizeof(struct iommu_hw_info) h](j; )}(h``size``h]jA )}(hjh@h]hsize}(hjj@hhhNhNubah}(h]h ]h"]h$]h&]uh1j@ hjf@ubah}(h]h ]h"]h$]h&]uh1j: hc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMhjb@ubjW )}(hhh]h)}(hsizeof(struct iommu_hw_info)h]hsizeof(struct iommu_hw_info)}(hj@hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj}@hMhj~@ubah}(h]h ]h"]h$]h&]uh1jV hjb@ubeh}(h]h ]h"]h$]h&]uh1j4 hj}@hMhj_@ubj5 )}(h``flags`` Must be 0 h](j; )}(h ``flags``h]jA )}(hj@h]hflags}(hj@hhhNhNubah}(h]h ]h"]h$]h&]uh1j@ hj@ubah}(h]h ]h"]h$]h&]uh1j: hc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMhj@ubjW )}(hhh]h)}(h Must be 0h]h Must be 0}(hj@hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj@hMhj@ubah}(h]h ]h"]h$]h&]uh1jV hj@ubeh}(h]h ]h"]h$]h&]uh1j4 hj@hMhj_@ubj5 )}(h+``dev_id`` The device bound to the iommufd h](j; )}(h ``dev_id``h]jA )}(hj@h]hdev_id}(hj@hhhNhNubah}(h]h ]h"]h$]h&]uh1j@ hj@ubah}(h]h ]h"]h$]h&]uh1j: hc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMhj@ubjW )}(hhh]h)}(hThe device bound to the iommufdh]hThe device bound to the iommufd}(hj@hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj@hMhj@ubah}(h]h ]h"]h$]h&]uh1jV hj@ubeh}(h]h ]h"]h$]h&]uh1j4 hj@hMhj_@ubj5 )}(hh``data_len`` Input the length of a user buffer in bytes. Output the length of data that kernel supports h](j; )}(h ``data_len``h]jA )}(hjAh]hdata_len}(hjAhhhNhNubah}(h]h ]h"]h$]h&]uh1j@ hjAubah}(h]h ]h"]h$]h&]uh1j: hc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMhj AubjW )}(hhh]h)}(hZInput the length of a user buffer in bytes. Output the length of data that kernel supportsh]hZInput the length of a user buffer in bytes. Output the length of data that kernel supports}(hj,AhhhNhNubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMhj)Aubah}(h]h ]h"]h$]h&]uh1jV hj Aubeh}(h]h ]h"]h$]h&]uh1j4 hj(AhMhj_@ubj5 )}(h``data_uptr`` User pointer to a user-space buffer used by the kernel to fill the iommu type specific hardware information data h](j; )}(h ``data_uptr``h]jA )}(hjMAh]h data_uptr}(hjOAhhhNhNubah}(h]h ]h"]h$]h&]uh1j@ hjKAubah}(h]h ]h"]h$]h&]uh1j: hc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMhjGAubjW )}(hhh]h)}(hpUser pointer to a user-space buffer used by the kernel to fill the iommu type specific hardware information datah]hpUser pointer to a user-space buffer used by the kernel to fill the iommu type specific hardware information data}(hjfAhhhNhNubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMhjcAubah}(h]h ]h"]h$]h&]uh1jV hjGAubeh}(h]h ]h"]h$]h&]uh1j4 hjbAhMhj_@ubj5 )}(h``{unnamed_union}`` anonymous h](j; )}(h``{unnamed_union}``h]jA )}(hjAh]h{unnamed_union}}(hjAhhhNhNubah}(h]h ]h"]h$]h&]uh1j@ hjAubah}(h]h ]h"]h$]h&]uh1j: hc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhKhjAubjW )}(hhh]h)}(h anonymoush]h anonymous}(hjAhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjAhKhjAubah}(h]h ]h"]h$]h&]uh1jV hjAubeh}(h]h ]h"]h$]h&]uh1j4 hjAhKhj_@ubj5 )}(hXn``in_data_type`` This shares the same field with **out_data_type**, making it be a bidirectional field. When IOMMU_HW_INFO_FLAG_INPUT_TYPE is set, an input type carried via this **in_data_type** field will be valid, requesting for the info data to the given type. If IOMMU_HW_INFO_FLAG_INPUT_TYPE is unset, any input value will be seen as IOMMU_HW_INFO_TYPE_DEFAULT h](j; )}(h``in_data_type``h]jA )}(hjAh]h in_data_type}(hjAhhhNhNubah}(h]h ]h"]h$]h&]uh1j@ hjAubah}(h]h ]h"]h$]h&]uh1j: hc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMhjAubjW )}(hhh]h)}(hX\This shares the same field with **out_data_type**, making it be a bidirectional field. When IOMMU_HW_INFO_FLAG_INPUT_TYPE is set, an input type carried via this **in_data_type** field will be valid, requesting for the info data to the given type. If IOMMU_HW_INFO_FLAG_INPUT_TYPE is unset, any input value will be seen as IOMMU_HW_INFO_TYPE_DEFAULTh](h This shares the same field with }(hjAhhhNhNubj>)}(h**out_data_type**h]h out_data_type}(hjAhhhNhNubah}(h]h ]h"]h$]h&]uh1j=hjAubhp, making it be a bidirectional field. When IOMMU_HW_INFO_FLAG_INPUT_TYPE is set, an input type carried via this }(hjAhhhNhNubj>)}(h**in_data_type**h]h in_data_type}(hjAhhhNhNubah}(h]h ]h"]h$]h&]uh1j=hjAubh field will be valid, requesting for the info data to the given type. If IOMMU_HW_INFO_FLAG_INPUT_TYPE is unset, any input value will be seen as IOMMU_HW_INFO_TYPE_DEFAULT}(hjAhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMhjAubah}(h]h ]h"]h$]h&]uh1jV hjAubeh}(h]h ]h"]h$]h&]uh1j4 hjAhMhj_@ubj5 )}(ha``out_data_type`` Output the iommu hardware info type as defined in the enum iommu_hw_info_type. h](j; )}(h``out_data_type``h]jA )}(hjBh]h out_data_type}(hj BhhhNhNubah}(h]h ]h"]h$]h&]uh1j@ hjBubah}(h]h ]h"]h$]h&]uh1j: hc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMhjBubjW )}(hhh]h)}(hNOutput the iommu hardware info type as defined in the enum iommu_hw_info_type.h]hNOutput the iommu hardware info type as defined in the enum iommu_hw_info_type.}(hj7BhhhNhNubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMhj4Bubah}(h]h ]h"]h$]h&]uh1jV hjBubeh}(h]h ]h"]h$]h&]uh1j4 hj3BhMhj_@ubj5 )}(h``out_max_pasid_log2`` Output the width of PASIDs. 0 means no PASID support. PCI devices turn to out_capabilities to check if the specific capabilities is supported or not. h](j; )}(h``out_max_pasid_log2``h]jA )}(hjXBh]hout_max_pasid_log2}(hjZBhhhNhNubah}(h]h ]h"]h$]h&]uh1j@ hjVBubah}(h]h ]h"]h$]h&]uh1j: hc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMhjRBubjW )}(hhh]h)}(hOutput the width of PASIDs. 0 means no PASID support. PCI devices turn to out_capabilities to check if the specific capabilities is supported or not.h]hOutput the width of PASIDs. 0 means no PASID support. PCI devices turn to out_capabilities to check if the specific capabilities is supported or not.}(hjqBhhhNhNubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMhjnBubah}(h]h ]h"]h$]h&]uh1jV hjRBubeh}(h]h ]h"]h$]h&]uh1j4 hjmBhMhj_@ubj5 )}(h``__reserved`` Must be 0 h](j; )}(h``__reserved``h]jA )}(hjBh]h __reserved}(hjBhhhNhNubah}(h]h ]h"]h$]h&]uh1j@ hjBubah}(h]h ]h"]h$]h&]uh1j: hc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMhjBubjW )}(hhh]h)}(h Must be 0h]h Must be 0}(hjBhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjBhMhjBubah}(h]h ]h"]h$]h&]uh1jV hjBubeh}(h]h ]h"]h$]h&]uh1j4 hjBhMhj_@ubj5 )}(hp``out_capabilities`` Output the generic iommu capability info type as defined in the enum iommu_hw_capabilities.h](j; )}(h``out_capabilities``h]jA )}(hjBh]hout_capabilities}(hjBhhhNhNubah}(h]h ]h"]h$]h&]uh1j@ hjBubah}(h]h ]h"]h$]h&]uh1j: hc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMhjBubjW )}(hhh]h)}(h[Output the generic iommu capability info type as defined in the enum iommu_hw_capabilities.h]h[Output the generic iommu capability info type as defined in the enum iommu_hw_capabilities.}(hjBhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjBhMhjBubah}(h]h ]h"]h$]h&]uh1jV hjBubeh}(h]h ]h"]h$]h&]uh1j4 hjBhMhj_@ubeh}(h]h ]h"]h$]h&]uh1j/ hj@ubeh}(h]h ] kernelindentah"]h$]h&]uh1jhjhhhj8hNubh)}(h**Description**h]j>)}(hj Ch]h Description}(hjChhhNhNubah}(h]h ]h"]h$]h&]uh1j=hj Cubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMhjhhubh)}(hXqQuery an iommu type specific hardware information data from an iommu behind a given device that has been bound to iommufd. This hardware info data will be used to sync capabilities between the virtual iommu and the physical iommu, e.g. a nested translation setup needs to check the hardware info, so a guest stage-1 page table can be compatible with the physical iommu.h]hXqQuery an iommu type specific hardware information data from an iommu behind a given device that has been bound to iommufd. This hardware info data will be used to sync capabilities between the virtual iommu and the physical iommu, e.g. a nested translation setup needs to check the hardware info, so a guest stage-1 page table can be compatible with the physical iommu.}(hj#ChhhNhNubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMhjhhubh)}(hX To capture an iommu type specific hardware information data, **data_uptr** and its length **data_len** must be provided. Trailing bytes will be zeroed if the user buffer is larger than the data that kernel has. Otherwise, kernel only fills the buffer using the given length in **data_len**. If the ioctl succeeds, **data_len** will be updated to the length that kernel actually supports, **out_data_type** will be filled to decode the data filled in the buffer pointed by **data_uptr**. Input **data_len** == zero is allowed.h](h=To capture an iommu type specific hardware information data, }(hj2ChhhNhNubj>)}(h **data_uptr**h]h data_uptr}(hj:ChhhNhNubah}(h]h ]h"]h$]h&]uh1j=hj2Cubh and its length }(hj2ChhhNhNubj>)}(h **data_len**h]hdata_len}(hjLChhhNhNubah}(h]h ]h"]h$]h&]uh1j=hj2Cubh must be provided. Trailing bytes will be zeroed if the user buffer is larger than the data that kernel has. Otherwise, kernel only fills the buffer using the given length in }(hj2ChhhNhNubj>)}(h **data_len**h]hdata_len}(hj^ChhhNhNubah}(h]h ]h"]h$]h&]uh1j=hj2Cubh. If the ioctl succeeds, }(hj2ChhhNhNubj>)}(h **data_len**h]hdata_len}(hjpChhhNhNubah}(h]h ]h"]h$]h&]uh1j=hj2Cubh> will be updated to the length that kernel actually supports, }(hj2ChhhNhNubj>)}(h**out_data_type**h]h out_data_type}(hjChhhNhNubah}(h]h ]h"]h$]h&]uh1j=hj2CubhC will be filled to decode the data filled in the buffer pointed by }(hj2ChhhNhNubj>)}(h **data_uptr**h]h data_uptr}(hjChhhNhNubah}(h]h ]h"]h$]h&]uh1j=hj2Cubh. Input }(hj2ChhhNhNubj>)}(h **data_len**h]hdata_len}(hjChhhNhNubah}(h]h ]h"]h$]h&]uh1j=hj2Cubh == zero is allowed.}(hj2ChhhNhNubeh}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMhjhhubjG)}(hhh]h}(h]h ]h"]h$]h&]entries](jS(iommu_hwpt_set_dirty_tracking (C struct)c.iommu_hwpt_set_dirty_trackinghNtauh1jFhjhhhj8hNubjX)}(hhh](j])}(hiommu_hwpt_set_dirty_trackingh]jc)}(h$struct iommu_hwpt_set_dirty_trackingh](ji)}(hjlh]hstruct}(hjChhhNhNubah}(h]h ]juah"]h$]h&]uh1jhhjChhhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMubj{)}(h h]h }(hjChhhNhNubah}(h]h ]jah"]h$]h&]uh1jzhjChhhjChMubj)}(hiommu_hwpt_set_dirty_trackingh]j)}(hjCh]hiommu_hwpt_set_dirty_tracking}(hjChhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjCubah}(h]h ](jjeh"]h$]h&]hhuh1jhjChhhjChMubeh}(h]h ]h"]h$]h&]hhjuh1jbjjhjChhhjChMubah}(h]jCah ](jjeh"]h$]h&]jj)jhuh1j\hjChMhjChhubj)}(hhh]h)}(h$ioctl(IOMMU_HWPT_SET_DIRTY_TRACKING)h]h$ioctl(IOMMU_HWPT_SET_DIRTY_TRACKING)}(hjDhhhNhNubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMhjDhhubah}(h]h ]h"]h$]h&]uh1jhjChhhjChMubeh}(h]h ](jstructeh"]h$]h&]jjjj2Djj2Djjjuh1jWhhhjhj8hNubj)}(hXz**Definition**:: struct iommu_hwpt_set_dirty_tracking { __u32 size; __u32 flags; __u32 hwpt_id; __u32 __reserved; }; **Members** ``size`` sizeof(struct iommu_hwpt_set_dirty_tracking) ``flags`` Combination of enum iommufd_hwpt_set_dirty_tracking_flags ``hwpt_id`` HW pagetable ID that represents the IOMMU domain ``__reserved`` Must be 0h](h)}(h**Definition**::h](j>)}(h**Definition**h]h Definition}(hj>DhhhNhNubah}(h]h ]h"]h$]h&]uh1j=hj:Dubh:}(hj:DhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMhj6Dubj)}(hsstruct iommu_hwpt_set_dirty_tracking { __u32 size; __u32 flags; __u32 hwpt_id; __u32 __reserved; };h]hsstruct iommu_hwpt_set_dirty_tracking { __u32 size; __u32 flags; __u32 hwpt_id; __u32 __reserved; };}hjWDsbah}(h]h ]h"]h$]h&]hhuh1jhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMhj6Dubh)}(h **Members**h]j>)}(hjhDh]hMembers}(hjjDhhhNhNubah}(h]h ]h"]h$]h&]uh1j=hjfDubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMhj6Dubj0 )}(hhh](j5 )}(h6``size`` sizeof(struct iommu_hwpt_set_dirty_tracking) h](j; )}(h``size``h]jA )}(hjDh]hsize}(hjDhhhNhNubah}(h]h ]h"]h$]h&]uh1j@ hjDubah}(h]h ]h"]h$]h&]uh1j: hc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMhjDubjW )}(hhh]h)}(h,sizeof(struct iommu_hwpt_set_dirty_tracking)h]h,sizeof(struct iommu_hwpt_set_dirty_tracking)}(hjDhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjDhMhjDubah}(h]h ]h"]h$]h&]uh1jV hjDubeh}(h]h ]h"]h$]h&]uh1j4 hjDhMhj~Dubj5 )}(hD``flags`` Combination of enum iommufd_hwpt_set_dirty_tracking_flags h](j; )}(h ``flags``h]jA )}(hjDh]hflags}(hjDhhhNhNubah}(h]h ]h"]h$]h&]uh1j@ hjDubah}(h]h ]h"]h$]h&]uh1j: hc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMhjDubjW )}(hhh]h)}(h9Combination of enum iommufd_hwpt_set_dirty_tracking_flagsh]h9Combination of enum iommufd_hwpt_set_dirty_tracking_flags}(hjDhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjDhMhjDubah}(h]h ]h"]h$]h&]uh1jV hjDubeh}(h]h ]h"]h$]h&]uh1j4 hjDhMhj~Dubj5 )}(h=``hwpt_id`` HW pagetable ID that represents the IOMMU domain h](j; )}(h ``hwpt_id``h]jA )}(hjDh]hhwpt_id}(hjDhhhNhNubah}(h]h ]h"]h$]h&]uh1j@ hjDubah}(h]h ]h"]h$]h&]uh1j: hc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMhjDubjW )}(hhh]h)}(h0HW pagetable ID that represents the IOMMU domainh]h0HW pagetable ID that represents the IOMMU domain}(hjEhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjEhMhjEubah}(h]h ]h"]h$]h&]uh1jV hjDubeh}(h]h ]h"]h$]h&]uh1j4 hjEhMhj~Dubj5 )}(h``__reserved`` Must be 0h](j; )}(h``__reserved``h]jA )}(hj2Eh]h __reserved}(hj4EhhhNhNubah}(h]h ]h"]h$]h&]uh1j@ hj0Eubah}(h]h ]h"]h$]h&]uh1j: hc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMhj,EubjW )}(hhh]h)}(h Must be 0h]h Must be 0}(hjKEhhhNhNubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMhjHEubah}(h]h ]h"]h$]h&]uh1jV hj,Eubeh}(h]h ]h"]h$]h&]uh1j4 hjGEhMhj~Dubeh}(h]h ]h"]h$]h&]uh1j/ hj6Dubeh}(h]h ] kernelindentah"]h$]h&]uh1jhjhhhj8hNubh)}(h**Description**h]j>)}(hjuEh]h Description}(hjwEhhhNhNubah}(h]h ]h"]h$]h&]uh1j=hjsEubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMhjhhubh)}(h)Toggle dirty tracking on an HW pagetable.h]h)Toggle dirty tracking on an HW pagetable.}(hjEhhhNhNubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMhjhhubjG)}(hhh]h}(h]h ]h"]h$]h&]entries](jS,iommufd_hwpt_get_dirty_bitmap_flags (C enum)%c.iommufd_hwpt_get_dirty_bitmap_flagshNtauh1jFhjhhhj8hNubjX)}(hhh](j])}(h#iommufd_hwpt_get_dirty_bitmap_flagsh]jc)}(h(enum iommufd_hwpt_get_dirty_bitmap_flagsh](ji)}(hjh]henum}(hjEhhhNhNubah}(h]h ]juah"]h$]h&]uh1jhhjEhhhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMubj{)}(h h]h }(hjEhhhNhNubah}(h]h ]jah"]h$]h&]uh1jzhjEhhhjEhMubj)}(h#iommufd_hwpt_get_dirty_bitmap_flagsh]j)}(hjEh]h#iommufd_hwpt_get_dirty_bitmap_flags}(hjEhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjEubah}(h]h ](jjeh"]h$]h&]hhuh1jhjEhhhjEhMubeh}(h]h ]h"]h$]h&]hhjuh1jbjjhjEhhhjEhMubah}(h]jEah ](jjeh"]h$]h&]jj)jhuh1j\hjEhMhjEhhubj)}(hhh]h)}(hFlags for getting dirty bitsh]hFlags for getting dirty bits}(hjEhhhNhNubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhM hjEhhubah}(h]h ]h"]h$]h&]uh1jhjEhhhjEhMubeh}(h]h ](jenumeh"]h$]h&]jjjj Fjj Fjjjuh1jWhhhjhj8hNubj)}(h**Constants** ``IOMMU_HWPT_GET_DIRTY_BITMAP_NO_CLEAR`` Just read the PTEs without clearing any dirty bits metadata. This flag can be passed in the expectation where the next operation is an unmap of the same IOVA range.h](h)}(h **Constants**h]j>)}(hjFh]h Constants}(hjFhhhNhNubah}(h]h ]h"]h$]h&]uh1j=hjFubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhM$hjFubj0 )}(hhh]j5 )}(h``IOMMU_HWPT_GET_DIRTY_BITMAP_NO_CLEAR`` Just read the PTEs without clearing any dirty bits metadata. This flag can be passed in the expectation where the next operation is an unmap of the same IOVA range.h](j; )}(h(``IOMMU_HWPT_GET_DIRTY_BITMAP_NO_CLEAR``h]jA )}(hj6Fh]h$IOMMU_HWPT_GET_DIRTY_BITMAP_NO_CLEAR}(hj8FhhhNhNubah}(h]h ]h"]h$]h&]uh1j@ hj4Fubah}(h]h ]h"]h$]h&]uh1j: hc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhM*hj0FubjW )}(hhh]h)}(hJust read the PTEs without clearing any dirty bits metadata. This flag can be passed in the expectation where the next operation is an unmap of the same IOVA range.h]hJust read the PTEs without clearing any dirty bits metadata. This flag can be passed in the expectation where the next operation is an unmap of the same IOVA range.}(hjOFhhhNhNubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhM'hjLFubah}(h]h ]h"]h$]h&]uh1jV hj0Fubeh}(h]h ]h"]h$]h&]uh1j4 hjKFhM*hj-Fubah}(h]h ]h"]h$]h&]uh1j/ hjFubeh}(h]h ] kernelindentah"]h$]h&]uh1jhjhhhj8hNubjG)}(hhh]h}(h]h ]h"]h$]h&]entries](jS&iommu_hwpt_get_dirty_bitmap (C struct)c.iommu_hwpt_get_dirty_bitmaphNtauh1jFhjhhhj8hNubjX)}(hhh](j])}(hiommu_hwpt_get_dirty_bitmaph]jc)}(h"struct iommu_hwpt_get_dirty_bitmaph](ji)}(hjlh]hstruct}(hjFhhhNhNubah}(h]h ]juah"]h$]h&]uh1jhhjFhhhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhM0ubj{)}(h h]h }(hjFhhhNhNubah}(h]h ]jah"]h$]h&]uh1jzhjFhhhjFhM0ubj)}(hiommu_hwpt_get_dirty_bitmaph]j)}(hjFh]hiommu_hwpt_get_dirty_bitmap}(hjFhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjFubah}(h]h ](jjeh"]h$]h&]hhuh1jhjFhhhjFhM0ubeh}(h]h ]h"]h$]h&]hhjuh1jbjjhjFhhhjFhM0ubah}(h]jFah ](jjeh"]h$]h&]jj)jhuh1j\hjFhM0hjFhhubj)}(hhh]h)}(h"ioctl(IOMMU_HWPT_GET_DIRTY_BITMAP)h]h"ioctl(IOMMU_HWPT_GET_DIRTY_BITMAP)}(hjFhhhNhNubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhM-hjFhhubah}(h]h ]h"]h$]h&]uh1jhjFhhhjFhM0ubeh}(h]h ](jstructeh"]h$]h&]jjjjFjjFjjjuh1jWhhhjhj8hNubj)}(hX**Definition**:: struct iommu_hwpt_get_dirty_bitmap { __u32 size; __u32 hwpt_id; __u32 flags; __u32 __reserved; __aligned_u64 iova; __aligned_u64 length; __aligned_u64 page_size; __aligned_u64 data; }; **Members** ``size`` sizeof(struct iommu_hwpt_get_dirty_bitmap) ``hwpt_id`` HW pagetable ID that represents the IOMMU domain ``flags`` Combination of enum iommufd_hwpt_get_dirty_bitmap_flags ``__reserved`` Must be 0 ``iova`` base IOVA of the bitmap first bit ``length`` IOVA range size ``page_size`` page size granularity of each bit in the bitmap ``data`` bitmap where to set the dirty bits. The bitmap bits each represent a page_size which you deviate from an arbitrary iova.h](h)}(h**Definition**::h](j>)}(h**Definition**h]h Definition}(hjFhhhNhNubah}(h]h ]h"]h$]h&]uh1j=hjFubh:}(hjFhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhM1hjFubj)}(hstruct iommu_hwpt_get_dirty_bitmap { __u32 size; __u32 hwpt_id; __u32 flags; __u32 __reserved; __aligned_u64 iova; __aligned_u64 length; __aligned_u64 page_size; __aligned_u64 data; };h]hstruct iommu_hwpt_get_dirty_bitmap { __u32 size; __u32 hwpt_id; __u32 flags; __u32 __reserved; __aligned_u64 iova; __aligned_u64 length; __aligned_u64 page_size; __aligned_u64 data; };}hjGsbah}(h]h ]h"]h$]h&]hhuh1jhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhM3hjFubh)}(h **Members**h]j>)}(hj Gh]hMembers}(hj"GhhhNhNubah}(h]h ]h"]h$]h&]uh1j=hjGubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhM>hjFubj0 )}(hhh](j5 )}(h4``size`` sizeof(struct iommu_hwpt_get_dirty_bitmap) h](j; )}(h``size``h]jA )}(hj?Gh]hsize}(hjAGhhhNhNubah}(h]h ]h"]h$]h&]uh1j@ hj=Gubah}(h]h ]h"]h$]h&]uh1j: hc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhM/hj9GubjW )}(hhh]h)}(h*sizeof(struct iommu_hwpt_get_dirty_bitmap)h]h*sizeof(struct iommu_hwpt_get_dirty_bitmap)}(hjXGhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjTGhM/hjUGubah}(h]h ]h"]h$]h&]uh1jV hj9Gubeh}(h]h ]h"]h$]h&]uh1j4 hjTGhM/hj6Gubj5 )}(h=``hwpt_id`` HW pagetable ID that represents the IOMMU domain h](j; )}(h ``hwpt_id``h]jA )}(hjxGh]hhwpt_id}(hjzGhhhNhNubah}(h]h ]h"]h$]h&]uh1j@ hjvGubah}(h]h ]h"]h$]h&]uh1j: hc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhM0hjrGubjW )}(hhh]h)}(h0HW pagetable ID that represents the IOMMU domainh]h0HW pagetable ID that represents the IOMMU domain}(hjGhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjGhM0hjGubah}(h]h ]h"]h$]h&]uh1jV hjrGubeh}(h]h ]h"]h$]h&]uh1j4 hjGhM0hj6Gubj5 )}(hB``flags`` Combination of enum iommufd_hwpt_get_dirty_bitmap_flags h](j; )}(h ``flags``h]jA )}(hjGh]hflags}(hjGhhhNhNubah}(h]h ]h"]h$]h&]uh1j@ hjGubah}(h]h ]h"]h$]h&]uh1j: hc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhM1hjGubjW )}(hhh]h)}(h7Combination of enum iommufd_hwpt_get_dirty_bitmap_flagsh]h7Combination of enum iommufd_hwpt_get_dirty_bitmap_flags}(hjGhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjGhM1hjGubah}(h]h ]h"]h$]h&]uh1jV hjGubeh}(h]h ]h"]h$]h&]uh1j4 hjGhM1hj6Gubj5 )}(h``__reserved`` Must be 0 h](j; )}(h``__reserved``h]jA )}(hjGh]h __reserved}(hjGhhhNhNubah}(h]h ]h"]h$]h&]uh1j@ hjGubah}(h]h ]h"]h$]h&]uh1j: hc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhM2hjGubjW )}(hhh]h)}(h Must be 0h]h Must be 0}(hjHhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjGhM2hjHubah}(h]h ]h"]h$]h&]uh1jV hjGubeh}(h]h ]h"]h$]h&]uh1j4 hjGhM2hj6Gubj5 )}(h+``iova`` base IOVA of the bitmap first bit h](j; )}(h``iova``h]jA )}(hj#Hh]hiova}(hj%HhhhNhNubah}(h]h ]h"]h$]h&]uh1j@ hj!Hubah}(h]h ]h"]h$]h&]uh1j: hc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhM3hjHubjW )}(hhh]h)}(h!base IOVA of the bitmap first bith]h!base IOVA of the bitmap first bit}(hj``page_size`` page size granularity of each bit in the bitmap h](j; )}(h ``page_size``h]jA )}(hjHh]h page_size}(hjHhhhNhNubah}(h]h ]h"]h$]h&]uh1j@ hjHubah}(h]h ]h"]h$]h&]uh1j: hc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhM5hjHubjW )}(hhh]h)}(h/page size granularity of each bit in the bitmaph]h/page size granularity of each bit in the bitmap}(hjHhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjHhM5hjHubah}(h]h ]h"]h$]h&]uh1jV hjHubeh}(h]h ]h"]h$]h&]uh1j4 hjHhM5hj6Gubj5 )}(h``data`` bitmap where to set the dirty bits. The bitmap bits each represent a page_size which you deviate from an arbitrary iova.h](j; )}(h``data``h]jA )}(hjHh]hdata}(hjHhhhNhNubah}(h]h ]h"]h$]h&]uh1j@ hjHubah}(h]h ]h"]h$]h&]uh1j: hc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhM6hjHubjW )}(hhh]h)}(hxbitmap where to set the dirty bits. The bitmap bits each represent a page_size which you deviate from an arbitrary iova.h]hxbitmap where to set the dirty bits. The bitmap bits each represent a page_size which you deviate from an arbitrary iova.}(hjHhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjHhM6hjHubah}(h]h ]h"]h$]h&]uh1jV hjHubeh}(h]h ]h"]h$]h&]uh1j4 hjHhM6hj6Gubeh}(h]h ]h"]h$]h&]uh1j/ hjFubeh}(h]h ] kernelindentah"]h$]h&]uh1jhjhhhj8hNubh)}(h**Description**h]j>)}(hjIh]h Description}(hjIhhhNhNubah}(h]h ]h"]h$]h&]uh1j=hjIubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhM:hjhhubh)}(hChecking a given IOVA is dirty:h]hChecking a given IOVA is dirty:}(hj&IhhhNhNubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhM7hjhhubjw)}(hDdata[(iova / page_size) / 64] & (1ULL << ((iova / page_size) % 64)) h]h)}(hCdata[(iova / page_size) / 64] & (1ULL << ((iova / page_size) % 64))h]hCdata[(iova / page_size) / 64] & (1ULL << ((iova / page_size) % 64))}(hj9IhhhNhNubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhM9hj5Iubah}(h]h ]h"]h$]h&]uh1jvhjGIhM9hjhhubh)}(hWalk the IOMMU pagetables for a given IOVA range to return a bitmap with the dirty IOVAs. In doing so it will also by default clear any dirty bit metadata set in the IOPTE.h]hWalk the IOMMU pagetables for a given IOVA range to return a bitmap with the dirty IOVAs. In doing so it will also by default clear any dirty bit metadata set in the IOPTE.}(hjNIhhhNhNubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhM;hjhhubjG)}(hhh]h}(h]h ]h"]h$]h&]entries](jS(iommu_hwpt_invalidate_data_type (C enum)!c.iommu_hwpt_invalidate_data_typehNtauh1jFhjhhhj8hNubjX)}(hhh](j])}(hiommu_hwpt_invalidate_data_typeh]jc)}(h$enum iommu_hwpt_invalidate_data_typeh](ji)}(hjh]henum}(hjvIhhhNhNubah}(h]h ]juah"]h$]h&]uh1jhhjrIhhhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMBubj{)}(h h]h }(hjIhhhNhNubah}(h]h ]jah"]h$]h&]uh1jzhjrIhhhjIhMBubj)}(hiommu_hwpt_invalidate_data_typeh]j)}(hjpIh]hiommu_hwpt_invalidate_data_type}(hjIhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjIubah}(h]h ](jjeh"]h$]h&]hhuh1jhjrIhhhjIhMBubeh}(h]h ]h"]h$]h&]hhjuh1jbjjhjnIhhhjIhMBubah}(h]jiIah ](jjeh"]h$]h&]jj)jhuh1j\hjIhMBhjkIhhubj)}(hhh]h)}(h'IOMMU HWPT Cache Invalidation Data Typeh]h'IOMMU HWPT Cache Invalidation Data Type}(hjIhhhNhNubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMNhjIhhubah}(h]h ]h"]h$]h&]uh1jhjkIhhhjIhMBubeh}(h]h ](jenumeh"]h$]h&]jjjjIjjIjjjuh1jWhhhjhj8hNubj)}(h**Constants** ``IOMMU_HWPT_INVALIDATE_DATA_VTD_S1`` Invalidation data for VTD_S1 ``IOMMU_VIOMMU_INVALIDATE_DATA_ARM_SMMUV3`` Invalidation data for ARM SMMUv3h](h)}(h **Constants**h]j>)}(hjIh]h Constants}(hjIhhhNhNubah}(h]h ]h"]h$]h&]uh1j=hjIubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMRhjIubj0 )}(hhh](j5 )}(hC``IOMMU_HWPT_INVALIDATE_DATA_VTD_S1`` Invalidation data for VTD_S1 h](j; )}(h%``IOMMU_HWPT_INVALIDATE_DATA_VTD_S1``h]jA )}(hjIh]h!IOMMU_HWPT_INVALIDATE_DATA_VTD_S1}(hjIhhhNhNubah}(h]h ]h"]h$]h&]uh1j@ hjIubah}(h]h ]h"]h$]h&]uh1j: hc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMUhjIubjW )}(hhh]h)}(hInvalidation data for VTD_S1h]hInvalidation data for VTD_S1}(hjJhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjJhMUhjJubah}(h]h ]h"]h$]h&]uh1jV hjIubeh}(h]h ]h"]h$]h&]uh1j4 hjJhMUhjIubj5 )}(hL``IOMMU_VIOMMU_INVALIDATE_DATA_ARM_SMMUV3`` Invalidation data for ARM SMMUv3h](j; )}(h+``IOMMU_VIOMMU_INVALIDATE_DATA_ARM_SMMUV3``h]jA )}(hj2Jh]h'IOMMU_VIOMMU_INVALIDATE_DATA_ARM_SMMUV3}(hj4JhhhNhNubah}(h]h ]h"]h$]h&]uh1j@ hj0Jubah}(h]h ]h"]h$]h&]uh1j: hc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMWhj,JubjW )}(hhh]h)}(h Invalidation data for ARM SMMUv3h]h Invalidation data for ARM SMMUv3}(hjKJhhhNhNubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMXhjHJubah}(h]h ]h"]h$]h&]uh1jV hj,Jubeh}(h]h ]h"]h$]h&]uh1j4 hjGJhMWhjIubeh}(h]h ]h"]h$]h&]uh1j/ hjIubeh}(h]h ] kernelindentah"]h$]h&]uh1jhjhhhj8hNubjG)}(hhh]h}(h]h ]h"]h$]h&]entries](jS+iommu_hwpt_vtd_s1_invalidate_flags (C enum)$c.iommu_hwpt_vtd_s1_invalidate_flagshNtauh1jFhjhhhj8hNubjX)}(hhh](j])}(h"iommu_hwpt_vtd_s1_invalidate_flagsh]jc)}(h'enum iommu_hwpt_vtd_s1_invalidate_flagsh](ji)}(hjh]henum}(hjJhhhNhNubah}(h]h ]juah"]h$]h&]uh1jhhjJhhhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhM]ubj{)}(h h]h }(hjJhhhNhNubah}(h]h ]jah"]h$]h&]uh1jzhjJhhhjJhM]ubj)}(h"iommu_hwpt_vtd_s1_invalidate_flagsh]j)}(hjJh]h"iommu_hwpt_vtd_s1_invalidate_flags}(hjJhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjJubah}(h]h ](jjeh"]h$]h&]hhuh1jhjJhhhjJhM]ubeh}(h]h ]h"]h$]h&]hhjuh1jbjjhjJhhhjJhM]ubah}(h]jJah ](jjeh"]h$]h&]jj)jhuh1j\hjJhM]hjJhhubj)}(hhh]h)}(h/Flags for Intel VT-d stage-1 cache invalidationh]h/Flags for Intel VT-d stage-1 cache invalidation}(hjJhhhNhNubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMYhjJhhubah}(h]h ]h"]h$]h&]uh1jhjJhhhjJhM]ubeh}(h]h ](jenumeh"]h$]h&]jjjjJjjJjjjuh1jWhhhjhj8hNubj)}(h**Constants** ``IOMMU_VTD_INV_FLAGS_LEAF`` Indicates whether the invalidation applies to all-levels page structure cache or just the leaf PTE cache.h](h)}(h **Constants**h]j>)}(hjJh]h Constants}(hjJhhhNhNubah}(h]h ]h"]h$]h&]uh1j=hjJubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhM]hjJubj0 )}(hhh]j5 )}(h``IOMMU_VTD_INV_FLAGS_LEAF`` Indicates whether the invalidation applies to all-levels page structure cache or just the leaf PTE cache.h](j; )}(h``IOMMU_VTD_INV_FLAGS_LEAF``h]jA )}(hjKh]hIOMMU_VTD_INV_FLAGS_LEAF}(hjKhhhNhNubah}(h]h ]h"]h$]h&]uh1j@ hj Kubah}(h]h ]h"]h$]h&]uh1j: hc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMahj KubjW )}(hhh]h)}(hiIndicates whether the invalidation applies to all-levels page structure cache or just the leaf PTE cache.h]hiIndicates whether the invalidation applies to all-levels page structure cache or just the leaf PTE cache.}(hj(KhhhNhNubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhM`hj%Kubah}(h]h ]h"]h$]h&]uh1jV hj Kubeh}(h]h ]h"]h$]h&]uh1j4 hj$KhMahjKubah}(h]h ]h"]h$]h&]uh1j/ hjJubeh}(h]h ] kernelindentah"]h$]h&]uh1jhjhhhj8hNubjG)}(hhh]h}(h]h ]h"]h$]h&]entries](jS'iommu_hwpt_vtd_s1_invalidate (C struct)c.iommu_hwpt_vtd_s1_invalidatehNtauh1jFhjhhhj8hNubjX)}(hhh](j])}(hiommu_hwpt_vtd_s1_invalidateh]jc)}(h#struct iommu_hwpt_vtd_s1_invalidateh](ji)}(hjlh]hstruct}(hjiKhhhNhNubah}(h]h ]juah"]h$]h&]uh1jhhjeKhhhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMgubj{)}(h h]h }(hjwKhhhNhNubah}(h]h ]jah"]h$]h&]uh1jzhjeKhhhjvKhMgubj)}(hiommu_hwpt_vtd_s1_invalidateh]j)}(hjcKh]hiommu_hwpt_vtd_s1_invalidate}(hjKhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjKubah}(h]h ](jjeh"]h$]h&]hhuh1jhjeKhhhjvKhMgubeh}(h]h ]h"]h$]h&]hhjuh1jbjjhjaKhhhjvKhMgubah}(h]j\Kah ](jjeh"]h$]h&]jj)jhuh1j\hjvKhMghj^Khhubj)}(hhh]h)}(hAIntel VT-d cache invalidation (IOMMU_HWPT_INVALIDATE_DATA_VTD_S1)h]hAIntel VT-d cache invalidation (IOMMU_HWPT_INVALIDATE_DATA_VTD_S1)}(hjKhhhNhNubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMdhjKhhubah}(h]h ]h"]h$]h&]uh1jhj^KhhhjvKhMgubeh}(h]h ](jstructeh"]h$]h&]jjjjKjjKjjjuh1jWhhhjhj8hNubj)}(hX**Definition**:: struct iommu_hwpt_vtd_s1_invalidate { __aligned_u64 addr; __aligned_u64 npages; __u32 flags; __u32 __reserved; }; **Members** ``addr`` The start address of the range to be invalidated. It needs to be 4KB aligned. ``npages`` Number of contiguous 4K pages to be invalidated. ``flags`` Combination of enum iommu_hwpt_vtd_s1_invalidate_flags ``__reserved`` Must be 0h](h)}(h**Definition**::h](j>)}(h**Definition**h]h Definition}(hjKhhhNhNubah}(h]h ]h"]h$]h&]uh1j=hjKubh:}(hjKhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMhhjKubj)}(hstruct iommu_hwpt_vtd_s1_invalidate { __aligned_u64 addr; __aligned_u64 npages; __u32 flags; __u32 __reserved; };h]hstruct iommu_hwpt_vtd_s1_invalidate { __aligned_u64 addr; __aligned_u64 npages; __u32 flags; __u32 __reserved; };}hjKsbah}(h]h ]h"]h$]h&]hhuh1jhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMjhjKubh)}(h **Members**h]j>)}(hjKh]hMembers}(hjKhhhNhNubah}(h]h ]h"]h$]h&]uh1j=hjKubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMqhjKubj0 )}(hhh](j5 )}(hW``addr`` The start address of the range to be invalidated. It needs to be 4KB aligned. h](j; )}(h``addr``h]jA )}(hjLh]haddr}(hjLhhhNhNubah}(h]h ]h"]h$]h&]uh1j@ hjLubah}(h]h ]h"]h$]h&]uh1j: hc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMhhjLubjW )}(hhh]h)}(hMThe start address of the range to be invalidated. It needs to be 4KB aligned.h]hMThe start address of the range to be invalidated. It needs to be 4KB aligned.}(hj1LhhhNhNubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMghj.Lubah}(h]h ]h"]h$]h&]uh1jV hjLubeh}(h]h ]h"]h$]h&]uh1j4 hj-LhMhhjLubj5 )}(h<``npages`` Number of contiguous 4K pages to be invalidated. h](j; )}(h ``npages``h]jA )}(hjRLh]hnpages}(hjTLhhhNhNubah}(h]h ]h"]h$]h&]uh1j@ hjPLubah}(h]h ]h"]h$]h&]uh1j: hc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMihjLLubjW )}(hhh]h)}(h0Number of contiguous 4K pages to be invalidated.h]h0Number of contiguous 4K pages to be invalidated.}(hjkLhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjgLhMihjhLubah}(h]h ]h"]h$]h&]uh1jV hjLLubeh}(h]h ]h"]h$]h&]uh1j4 hjgLhMihjLubj5 )}(hA``flags`` Combination of enum iommu_hwpt_vtd_s1_invalidate_flags h](j; )}(h ``flags``h]jA )}(hjLh]hflags}(hjLhhhNhNubah}(h]h ]h"]h$]h&]uh1j@ hjLubah}(h]h ]h"]h$]h&]uh1j: hc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMjhjLubjW )}(hhh]h)}(h6Combination of enum iommu_hwpt_vtd_s1_invalidate_flagsh]h6Combination of enum iommu_hwpt_vtd_s1_invalidate_flags}(hjLhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjLhMjhjLubah}(h]h ]h"]h$]h&]uh1jV hjLubeh}(h]h ]h"]h$]h&]uh1j4 hjLhMjhjLubj5 )}(h``__reserved`` Must be 0h](j; )}(h``__reserved``h]jA )}(hjLh]h __reserved}(hjLhhhNhNubah}(h]h ]h"]h$]h&]uh1j@ hjLubah}(h]h ]h"]h$]h&]uh1j: hc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMjhjLubjW )}(hhh]h)}(h Must be 0h]h Must be 0}(hjLhhhNhNubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMkhjLubah}(h]h ]h"]h$]h&]uh1jV hjLubeh}(h]h ]h"]h$]h&]uh1j4 hjLhMjhjLubeh}(h]h ]h"]h$]h&]uh1j/ hjKubeh}(h]h ] kernelindentah"]h$]h&]uh1jhjhhhj8hNubh)}(h**Description**h]j>)}(hjMh]h Description}(hj MhhhNhNubah}(h]h ]h"]h$]h&]uh1j=hjMubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMnhjhhubh)}(hThe Intel VT-d specific invalidation data for user-managed stage-1 cache invalidation in nested translation. Userspace uses this structure to tell the impacted cache scope after modifying the stage-1 page table.h]hThe Intel VT-d specific invalidation data for user-managed stage-1 cache invalidation in nested translation. Userspace uses this structure to tell the impacted cache scope after modifying the stage-1 page table.}(hjMhhhNhNubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMkhjhhubh)}(hoInvalidating all the caches related to the page table by setting **addr** to be 0 and **npages** to be U64_MAX.h](hAInvalidating all the caches related to the page table by setting }(hj,MhhhNhNubj>)}(h**addr** h]haddr}(hj4MhhhNhNubah}(h]h ]h"]h$]h&]uh1j=hj,Mubh to be 0 and }(hj,MhhhNhNubj>)}(h **npages**h]hnpages}(hjFMhhhNhNubah}(h]h ]h"]h$]h&]uh1j=hj,Mubh to be U64_MAX.}(hj,MhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMohjhhubh)}(hCThe device TLB will be invalidated automatically if ATS is enabled.h]hCThe device TLB will be invalidated automatically if ATS is enabled.}(hj_MhhhNhNubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMrhjhhubjG)}(hhh]h}(h]h ]h"]h$]h&]entries](jS-iommu_viommu_arm_smmuv3_invalidate (C struct)$c.iommu_viommu_arm_smmuv3_invalidatehNtauh1jFhjhhhj8hNubjX)}(hhh](j])}(h"iommu_viommu_arm_smmuv3_invalidateh]jc)}(h)struct iommu_viommu_arm_smmuv3_invalidateh](ji)}(hjlh]hstruct}(hjMhhhNhNubah}(h]h ]juah"]h$]h&]uh1jhhjMhhhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMwubj{)}(h h]h }(hjMhhhNhNubah}(h]h ]jah"]h$]h&]uh1jzhjMhhhjMhMwubj)}(h"iommu_viommu_arm_smmuv3_invalidateh]j)}(hjMh]h"iommu_viommu_arm_smmuv3_invalidate}(hjMhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjMubah}(h]h ](jjeh"]h$]h&]hhuh1jhjMhhhjMhMwubeh}(h]h ]h"]h$]h&]hhjuh1jbjjhjMhhhjMhMwubah}(h]jzMah ](jjeh"]h$]h&]jj)jhuh1j\hjMhMwhj|Mhhubj)}(hhh]h)}(hGARM SMMUv3 cache invalidation (IOMMU_VIOMMU_INVALIDATE_DATA_ARM_SMMUV3)h]hGARM SMMUv3 cache invalidation (IOMMU_VIOMMU_INVALIDATE_DATA_ARM_SMMUV3)}(hjMhhhNhNubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhM}hjMhhubah}(h]h ]h"]h$]h&]uh1jhj|MhhhjMhMwubeh}(h]h ](jstructeh"]h$]h&]jjjjMjjMjjjuh1jWhhhjhj8hNubj)}(h**Definition**:: struct iommu_viommu_arm_smmuv3_invalidate { __aligned_le64 cmd[2]; }; **Members** ``cmd`` 128-bit cache invalidation command that runs in SMMU CMDQ. Must be little-endian.h](h)}(h**Definition**::h](j>)}(h**Definition**h]h Definition}(hjMhhhNhNubah}(h]h ]h"]h$]h&]uh1j=hjMubh:}(hjMhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMhjMubj)}(hIstruct iommu_viommu_arm_smmuv3_invalidate { __aligned_le64 cmd[2]; };h]hIstruct iommu_viommu_arm_smmuv3_invalidate { __aligned_le64 cmd[2]; };}hjNsbah}(h]h ]h"]h$]h&]hhuh1jhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMhjMubh)}(h **Members**h]j>)}(hjNh]hMembers}(hjNhhhNhNubah}(h]h ]h"]h$]h&]uh1j=hjNubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMhjMubj0 )}(hhh]j5 )}(hY``cmd`` 128-bit cache invalidation command that runs in SMMU CMDQ. Must be little-endian.h](j; )}(h``cmd``h]jA )}(hj6Nh]hcmd}(hj8NhhhNhNubah}(h]h ]h"]h$]h&]uh1j@ hj4Nubah}(h]h ]h"]h$]h&]uh1j: hc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMhj0NubjW )}(hhh]h)}(hQ128-bit cache invalidation command that runs in SMMU CMDQ. Must be little-endian.h]hQ128-bit cache invalidation command that runs in SMMU CMDQ. Must be little-endian.}(hjONhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjKNhMhjLNubah}(h]h ]h"]h$]h&]uh1jV hj0Nubeh}(h]h ]h"]h$]h&]uh1j4 hjKNhMhj-Nubah}(h]h ]h"]h$]h&]uh1j/ hjMubeh}(h]h ] kernelindentah"]h$]h&]uh1jhjhhhj8hNubh)}(h**Description**h]j>)}(hjxNh]h Description}(hjzNhhhNhNubah}(h]h ]h"]h$]h&]uh1j=hjvNubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMhjhhubj0 )}(hhh]j5 )}(hSupported command list only when passing in a vIOMMU via **hwpt_id**: CMDQ_OP_TLBI_NSNH_ALL CMDQ_OP_TLBI_NH_VA CMDQ_OP_TLBI_NH_VAA CMDQ_OP_TLBI_NH_ALL CMDQ_OP_TLBI_NH_ASID CMDQ_OP_ATC_INV CMDQ_OP_CFGI_CD CMDQ_OP_CFGI_CD_ALL h](j; )}(hESupported command list only when passing in a vIOMMU via **hwpt_id**:h](h9Supported command list only when passing in a vIOMMU via }(hjNhhhNhNubj>)}(h **hwpt_id**h]hhwpt_id}(hjNhhhNhNubah}(h]h ]h"]h$]h&]uh1j=hjNubh:}(hjNhhhNhNubeh}(h]h ]h"]h$]h&]uh1j: hc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMhjNubjW )}(hhh]h)}(hCMDQ_OP_TLBI_NSNH_ALL CMDQ_OP_TLBI_NH_VA CMDQ_OP_TLBI_NH_VAA CMDQ_OP_TLBI_NH_ALL CMDQ_OP_TLBI_NH_ASID CMDQ_OP_ATC_INV CMDQ_OP_CFGI_CD CMDQ_OP_CFGI_CD_ALLh]hCMDQ_OP_TLBI_NSNH_ALL CMDQ_OP_TLBI_NH_VA CMDQ_OP_TLBI_NH_VAA CMDQ_OP_TLBI_NH_ALL CMDQ_OP_TLBI_NH_ASID CMDQ_OP_ATC_INV CMDQ_OP_CFGI_CD CMDQ_OP_CFGI_CD_ALL}(hjNhhhNhNubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMhjNubah}(h]h ]h"]h$]h&]uh1jV hjNubeh}(h]h ]h"]h$]h&]uh1j4 hjNhMhjNubah}(h]h ]h"]h$]h&]uh1j/ hjhhhj8hNubh)}(h6-EIO will be returned if the command is not supported.h]h6-EIO will be returned if the command is not supported.}(hjNhhhNhNubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMhjhhubjG)}(hhh]h}(h]h ]h"]h$]h&]entries](jS iommu_hwpt_invalidate (C struct)c.iommu_hwpt_invalidatehNtauh1jFhjhhhj8hNubjX)}(hhh](j])}(hiommu_hwpt_invalidateh]jc)}(hstruct iommu_hwpt_invalidateh](ji)}(hjlh]hstruct}(hjOhhhNhNubah}(h]h ]juah"]h$]h&]uh1jhhjNhhhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMubj{)}(h h]h }(hjOhhhNhNubah}(h]h ]jah"]h$]h&]uh1jzhjNhhhjOhMubj)}(hiommu_hwpt_invalidateh]j)}(hjNh]hiommu_hwpt_invalidate}(hj"OhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjOubah}(h]h ](jjeh"]h$]h&]hhuh1jhjNhhhjOhMubeh}(h]h ]h"]h$]h&]hhjuh1jbjjhjNhhhjOhMubah}(h]jNah ](jjeh"]h$]h&]jj)jhuh1j\hjOhMhjNhhubj)}(hhh]h)}(hioctl(IOMMU_HWPT_INVALIDATE)h]hioctl(IOMMU_HWPT_INVALIDATE)}(hjDOhhhNhNubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMhjAOhhubah}(h]h ]h"]h$]h&]uh1jhjNhhhjOhMubeh}(h]h ](jstructeh"]h$]h&]jjjj\Ojj\Ojjjuh1jWhhhjhj8hNubj)}(hX**Definition**:: struct iommu_hwpt_invalidate { __u32 size; __u32 hwpt_id; __aligned_u64 data_uptr; __u32 data_type; __u32 entry_len; __u32 entry_num; __u32 __reserved; }; **Members** ``size`` sizeof(struct iommu_hwpt_invalidate) ``hwpt_id`` ID of a nested HWPT or a vIOMMU, for cache invalidation ``data_uptr`` User pointer to an array of driver-specific cache invalidation data. ``data_type`` One of enum iommu_hwpt_invalidate_data_type, defining the data type of all the entries in the invalidation request array. It should be a type supported by the hwpt pointed by **hwpt_id**. ``entry_len`` Length (in bytes) of a request entry in the request array ``entry_num`` Input the number of cache invalidation requests in the array. Output the number of requests successfully handled by kernel. ``__reserved`` Must be 0.h](h)}(h**Definition**::h](j>)}(h**Definition**h]h Definition}(hjhOhhhNhNubah}(h]h ]h"]h$]h&]uh1j=hjdOubh:}(hjdOhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMhj`Oubj)}(hstruct iommu_hwpt_invalidate { __u32 size; __u32 hwpt_id; __aligned_u64 data_uptr; __u32 data_type; __u32 entry_len; __u32 entry_num; __u32 __reserved; };h]hstruct iommu_hwpt_invalidate { __u32 size; __u32 hwpt_id; __aligned_u64 data_uptr; __u32 data_type; __u32 entry_len; __u32 entry_num; __u32 __reserved; };}hjOsbah}(h]h ]h"]h$]h&]hhuh1jhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMhj`Oubh)}(h **Members**h]j>)}(hjOh]hMembers}(hjOhhhNhNubah}(h]h ]h"]h$]h&]uh1j=hjOubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMhj`Oubj0 )}(hhh](j5 )}(h.``size`` sizeof(struct iommu_hwpt_invalidate) h](j; )}(h``size``h]jA )}(hjOh]hsize}(hjOhhhNhNubah}(h]h ]h"]h$]h&]uh1j@ hjOubah}(h]h ]h"]h$]h&]uh1j: hc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMhjOubjW )}(hhh]h)}(h$sizeof(struct iommu_hwpt_invalidate)h]h$sizeof(struct iommu_hwpt_invalidate)}(hjOhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjOhMhjOubah}(h]h ]h"]h$]h&]uh1jV hjOubeh}(h]h ]h"]h$]h&]uh1j4 hjOhMhjOubj5 )}(hD``hwpt_id`` ID of a nested HWPT or a vIOMMU, for cache invalidation h](j; )}(h ``hwpt_id``h]jA )}(hjOh]hhwpt_id}(hjOhhhNhNubah}(h]h ]h"]h$]h&]uh1j@ hjOubah}(h]h ]h"]h$]h&]uh1j: hc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMhjOubjW )}(hhh]h)}(h7ID of a nested HWPT or a vIOMMU, for cache invalidationh]h7ID of a nested HWPT or a vIOMMU, for cache invalidation}(hjPhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjOhMhjPubah}(h]h ]h"]h$]h&]uh1jV hjOubeh}(h]h ]h"]h$]h&]uh1j4 hjOhMhjOubj5 )}(hS``data_uptr`` User pointer to an array of driver-specific cache invalidation data. h](j; )}(h ``data_uptr``h]jA )}(hj#Ph]h data_uptr}(hj%PhhhNhNubah}(h]h ]h"]h$]h&]uh1j@ hj!Pubah}(h]h ]h"]h$]h&]uh1j: hc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMhjPubjW )}(hhh]h)}(hDUser pointer to an array of driver-specific cache invalidation data.h]hDUser pointer to an array of driver-specific cache invalidation data.}(hj)}(h **hwpt_id**h]hhwpt_id}(hj~PhhhNhNubah}(h]h ]h"]h$]h&]uh1j=hjvPubh.}(hjvPhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMhjsPubah}(h]h ]h"]h$]h&]uh1jV hjWPubeh}(h]h ]h"]h$]h&]uh1j4 hjrPhMhjOubj5 )}(hH``entry_len`` Length (in bytes) of a request entry in the request array h](j; )}(h ``entry_len``h]jA )}(hjPh]h entry_len}(hjPhhhNhNubah}(h]h ]h"]h$]h&]uh1j@ hjPubah}(h]h ]h"]h$]h&]uh1j: hc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMhjPubjW )}(hhh]h)}(h9Length (in bytes) of a request entry in the request arrayh]h9Length (in bytes) of a request entry in the request array}(hjPhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjPhMhjPubah}(h]h ]h"]h$]h&]uh1jV hjPubeh}(h]h ]h"]h$]h&]uh1j4 hjPhMhjOubj5 )}(h``entry_num`` Input the number of cache invalidation requests in the array. Output the number of requests successfully handled by kernel. h](j; )}(h ``entry_num``h]jA )}(hjPh]h entry_num}(hjPhhhNhNubah}(h]h ]h"]h$]h&]uh1j@ hjPubah}(h]h ]h"]h$]h&]uh1j: hc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMhjPubjW )}(hhh]h)}(h{Input the number of cache invalidation requests in the array. Output the number of requests successfully handled by kernel.h]h{Input the number of cache invalidation requests in the array. Output the number of requests successfully handled by kernel.}(hjPhhhNhNubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMhjPubah}(h]h ]h"]h$]h&]uh1jV hjPubeh}(h]h ]h"]h$]h&]uh1j4 hjPhMhjOubj5 )}(h``__reserved`` Must be 0.h](j; )}(h``__reserved``h]jA )}(hjQh]h __reserved}(hjQhhhNhNubah}(h]h ]h"]h$]h&]uh1j@ hjQubah}(h]h ]h"]h$]h&]uh1j: hc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMhjQubjW )}(hhh]h)}(h Must be 0.h]h Must be 0.}(hj5QhhhNhNubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMhj2Qubah}(h]h ]h"]h$]h&]uh1jV hjQubeh}(h]h ]h"]h$]h&]uh1j4 hj1QhMhjOubeh}(h]h ]h"]h$]h&]uh1j/ hj`Oubeh}(h]h ] kernelindentah"]h$]h&]uh1jhjhhhj8hNubh)}(h**Description**h]j>)}(hj_Qh]h Description}(hjaQhhhNhNubah}(h]h ]h"]h$]h&]uh1j=hj]Qubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMhjhhubh)}(hX0Invalidate iommu cache for user-managed page table or vIOMMU. Modifications on a user-managed page table should be followed by this operation, if a HWPT is passed in via **hwpt_id**. Other caches, such as device cache or descriptor cache can be flushed if a vIOMMU is passed in via the **hwpt_id** field.h](hInvalidate iommu cache for user-managed page table or vIOMMU. Modifications on a user-managed page table should be followed by this operation, if a HWPT is passed in via }(hjuQhhhNhNubj>)}(h **hwpt_id**h]hhwpt_id}(hj}QhhhNhNubah}(h]h ]h"]h$]h&]uh1j=hjuQubhi. Other caches, such as device cache or descriptor cache can be flushed if a vIOMMU is passed in via the }(hjuQhhhNhNubj>)}(h **hwpt_id**h]hhwpt_id}(hjQhhhNhNubah}(h]h ]h"]h$]h&]uh1j=hjuQubh field.}(hjuQhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMhjhhubh)}(hEach ioctl can support one or more cache invalidation requests in the array that has a total size of **entry_len** * **entry_num**.h](heEach ioctl can support one or more cache invalidation requests in the array that has a total size of }(hjQhhhNhNubj>)}(h **entry_len**h]h entry_len}(hjQhhhNhNubah}(h]h ]h"]h$]h&]uh1j=hjQubh * }(hjQhhhNhNubj>)}(h **entry_num**h]h entry_num}(hjQhhhNhNubah}(h]h ]h"]h$]h&]uh1j=hjQubh.}(hjQhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMhjhhubh)}(hAn empty invalidation request array by setting **entry_num**==0 is allowed, and **entry_len** and **data_uptr** would be ignored in this case. This can be used to check if the given **data_type** is supported or not by kernel.h](h/An empty invalidation request array by setting }(hjQhhhNhNubj>)}(h.**entry_num**==0 is allowed, and **entry_len**h]h*entry_num**==0 is allowed, and **entry_len}(hjQhhhNhNubah}(h]h ]h"]h$]h&]uh1j=hjQubh and }(hjQhhhNhNubj>)}(h **data_uptr**h]h data_uptr}(hjQhhhNhNubah}(h]h ]h"]h$]h&]uh1j=hjQubhG would be ignored in this case. This can be used to check if the given }(hjQhhhNhNubj>)}(h **data_type**h]h data_type}(hjRhhhNhNubah}(h]h ]h"]h$]h&]uh1j=hjQubh is supported or not by kernel.}(hjQhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMhjhhubjG)}(hhh]h}(h]h ]h"]h$]h&]entries](jS!iommu_hwpt_pgfault_flags (C enum)c.iommu_hwpt_pgfault_flagshNtauh1jFhjhhhj8hNubjX)}(hhh](j])}(hiommu_hwpt_pgfault_flagsh]jc)}(henum iommu_hwpt_pgfault_flagsh](ji)}(hjh]henum}(hj9RhhhNhNubah}(h]h ]juah"]h$]h&]uh1jhhj5Rhhhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMubj{)}(h h]h }(hjGRhhhNhNubah}(h]h ]jah"]h$]h&]uh1jzhj5RhhhjFRhMubj)}(hiommu_hwpt_pgfault_flagsh]j)}(hj3Rh]hiommu_hwpt_pgfault_flags}(hjYRhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjURubah}(h]h ](jjeh"]h$]h&]hhuh1jhj5RhhhjFRhMubeh}(h]h ]h"]h$]h&]hhjuh1jbjjhj1RhhhjFRhMubah}(h]j,Rah ](jjeh"]h$]h&]jj)jhuh1j\hjFRhMhj.Rhhubj)}(hhh]h)}(h#flags for struct iommu_hwpt_pgfaulth]h#flags for struct iommu_hwpt_pgfault}(hj{RhhhNhNubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMhjxRhhubah}(h]h ]h"]h$]h&]uh1jhj.RhhhjFRhMubeh}(h]h ](jenumeh"]h$]h&]jjjjRjjRjjjuh1jWhhhjhj8hNubj)}(h**Constants** ``IOMMU_PGFAULT_FLAGS_PASID_VALID`` The pasid field of the fault data is valid. ``IOMMU_PGFAULT_FLAGS_LAST_PAGE`` It's the last fault of a fault group.h](h)}(h **Constants**h]j>)}(hjRh]h Constants}(hjRhhhNhNubah}(h]h ]h"]h$]h&]uh1j=hjRubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMhjRubj0 )}(hhh](j5 )}(hP``IOMMU_PGFAULT_FLAGS_PASID_VALID`` The pasid field of the fault data is valid. h](j; )}(h#``IOMMU_PGFAULT_FLAGS_PASID_VALID``h]jA )}(hjRh]hIOMMU_PGFAULT_FLAGS_PASID_VALID}(hjRhhhNhNubah}(h]h ]h"]h$]h&]uh1j@ hjRubah}(h]h ]h"]h$]h&]uh1j: hc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMhjRubjW )}(hhh]h)}(h+The pasid field of the fault data is valid.h]h+The pasid field of the fault data is valid.}(hjRhhhNhNubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMhjRubah}(h]h ]h"]h$]h&]uh1jV hjRubeh}(h]h ]h"]h$]h&]uh1j4 hjRhMhjRubj5 )}(hG``IOMMU_PGFAULT_FLAGS_LAST_PAGE`` It's the last fault of a fault group.h](j; )}(h!``IOMMU_PGFAULT_FLAGS_LAST_PAGE``h]jA )}(hjRh]hIOMMU_PGFAULT_FLAGS_LAST_PAGE}(hjRhhhNhNubah}(h]h ]h"]h$]h&]uh1j@ hjRubah}(h]h ]h"]h$]h&]uh1j: hc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMhjRubjW )}(hhh]h)}(h%It's the last fault of a fault group.h]h'It’s the last fault of a fault group.}(hjShhhNhNubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMhj Subah}(h]h ]h"]h$]h&]uh1jV hjRubeh}(h]h ]h"]h$]h&]uh1j4 hj ShMhjRubeh}(h]h ]h"]h$]h&]uh1j/ hjRubeh}(h]h ] kernelindentah"]h$]h&]uh1jhjhhhj8hNubjG)}(hhh]h}(h]h ]h"]h$]h&]entries](jS iommu_hwpt_pgfault_perm (C enum)c.iommu_hwpt_pgfault_permhNtauh1jFhjhhhj8hNubjX)}(hhh](j])}(hiommu_hwpt_pgfault_permh]jc)}(henum iommu_hwpt_pgfault_permh](ji)}(hjh]henum}(hjPShhhNhNubah}(h]h ]juah"]h$]h&]uh1jhhjLShhhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMubj{)}(h h]h }(hj^ShhhNhNubah}(h]h ]jah"]h$]h&]uh1jzhjLShhhj]ShMubj)}(hiommu_hwpt_pgfault_permh]j)}(hjJSh]hiommu_hwpt_pgfault_perm}(hjpShhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjlSubah}(h]h ](jjeh"]h$]h&]hhuh1jhjLShhhj]ShMubeh}(h]h ]h"]h$]h&]hhjuh1jbjjhjHShhhj]ShMubah}(h]jCSah ](jjeh"]h$]h&]jj)jhuh1j\hj]ShMhjEShhubj)}(hhh]h)}(h'perm bits for struct iommu_hwpt_pgfaulth]h'perm bits for struct iommu_hwpt_pgfault}(hjShhhNhNubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMhjShhubah}(h]h ]h"]h$]h&]uh1jhjEShhhj]ShMubeh}(h]h ](jenumeh"]h$]h&]jjjjSjjSjjjuh1jWhhhjhj8hNubj)}(hX**Constants** ``IOMMU_PGFAULT_PERM_READ`` request for read permission ``IOMMU_PGFAULT_PERM_WRITE`` request for write permission ``IOMMU_PGFAULT_PERM_EXEC`` (PCIE 10.4.1) request with a PASID that has the Execute Requested bit set in PASID TLP Prefix. ``IOMMU_PGFAULT_PERM_PRIV`` (PCIE 10.4.1) request with a PASID that has the Privileged Mode Requested bit set in PASID TLP Prefix.h](h)}(h **Constants**h]j>)}(hjSh]h Constants}(hjShhhNhNubah}(h]h ]h"]h$]h&]uh1j=hjSubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMhjSubj0 )}(hhh](j5 )}(h8``IOMMU_PGFAULT_PERM_READ`` request for read permission h](j; )}(h``IOMMU_PGFAULT_PERM_READ``h]jA )}(hjSh]hIOMMU_PGFAULT_PERM_READ}(hjShhhNhNubah}(h]h ]h"]h$]h&]uh1j@ hjSubah}(h]h ]h"]h$]h&]uh1j: hc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMhjSubjW )}(hhh]h)}(hrequest for read permissionh]hrequest for read permission}(hjShhhNhNubah}(h]h ]h"]h$]h&]uh1hhjShMhjSubah}(h]h ]h"]h$]h&]uh1jV hjSubeh}(h]h ]h"]h$]h&]uh1j4 hjShMhjSubj5 )}(h:``IOMMU_PGFAULT_PERM_WRITE`` request for write permission h](j; )}(h``IOMMU_PGFAULT_PERM_WRITE``h]jA )}(hj Th]hIOMMU_PGFAULT_PERM_WRITE}(hjThhhNhNubah}(h]h ]h"]h$]h&]uh1j@ hj Tubah}(h]h ]h"]h$]h&]uh1j: hc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMhjTubjW )}(hhh]h)}(hrequest for write permissionh]hrequest for write permission}(hj%ThhhNhNubah}(h]h ]h"]h$]h&]uh1hhj!ThMhj"Tubah}(h]h ]h"]h$]h&]uh1jV hjTubeh}(h]h ]h"]h$]h&]uh1j4 hj!ThMhjSubj5 )}(h{``IOMMU_PGFAULT_PERM_EXEC`` (PCIE 10.4.1) request with a PASID that has the Execute Requested bit set in PASID TLP Prefix. h](j; )}(h``IOMMU_PGFAULT_PERM_EXEC``h]jA )}(hjETh]hIOMMU_PGFAULT_PERM_EXEC}(hjGThhhNhNubah}(h]h ]h"]h$]h&]uh1j@ hjCTubah}(h]h ]h"]h$]h&]uh1j: hc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMhj?TubjW )}(hhh]h)}(h^(PCIE 10.4.1) request with a PASID that has the Execute Requested bit set in PASID TLP Prefix.h]h^(PCIE 10.4.1) request with a PASID that has the Execute Requested bit set in PASID TLP Prefix.}(hj^ThhhNhNubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMhj[Tubah}(h]h ]h"]h$]h&]uh1jV hj?Tubeh}(h]h ]h"]h$]h&]uh1j4 hjZThMhjSubj5 )}(h``IOMMU_PGFAULT_PERM_PRIV`` (PCIE 10.4.1) request with a PASID that has the Privileged Mode Requested bit set in PASID TLP Prefix.h](j; )}(h``IOMMU_PGFAULT_PERM_PRIV``h]jA )}(hjTh]hIOMMU_PGFAULT_PERM_PRIV}(hjThhhNhNubah}(h]h ]h"]h$]h&]uh1j@ hj}Tubah}(h]h ]h"]h$]h&]uh1j: hc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMhjyTubjW )}(hhh]h)}(hf(PCIE 10.4.1) request with a PASID that has the Privileged Mode Requested bit set in PASID TLP Prefix.h]hf(PCIE 10.4.1) request with a PASID that has the Privileged Mode Requested bit set in PASID TLP Prefix.}(hjThhhNhNubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMhjTubah}(h]h ]h"]h$]h&]uh1jV hjyTubeh}(h]h ]h"]h$]h&]uh1j4 hjThMhjSubeh}(h]h ]h"]h$]h&]uh1j/ hjSubeh}(h]h ] kernelindentah"]h$]h&]uh1jhjhhhj8hNubjG)}(hhh]h}(h]h ]h"]h$]h&]entries](jSiommu_hwpt_pgfault (C struct)c.iommu_hwpt_pgfaulthNtauh1jFhjhhhj8hNubjX)}(hhh](j])}(hiommu_hwpt_pgfaulth]jc)}(hstruct iommu_hwpt_pgfaulth](ji)}(hjlh]hstruct}(hjThhhNhNubah}(h]h ]juah"]h$]h&]uh1jhhjThhhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMubj{)}(h h]h }(hjThhhNhNubah}(h]h ]jah"]h$]h&]uh1jzhjThhhjThMubj)}(hiommu_hwpt_pgfaulth]j)}(hjTh]hiommu_hwpt_pgfault}(hjThhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjTubah}(h]h ](jjeh"]h$]h&]hhuh1jhjThhhjThMubeh}(h]h ]h"]h$]h&]hhjuh1jbjjhjThhhjThMubah}(h]jTah ](jjeh"]h$]h&]jj)jhuh1j\hjThMhjThhubj)}(hhh]h)}(hiommu page fault datah]hiommu page fault data}(hjUhhhNhNubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMhjUhhubah}(h]h ]h"]h$]h&]uh1jhjThhhjThMubeh}(h]h ](jstructeh"]h$]h&]jjjj3Ujj3Ujjjuh1jWhhhjhj8hNubj)}(hX**Definition**:: struct iommu_hwpt_pgfault { __u32 flags; __u32 dev_id; __u32 pasid; __u32 grpid; __u32 perm; __u32 __reserved; __aligned_u64 addr; __u32 length; __u32 cookie; }; **Members** ``flags`` Combination of enum iommu_hwpt_pgfault_flags ``dev_id`` id of the originated device ``pasid`` Process Address Space ID ``grpid`` Page Request Group Index ``perm`` Combination of enum iommu_hwpt_pgfault_perm ``__reserved`` Must be 0. ``addr`` Fault address ``length`` a hint of how much data the requestor is expecting to fetch. For example, if the PRI initiator knows it is going to do a 10MB transfer, it could fill in 10MB and the OS could pre-fault in 10MB of IOVA. It's default to 0 if there's no such hint. ``cookie`` kernel-managed cookie identifying a group of fault messages. The cookie number encoded in the last page fault of the group should be echoed back in the response message.h](h)}(h**Definition**::h](j>)}(h**Definition**h]h Definition}(hj?UhhhNhNubah}(h]h ]h"]h$]h&]uh1j=hj;Uubh:}(hj;UhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMhj7Uubj)}(hstruct iommu_hwpt_pgfault { __u32 flags; __u32 dev_id; __u32 pasid; __u32 grpid; __u32 perm; __u32 __reserved; __aligned_u64 addr; __u32 length; __u32 cookie; };h]hstruct iommu_hwpt_pgfault { __u32 flags; __u32 dev_id; __u32 pasid; __u32 grpid; __u32 perm; __u32 __reserved; __aligned_u64 addr; __u32 length; __u32 cookie; };}hjXUsbah}(h]h ]h"]h$]h&]hhuh1jhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMhj7Uubh)}(h **Members**h]j>)}(hjiUh]hMembers}(hjkUhhhNhNubah}(h]h ]h"]h$]h&]uh1j=hjgUubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMhj7Uubj0 )}(hhh](j5 )}(h7``flags`` Combination of enum iommu_hwpt_pgfault_flags h](j; )}(h ``flags``h]jA )}(hjUh]hflags}(hjUhhhNhNubah}(h]h ]h"]h$]h&]uh1j@ hjUubah}(h]h ]h"]h$]h&]uh1j: hc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMhjUubjW )}(hhh]h)}(h,Combination of enum iommu_hwpt_pgfault_flagsh]h,Combination of enum iommu_hwpt_pgfault_flags}(hjUhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjUhMhjUubah}(h]h ]h"]h$]h&]uh1jV hjUubeh}(h]h ]h"]h$]h&]uh1j4 hjUhMhjUubj5 )}(h'``dev_id`` id of the originated device h](j; )}(h ``dev_id``h]jA )}(hjUh]hdev_id}(hjUhhhNhNubah}(h]h ]h"]h$]h&]uh1j@ hjUubah}(h]h ]h"]h$]h&]uh1j: hc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMhjUubjW )}(hhh]h)}(hid of the originated deviceh]hid of the originated device}(hjUhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjUhMhjUubah}(h]h ]h"]h$]h&]uh1jV hjUubeh}(h]h ]h"]h$]h&]uh1j4 hjUhMhjUubj5 )}(h#``pasid`` Process Address Space ID h](j; )}(h ``pasid``h]jA )}(hjUh]hpasid}(hjUhhhNhNubah}(h]h ]h"]h$]h&]uh1j@ hjUubah}(h]h ]h"]h$]h&]uh1j: hc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMhjUubjW )}(hhh]h)}(hProcess Address Space IDh]hProcess Address Space ID}(hjVhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjVhMhjVubah}(h]h ]h"]h$]h&]uh1jV hjUubeh}(h]h ]h"]h$]h&]uh1j4 hjVhMhjUubj5 )}(h#``grpid`` Page Request Group Index h](j; )}(h ``grpid``h]jA )}(hj3Vh]hgrpid}(hj5VhhhNhNubah}(h]h ]h"]h$]h&]uh1j@ hj1Vubah}(h]h ]h"]h$]h&]uh1j: hc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMhj-VubjW )}(hhh]h)}(hPage Request Group Indexh]hPage Request Group Index}(hjLVhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjHVhMhjIVubah}(h]h ]h"]h$]h&]uh1jV hj-Vubeh}(h]h ]h"]h$]h&]uh1j4 hjHVhMhjUubj5 )}(h5``perm`` Combination of enum iommu_hwpt_pgfault_perm h](j; )}(h``perm``h]jA )}(hjlVh]hperm}(hjnVhhhNhNubah}(h]h ]h"]h$]h&]uh1j@ hjjVubah}(h]h ]h"]h$]h&]uh1j: hc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMhjfVubjW )}(hhh]h)}(h+Combination of enum iommu_hwpt_pgfault_permh]h+Combination of enum iommu_hwpt_pgfault_perm}(hjVhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjVhMhjVubah}(h]h ]h"]h$]h&]uh1jV hjfVubeh}(h]h ]h"]h$]h&]uh1j4 hjVhMhjUubj5 )}(h``__reserved`` Must be 0. h](j; )}(h``__reserved``h]jA )}(hjVh]h __reserved}(hjVhhhNhNubah}(h]h ]h"]h$]h&]uh1j@ hjVubah}(h]h ]h"]h$]h&]uh1j: hc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMhjVubjW )}(hhh]h)}(h Must be 0.h]h Must be 0.}(hjVhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjVhMhjVubah}(h]h ]h"]h$]h&]uh1jV hjVubeh}(h]h ]h"]h$]h&]uh1j4 hjVhMhjUubj5 )}(h``addr`` Fault address h](j; )}(h``addr``h]jA )}(hjVh]haddr}(hjVhhhNhNubah}(h]h ]h"]h$]h&]uh1j@ hjVubah}(h]h ]h"]h$]h&]uh1j: hc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMhjVubjW )}(hhh]h)}(h Fault addressh]h Fault address}(hjVhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjVhMhjVubah}(h]h ]h"]h$]h&]uh1jV hjVubeh}(h]h ]h"]h$]h&]uh1j4 hjVhMhjUubj5 )}(hX``length`` a hint of how much data the requestor is expecting to fetch. For example, if the PRI initiator knows it is going to do a 10MB transfer, it could fill in 10MB and the OS could pre-fault in 10MB of IOVA. It's default to 0 if there's no such hint. h](j; )}(h ``length``h]jA )}(hjWh]hlength}(hjWhhhNhNubah}(h]h ]h"]h$]h&]uh1j@ hjWubah}(h]h ]h"]h$]h&]uh1j: hc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMhjWubjW )}(hhh]h)}(ha hint of how much data the requestor is expecting to fetch. For example, if the PRI initiator knows it is going to do a 10MB transfer, it could fill in 10MB and the OS could pre-fault in 10MB of IOVA. It's default to 0 if there's no such hint.h]ha hint of how much data the requestor is expecting to fetch. For example, if the PRI initiator knows it is going to do a 10MB transfer, it could fill in 10MB and the OS could pre-fault in 10MB of IOVA. It’s default to 0 if there’s no such hint.}(hj0WhhhNhNubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMhj-Wubah}(h]h ]h"]h$]h&]uh1jV hjWubeh}(h]h ]h"]h$]h&]uh1j4 hj,WhMhjUubj5 )}(h``cookie`` kernel-managed cookie identifying a group of fault messages. The cookie number encoded in the last page fault of the group should be echoed back in the response message.h](j; )}(h ``cookie``h]jA )}(hjQWh]hcookie}(hjSWhhhNhNubah}(h]h ]h"]h$]h&]uh1j@ hjOWubah}(h]h ]h"]h$]h&]uh1j: hc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMhjKWubjW )}(hhh]h)}(hkernel-managed cookie identifying a group of fault messages. The cookie number encoded in the last page fault of the group should be echoed back in the response message.h]hkernel-managed cookie identifying a group of fault messages. The cookie number encoded in the last page fault of the group should be echoed back in the response message.}(hjjWhhhNhNubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMhjgWubah}(h]h ]h"]h$]h&]uh1jV hjKWubeh}(h]h ]h"]h$]h&]uh1j4 hjfWhMhjUubeh}(h]h ]h"]h$]h&]uh1j/ hj7Uubeh}(h]h ] kernelindentah"]h$]h&]uh1jhjhhhj8hNubjG)}(hhh]h}(h]h ]h"]h$]h&]entries](jS#iommufd_page_response_code (C enum)c.iommufd_page_response_codehNtauh1jFhjhhhj8hNubjX)}(hhh](j])}(hiommufd_page_response_codeh]jc)}(henum iommufd_page_response_codeh](ji)}(hjh]henum}(hjWhhhNhNubah}(h]h ]juah"]h$]h&]uh1jhhjWhhhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMubj{)}(h h]h }(hjWhhhNhNubah}(h]h ]jah"]h$]h&]uh1jzhjWhhhjWhMubj)}(hiommufd_page_response_codeh]j)}(hjWh]hiommufd_page_response_code}(hjWhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjWubah}(h]h ](jjeh"]h$]h&]hhuh1jhjWhhhjWhMubeh}(h]h ]h"]h$]h&]hhjuh1jbjjhjWhhhjWhMubah}(h]jWah ](jjeh"]h$]h&]jj)jhuh1j\hjWhMhjWhhubj)}(hhh]h)}(hReturn status of fault handlersh]hReturn status of fault handlers}(hjWhhhNhNubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMhjWhhubah}(h]h ]h"]h$]h&]uh1jhjWhhhjWhMubeh}(h]h ](jenumeh"]h$]h&]jjjjXjjXjjjuh1jWhhhjhj8hNubj)}(hX2**Constants** ``IOMMUFD_PAGE_RESP_SUCCESS`` Fault has been handled and the page tables populated, retry the access. This is the "Success" defined in PCI 10.4.2.1. ``IOMMUFD_PAGE_RESP_INVALID`` Could not handle this fault, don't retry the access. This is the "Invalid Request" in PCI 10.4.2.1.h](h)}(h **Constants**h]j>)}(hjXh]h Constants}(hjXhhhNhNubah}(h]h ]h"]h$]h&]uh1j=hj Xubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMhj Xubj0 )}(hhh](j5 )}(h``IOMMUFD_PAGE_RESP_SUCCESS`` Fault has been handled and the page tables populated, retry the access. This is the "Success" defined in PCI 10.4.2.1. h](j; )}(h``IOMMUFD_PAGE_RESP_SUCCESS``h]jA )}(hj.Xh]hIOMMUFD_PAGE_RESP_SUCCESS}(hj0XhhhNhNubah}(h]h ]h"]h$]h&]uh1j@ hj,Xubah}(h]h ]h"]h$]h&]uh1j: hc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMhj(XubjW )}(hhh]h)}(hvFault has been handled and the page tables populated, retry the access. This is the "Success" defined in PCI 10.4.2.1.h]hzFault has been handled and the page tables populated, retry the access. This is the “Success” defined in PCI 10.4.2.1.}(hjGXhhhNhNubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMhjDXubah}(h]h ]h"]h$]h&]uh1jV hj(Xubeh}(h]h ]h"]h$]h&]uh1j4 hjCXhMhj%Xubj5 )}(h``IOMMUFD_PAGE_RESP_INVALID`` Could not handle this fault, don't retry the access. This is the "Invalid Request" in PCI 10.4.2.1.h](j; )}(h``IOMMUFD_PAGE_RESP_INVALID``h]jA )}(hjhXh]hIOMMUFD_PAGE_RESP_INVALID}(hjjXhhhNhNubah}(h]h ]h"]h$]h&]uh1j@ hjfXubah}(h]h ]h"]h$]h&]uh1j: hc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMhjbXubjW )}(hhh]h)}(hcCould not handle this fault, don't retry the access. This is the "Invalid Request" in PCI 10.4.2.1.h]hiCould not handle this fault, don’t retry the access. This is the “Invalid Request” in PCI 10.4.2.1.}(hjXhhhNhNubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMhj~Xubah}(h]h ]h"]h$]h&]uh1jV hjbXubeh}(h]h ]h"]h$]h&]uh1j4 hj}XhMhj%Xubeh}(h]h ]h"]h$]h&]uh1j/ hj Xubeh}(h]h ] kernelindentah"]h$]h&]uh1jhjhhhj8hNubjG)}(hhh]h}(h]h ]h"]h$]h&]entries](jS#iommu_hwpt_page_response (C struct)c.iommu_hwpt_page_responsehNtauh1jFhjhhhj8hNubjX)}(hhh](j])}(hiommu_hwpt_page_responseh]jc)}(hstruct iommu_hwpt_page_responseh](ji)}(hjlh]hstruct}(hjXhhhNhNubah}(h]h ]juah"]h$]h&]uh1jhhjXhhhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMubj{)}(h h]h }(hjXhhhNhNubah}(h]h ]jah"]h$]h&]uh1jzhjXhhhjXhMubj)}(hiommu_hwpt_page_responseh]j)}(hjXh]hiommu_hwpt_page_response}(hjXhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjXubah}(h]h ](jjeh"]h$]h&]hhuh1jhjXhhhjXhMubeh}(h]h ]h"]h$]h&]hhjuh1jbjjhjXhhhjXhMubah}(h]jXah ](jjeh"]h$]h&]jj)jhuh1j\hjXhMhjXhhubj)}(hhh]h)}(hIOMMU page fault responseh]hIOMMU page fault response}(hjYhhhNhNubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMhjYhhubah}(h]h ]h"]h$]h&]uh1jhjXhhhjXhMubeh}(h]h ](jstructeh"]h$]h&]jjjjYjjYjjjuh1jWhhhjhj8hNubj)}(h**Definition**:: struct iommu_hwpt_page_response { __u32 cookie; __u32 code; }; **Members** ``cookie`` The kernel-managed cookie reported in the fault message. ``code`` One of response code in enum iommufd_page_response_code.h](h)}(h**Definition**::h](j>)}(h**Definition**h]h Definition}(hj(YhhhNhNubah}(h]h ]h"]h$]h&]uh1j=hj$Yubh:}(hj$YhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMhj Yubj)}(hFstruct iommu_hwpt_page_response { __u32 cookie; __u32 code; };h]hFstruct iommu_hwpt_page_response { __u32 cookie; __u32 code; };}hjAYsbah}(h]h ]h"]h$]h&]hhuh1jhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMhj Yubh)}(h **Members**h]j>)}(hjRYh]hMembers}(hjTYhhhNhNubah}(h]h ]h"]h$]h&]uh1j=hjPYubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhM hj Yubj0 )}(hhh](j5 )}(hD``cookie`` The kernel-managed cookie reported in the fault message. h](j; )}(h ``cookie``h]jA )}(hjqYh]hcookie}(hjsYhhhNhNubah}(h]h ]h"]h$]h&]uh1j@ hjoYubah}(h]h ]h"]h$]h&]uh1j: hc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMhjkYubjW )}(hhh]h)}(h8The kernel-managed cookie reported in the fault message.h]h8The kernel-managed cookie reported in the fault message.}(hjYhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjYhMhjYubah}(h]h ]h"]h$]h&]uh1jV hjkYubeh}(h]h ]h"]h$]h&]uh1j4 hjYhMhjhYubj5 )}(hA``code`` One of response code in enum iommufd_page_response_code.h](j; )}(h``code``h]jA )}(hjYh]hcode}(hjYhhhNhNubah}(h]h ]h"]h$]h&]uh1j@ hjYubah}(h]h ]h"]h$]h&]uh1j: hc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMhjYubjW )}(hhh]h)}(h8One of response code in enum iommufd_page_response_code.h]h8One of response code in enum iommufd_page_response_code.}(hjYhhhNhNubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMhjYubah}(h]h ]h"]h$]h&]uh1jV hjYubeh}(h]h ]h"]h$]h&]uh1j4 hjYhMhjhYubeh}(h]h ]h"]h$]h&]uh1j/ hj Yubeh}(h]h ] kernelindentah"]h$]h&]uh1jhjhhhj8hNubjG)}(hhh]h}(h]h ]h"]h$]h&]entries](jSiommu_fault_alloc (C struct)c.iommu_fault_allochNtauh1jFhjhhhj8hNubjX)}(hhh](j])}(hiommu_fault_alloch]jc)}(hstruct iommu_fault_alloch](ji)}(hjlh]hstruct}(hjZhhhNhNubah}(h]h ]juah"]h$]h&]uh1jhhjZhhhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMubj{)}(h h]h }(hjZhhhNhNubah}(h]h ]jah"]h$]h&]uh1jzhjZhhhjZhMubj)}(hiommu_fault_alloch]j)}(hjYh]hiommu_fault_alloc}(hj$ZhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj Zubah}(h]h ](jjeh"]h$]h&]hhuh1jhjZhhhjZhMubeh}(h]h ]h"]h$]h&]hhjuh1jbjjhjYhhhjZhMubah}(h]jYah ](jjeh"]h$]h&]jj)jhuh1j\hjZhMhjYhhubj)}(hhh]h)}(hioctl(IOMMU_FAULT_QUEUE_ALLOC)h]hioctl(IOMMU_FAULT_QUEUE_ALLOC)}(hjFZhhhNhNubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhM hjCZhhubah}(h]h ]h"]h$]h&]uh1jhjYhhhjZhMubeh}(h]h ](jstructeh"]h$]h&]jjjj^Zjj^Zjjjuh1jWhhhjhj8hNubj)}(hX5**Definition**:: struct iommu_fault_alloc { __u32 size; __u32 flags; __u32 out_fault_id; __u32 out_fault_fd; }; **Members** ``size`` sizeof(struct iommu_fault_alloc) ``flags`` Must be 0 ``out_fault_id`` The ID of the new FAULT ``out_fault_fd`` The fd of the new FAULTh](h)}(h**Definition**::h](j>)}(h**Definition**h]h Definition}(hjjZhhhNhNubah}(h]h ]h"]h$]h&]uh1j=hjfZubh:}(hjfZhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhM hjbZubj)}(hnstruct iommu_fault_alloc { __u32 size; __u32 flags; __u32 out_fault_id; __u32 out_fault_fd; };h]hnstruct iommu_fault_alloc { __u32 size; __u32 flags; __u32 out_fault_id; __u32 out_fault_fd; };}hjZsbah}(h]h ]h"]h$]h&]hhuh1jhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMhjbZubh)}(h **Members**h]j>)}(hjZh]hMembers}(hjZhhhNhNubah}(h]h ]h"]h$]h&]uh1j=hjZubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMhjbZubj0 )}(hhh](j5 )}(h*``size`` sizeof(struct iommu_fault_alloc) h](j; )}(h``size``h]jA )}(hjZh]hsize}(hjZhhhNhNubah}(h]h ]h"]h$]h&]uh1j@ hjZubah}(h]h ]h"]h$]h&]uh1j: hc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhM hjZubjW )}(hhh]h)}(h sizeof(struct iommu_fault_alloc)h]h sizeof(struct iommu_fault_alloc)}(hjZhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjZhM hjZubah}(h]h ]h"]h$]h&]uh1jV hjZubeh}(h]h ]h"]h$]h&]uh1j4 hjZhM hjZubj5 )}(h``flags`` Must be 0 h](j; )}(h ``flags``h]jA )}(hjZh]hflags}(hjZhhhNhNubah}(h]h ]h"]h$]h&]uh1j@ hjZubah}(h]h ]h"]h$]h&]uh1j: hc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhM hjZubjW )}(hhh]h)}(h Must be 0h]h Must be 0}(hj[hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj[hM hj[ubah}(h]h ]h"]h$]h&]uh1jV hjZubeh}(h]h ]h"]h$]h&]uh1j4 hj[hM hjZubj5 )}(h)``out_fault_id`` The ID of the new FAULT h](j; )}(h``out_fault_id``h]jA )}(hj%[h]h out_fault_id}(hj'[hhhNhNubah}(h]h ]h"]h$]h&]uh1j@ hj#[ubah}(h]h ]h"]h$]h&]uh1j: hc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhM hj[ubjW )}(hhh]h)}(hThe ID of the new FAULTh]hThe ID of the new FAULT}(hj>[hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj:[hM hj;[ubah}(h]h ]h"]h$]h&]uh1jV hj[ubeh}(h]h ]h"]h$]h&]uh1j4 hj:[hM hjZubj5 )}(h(``out_fault_fd`` The fd of the new FAULTh](j; )}(h``out_fault_fd``h]jA )}(hj^[h]h out_fault_fd}(hj`[hhhNhNubah}(h]h ]h"]h$]h&]uh1j@ hj\[ubah}(h]h ]h"]h$]h&]uh1j: hc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhM hjX[ubjW )}(hhh]h)}(hThe fd of the new FAULTh]hThe fd of the new FAULT}(hjw[hhhNhNubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMhjt[ubah}(h]h ]h"]h$]h&]uh1jV hjX[ubeh}(h]h ]h"]h$]h&]uh1j4 hjs[hM hjZubeh}(h]h ]h"]h$]h&]uh1j/ hjbZubeh}(h]h ] kernelindentah"]h$]h&]uh1jhjhhhj8hNubh)}(h**Description**h]j>)}(hj[h]h Description}(hj[hhhNhNubah}(h]h ]h"]h$]h&]uh1j=hj[ubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMhjhhubh)}(h,Explicitly allocate a fault handling object.h]h,Explicitly allocate a fault handling object.}(hj[hhhNhNubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMhjhhubjG)}(hhh]h}(h]h ]h"]h$]h&]entries](jSiommu_viommu_type (C enum)c.iommu_viommu_typehNtauh1jFhjhhhj8hNubjX)}(hhh](j])}(hiommu_viommu_typeh]jc)}(henum iommu_viommu_typeh](ji)}(hjh]henum}(hj[hhhNhNubah}(h]h ]juah"]h$]h&]uh1jhhj[hhhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMubj{)}(h h]h }(hj[hhhNhNubah}(h]h ]jah"]h$]h&]uh1jzhj[hhhj[hMubj)}(hiommu_viommu_typeh]j)}(hj[h]hiommu_viommu_type}(hj[hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj[ubah}(h]h ](jjeh"]h$]h&]hhuh1jhj[hhhj[hMubeh}(h]h ]h"]h$]h&]hhjuh1jbjjhj[hhhj[hMubah}(h]j[ah ](jjeh"]h$]h&]jj)jhuh1j\hj[hMhj[hhubj)}(hhh]h)}(hVirtual IOMMU Typeh]hVirtual IOMMU Type}(hj!\hhhNhNubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMhj\hhubah}(h]h ]h"]h$]h&]uh1jhj[hhhj[hMubeh}(h]h ](jenumeh"]h$]h&]jjjj9\jj9\jjjuh1jWhhhjhj8hNubj)}(h**Constants** ``IOMMU_VIOMMU_TYPE_DEFAULT`` Reserved for future use ``IOMMU_VIOMMU_TYPE_ARM_SMMUV3`` ARM SMMUv3 driver specific type ``IOMMU_VIOMMU_TYPE_TEGRA241_CMDQV`` NVIDIA Tegra241 CMDQV (extension for ARM SMMUv3) enabled ARM SMMUv3 typeh](h)}(h **Constants**h]j>)}(hjC\h]h Constants}(hjE\hhhNhNubah}(h]h ]h"]h$]h&]uh1j=hjA\ubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMhj=\ubj0 )}(hhh](j5 )}(h6``IOMMU_VIOMMU_TYPE_DEFAULT`` Reserved for future use h](j; )}(h``IOMMU_VIOMMU_TYPE_DEFAULT``h]jA )}(hjb\h]hIOMMU_VIOMMU_TYPE_DEFAULT}(hjd\hhhNhNubah}(h]h ]h"]h$]h&]uh1j@ hj`\ubah}(h]h ]h"]h$]h&]uh1j: hc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhM!hj\\ubjW )}(hhh]h)}(hReserved for future useh]hReserved for future use}(hj{\hhhNhNubah}(h]h ]h"]h$]h&]uh1hhjw\hM!hjx\ubah}(h]h ]h"]h$]h&]uh1jV hj\\ubeh}(h]h ]h"]h$]h&]uh1j4 hjw\hM!hjY\ubj5 )}(hA``IOMMU_VIOMMU_TYPE_ARM_SMMUV3`` ARM SMMUv3 driver specific type h](j; )}(h ``IOMMU_VIOMMU_TYPE_ARM_SMMUV3``h]jA )}(hj\h]hIOMMU_VIOMMU_TYPE_ARM_SMMUV3}(hj\hhhNhNubah}(h]h ]h"]h$]h&]uh1j@ hj\ubah}(h]h ]h"]h$]h&]uh1j: hc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhM$hj\ubjW )}(hhh]h)}(hARM SMMUv3 driver specific typeh]hARM SMMUv3 driver specific type}(hj\hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj\hM$hj\ubah}(h]h ]h"]h$]h&]uh1jV hj\ubeh}(h]h ]h"]h$]h&]uh1j4 hj\hM$hjY\ubj5 )}(hm``IOMMU_VIOMMU_TYPE_TEGRA241_CMDQV`` NVIDIA Tegra241 CMDQV (extension for ARM SMMUv3) enabled ARM SMMUv3 typeh](j; )}(h$``IOMMU_VIOMMU_TYPE_TEGRA241_CMDQV``h]jA )}(hj\h]h IOMMU_VIOMMU_TYPE_TEGRA241_CMDQV}(hj\hhhNhNubah}(h]h ]h"]h$]h&]uh1j@ hj\ubah}(h]h ]h"]h$]h&]uh1j: hc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhM'hj\ubjW )}(hhh]h)}(hHNVIDIA Tegra241 CMDQV (extension for ARM SMMUv3) enabled ARM SMMUv3 typeh]hHNVIDIA Tegra241 CMDQV (extension for ARM SMMUv3) enabled ARM SMMUv3 type}(hj\hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj\hM'hj\ubah}(h]h ]h"]h$]h&]uh1jV hj\ubeh}(h]h ]h"]h$]h&]uh1j4 hj\hM'hjY\ubeh}(h]h ]h"]h$]h&]uh1j/ hj=\ubeh}(h]h ] kernelindentah"]h$]h&]uh1jhjhhhj8hNubjG)}(hhh]h}(h]h ]h"]h$]h&]entries](jS&iommu_viommu_tegra241_cmdqv (C struct)c.iommu_viommu_tegra241_cmdqvhNtauh1jFhjhhhj8hNubjX)}(hhh](j])}(hiommu_viommu_tegra241_cmdqvh]jc)}(h"struct iommu_viommu_tegra241_cmdqvh](ji)}(hjlh]hstruct}(hj-]hhhNhNubah}(h]h ]juah"]h$]h&]uh1jhhj)]hhhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhM-ubj{)}(h h]h }(hj;]hhhNhNubah}(h]h ]jah"]h$]h&]uh1jzhj)]hhhj:]hM-ubj)}(hiommu_viommu_tegra241_cmdqvh]j)}(hj']h]hiommu_viommu_tegra241_cmdqv}(hjM]hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjI]ubah}(h]h ](jjeh"]h$]h&]hhuh1jhj)]hhhj:]hM-ubeh}(h]h ]h"]h$]h&]hhjuh1jbjjhj%]hhhj:]hM-ubah}(h]j ]ah ](jjeh"]h$]h&]jj)jhuh1j\hj:]hM-hj"]hhubj)}(hhh]h)}(hJNVIDIA Tegra241 CMDQV Virtual Interface (IOMMU_VIOMMU_TYPE_TEGRA241_CMDQV)h]hJNVIDIA Tegra241 CMDQV Virtual Interface (IOMMU_VIOMMU_TYPE_TEGRA241_CMDQV)}(hjo]hhhNhNubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhM,hjl]hhubah}(h]h ]h"]h$]h&]uh1jhj"]hhhj:]hM-ubeh}(h]h ](jstructeh"]h$]h&]jjjj]jj]jjjuh1jWhhhjhj8hNubj)}(hX(**Definition**:: struct iommu_viommu_tegra241_cmdqv { __aligned_u64 out_vintf_mmap_offset; __aligned_u64 out_vintf_mmap_length; }; **Members** ``out_vintf_mmap_offset`` mmap offset argument for VINTF's page0 ``out_vintf_mmap_length`` mmap length argument for VINTF's page0h](h)}(h**Definition**::h](j>)}(h**Definition**h]h Definition}(hj]hhhNhNubah}(h]h ]h"]h$]h&]uh1j=hj]ubh:}(hj]hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhM0hj]ubj)}(hystruct iommu_viommu_tegra241_cmdqv { __aligned_u64 out_vintf_mmap_offset; __aligned_u64 out_vintf_mmap_length; };h]hystruct iommu_viommu_tegra241_cmdqv { __aligned_u64 out_vintf_mmap_offset; __aligned_u64 out_vintf_mmap_length; };}hj]sbah}(h]h ]h"]h$]h&]hhuh1jhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhM2hj]ubh)}(h **Members**h]j>)}(hj]h]hMembers}(hj]hhhNhNubah}(h]h ]h"]h$]h&]uh1j=hj]ubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhM7hj]ubj0 )}(hhh](j5 )}(hA``out_vintf_mmap_offset`` mmap offset argument for VINTF's page0 h](j; )}(h``out_vintf_mmap_offset``h]jA )}(hj]h]hout_vintf_mmap_offset}(hj]hhhNhNubah}(h]h ]h"]h$]h&]uh1j@ hj]ubah}(h]h ]h"]h$]h&]uh1j: hc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhM/hj]ubjW )}(hhh]h)}(h&mmap offset argument for VINTF's page0h]h(mmap offset argument for VINTF’s page0}(hj]hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj]hM/hj]ubah}(h]h ]h"]h$]h&]uh1jV hj]ubeh}(h]h ]h"]h$]h&]uh1j4 hj]hM/hj]ubj5 )}(h@``out_vintf_mmap_length`` mmap length argument for VINTF's page0h](j; )}(h``out_vintf_mmap_length``h]jA )}(hj^h]hout_vintf_mmap_length}(hj^hhhNhNubah}(h]h ]h"]h$]h&]uh1j@ hj^ubah}(h]h ]h"]h$]h&]uh1j: hc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhM/hj^ubjW )}(hhh]h)}(h&mmap length argument for VINTF's page0h]h(mmap length argument for VINTF’s page0}(hj.^hhhNhNubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhM0hj+^ubah}(h]h ]h"]h$]h&]uh1jV hj^ubeh}(h]h ]h"]h$]h&]uh1j4 hj*^hM/hj]ubeh}(h]h ]h"]h$]h&]uh1j/ hj]ubeh}(h]h ] kernelindentah"]h$]h&]uh1jhjhhhj8hNubh)}(h**Description**h]j>)}(hjX^h]h Description}(hjZ^hhhNhNubah}(h]h ]h"]h$]h&]uh1j=hjV^ubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhM3hjhhubh)}(hX5Both **out_vintf_mmap_offset** and **out_vintf_mmap_length** are reported by kernel for user space to mmap the VINTF page0 from the host physical address space to the guest physical address space so that a guest kernel can directly R/W access to the VINTF page0 in order to control its virtual command queues.h](hBoth }(hjn^hhhNhNubj>)}(h**out_vintf_mmap_offset**h]hout_vintf_mmap_offset}(hjv^hhhNhNubah}(h]h ]h"]h$]h&]uh1j=hjn^ubh and }(hjn^hhhNhNubj>)}(h**out_vintf_mmap_length**h]hout_vintf_mmap_length}(hj^hhhNhNubah}(h]h ]h"]h$]h&]uh1j=hjn^ubh are reported by kernel for user space to mmap the VINTF page0 from the host physical address space to the guest physical address space so that a guest kernel can directly R/W access to the VINTF page0 in order to control its virtual command queues.}(hjn^hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhM0hjhhubjG)}(hhh]h}(h]h ]h"]h$]h&]entries](jSiommu_viommu_alloc (C struct)c.iommu_viommu_allochNtauh1jFhjhhhj8hNubjX)}(hhh](j])}(hiommu_viommu_alloch]jc)}(hstruct iommu_viommu_alloch](ji)}(hjlh]hstruct}(hj^hhhNhNubah}(h]h ]juah"]h$]h&]uh1jhhj^hhhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhM8ubj{)}(h h]h }(hj^hhhNhNubah}(h]h ]jah"]h$]h&]uh1jzhj^hhhj^hM8ubj)}(hiommu_viommu_alloch]j)}(hj^h]hiommu_viommu_alloc}(hj^hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj^ubah}(h]h ](jjeh"]h$]h&]hhuh1jhj^hhhj^hM8ubeh}(h]h ]h"]h$]h&]hhjuh1jbjjhj^hhhj^hM8ubah}(h]j^ah ](jjeh"]h$]h&]jj)jhuh1j\hj^hM8hj^hhubj)}(hhh]h)}(hioctl(IOMMU_VIOMMU_ALLOC)h]hioctl(IOMMU_VIOMMU_ALLOC)}(hj^hhhNhNubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.h hM<hj^hhubah}(h]h ]h"]h$]h&]uh1jhj^hhhj^hM8ubeh}(h]h ](jstructeh"]h$]h&]jjjj_jj_jjjuh1jWhhhjhj8hNubj)}(hX**Definition**:: struct iommu_viommu_alloc { __u32 size; __u32 flags; __u32 type; __u32 dev_id; __u32 hwpt_id; __u32 out_viommu_id; __u32 data_len; __u32 __reserved; __aligned_u64 data_uptr; }; **Members** ``size`` sizeof(struct iommu_viommu_alloc) ``flags`` Must be 0 ``type`` Type of the virtual IOMMU. Must be defined in enum iommu_viommu_type ``dev_id`` The device's physical IOMMU will be used to back the virtual IOMMU ``hwpt_id`` ID of a nesting parent HWPT to associate to ``out_viommu_id`` Output virtual IOMMU ID for the allocated object ``data_len`` Length of the type specific data ``__reserved`` Must be 0 ``data_uptr`` User pointer to a driver-specific virtual IOMMU datah](h)}(h**Definition**::h](j>)}(h**Definition**h]h Definition}(hj _hhhNhNubah}(h]h ]h"]h$]h&]uh1j=hj_ubh:}(hj_hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhM@hj_ubj)}(hstruct iommu_viommu_alloc { __u32 size; __u32 flags; __u32 type; __u32 dev_id; __u32 hwpt_id; __u32 out_viommu_id; __u32 data_len; __u32 __reserved; __aligned_u64 data_uptr; };h]hstruct iommu_viommu_alloc { __u32 size; __u32 flags; __u32 type; __u32 dev_id; __u32 hwpt_id; __u32 out_viommu_id; __u32 data_len; __u32 __reserved; __aligned_u64 data_uptr; };}hj9_sbah}(h]h ]h"]h$]h&]hhuh1jhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMBhj_ubh)}(h **Members**h]j>)}(hjJ_h]hMembers}(hjL_hhhNhNubah}(h]h ]h"]h$]h&]uh1j=hjH_ubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMNhj_ubj0 )}(hhh](j5 )}(h+``size`` sizeof(struct iommu_viommu_alloc) h](j; )}(h``size``h]jA )}(hji_h]hsize}(hjk_hhhNhNubah}(h]h ]h"]h$]h&]uh1j@ hjg_ubah}(h]h ]h"]h$]h&]uh1j: hc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhM>hjc_ubjW )}(hhh]h)}(h!sizeof(struct iommu_viommu_alloc)h]h!sizeof(struct iommu_viommu_alloc)}(hj_hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj~_hM>hj_ubah}(h]h ]h"]h$]h&]uh1jV hjc_ubeh}(h]h ]h"]h$]h&]uh1j4 hj~_hM>hj`_ubj5 )}(h``flags`` Must be 0 h](j; )}(h ``flags``h]jA )}(hj_h]hflags}(hj_hhhNhNubah}(h]h ]h"]h$]h&]uh1j@ hj_ubah}(h]h ]h"]h$]h&]uh1j: hc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhM?hj_ubjW )}(hhh]h)}(h Must be 0h]h Must be 0}(hj_hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj_hM?hj_ubah}(h]h ]h"]h$]h&]uh1jV hj_ubeh}(h]h ]h"]h$]h&]uh1j4 hj_hM?hj`_ubj5 )}(hN``type`` Type of the virtual IOMMU. Must be defined in enum iommu_viommu_type h](j; )}(h``type``h]jA )}(hj_h]htype}(hj_hhhNhNubah}(h]h ]h"]h$]h&]uh1j@ hj_ubah}(h]h ]h"]h$]h&]uh1j: hc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhM@hj_ubjW )}(hhh]h)}(hDType of the virtual IOMMU. Must be defined in enum iommu_viommu_typeh]hDType of the virtual IOMMU. Must be defined in enum iommu_viommu_type}(hj_hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj_hM@hj_ubah}(h]h ]h"]h$]h&]uh1jV hj_ubeh}(h]h ]h"]h$]h&]uh1j4 hj_hM@hj`_ubj5 )}(hN``dev_id`` The device's physical IOMMU will be used to back the virtual IOMMU h](j; )}(h ``dev_id``h]jA )}(hj`h]hdev_id}(hj`hhhNhNubah}(h]h ]h"]h$]h&]uh1j@ hj`ubah}(h]h ]h"]h$]h&]uh1j: hc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMAhj`ubjW )}(hhh]h)}(hBThe device's physical IOMMU will be used to back the virtual IOMMUh]hDThe device’s physical IOMMU will be used to back the virtual IOMMU}(hj-`hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj)`hMAhj*`ubah}(h]h ]h"]h$]h&]uh1jV hj`ubeh}(h]h ]h"]h$]h&]uh1j4 hj)`hMAhj`_ubj5 )}(h8``hwpt_id`` ID of a nesting parent HWPT to associate to h](j; )}(h ``hwpt_id``h]jA )}(hjM`h]hhwpt_id}(hjO`hhhNhNubah}(h]h ]h"]h$]h&]uh1j@ hjK`ubah}(h]h ]h"]h$]h&]uh1j: hc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMBhjG`ubjW )}(hhh]h)}(h+ID of a nesting parent HWPT to associate toh]h+ID of a nesting parent HWPT to associate to}(hjf`hhhNhNubah}(h]h ]h"]h$]h&]uh1hhjb`hMBhjc`ubah}(h]h ]h"]h$]h&]uh1jV hjG`ubeh}(h]h ]h"]h$]h&]uh1j4 hjb`hMBhj`_ubj5 )}(hC``out_viommu_id`` Output virtual IOMMU ID for the allocated object h](j; )}(h``out_viommu_id``h]jA )}(hj`h]h out_viommu_id}(hj`hhhNhNubah}(h]h ]h"]h$]h&]uh1j@ hj`ubah}(h]h ]h"]h$]h&]uh1j: hc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMChj`ubjW )}(hhh]h)}(h0Output virtual IOMMU ID for the allocated objecth]h0Output virtual IOMMU ID for the allocated object}(hj`hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj`hMChj`ubah}(h]h ]h"]h$]h&]uh1jV hj`ubeh}(h]h ]h"]h$]h&]uh1j4 hj`hMChj`_ubj5 )}(h.``data_len`` Length of the type specific data h](j; )}(h ``data_len``h]jA )}(hj`h]hdata_len}(hj`hhhNhNubah}(h]h ]h"]h$]h&]uh1j@ hj`ubah}(h]h ]h"]h$]h&]uh1j: hc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMDhj`ubjW )}(hhh]h)}(h Length of the type specific datah]h Length of the type specific data}(hj`hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj`hMDhj`ubah}(h]h ]h"]h$]h&]uh1jV hj`ubeh}(h]h ]h"]h$]h&]uh1j4 hj`hMDhj`_ubj5 )}(h``__reserved`` Must be 0 h](j; )}(h``__reserved``h]jA )}(hj`h]h __reserved}(hj`hhhNhNubah}(h]h ]h"]h$]h&]uh1j@ hj`ubah}(h]h ]h"]h$]h&]uh1j: hc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMEhj`ubjW )}(hhh]h)}(h Must be 0h]h Must be 0}(hjahhhNhNubah}(h]h ]h"]h$]h&]uh1hhj ahMEhjaubah}(h]h ]h"]h$]h&]uh1jV hj`ubeh}(h]h ]h"]h$]h&]uh1j4 hj ahMEhj`_ubj5 )}(hB``data_uptr`` User pointer to a driver-specific virtual IOMMU datah](j; )}(h ``data_uptr``h]jA )}(hj1ah]h data_uptr}(hj3ahhhNhNubah}(h]h ]h"]h$]h&]uh1j@ hj/aubah}(h]h ]h"]h$]h&]uh1j: hc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMEhj+aubjW )}(hhh]h)}(h4User pointer to a driver-specific virtual IOMMU datah]h4User pointer to a driver-specific virtual IOMMU data}(hjJahhhNhNubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMFhjGaubah}(h]h ]h"]h$]h&]uh1jV hj+aubeh}(h]h ]h"]h$]h&]uh1j4 hjFahMEhj`_ubeh}(h]h ]h"]h$]h&]uh1j/ hj_ubeh}(h]h ] kernelindentah"]h$]h&]uh1jhjhhhj8hNubh)}(h**Description**h]j>)}(hjtah]h Description}(hjvahhhNhNubah}(h]h ]h"]h$]h&]uh1j=hjraubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMIhjhhubh)}(hXAllocate a virtual IOMMU object, representing the underlying physical IOMMU's virtualization support that is a security-isolated slice of the real IOMMU HW that is unique to a specific VM. Operations global to the IOMMU are connected to the vIOMMU, such as: - Security namespace for guest owned ID, e.g. guest-controlled cache tags - Non-device-affiliated event reporting, e.g. invalidation queue errors - Access to a sharable nesting parent pagetable across physical IOMMUs - Virtualization of various platforms IDs, e.g. RIDs and others - Delivery of paravirtualized invalidation - Direct assigned invalidation queues - Direct assigned interruptsh]hXAllocate a virtual IOMMU object, representing the underlying physical IOMMU’s virtualization support that is a security-isolated slice of the real IOMMU HW that is unique to a specific VM. Operations global to the IOMMU are connected to the vIOMMU, such as: - Security namespace for guest owned ID, e.g. guest-controlled cache tags - Non-device-affiliated event reporting, e.g. invalidation queue errors - Access to a sharable nesting parent pagetable across physical IOMMUs - Virtualization of various platforms IDs, e.g. RIDs and others - Delivery of paravirtualized invalidation - Direct assigned invalidation queues - Direct assigned interrupts}(hjahhhNhNubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMFhjhhubjG)}(hhh]h}(h]h ]h"]h$]h&]entries](jSiommu_vdevice_alloc (C struct)c.iommu_vdevice_allochNtauh1jFhjhhhj8hNubjX)}(hhh](j])}(hiommu_vdevice_alloch]jc)}(hstruct iommu_vdevice_alloch](ji)}(hjlh]hstruct}(hjahhhNhNubah}(h]h ]juah"]h$]h&]uh1jhhjahhhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMUubj{)}(h h]h }(hjahhhNhNubah}(h]h ]jah"]h$]h&]uh1jzhjahhhjahMUubj)}(hiommu_vdevice_alloch]j)}(hjah]hiommu_vdevice_alloc}(hjahhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjaubah}(h]h ](jjeh"]h$]h&]hhuh1jhjahhhjahMUubeh}(h]h ]h"]h$]h&]hhjuh1jbjjhjahhhjahMUubah}(h]jaah ](jjeh"]h$]h&]jj)jhuh1j\hjahMUhjahhubj)}(hhh]h)}(hioctl(IOMMU_VDEVICE_ALLOC)h]hioctl(IOMMU_VDEVICE_ALLOC)}(hjahhhNhNubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMahjahhubah}(h]h ]h"]h$]h&]uh1jhjahhhjahMUubeh}(h]h ](jstructeh"]h$]h&]jjjj bjj bjjjuh1jWhhhjhj8hNubj)}(hX8**Definition**:: struct iommu_vdevice_alloc { __u32 size; __u32 viommu_id; __u32 dev_id; __u32 out_vdevice_id; __aligned_u64 virt_id; }; **Members** ``size`` sizeof(struct iommu_vdevice_alloc) ``viommu_id`` vIOMMU ID to associate with the virtual device ``dev_id`` The physical device to allocate a virtual instance on the vIOMMU ``out_vdevice_id`` Object handle for the vDevice. Pass to IOMMU_DESTORY ``virt_id`` Virtual device ID per vIOMMU, e.g. vSID of ARM SMMUv3, vDeviceID of AMD IOMMU, and vRID of Intel VT-dh](h)}(h**Definition**::h](j>)}(h**Definition**h]h Definition}(hjbhhhNhNubah}(h]h ]h"]h$]h&]uh1j=hjbubh:}(hjbhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMehjbubj)}(hstruct iommu_vdevice_alloc { __u32 size; __u32 viommu_id; __u32 dev_id; __u32 out_vdevice_id; __aligned_u64 virt_id; };h]hstruct iommu_vdevice_alloc { __u32 size; __u32 viommu_id; __u32 dev_id; __u32 out_vdevice_id; __aligned_u64 virt_id; };}hj1bsbah}(h]h ]h"]h$]h&]hhuh1jhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMghjbubh)}(h **Members**h]j>)}(hjBbh]hMembers}(hjDbhhhNhNubah}(h]h ]h"]h$]h&]uh1j=hj@bubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMohjbubj0 )}(hhh](j5 )}(h,``size`` sizeof(struct iommu_vdevice_alloc) h](j; )}(h``size``h]jA )}(hjabh]hsize}(hjcbhhhNhNubah}(h]h ]h"]h$]h&]uh1j@ hj_bubah}(h]h ]h"]h$]h&]uh1j: hc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMchj[bubjW )}(hhh]h)}(h"sizeof(struct iommu_vdevice_alloc)h]h"sizeof(struct iommu_vdevice_alloc)}(hjzbhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjvbhMchjwbubah}(h]h ]h"]h$]h&]uh1jV hj[bubeh}(h]h ]h"]h$]h&]uh1j4 hjvbhMchjXbubj5 )}(h=``viommu_id`` vIOMMU ID to associate with the virtual device h](j; )}(h ``viommu_id``h]jA )}(hjbh]h viommu_id}(hjbhhhNhNubah}(h]h ]h"]h$]h&]uh1j@ hjbubah}(h]h ]h"]h$]h&]uh1j: hc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMdhjbubjW )}(hhh]h)}(h.vIOMMU ID to associate with the virtual deviceh]h.vIOMMU ID to associate with the virtual device}(hjbhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjbhMdhjbubah}(h]h ]h"]h$]h&]uh1jV hjbubeh}(h]h ]h"]h$]h&]uh1j4 hjbhMdhjXbubj5 )}(hL``dev_id`` The physical device to allocate a virtual instance on the vIOMMU h](j; )}(h ``dev_id``h]jA )}(hjbh]hdev_id}(hjbhhhNhNubah}(h]h ]h"]h$]h&]uh1j@ hjbubah}(h]h ]h"]h$]h&]uh1j: hc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMehjbubjW )}(hhh]h)}(h@The physical device to allocate a virtual instance on the vIOMMUh]h@The physical device to allocate a virtual instance on the vIOMMU}(hjbhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjbhMehjbubah}(h]h ]h"]h$]h&]uh1jV hjbubeh}(h]h ]h"]h$]h&]uh1j4 hjbhMehjXbubj5 )}(hH``out_vdevice_id`` Object handle for the vDevice. Pass to IOMMU_DESTORY h](j; )}(h``out_vdevice_id``h]jA )}(hj ch]hout_vdevice_id}(hjchhhNhNubah}(h]h ]h"]h$]h&]uh1j@ hj cubah}(h]h ]h"]h$]h&]uh1j: hc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMfhjcubjW )}(hhh]h)}(h4Object handle for the vDevice. Pass to IOMMU_DESTORYh]h4Object handle for the vDevice. Pass to IOMMU_DESTORY}(hj%chhhNhNubah}(h]h ]h"]h$]h&]uh1hhj!chMfhj"cubah}(h]h ]h"]h$]h&]uh1jV hjcubeh}(h]h ]h"]h$]h&]uh1j4 hj!chMfhjXbubj5 )}(hq``virt_id`` Virtual device ID per vIOMMU, e.g. vSID of ARM SMMUv3, vDeviceID of AMD IOMMU, and vRID of Intel VT-dh](j; )}(h ``virt_id``h]jA )}(hjEch]hvirt_id}(hjGchhhNhNubah}(h]h ]h"]h$]h&]uh1j@ hjCcubah}(h]h ]h"]h$]h&]uh1j: hc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMghj?cubjW )}(hhh]h)}(heVirtual device ID per vIOMMU, e.g. vSID of ARM SMMUv3, vDeviceID of AMD IOMMU, and vRID of Intel VT-dh]heVirtual device ID per vIOMMU, e.g. vSID of ARM SMMUv3, vDeviceID of AMD IOMMU, and vRID of Intel VT-d}(hj^chhhNhNubah}(h]h ]h"]h$]h&]uh1hhjZchMghj[cubah}(h]h ]h"]h$]h&]uh1jV hj?cubeh}(h]h ]h"]h$]h&]uh1j4 hjZchMghjXbubeh}(h]h ]h"]h$]h&]uh1j/ hjbubeh}(h]h ] kernelindentah"]h$]h&]uh1jhjhhhj8hNubh)}(h**Description**h]j>)}(hjch]h Description}(hjchhhNhNubah}(h]h ]h"]h$]h&]uh1j=hjcubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMkhjhhubh)}(hXAllocate a virtual device instance (for a physical device) against a vIOMMU. This instance holds the device's information (related to its vIOMMU) in a VM. User should use IOMMU_DESTROY to destroy the virtual device before destroying the physical device (by closing vfio_cdev fd). Otherwise the virtual device would be forcibly destroyed on physical device destruction, its vdevice_id would be permanently leaked (unremovable & unreusable) until iommu fd closed.h]hXAllocate a virtual device instance (for a physical device) against a vIOMMU. This instance holds the device’s information (related to its vIOMMU) in a VM. User should use IOMMU_DESTROY to destroy the virtual device before destroying the physical device (by closing vfio_cdev fd). Otherwise the virtual device would be forcibly destroyed on physical device destruction, its vdevice_id would be permanently leaked (unremovable & unreusable) until iommu fd closed.}(hjchhhNhNubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMhhjhhubjG)}(hhh]h}(h]h ]h"]h$]h&]entries](jS$iommu_ioas_change_process (C struct)c.iommu_ioas_change_processhNtauh1jFhjhhhj8hNubjX)}(hhh](j])}(hiommu_ioas_change_processh]jc)}(h struct iommu_ioas_change_processh](ji)}(hjlh]hstruct}(hjchhhNhNubah}(h]h ]juah"]h$]h&]uh1jhhjchhhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMsubj{)}(h h]h }(hjchhhNhNubah}(h]h ]jah"]h$]h&]uh1jzhjchhhjchMsubj)}(hiommu_ioas_change_processh]j)}(hjch]hiommu_ioas_change_process}(hjchhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjcubah}(h]h ](jjeh"]h$]h&]hhuh1jhjchhhjchMsubeh}(h]h ]h"]h$]h&]hhjuh1jbjjhjchhhjchMsubah}(h]jcah ](jjeh"]h$]h&]jj)jhuh1j\hjchMshjchhubj)}(hhh]h)}(hioctl(VFIO_IOAS_CHANGE_PROCESS)h]hioctl(VFIO_IOAS_CHANGE_PROCESS)}(hjdhhhNhNubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhM{hjdhhubah}(h]h ]h"]h$]h&]uh1jhjchhhjchMsubeh}(h]h ](jstructeh"]h$]h&]jjjjdjjdjjjuh1jWhhhjhj8hNubj)}(h**Definition**:: struct iommu_ioas_change_process { __u32 size; __u32 __reserved; }; **Members** ``size`` sizeof(struct iommu_ioas_change_process) ``__reserved`` Must be 0h](h)}(h**Definition**::h](j>)}(h**Definition**h]h Definition}(hj+dhhhNhNubah}(h]h ]h"]h$]h&]uh1j=hj'dubh:}(hj'dhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMhj#dubj)}(hKstruct iommu_ioas_change_process { __u32 size; __u32 __reserved; };h]hKstruct iommu_ioas_change_process { __u32 size; __u32 __reserved; };}hjDdsbah}(h]h ]h"]h$]h&]hhuh1jhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMhj#dubh)}(h **Members**h]j>)}(hjUdh]hMembers}(hjWdhhhNhNubah}(h]h ]h"]h$]h&]uh1j=hjSdubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMhj#dubj0 )}(hhh](j5 )}(h2``size`` sizeof(struct iommu_ioas_change_process) h](j; )}(h``size``h]jA )}(hjtdh]hsize}(hjvdhhhNhNubah}(h]h ]h"]h$]h&]uh1j@ hjrdubah}(h]h ]h"]h$]h&]uh1j: hc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhM}hjndubjW )}(hhh]h)}(h(sizeof(struct iommu_ioas_change_process)h]h(sizeof(struct iommu_ioas_change_process)}(hjdhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjdhM}hjdubah}(h]h ]h"]h$]h&]uh1jV hjndubeh}(h]h ]h"]h$]h&]uh1j4 hjdhM}hjkdubj5 )}(h``__reserved`` Must be 0h](j; )}(h``__reserved``h]jA )}(hjdh]h __reserved}(hjdhhhNhNubah}(h]h ]h"]h$]h&]uh1j@ hjdubah}(h]h ]h"]h$]h&]uh1j: hc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhM}hjdubjW )}(hhh]h)}(h Must be 0h]h Must be 0}(hjdhhhNhNubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhM~hjdubah}(h]h ]h"]h$]h&]uh1jV hjdubeh}(h]h ]h"]h$]h&]uh1j4 hjdhM}hjkdubeh}(h]h ]h"]h$]h&]uh1j/ hj#dubeh}(h]h ] kernelindentah"]h$]h&]uh1jhjhhhj8hNubh)}(h**Description**h]j>)}(hjdh]h Description}(hjdhhhNhNubah}(h]h ]h"]h$]h&]uh1j=hjdubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMhjhhubh)}(hXThis transfers pinned memory counts for every memory map in every IOAS in the context to the current process. This only supports maps created with IOMMU_IOAS_MAP_FILE, and returns EINVAL if other maps are present. If the ioctl returns a failure status, then nothing is changed.h]hXThis transfers pinned memory counts for every memory map in every IOAS in the context to the current process. This only supports maps created with IOMMU_IOAS_MAP_FILE, and returns EINVAL if other maps are present. If the ioctl returns a failure status, then nothing is changed.}(hjehhhNhNubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhM~hjhhubh)}(h{This API is useful for transferring operation of a device from one process to another, such as during userland live update.h]h{This API is useful for transferring operation of a device from one process to another, such as during userland live update.}(hjehhhNhNubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMhjhhubjG)}(hhh]h}(h]h ]h"]h$]h&]entries](jSiommu_veventq_flag (C enum)c.iommu_veventq_flaghNtauh1jFhjhhhj8hNubjX)}(hhh](j])}(hiommu_veventq_flagh]jc)}(henum iommu_veventq_flagh](ji)}(hjh]henum}(hj=ehhhNhNubah}(h]h ]juah"]h$]h&]uh1jhhj9ehhhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMubj{)}(h h]h }(hjKehhhNhNubah}(h]h ]jah"]h$]h&]uh1jzhj9ehhhjJehMubj)}(hiommu_veventq_flagh]j)}(hj7eh]hiommu_veventq_flag}(hj]ehhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjYeubah}(h]h ](jjeh"]h$]h&]hhuh1jhj9ehhhjJehMubeh}(h]h ]h"]h$]h&]hhjuh1jbjjhj5ehhhjJehMubah}(h]j0eah ](jjeh"]h$]h&]jj)jhuh1j\hjJehMhj2ehhubj)}(hhh]h)}(h%flag for struct iommufd_vevent_headerh]h%flag for struct iommufd_vevent_header}(hjehhhNhNubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMhj|ehhubah}(h]h ]h"]h$]h&]uh1jhj2ehhhjJehMubeh}(h]h ](jenumeh"]h$]h&]jjjjejjejjjuh1jWhhhjhj8hNubj)}(hL**Constants** ``IOMMU_VEVENTQ_FLAG_LOST_EVENTS`` vEVENTQ has lost vEVENTsh](h)}(h **Constants**h]j>)}(hjeh]h Constants}(hjehhhNhNubah}(h]h ]h"]h$]h&]uh1j=hjeubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMhjeubj0 )}(hhh]j5 )}(h;``IOMMU_VEVENTQ_FLAG_LOST_EVENTS`` vEVENTQ has lost vEVENTsh](j; )}(h"``IOMMU_VEVENTQ_FLAG_LOST_EVENTS``h]jA )}(hjeh]hIOMMU_VEVENTQ_FLAG_LOST_EVENTS}(hjehhhNhNubah}(h]h ]h"]h$]h&]uh1j@ hjeubah}(h]h ]h"]h$]h&]uh1j: hc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMhjeubjW )}(hhh]h)}(hvEVENTQ has lost vEVENTsh]hvEVENTQ has lost vEVENTs}(hjehhhNhNubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMhjeubah}(h]h ]h"]h$]h&]uh1jV hjeubeh}(h]h ]h"]h$]h&]uh1j4 hjehMhjeubah}(h]h ]h"]h$]h&]uh1j/ hjeubeh}(h]h ] kernelindentah"]h$]h&]uh1jhjhhhj8hNubjG)}(hhh]h}(h]h ]h"]h$]h&]entries](jS iommufd_vevent_header (C struct)c.iommufd_vevent_headerhNtauh1jFhjhhhj8hNubjX)}(hhh](j])}(hiommufd_vevent_headerh]jc)}(hstruct iommufd_vevent_headerh](ji)}(hjlh]hstruct}(hjfhhhNhNubah}(h]h ]juah"]h$]h&]uh1jhhjfhhhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMubj{)}(h h]h }(hj(fhhhNhNubah}(h]h ]jah"]h$]h&]uh1jzhjfhhhj'fhMubj)}(hiommufd_vevent_headerh]j)}(hjfh]hiommufd_vevent_header}(hj:fhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj6fubah}(h]h ](jjeh"]h$]h&]hhuh1jhjfhhhj'fhMubeh}(h]h ]h"]h$]h&]hhjuh1jbjjhjfhhhj'fhMubah}(h]j fah ](jjeh"]h$]h&]jj)jhuh1j\hj'fhMhjfhhubj)}(hhh]h)}(h)Virtual Event Header for a vEVENTQ Statush]h)Virtual Event Header for a vEVENTQ Status}(hj\fhhhNhNubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMhjYfhhubah}(h]h ]h"]h$]h&]uh1jhjfhhhj'fhMubeh}(h]h ](jstructeh"]h$]h&]jjjjtfjjtfjjjuh1jWhhhjhj8hNubj)}(hX)**Definition**:: struct iommufd_vevent_header { __u32 flags; __u32 sequence; }; **Members** ``flags`` Combination of enum iommu_veventq_flag ``sequence`` The sequence index of a vEVENT in the vEVENTQ, with a range of [0, INT_MAX] where the following index of INT_MAX is 0h](h)}(h**Definition**::h](j>)}(h**Definition**h]h Definition}(hjfhhhNhNubah}(h]h ]h"]h$]h&]uh1j=hj|fubh:}(hj|fhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMhjxfubj)}(hFstruct iommufd_vevent_header { __u32 flags; __u32 sequence; };h]hFstruct iommufd_vevent_header { __u32 flags; __u32 sequence; };}hjfsbah}(h]h ]h"]h$]h&]hhuh1jhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMhjxfubh)}(h **Members**h]j>)}(hjfh]hMembers}(hjfhhhNhNubah}(h]h ]h"]h$]h&]uh1j=hjfubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMhjxfubj0 )}(hhh](j5 )}(h1``flags`` Combination of enum iommu_veventq_flag h](j; )}(h ``flags``h]jA )}(hjfh]hflags}(hjfhhhNhNubah}(h]h ]h"]h$]h&]uh1j@ hjfubah}(h]h ]h"]h$]h&]uh1j: hc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMhjfubjW )}(hhh]h)}(h&Combination of enum iommu_veventq_flagh]h&Combination of enum iommu_veventq_flag}(hjfhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjfhMhjfubah}(h]h ]h"]h$]h&]uh1jV hjfubeh}(h]h ]h"]h$]h&]uh1j4 hjfhMhjfubj5 )}(h``sequence`` The sequence index of a vEVENT in the vEVENTQ, with a range of [0, INT_MAX] where the following index of INT_MAX is 0h](j; )}(h ``sequence``h]jA )}(hjgh]hsequence}(hjghhhNhNubah}(h]h ]h"]h$]h&]uh1j@ hjgubah}(h]h ]h"]h$]h&]uh1j: hc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMhjfubjW )}(hhh]h)}(huThe sequence index of a vEVENT in the vEVENTQ, with a range of [0, INT_MAX] where the following index of INT_MAX is 0h]huThe sequence index of a vEVENT in the vEVENTQ, with a range of [0, INT_MAX] where the following index of INT_MAX is 0}(hjghhhNhNubah}(h]h ]h"]h$]h&]uh1hhjghMhjgubah}(h]h ]h"]h$]h&]uh1jV hjfubeh}(h]h ]h"]h$]h&]uh1j4 hjghMhjfubeh}(h]h ]h"]h$]h&]uh1j/ hjxfubeh}(h]h ] kernelindentah"]h$]h&]uh1jhjhhhj8hNubh)}(h**Description**h]j>)}(hjDgh]h Description}(hjFghhhNhNubah}(h]h ]h"]h$]h&]uh1j=hjBgubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMhjhhubh)}(hLEach iommufd_vevent_header reports a sequence index of the following vEVENT:h]hLEach iommufd_vevent_header reports a sequence index of the following vEVENT:}(hjZghhhNhNubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMhjhhubhtable)}(hhh]htgroup)}(hhh](hcolspec)}(hhh]h}(h]h ]h"]h$]h&]colwidthKuh1jsghjpgubjtg)}(hhh]h}(h]h ]h"]h$]h&]colwidthKuh1jsghjpgubjtg)}(hhh]h}(h]h ]h"]h$]h&]colwidthKuh1jsghjpgubjtg)}(hhh]h}(h]h ]h"]h$]h&]colwidthKuh1jsghjpgubjtg)}(hhh]h}(h]h ]h"]h$]h&]colwidthKuh1jsghjpgubjtg)}(hhh]h}(h]h ]h"]h$]h&]colwidthKuh1jsghjpgubhtbody)}(hhh]hrow)}(hhh](hentry)}(hhh]h)}(hheader0 {sequence=0}h]hheader0 {sequence=0}}(hjghhhNhNubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMhjgubah}(h]h ]h"]h$]h&]uh1jghjgubjg)}(hhh]h)}(hdata0h]hdata0}(hjghhhNhNubah}(h]h ]h"]h$]h&]uh1hhjghMhjgubah}(h]h ]h"]h$]h&]uh1jghjgubjg)}(hhh]h)}(hheader1 {sequence=1}h]hheader1 {sequence=1}}(hjghhhNhNubah}(h]h ]h"]h$]h&]uh1hhjghMhjgubah}(h]h ]h"]h$]h&]uh1jghjgubjg)}(hhh]h)}(hdata1h]hdata1}(hjhhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjghMhjhubah}(h]h ]h"]h$]h&]uh1jghjgubjg)}(hhh]h)}(h...h]h...}(hjhhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjghMhjhubah}(h]h ]h"]h$]h&]uh1jghjgubjg)}(hhh]h)}(hdataNh]hdataN}(hj4hhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjghMhj1hubah}(h]h ]h"]h$]h&]uh1jghjgubeh}(h]h ]h"]h$]h&]uh1jghjgubah}(h]h ]h"]h$]h&]uh1jghjpgubeh}(h]h ]h"]h$]h&]colsKuh1jnghjkgubah}(h]h ]h"]h$]h&]uh1jighjhhhj8hNubh)}(hAnd this sequence index is expected to be monotonic to the sequence index of the previous vEVENT. If two adjacent sequence indexes has a delta larger than 1, it means that delta - 1 number of vEVENTs has lost, e.g. two lost vEVENTs:h]hAnd this sequence index is expected to be monotonic to the sequence index of the previous vEVENT. If two adjacent sequence indexes has a delta larger than 1, it means that delta - 1 number of vEVENTs has lost, e.g. two lost vEVENTs:}(hjahhhhNhNubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMhjhhubjjg)}(hhh]jog)}(hhh](jtg)}(hhh]h}(h]h ]h"]h$]h&]colwidthKuh1jsghjshubjtg)}(hhh]h}(h]h ]h"]h$]h&]colwidthKuh1jsghjshubjtg)}(hhh]h}(h]h ]h"]h$]h&]colwidthKuh1jsghjshubjtg)}(hhh]h}(h]h ]h"]h$]h&]colwidthKuh1jsghjshubjtg)}(hhh]h}(h]h ]h"]h$]h&]colwidthKuh1jsghjshubjtg)}(hhh]h}(h]h ]h"]h$]h&]colwidthKuh1jsghjshubjg)}(hhh]jg)}(hhh](jg)}(hhh]h)}(h...h]h...}(hjhhhhNhNubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMhjhubah}(h]h ]h"]h$]h&]uh1jghjhubjg)}(hhh]h)}(hheader3 {sequence=3}h]hheader3 {sequence=3}}(hjhhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhhMhjhubah}(h]h ]h"]h$]h&]uh1jghjhubjg)}(hhh]h)}(hdata3h]hdata3}(hjhhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhhMhjhubah}(h]h ]h"]h$]h&]uh1jghjhubjg)}(hhh]h)}(hheader6 {sequence=6}h]hheader6 {sequence=6}}(hjihhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhhMhjhubah}(h]h ]h"]h$]h&]uh1jghjhubjg)}(hhh]h)}(hdata6h]hdata6}(hjihhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhhMhjiubah}(h]h ]h"]h$]h&]uh1jghjhubjg)}(hhh]h)}(h...h]h...}(hj/ihhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhhMhj,iubah}(h]h ]h"]h$]h&]uh1jghjhubeh}(h]h ]h"]h$]h&]uh1jghjhubah}(h]h ]h"]h$]h&]uh1jghjshubeh}(h]h ]h"]h$]h&]colsKuh1jnghjphubah}(h]h ]h"]h$]h&]uh1jighjhhhj8hNubh)}(hIf a vEVENT lost at the tail of the vEVENTQ and there is no following vEVENT providing the next sequence index, an IOMMU_VEVENTQ_FLAG_LOST_EVENTS header would be added to the tail, and no data would follow this header:h]hIf a vEVENT lost at the tail of the vEVENTQ and there is no following vEVENT providing the next sequence index, an IOMMU_VEVENTQ_FLAG_LOST_EVENTS header would be added to the tail, and no data would follow this header:}(hj\ihhhNhNubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMhjhhubjjg)}(hhh]jog)}(hhh](jtg)}(hhh]h}(h]h ]h"]h$]h&]colwidthKuh1jsghjniubjtg)}(hhh]h}(h]h ]h"]h$]h&]colwidthKuh1jsghjniubjtg)}(hhh]h}(h]h ]h"]h$]h&]colwidthKuh1jsghjniubjtg)}(hhh]h}(h]h ]h"]h$]h&]colwidthK)uh1jsghjniubjg)}(hhh]jg)}(hhh](jg)}(hhh]h)}(hhh]h}(h]h ]h"]h$]h&]hhuh1hhjiubah}(h]h ]h"]h$]h&]uh1jghjiubjg)}(hhh]h)}(hheader3 {sequence=3}h]hheader3 {sequence=3}}(hjihhhNhNubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMhjiubah}(h]h ]h"]h$]h&]uh1jghjiubjg)}(hhh]h)}(hdata3h]hdata3}(hjihhhNhNubah}(h]h ]h"]h$]h&]uh1hhjihMhjiubah}(h]h ]h"]h$]h&]uh1jghjiubjg)}(hhh]h)}(h'header4 {flags=LOST_EVENTS, sequence=4}h]h'header4 {flags=LOST_EVENTS, sequence=4}}(hjihhhNhNubah}(h]h ]h"]h$]h&]uh1hhjihMhjiubah}(h]h ]h"]h$]h&]uh1jghjiubeh}(h]h ]h"]h$]h&]uh1jghjiubah}(h]h ]h"]h$]h&]uh1jghjniubeh}(h]h ]h"]h$]h&]colsKuh1jnghjkiubah}(h]h ]h"]h$]h&]uh1jighjhhhj8hNubjG)}(hhh]h}(h]h ]h"]h$]h&]entries](jSiommu_veventq_type (C enum)c.iommu_veventq_typehNtauh1jFhjhhhj8hNubjX)}(hhh](j])}(hiommu_veventq_typeh]jc)}(henum iommu_veventq_typeh](ji)}(hjh]henum}(hj)jhhhNhNubah}(h]h ]juah"]h$]h&]uh1jhhj%jhhhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMubj{)}(h h]h }(hj7jhhhNhNubah}(h]h ]jah"]h$]h&]uh1jzhj%jhhhj6jhMubj)}(hiommu_veventq_typeh]j)}(hj#jh]hiommu_veventq_type}(hjIjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjEjubah}(h]h ](jjeh"]h$]h&]hhuh1jhj%jhhhj6jhMubeh}(h]h ]h"]h$]h&]hhjuh1jbjjhj!jhhhj6jhMubah}(h]jjah ](jjeh"]h$]h&]jj)jhuh1j\hj6jhMhjjhhubj)}(hhh]h)}(hVirtual Event Queue Typeh]hVirtual Event Queue Type}(hjkjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMhjhjhhubah}(h]h ]h"]h$]h&]uh1jhjjhhhj6jhMubeh}(h]h ](jenumeh"]h$]h&]jjjjjjjjjjjuh1jWhhhjhj8hNubj)}(h**Constants** ``IOMMU_VEVENTQ_TYPE_DEFAULT`` Reserved for future use ``IOMMU_VEVENTQ_TYPE_ARM_SMMUV3`` ARM SMMUv3 Virtual Event Queue ``IOMMU_VEVENTQ_TYPE_TEGRA241_CMDQV`` NVIDIA Tegra241 CMDQV Extension IRQh](h)}(h **Constants**h]j>)}(hjjh]h Constants}(hjjhhhNhNubah}(h]h ]h"]h$]h&]uh1j=hjjubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMhjjubj0 )}(hhh](j5 )}(h7``IOMMU_VEVENTQ_TYPE_DEFAULT`` Reserved for future use h](j; )}(h``IOMMU_VEVENTQ_TYPE_DEFAULT``h]jA )}(hjjh]hIOMMU_VEVENTQ_TYPE_DEFAULT}(hjjhhhNhNubah}(h]h ]h"]h$]h&]uh1j@ hjjubah}(h]h ]h"]h$]h&]uh1j: hc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMhjjubjW )}(hhh]h)}(hReserved for future useh]hReserved for future use}(hjjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjjhMhjjubah}(h]h ]h"]h$]h&]uh1jV hjjubeh}(h]h ]h"]h$]h&]uh1j4 hjjhMhjjubj5 )}(hA``IOMMU_VEVENTQ_TYPE_ARM_SMMUV3`` ARM SMMUv3 Virtual Event Queue h](j; )}(h!``IOMMU_VEVENTQ_TYPE_ARM_SMMUV3``h]jA )}(hjjh]hIOMMU_VEVENTQ_TYPE_ARM_SMMUV3}(hjjhhhNhNubah}(h]h ]h"]h$]h&]uh1j@ hjjubah}(h]h ]h"]h$]h&]uh1j: hc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMhjjubjW )}(hhh]h)}(hARM SMMUv3 Virtual Event Queueh]hARM SMMUv3 Virtual Event Queue}(hjjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjjhMhjjubah}(h]h ]h"]h$]h&]uh1jV hjjubeh}(h]h ]h"]h$]h&]uh1j4 hjjhMhjjubj5 )}(hI``IOMMU_VEVENTQ_TYPE_TEGRA241_CMDQV`` NVIDIA Tegra241 CMDQV Extension IRQh](j; )}(h%``IOMMU_VEVENTQ_TYPE_TEGRA241_CMDQV``h]jA )}(hjkh]h!IOMMU_VEVENTQ_TYPE_TEGRA241_CMDQV}(hj khhhNhNubah}(h]h ]h"]h$]h&]uh1j@ hjkubah}(h]h ]h"]h$]h&]uh1j: hc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMhjkubjW )}(hhh]h)}(h#NVIDIA Tegra241 CMDQV Extension IRQh]h#NVIDIA Tegra241 CMDQV Extension IRQ}(hj7khhhNhNubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMhj4kubah}(h]h ]h"]h$]h&]uh1jV hjkubeh}(h]h ]h"]h$]h&]uh1j4 hj3khMhjjubeh}(h]h ]h"]h$]h&]uh1j/ hjjubeh}(h]h ] kernelindentah"]h$]h&]uh1jhjhhhj8hNubjG)}(hhh]h}(h]h ]h"]h$]h&]entries](jS"iommu_vevent_arm_smmuv3 (C struct)c.iommu_vevent_arm_smmuv3hNtauh1jFhjhhhj8hNubjX)}(hhh](j])}(hiommu_vevent_arm_smmuv3h]jc)}(hstruct iommu_vevent_arm_smmuv3h](ji)}(hjlh]hstruct}(hjxkhhhNhNubah}(h]h ]juah"]h$]h&]uh1jhhjtkhhhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMubj{)}(h h]h }(hjkhhhNhNubah}(h]h ]jah"]h$]h&]uh1jzhjtkhhhjkhMubj)}(hiommu_vevent_arm_smmuv3h]j)}(hjrkh]hiommu_vevent_arm_smmuv3}(hjkhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjkubah}(h]h ](jjeh"]h$]h&]hhuh1jhjtkhhhjkhMubeh}(h]h ]h"]h$]h&]hhjuh1jbjjhjpkhhhjkhMubah}(h]jkkah ](jjeh"]h$]h&]jj)jhuh1j\hjkhMhjmkhhubj)}(hhh]h)}(h8ARM SMMUv3 Virtual Event (IOMMU_VEVENTQ_TYPE_ARM_SMMUV3)h]h8ARM SMMUv3 Virtual Event (IOMMU_VEVENTQ_TYPE_ARM_SMMUV3)}(hjkhhhNhNubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMhjkhhubah}(h]h ]h"]h$]h&]uh1jhjmkhhhjkhMubeh}(h]h ](jstructeh"]h$]h&]jjjjkjjkjjjuh1jWhhhjhj8hNubj)}(hX**Definition**:: struct iommu_vevent_arm_smmuv3 { __aligned_le64 evt[4]; }; **Members** ``evt`` 256-bit ARM SMMUv3 Event record, little-endian. Reported event records: (Refer to "7.3 Event records" in SMMUv3 HW Spec) - 0x04 C_BAD_STE - 0x06 F_STREAM_DISABLED - 0x08 C_BAD_SUBSTREAMID - 0x0a C_BAD_CD - 0x10 F_TRANSLATION - 0x11 F_ADDR_SIZE - 0x12 F_ACCESS - 0x13 F_PERMISSIONh](h)}(h**Definition**::h](j>)}(h**Definition**h]h Definition}(hjkhhhNhNubah}(h]h ]h"]h$]h&]uh1j=hjkubh:}(hjkhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMhjkubj)}(h>struct iommu_vevent_arm_smmuv3 { __aligned_le64 evt[4]; };h]h>struct iommu_vevent_arm_smmuv3 { __aligned_le64 evt[4]; };}hjksbah}(h]h ]h"]h$]h&]hhuh1jhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMhjkubh)}(h **Members**h]j>)}(hjlh]hMembers}(hj lhhhNhNubah}(h]h ]h"]h$]h&]uh1j=hjlubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMhjkubj0 )}(hhh]j5 )}(hX``evt`` 256-bit ARM SMMUv3 Event record, little-endian. Reported event records: (Refer to "7.3 Event records" in SMMUv3 HW Spec) - 0x04 C_BAD_STE - 0x06 F_STREAM_DISABLED - 0x08 C_BAD_SUBSTREAMID - 0x0a C_BAD_CD - 0x10 F_TRANSLATION - 0x11 F_ADDR_SIZE - 0x12 F_ACCESS - 0x13 F_PERMISSIONh](j; )}(h``evt``h]jA )}(hj'lh]hevt}(hj)lhhhNhNubah}(h]h ]h"]h$]h&]uh1j@ hj%lubah}(h]h ]h"]h$]h&]uh1j: hc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMhj!lubjW )}(hhh]h)}(hX256-bit ARM SMMUv3 Event record, little-endian. Reported event records: (Refer to "7.3 Event records" in SMMUv3 HW Spec) - 0x04 C_BAD_STE - 0x06 F_STREAM_DISABLED - 0x08 C_BAD_SUBSTREAMID - 0x0a C_BAD_CD - 0x10 F_TRANSLATION - 0x11 F_ADDR_SIZE - 0x12 F_ACCESS - 0x13 F_PERMISSIONh]hX256-bit ARM SMMUv3 Event record, little-endian. Reported event records: (Refer to “7.3 Event records” in SMMUv3 HW Spec) - 0x04 C_BAD_STE - 0x06 F_STREAM_DISABLED - 0x08 C_BAD_SUBSTREAMID - 0x0a C_BAD_CD - 0x10 F_TRANSLATION - 0x11 F_ADDR_SIZE - 0x12 F_ACCESS - 0x13 F_PERMISSION}(hj@lhhhNhNubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMhj=lubah}(h]h ]h"]h$]h&]uh1jV hj!lubeh}(h]h ]h"]h$]h&]uh1j4 hj)}(hjjlh]h Description}(hjllhhhNhNubah}(h]h ]h"]h$]h&]uh1j=hjhlubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMhjhhubh)}(hStreamID field reports a virtual device ID. To receive a virtual event for a device, a vDEVICE must be allocated via IOMMU_VDEVICE_ALLOC.h]hStreamID field reports a virtual device ID. To receive a virtual event for a device, a vDEVICE must be allocated via IOMMU_VDEVICE_ALLOC.}(hjlhhhNhNubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMhjhhubjG)}(hhh]h}(h]h ]h"]h$]h&]entries](jS&iommu_vevent_tegra241_cmdqv (C struct)c.iommu_vevent_tegra241_cmdqvhNtauh1jFhjhhhj8hNubjX)}(hhh](j])}(hiommu_vevent_tegra241_cmdqvh]jc)}(h"struct iommu_vevent_tegra241_cmdqvh](ji)}(hjlh]hstruct}(hjlhhhNhNubah}(h]h ]juah"]h$]h&]uh1jhhjlhhhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMubj{)}(h h]h }(hjlhhhNhNubah}(h]h ]jah"]h$]h&]uh1jzhjlhhhjlhMubj)}(hiommu_vevent_tegra241_cmdqvh]j)}(hjlh]hiommu_vevent_tegra241_cmdqv}(hjlhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjlubah}(h]h ](jjeh"]h$]h&]hhuh1jhjlhhhjlhMubeh}(h]h ]h"]h$]h&]hhjuh1jbjjhjlhhhjlhMubah}(h]jlah ](jjeh"]h$]h&]jj)jhuh1j\hjlhMhjlhhubj)}(hhh]h)}(h6Tegra241 CMDQV IRQ (IOMMU_VEVENTQ_TYPE_TEGRA241_CMDQV)h]h6Tegra241 CMDQV IRQ (IOMMU_VEVENTQ_TYPE_TEGRA241_CMDQV)}(hjlhhhNhNubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMhjlhhubah}(h]h ]h"]h$]h&]uh1jhjlhhhjlhMubeh}(h]h ](jstructeh"]h$]h&]jjjjmjjmjjjuh1jWhhhjhj8hNubj)}(h**Definition**:: struct iommu_vevent_tegra241_cmdqv { __aligned_le64 lvcmdq_err_map[2]; }; **Members** ``lvcmdq_err_map`` 128-bit logical vcmdq error map, little-endian. (Refer to register LVCMDQ_ERR_MAPs per VINTF )h](h)}(h**Definition**::h](j>)}(h**Definition**h]h Definition}(hjmhhhNhNubah}(h]h ]h"]h$]h&]uh1j=hj mubh:}(hj mhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMhjmubj)}(hMstruct iommu_vevent_tegra241_cmdqv { __aligned_le64 lvcmdq_err_map[2]; };h]hMstruct iommu_vevent_tegra241_cmdqv { __aligned_le64 lvcmdq_err_map[2]; };}hj'msbah}(h]h ]h"]h$]h&]hhuh1jhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMhjmubh)}(h **Members**h]j>)}(hj8mh]hMembers}(hj:mhhhNhNubah}(h]h ]h"]h$]h&]uh1j=hj6mubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMhjmubj0 )}(hhh]j5 )}(hq``lvcmdq_err_map`` 128-bit logical vcmdq error map, little-endian. (Refer to register LVCMDQ_ERR_MAPs per VINTF )h](j; )}(h``lvcmdq_err_map``h]jA )}(hjWmh]hlvcmdq_err_map}(hjYmhhhNhNubah}(h]h ]h"]h$]h&]uh1j@ hjUmubah}(h]h ]h"]h$]h&]uh1j: hc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMhjQmubjW )}(hhh]h)}(h^128-bit logical vcmdq error map, little-endian. (Refer to register LVCMDQ_ERR_MAPs per VINTF )h]h^128-bit logical vcmdq error map, little-endian. (Refer to register LVCMDQ_ERR_MAPs per VINTF )}(hjpmhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjlmhMhjmmubah}(h]h ]h"]h$]h&]uh1jV hjQmubeh}(h]h ]h"]h$]h&]uh1j4 hjlmhMhjNmubah}(h]h ]h"]h$]h&]uh1j/ hjmubeh}(h]h ] kernelindentah"]h$]h&]uh1jhjhhhj8hNubh)}(h**Description**h]j>)}(hjmh]h Description}(hjmhhhNhNubah}(h]h ]h"]h$]h&]uh1j=hjmubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMhjhhubh)}(hThe 128-bit register value from HW exclusively reflect the error bits for a Virtual Interface represented by a vIOMMU object. Read and report directly.h]hThe 128-bit register value from HW exclusively reflect the error bits for a Virtual Interface represented by a vIOMMU object. Read and report directly.}(hjmhhhNhNubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMhjhhubjG)}(hhh]h}(h]h ]h"]h$]h&]entries](jSiommu_veventq_alloc (C struct)c.iommu_veventq_allochNtauh1jFhjhhhj8hNubjX)}(hhh](j])}(hiommu_veventq_alloch]jc)}(hstruct iommu_veventq_alloch](ji)}(hjlh]hstruct}(hjmhhhNhNubah}(h]h ]juah"]h$]h&]uh1jhhjmhhhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMubj{)}(h h]h }(hjmhhhNhNubah}(h]h ]jah"]h$]h&]uh1jzhjmhhhjmhMubj)}(hiommu_veventq_alloch]j)}(hjmh]hiommu_veventq_alloc}(hjmhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjmubah}(h]h ](jjeh"]h$]h&]hhuh1jhjmhhhjmhMubeh}(h]h ]h"]h$]h&]hhjuh1jbjjhjmhhhjmhMubah}(h]jmah ](jjeh"]h$]h&]jj)jhuh1j\hjmhMhjmhhubj)}(hhh]h)}(hioctl(IOMMU_VEVENTQ_ALLOC)h]hioctl(IOMMU_VEVENTQ_ALLOC)}(hjnhhhNhNubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMhjnhhubah}(h]h ]h"]h$]h&]uh1jhjmhhhjmhMubeh}(h]h ](jstructeh"]h$]h&]jjjj1njj1njjjuh1jWhhhjhj8hNubj)}(hX**Definition**:: struct iommu_veventq_alloc { __u32 size; __u32 flags; __u32 viommu_id; __u32 type; __u32 veventq_depth; __u32 out_veventq_id; __u32 out_veventq_fd; __u32 __reserved; }; **Members** ``size`` sizeof(struct iommu_veventq_alloc) ``flags`` Must be 0 ``viommu_id`` virtual IOMMU ID to associate the vEVENTQ with ``type`` Type of the vEVENTQ. Must be defined in enum iommu_veventq_type ``veventq_depth`` Maximum number of events in the vEVENTQ ``out_veventq_id`` The ID of the new vEVENTQ ``out_veventq_fd`` The fd of the new vEVENTQ. User space must close the successfully returned fd after using it ``__reserved`` Must be 0h](h)}(h**Definition**::h](j>)}(h**Definition**h]h Definition}(hj=nhhhNhNubah}(h]h ]h"]h$]h&]uh1j=hj9nubh:}(hj9nhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMhj5nubj)}(hstruct iommu_veventq_alloc { __u32 size; __u32 flags; __u32 viommu_id; __u32 type; __u32 veventq_depth; __u32 out_veventq_id; __u32 out_veventq_fd; __u32 __reserved; };h]hstruct iommu_veventq_alloc { __u32 size; __u32 flags; __u32 viommu_id; __u32 type; __u32 veventq_depth; __u32 out_veventq_id; __u32 out_veventq_fd; __u32 __reserved; };}hjVnsbah}(h]h ]h"]h$]h&]hhuh1jhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMhj5nubh)}(h **Members**h]j>)}(hjgnh]hMembers}(hjinhhhNhNubah}(h]h ]h"]h$]h&]uh1j=hjenubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMhj5nubj0 )}(hhh](j5 )}(h,``size`` sizeof(struct iommu_veventq_alloc) h](j; )}(h``size``h]jA )}(hjnh]hsize}(hjnhhhNhNubah}(h]h ]h"]h$]h&]uh1j@ hjnubah}(h]h ]h"]h$]h&]uh1j: hc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMhjnubjW )}(hhh]h)}(h"sizeof(struct iommu_veventq_alloc)h]h"sizeof(struct iommu_veventq_alloc)}(hjnhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjnhMhjnubah}(h]h ]h"]h$]h&]uh1jV hjnubeh}(h]h ]h"]h$]h&]uh1j4 hjnhMhj}nubj5 )}(h``flags`` Must be 0 h](j; )}(h ``flags``h]jA )}(hjnh]hflags}(hjnhhhNhNubah}(h]h ]h"]h$]h&]uh1j@ hjnubah}(h]h ]h"]h$]h&]uh1j: hc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMhjnubjW )}(hhh]h)}(h Must be 0h]h Must be 0}(hjnhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjnhMhjnubah}(h]h ]h"]h$]h&]uh1jV hjnubeh}(h]h ]h"]h$]h&]uh1j4 hjnhMhj}nubj5 )}(h=``viommu_id`` virtual IOMMU ID to associate the vEVENTQ with h](j; )}(h ``viommu_id``h]jA )}(hjnh]h viommu_id}(hjnhhhNhNubah}(h]h ]h"]h$]h&]uh1j@ hjnubah}(h]h ]h"]h$]h&]uh1j: hc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMhjnubjW )}(hhh]h)}(h.virtual IOMMU ID to associate the vEVENTQ withh]h.virtual IOMMU ID to associate the vEVENTQ with}(hjohhhNhNubah}(h]h ]h"]h$]h&]uh1hhj ohMhjoubah}(h]h ]h"]h$]h&]uh1jV hjnubeh}(h]h ]h"]h$]h&]uh1j4 hj ohMhj}nubj5 )}(hI``type`` Type of the vEVENTQ. Must be defined in enum iommu_veventq_type h](j; )}(h``type``h]jA )}(hj1oh]htype}(hj3ohhhNhNubah}(h]h ]h"]h$]h&]uh1j@ hj/oubah}(h]h ]h"]h$]h&]uh1j: hc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMhj+oubjW )}(hhh]h)}(h?Type of the vEVENTQ. Must be defined in enum iommu_veventq_typeh]h?Type of the vEVENTQ. Must be defined in enum iommu_veventq_type}(hjJohhhNhNubah}(h]h ]h"]h$]h&]uh1hhjFohMhjGoubah}(h]h ]h"]h$]h&]uh1jV hj+oubeh}(h]h ]h"]h$]h&]uh1j4 hjFohMhj}nubj5 )}(h:``veventq_depth`` Maximum number of events in the vEVENTQ h](j; )}(h``veventq_depth``h]jA )}(hjjoh]h veventq_depth}(hjlohhhNhNubah}(h]h ]h"]h$]h&]uh1j@ hjhoubah}(h]h ]h"]h$]h&]uh1j: hc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMhjdoubjW )}(hhh]h)}(h'Maximum number of events in the vEVENTQh]h'Maximum number of events in the vEVENTQ}(hjohhhNhNubah}(h]h ]h"]h$]h&]uh1hhjohMhjoubah}(h]h ]h"]h$]h&]uh1jV hjdoubeh}(h]h ]h"]h$]h&]uh1j4 hjohMhj}nubj5 )}(h-``out_veventq_id`` The ID of the new vEVENTQ h](j; )}(h``out_veventq_id``h]jA )}(hjoh]hout_veventq_id}(hjohhhNhNubah}(h]h ]h"]h$]h&]uh1j@ hjoubah}(h]h ]h"]h$]h&]uh1j: hc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMhjoubjW )}(hhh]h)}(hThe ID of the new vEVENTQh]hThe ID of the new vEVENTQ}(hjohhhNhNubah}(h]h ]h"]h$]h&]uh1hhjohMhjoubah}(h]h ]h"]h$]h&]uh1jV hjoubeh}(h]h ]h"]h$]h&]uh1j4 hjohMhj}nubj5 )}(hp``out_veventq_fd`` The fd of the new vEVENTQ. User space must close the successfully returned fd after using it h](j; )}(h``out_veventq_fd``h]jA )}(hjoh]hout_veventq_fd}(hjohhhNhNubah}(h]h ]h"]h$]h&]uh1j@ hjoubah}(h]h ]h"]h$]h&]uh1j: hc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMhjoubjW )}(hhh]h)}(h\The fd of the new vEVENTQ. User space must close the successfully returned fd after using ith]h\The fd of the new vEVENTQ. User space must close the successfully returned fd after using it}(hjohhhNhNubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMhjoubah}(h]h ]h"]h$]h&]uh1jV hjoubeh}(h]h ]h"]h$]h&]uh1j4 hjohMhj}nubj5 )}(h``__reserved`` Must be 0h](j; )}(h``__reserved``h]jA )}(hjph]h __reserved}(hjphhhNhNubah}(h]h ]h"]h$]h&]uh1j@ hjpubah}(h]h ]h"]h$]h&]uh1j: hc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMhjpubjW )}(hhh]h)}(h Must be 0h]h Must be 0}(hj/phhhNhNubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMhj,pubah}(h]h ]h"]h$]h&]uh1jV hjpubeh}(h]h ]h"]h$]h&]uh1j4 hj+phMhj}nubeh}(h]h ]h"]h$]h&]uh1j/ hj5nubeh}(h]h ] kernelindentah"]h$]h&]uh1jhjhhhj8hNubh)}(h**Description**h]j>)}(hjYph]h Description}(hj[phhhNhNubah}(h]h ]h"]h$]h&]uh1j=hjWpubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMhjhhubh)}(hXkExplicitly allocate a virtual event queue interface for a vIOMMU. A vIOMMU can have multiple FDs for different types, but is confined to one per **type**. User space should open the **out_veventq_fd** to read vEVENTs out of a vEVENTQ, if there are vEVENTs available. A vEVENTQ will lose events due to overflow, if the number of the vEVENTs hits **veventq_depth**.h](hExplicitly allocate a virtual event queue interface for a vIOMMU. A vIOMMU can have multiple FDs for different types, but is confined to one per }(hjophhhNhNubj>)}(h**type**h]htype}(hjwphhhNhNubah}(h]h ]h"]h$]h&]uh1j=hjopubh. User space should open the }(hjophhhNhNubj>)}(h**out_veventq_fd**h]hout_veventq_fd}(hjphhhNhNubah}(h]h ]h"]h$]h&]uh1j=hjopubh to read vEVENTs out of a vEVENTQ, if there are vEVENTs available. A vEVENTQ will lose events due to overflow, if the number of the vEVENTs hits }(hjophhhNhNubj>)}(h**veventq_depth**h]h veventq_depth}(hjphhhNhNubah}(h]h ]h"]h$]h&]uh1j=hjopubh.}(hjophhhNhNubeh}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMhjhhubh)}(h~Each vEVENT in a vEVENTQ encloses a struct iommufd_vevent_header followed by a type-specific data structure, in a normal case:h]h~Each vEVENT in a vEVENTQ encloses a struct iommufd_vevent_header followed by a type-specific data structure, in a normal case:}(hjphhhNhNubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMhjhhubjjg)}(hhh]jog)}(hhh](jtg)}(hhh]h}(h]h ]h"]h$]h&]colwidthKuh1jsghjpubjtg)}(hhh]h}(h]h ]h"]h$]h&]colwidthK uh1jsghjpubjtg)}(hhh]h}(h]h ]h"]h$]h&]colwidthKuh1jsghjpubjtg)}(hhh]h}(h]h ]h"]h$]h&]colwidthK uh1jsghjpubjtg)}(hhh]h}(h]h ]h"]h$]h&]colwidthKuh1jsghjpubjtg)}(hhh]h}(h]h ]h"]h$]h&]colwidthKuh1jsghjpubjtg)}(hhh]h}(h]h ]h"]h$]h&]colwidthK uh1jsghjpubjtg)}(hhh]h}(h]h ]h"]h$]h&]colwidthKuh1jsghjpubjtg)}(hhh]h}(h]h ]h"]h$]h&]colwidthKuh1jsghjpubjg)}(hhh]jg)}(hhh](jg)}(hhh]h}(h]h ]h"]h$]h&]uh1jghj&qubjg)}(hhh]h)}(hheader0h]hheader0}(hj5qhhhNhNubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMhj2qubah}(h]h ]h"]h$]h&]uh1jghj&qubjg)}(hhh]h)}(hdata0h]hdata0}(hjMqhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjCqhMhjJqubah}(h]h ]h"]h$]h&]uh1jghj&qubjg)}(hhh]h)}(hheader1h]hheader1}(hjdqhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjCqhMhjaqubah}(h]h ]h"]h$]h&]uh1jghj&qubjg)}(hhh]h)}(hdata1h]hdata1}(hj{qhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjCqhMhjxqubah}(h]h ]h"]h$]h&]uh1jghj&qubjg)}(hhh]h)}(h...h]h...}(hjqhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjCqhMhjqubah}(h]h ]h"]h$]h&]uh1jghj&qubjg)}(hhh]h)}(hheaderNh]hheaderN}(hjqhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjCqhMhjqubah}(h]h ]h"]h$]h&]uh1jghj&qubjg)}(hhh]h)}(hdataNh]hdataN}(hjqhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjCqhMhjqubah}(h]h ]h"]h$]h&]uh1jghj&qubjg)}(hhh]h}(h]h ]h"]h$]h&]uh1jghj&qubeh}(h]h ]h"]h$]h&]uh1jghj#qubah}(h]h ]h"]h$]h&]uh1jghjpubeh}(h]h ]h"]h$]h&]colsK uh1jnghjpubah}(h]h ]h"]h$]h&]uh1jighjhhhj8hNubh)}(hiunless a tailing IOMMU_VEVENTQ_FLAG_LOST_EVENTS header is logged (refer to struct iommufd_vevent_header).h]hiunless a tailing IOMMU_VEVENTQ_FLAG_LOST_EVENTS header is logged (refer to struct iommufd_vevent_header).}(hjqhhhNhNubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMhjhhubjG)}(hhh]h}(h]h ]h"]h$]h&]entries](jSiommu_hw_queue_type (C enum)c.iommu_hw_queue_typehNtauh1jFhjhhhj8hNubjX)}(hhh](j])}(hiommu_hw_queue_typeh]jc)}(henum iommu_hw_queue_typeh](ji)}(hjh]henum}(hjrhhhNhNubah}(h]h ]juah"]h$]h&]uh1jhhjrhhhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMubj{)}(h h]h }(hj,rhhhNhNubah}(h]h ]jah"]h$]h&]uh1jzhjrhhhj+rhMubj)}(hiommu_hw_queue_typeh]j)}(hjrh]hiommu_hw_queue_type}(hj>rhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj:rubah}(h]h ](jjeh"]h$]h&]hhuh1jhjrhhhj+rhMubeh}(h]h ]h"]h$]h&]hhjuh1jbjjhjrhhhj+rhMubah}(h]jrah ](jjeh"]h$]h&]jj)jhuh1j\hj+rhMhjrhhubj)}(hhh]h)}(h HW Queue Typeh]h HW Queue Type}(hj`rhhhNhNubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMhj]rhhubah}(h]h ]h"]h$]h&]uh1jhjrhhhj+rhMubeh}(h]h ](jenumeh"]h$]h&]jjjjxrjjxrjjjuh1jWhhhjhj8hNubj)}(h**Constants** ``IOMMU_HW_QUEUE_TYPE_DEFAULT`` Reserved for future use ``IOMMU_HW_QUEUE_TYPE_TEGRA241_CMDQV`` NVIDIA Tegra241 CMDQV (extension for ARM SMMUv3) Virtual Command Queue (VCMDQ)h](h)}(h **Constants**h]j>)}(hjrh]h Constants}(hjrhhhNhNubah}(h]h ]h"]h$]h&]uh1j=hjrubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMhj|rubj0 )}(hhh](j5 )}(h8``IOMMU_HW_QUEUE_TYPE_DEFAULT`` Reserved for future use h](j; )}(h``IOMMU_HW_QUEUE_TYPE_DEFAULT``h]jA )}(hjrh]hIOMMU_HW_QUEUE_TYPE_DEFAULT}(hjrhhhNhNubah}(h]h ]h"]h$]h&]uh1j@ hjrubah}(h]h ]h"]h$]h&]uh1j: hc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMhjrubjW )}(hhh]h)}(hReserved for future useh]hReserved for future use}(hjrhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjrhMhjrubah}(h]h ]h"]h$]h&]uh1jV hjrubeh}(h]h ]h"]h$]h&]uh1j4 hjrhMhjrubj5 )}(hu``IOMMU_HW_QUEUE_TYPE_TEGRA241_CMDQV`` NVIDIA Tegra241 CMDQV (extension for ARM SMMUv3) Virtual Command Queue (VCMDQ)h](j; )}(h&``IOMMU_HW_QUEUE_TYPE_TEGRA241_CMDQV``h]jA )}(hjrh]h"IOMMU_HW_QUEUE_TYPE_TEGRA241_CMDQV}(hjrhhhNhNubah}(h]h ]h"]h$]h&]uh1j@ hjrubah}(h]h ]h"]h$]h&]uh1j: hc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMhjrubjW )}(hhh]h)}(hNNVIDIA Tegra241 CMDQV (extension for ARM SMMUv3) Virtual Command Queue (VCMDQ)h]hNNVIDIA Tegra241 CMDQV (extension for ARM SMMUv3) Virtual Command Queue (VCMDQ)}(hjrhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjrhMhjrubah}(h]h ]h"]h$]h&]uh1jV hjrubeh}(h]h ]h"]h$]h&]uh1j4 hjrhMhjrubeh}(h]h ]h"]h$]h&]uh1j/ hj|rubeh}(h]h ] kernelindentah"]h$]h&]uh1jhjhhhj8hNubjG)}(hhh]h}(h]h ]h"]h$]h&]entries](jSiommu_hw_queue_alloc (C struct)c.iommu_hw_queue_allochNtauh1jFhjhhhj8hNubjX)}(hhh](j])}(hiommu_hw_queue_alloch]jc)}(hstruct iommu_hw_queue_alloch](ji)}(hjlh]hstruct}(hj3shhhNhNubah}(h]h ]juah"]h$]h&]uh1jhhj/shhhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMubj{)}(h h]h }(hjAshhhNhNubah}(h]h ]jah"]h$]h&]uh1jzhj/shhhj@shMubj)}(hiommu_hw_queue_alloch]j)}(hj-sh]hiommu_hw_queue_alloc}(hjSshhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjOsubah}(h]h ](jjeh"]h$]h&]hhuh1jhj/shhhj@shMubeh}(h]h ]h"]h$]h&]hhjuh1jbjjhj+shhhj@shMubah}(h]j&sah ](jjeh"]h$]h&]jj)jhuh1j\hj@shMhj(shhubj)}(hhh]h)}(hioctl(IOMMU_HW_QUEUE_ALLOC)h]hioctl(IOMMU_HW_QUEUE_ALLOC)}(hjushhhNhNubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhM&hjrshhubah}(h]h ]h"]h$]h&]uh1jhj(shhhj@shMubeh}(h]h ](jstructeh"]h$]h&]jjjjsjjsjjjuh1jWhhhjhj8hNubj)}(hX**Definition**:: struct iommu_hw_queue_alloc { __u32 size; __u32 flags; __u32 viommu_id; __u32 type; __u32 index; __u32 out_hw_queue_id; __aligned_u64 nesting_parent_iova; __aligned_u64 length; }; **Members** ``size`` sizeof(struct iommu_hw_queue_alloc) ``flags`` Must be 0 ``viommu_id`` Virtual IOMMU ID to associate the HW queue with ``type`` One of enum iommu_hw_queue_type ``index`` The logical index to the HW queue per virtual IOMMU for a multi-queue model ``out_hw_queue_id`` The ID of the new HW queue ``nesting_parent_iova`` Base address of the queue memory in the guest physical address space ``length`` Length of the queue memoryh](h)}(h**Definition**::h](j>)}(h**Definition**h]h Definition}(hjshhhNhNubah}(h]h ]h"]h$]h&]uh1j=hjsubh:}(hjshhhNhNubeh}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhM*hjsubj)}(hstruct iommu_hw_queue_alloc { __u32 size; __u32 flags; __u32 viommu_id; __u32 type; __u32 index; __u32 out_hw_queue_id; __aligned_u64 nesting_parent_iova; __aligned_u64 length; };h]hstruct iommu_hw_queue_alloc { __u32 size; __u32 flags; __u32 viommu_id; __u32 type; __u32 index; __u32 out_hw_queue_id; __aligned_u64 nesting_parent_iova; __aligned_u64 length; };}hjssbah}(h]h ]h"]h$]h&]hhuh1jhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhM,hjsubh)}(h **Members**h]j>)}(hjsh]hMembers}(hjshhhNhNubah}(h]h ]h"]h$]h&]uh1j=hjsubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhM7hjsubj0 )}(hhh](j5 )}(h-``size`` sizeof(struct iommu_hw_queue_alloc) h](j; )}(h``size``h]jA )}(hjsh]hsize}(hjshhhNhNubah}(h]h ]h"]h$]h&]uh1j@ hjsubah}(h]h ]h"]h$]h&]uh1j: hc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhM(hjsubjW )}(hhh]h)}(h#sizeof(struct iommu_hw_queue_alloc)h]h#sizeof(struct iommu_hw_queue_alloc)}(hjshhhNhNubah}(h]h ]h"]h$]h&]uh1hhjshM(hjsubah}(h]h ]h"]h$]h&]uh1jV hjsubeh}(h]h ]h"]h$]h&]uh1j4 hjshM(hjsubj5 )}(h``flags`` Must be 0 h](j; )}(h ``flags``h]jA )}(hjth]hflags}(hjthhhNhNubah}(h]h ]h"]h$]h&]uh1j@ hjtubah}(h]h ]h"]h$]h&]uh1j: hc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhM)hjtubjW )}(hhh]h)}(h Must be 0h]h Must be 0}(hj4thhhNhNubah}(h]h ]h"]h$]h&]uh1hhj0thM)hj1tubah}(h]h ]h"]h$]h&]uh1jV hjtubeh}(h]h ]h"]h$]h&]uh1j4 hj0thM)hjsubj5 )}(h>``viommu_id`` Virtual IOMMU ID to associate the HW queue with h](j; )}(h ``viommu_id``h]jA )}(hjTth]h viommu_id}(hjVthhhNhNubah}(h]h ]h"]h$]h&]uh1j@ hjRtubah}(h]h ]h"]h$]h&]uh1j: hc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhM*hjNtubjW )}(hhh]h)}(h/Virtual IOMMU ID to associate the HW queue withh]h/Virtual IOMMU ID to associate the HW queue with}(hjmthhhNhNubah}(h]h ]h"]h$]h&]uh1hhjithM*hjjtubah}(h]h ]h"]h$]h&]uh1jV hjNtubeh}(h]h ]h"]h$]h&]uh1j4 hjithM*hjsubj5 )}(h)``type`` One of enum iommu_hw_queue_type h](j; )}(h``type``h]jA )}(hjth]htype}(hjthhhNhNubah}(h]h ]h"]h$]h&]uh1j@ hjtubah}(h]h ]h"]h$]h&]uh1j: hc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhM+hjtubjW )}(hhh]h)}(hOne of enum iommu_hw_queue_typeh]hOne of enum iommu_hw_queue_type}(hjthhhNhNubah}(h]h ]h"]h$]h&]uh1hhjthM+hjtubah}(h]h ]h"]h$]h&]uh1jV hjtubeh}(h]h ]h"]h$]h&]uh1j4 hjthM+hjsubj5 )}(hV``index`` The logical index to the HW queue per virtual IOMMU for a multi-queue model h](j; )}(h ``index``h]jA )}(hjth]hindex}(hjthhhNhNubah}(h]h ]h"]h$]h&]uh1j@ hjtubah}(h]h ]h"]h$]h&]uh1j: hc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhM-hjtubjW )}(hhh]h)}(hKThe logical index to the HW queue per virtual IOMMU for a multi-queue modelh]hKThe logical index to the HW queue per virtual IOMMU for a multi-queue model}(hjthhhNhNubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhM,hjtubah}(h]h ]h"]h$]h&]uh1jV hjtubeh}(h]h ]h"]h$]h&]uh1j4 hjthM-hjsubj5 )}(h/``out_hw_queue_id`` The ID of the new HW queue h](j; )}(h``out_hw_queue_id``h]jA )}(hjuh]hout_hw_queue_id}(hjuhhhNhNubah}(h]h ]h"]h$]h&]uh1j@ hjtubah}(h]h ]h"]h$]h&]uh1j: hc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhM.hjtubjW )}(hhh]h)}(hThe ID of the new HW queueh]hThe ID of the new HW queue}(hjuhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjuhM.hjuubah}(h]h ]h"]h$]h&]uh1jV hjtubeh}(h]h ]h"]h$]h&]uh1j4 hjuhM.hjsubj5 )}(h]``nesting_parent_iova`` Base address of the queue memory in the guest physical address space h](j; )}(h``nesting_parent_iova``h]jA )}(hj9uh]hnesting_parent_iova}(hj;uhhhNhNubah}(h]h ]h"]h$]h&]uh1j@ hj7uubah}(h]h ]h"]h$]h&]uh1j: hc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhM0hj3uubjW )}(hhh]h)}(hDBase address of the queue memory in the guest physical address spaceh]hDBase address of the queue memory in the guest physical address space}(hjRuhhhNhNubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhM/hjOuubah}(h]h ]h"]h$]h&]uh1jV hj3uubeh}(h]h ]h"]h$]h&]uh1j4 hjNuhM0hjsubj5 )}(h%``length`` Length of the queue memoryh](j; )}(h ``length``h]jA )}(hjsuh]hlength}(hjuuhhhNhNubah}(h]h ]h"]h$]h&]uh1j@ hjquubah}(h]h ]h"]h$]h&]uh1j: hc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhM0hjmuubjW )}(hhh]h)}(hLength of the queue memoryh]hLength of the queue memory}(hjuhhhNhNubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhM1hjuubah}(h]h ]h"]h$]h&]uh1jV hjmuubeh}(h]h ]h"]h$]h&]uh1j4 hjuhM0hjsubeh}(h]h ]h"]h$]h&]uh1j/ hjsubeh}(h]h ] kernelindentah"]h$]h&]uh1jhjhhhj8hNubh)}(h**Description**h]j>)}(hjuh]h Description}(hjuhhhNhNubah}(h]h ]h"]h$]h&]uh1j=hjuubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhM4hjhhubh)}(hAllocate a HW queue object for a vIOMMU-specific HW-accelerated queue, which allows HW to access a guest queue memory described using **nesting_parent_iova** and **length**.h](hAllocate a HW queue object for a vIOMMU-specific HW-accelerated queue, which allows HW to access a guest queue memory described using }(hjuhhhNhNubj>)}(h**nesting_parent_iova**h]hnesting_parent_iova}(hjuhhhNhNubah}(h]h ]h"]h$]h&]uh1j=hjuubh and }(hjuhhhNhNubj>)}(h **length**h]hlength}(hjuhhhNhNubah}(h]h ]h"]h$]h&]uh1j=hjuubh.}(hjuhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhM1hjhhubh)}(hxA vIOMMU can allocate multiple queues, but it must use a different **index** per type to separate each allocation, e.g::h](hCA vIOMMU can allocate multiple queues, but it must use a different }(hjuhhhNhNubj>)}(h **index**h]hindex}(hjvhhhNhNubah}(h]h ]h"]h$]h&]uh1j=hjuubh+ per type to separate each allocation, e.g:}(hjuhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhM5hjhhubj)}(h6Type1 HW queue0, Type1 HW queue1, Type2 HW queue0, ...h]h6Type1 HW queue0, Type1 HW queue1, Type2 HW queue0, ...}hj vsbah}(h]h ]h"]h$]h&]hhuh1jhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhM8hjhhubeh}(h]iommufd-user-apiah ]h"]iommufd user apiah$]h&]uh1hhhhhhhhMMubh)}(hhh](h)}(hIOMMUFD Kernel APIh]hIOMMUFD Kernel API}(hj:vhhhNhNubah}(h]h ]h"]h$]h&]uh1hhj7vhhhhhMRubh)}(hX)The IOMMUFD kAPI is device-centric with group-related tricks managed behind the scene. This allows the external drivers calling such kAPI to implement a simple device-centric uAPI for connecting its device to an iommufd, instead of explicitly imposing the group semantics in its uAPI as VFIO does.h]hX)The IOMMUFD kAPI is device-centric with group-related tricks managed behind the scene. This allows the external drivers calling such kAPI to implement a simple device-centric uAPI for connecting its device to an iommufd, instead of explicitly imposing the group semantics in its uAPI as VFIO does.}(hjHvhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMThj7vhhubjG)}(hhh]h}(h]h ]h"]h$]h&]entries](jS iommufd_device_bind (C function)c.iommufd_device_bindhNtauh1jFhj7vhhhNhNubjX)}(hhh](j])}(hcstruct iommufd_device * iommufd_device_bind (struct iommufd_ctx *ictx, struct device *dev, u32 *id)h]jc)}(hastruct iommufd_device *iommufd_device_bind(struct iommufd_ctx *ictx, struct device *dev, u32 *id)h](ji)}(hjlh]hstruct}(hjovhhhNhNubah}(h]h ]juah"]h$]h&]uh1jhhjkvhhhe/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:345: ./drivers/iommu/iommufd/device.chKubj{)}(h h]h }(hj}vhhhNhNubah}(h]h ]jah"]h$]h&]uh1jzhjkvhhhj|vhKubh)}(hhh]j)}(hiommufd_deviceh]hiommufd_device}(hjvhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjvubah}(h]h ]h"]h$]h&] refdomainjreftype identifier reftargetjvmodnameN classnameN c:parent_keysphinx.domains.c LookupKey)}data]jv ASTIdentifier)}jviommufd_device_bindsbc.iommufd_device_bindasbuh1hhjkvhhhj|vhKubj{)}(h h]h }(hjvhhhNhNubah}(h]h ]jah"]h$]h&]uh1jzhjkvhhhj|vhKubhdesc_sig_punctuation)}(hjh]h*}(hjvhhhNhNubah}(h]h ]pah"]h$]h&]uh1jvhjkvhhhj|vhKubj)}(hiommufd_device_bindh]j)}(hjvh]hiommufd_device_bind}(hjvhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjvubah}(h]h ](jjeh"]h$]h&]hhuh1jhjkvhhhj|vhKubhdesc_parameterlist)}(h7(struct iommufd_ctx *ictx, struct device *dev, u32 *id)h](hdesc_parameter)}(hstruct iommufd_ctx *ictxh](ji)}(hjlh]hstruct}(hjvhhhNhNubah}(h]h ]juah"]h$]h&]uh1jhhjvubj{)}(h h]h }(hjwhhhNhNubah}(h]h ]jah"]h$]h&]uh1jzhjvubh)}(hhh]j)}(h iommufd_ctxh]h iommufd_ctx}(hjwhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjwubah}(h]h ]h"]h$]h&] refdomainjreftypejv reftargetjwmodnameN classnameNjvjv)}jv]jvc.iommufd_device_bindasbuh1hhjvubj{)}(h h]h }(hj4whhhNhNubah}(h]h ]jah"]h$]h&]uh1jzhjvubjv)}(hjh]h*}(hjBwhhhNhNubah}(h]h ]jvah"]h$]h&]uh1jvhjvubj)}(hictxh]hictx}(hjOwhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjvubeh}(h]h ]h"]h$]h&]noemphhhuh1jvhjvubjv)}(hstruct device *devh](ji)}(hjlh]hstruct}(hjhwhhhNhNubah}(h]h ]juah"]h$]h&]uh1jhhjdwubj{)}(h h]h }(hjuwhhhNhNubah}(h]h ]jah"]h$]h&]uh1jzhjdwubh)}(hhh]j)}(hdeviceh]hdevice}(hjwhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjwubah}(h]h ]h"]h$]h&] refdomainjreftypejv reftargetjwmodnameN classnameNjvjv)}jv]jvc.iommufd_device_bindasbuh1hhjdwubj{)}(h h]h }(hjwhhhNhNubah}(h]h ]jah"]h$]h&]uh1jzhjdwubjv)}(hjh]h*}(hjwhhhNhNubah}(h]h ]jvah"]h$]h&]uh1jvhjdwubj)}(hdevh]hdev}(hjwhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjdwubeh}(h]h ]h"]h$]h&]noemphhhuh1jvhjvubjv)}(hu32 *idh](h)}(hhh]j)}(hu32h]hu32}(hjwhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjwubah}(h]h ]h"]h$]h&] refdomainjreftypejv reftargetjwmodnameN classnameNjvjv)}jv]jvc.iommufd_device_bindasbuh1hhjwubj{)}(h h]h }(hjwhhhNhNubah}(h]h ]jah"]h$]h&]uh1jzhjwubjv)}(hjh]h*}(hjxhhhNhNubah}(h]h ]jvah"]h$]h&]uh1jvhjwubj)}(hidh]hid}(hjxhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjwubeh}(h]h ]h"]h$]h&]noemphhhuh1jvhjvubeh}(h]h ]h"]h$]h&]hhuh1jvhjkvhhhj|vhKubeh}(h]h ]h"]h$]h&]hhjuh1jbjjhjgvhhhj|vhKubah}(h]jbvah ](jjeh"]h$]h&]jj)jhuh1j\hj|vhKhjdvhhubj)}(hhh]h)}(h%Bind a physical device to an iommu fdh]h%Bind a physical device to an iommu fd}(hj>xhhhNhNubah}(h]h ]h"]h$]h&]uh1hhe/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:345: ./drivers/iommu/iommufd/device.chKhj;xhhubah}(h]h ]h"]h$]h&]uh1jhjdvhhhj|vhKubeh}(h]h ](jfunctioneh"]h$]h&]jjjjVxjjVxjjjuh1jWhhhj7vhNhNubj)}(hXi**Parameters** ``struct iommufd_ctx *ictx`` iommufd file descriptor ``struct device *dev`` Pointer to a physical device struct ``u32 *id`` Output ID number to return to userspace for this device **Description** A successful bind establishes an ownership over the device and returns struct iommufd_device pointer, otherwise returns error pointer. A driver using this API must set driver_managed_dma and must not touch the device until this routine succeeds and establishes ownership. Binding a PCI device places the entire RID under iommufd control. The caller must undo this with iommufd_device_unbind()h](h)}(h**Parameters**h]j>)}(hj`xh]h Parameters}(hjbxhhhNhNubah}(h]h ]h"]h$]h&]uh1j=hj^xubah}(h]h ]h"]h$]h&]uh1hhe/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:345: ./drivers/iommu/iommufd/device.chKhjZxubj0 )}(hhh](j5 )}(h5``struct iommufd_ctx *ictx`` iommufd file descriptor h](j; )}(h``struct iommufd_ctx *ictx``h]jA )}(hjxh]hstruct iommufd_ctx *ictx}(hjxhhhNhNubah}(h]h ]h"]h$]h&]uh1j@ hj}xubah}(h]h ]h"]h$]h&]uh1j: he/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:345: ./drivers/iommu/iommufd/device.chKhjyxubjW )}(hhh]h)}(hiommufd file descriptorh]hiommufd file descriptor}(hjxhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjxhKhjxubah}(h]h ]h"]h$]h&]uh1jV hjyxubeh}(h]h ]h"]h$]h&]uh1j4 hjxhKhjvxubj5 )}(h;``struct device *dev`` Pointer to a physical device struct h](j; )}(h``struct device *dev``h]jA )}(hjxh]hstruct device *dev}(hjxhhhNhNubah}(h]h ]h"]h$]h&]uh1j@ hjxubah}(h]h ]h"]h$]h&]uh1j: he/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:345: ./drivers/iommu/iommufd/device.chKhjxubjW )}(hhh]h)}(h#Pointer to a physical device structh]h#Pointer to a physical device struct}(hjxhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjxhKhjxubah}(h]h ]h"]h$]h&]uh1jV hjxubeh}(h]h ]h"]h$]h&]uh1j4 hjxhKhjvxubj5 )}(hD``u32 *id`` Output ID number to return to userspace for this device h](j; )}(h ``u32 *id``h]jA )}(hjxh]hu32 *id}(hjxhhhNhNubah}(h]h ]h"]h$]h&]uh1j@ hjxubah}(h]h ]h"]h$]h&]uh1j: he/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:345: ./drivers/iommu/iommufd/device.chKhjxubjW )}(hhh]h)}(h7Output ID number to return to userspace for this deviceh]h7Output ID number to return to userspace for this device}(hj yhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjyhKhjyubah}(h]h ]h"]h$]h&]uh1jV hjxubeh}(h]h ]h"]h$]h&]uh1j4 hjyhKhjvxubeh}(h]h ]h"]h$]h&]uh1j/ hjZxubh)}(h**Description**h]j>)}(hj,yh]h Description}(hj.yhhhNhNubah}(h]h ]h"]h$]h&]uh1j=hj*yubah}(h]h ]h"]h$]h&]uh1hhe/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:345: ./drivers/iommu/iommufd/device.chKhjZxubh)}(hA successful bind establishes an ownership over the device and returns struct iommufd_device pointer, otherwise returns error pointer.h]hA successful bind establishes an ownership over the device and returns struct iommufd_device pointer, otherwise returns error pointer.}(hjByhhhNhNubah}(h]h ]h"]h$]h&]uh1hhe/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:345: ./drivers/iommu/iommufd/device.chKhjZxubh)}(hA driver using this API must set driver_managed_dma and must not touch the device until this routine succeeds and establishes ownership.h]hA driver using this API must set driver_managed_dma and must not touch the device until this routine succeeds and establishes ownership.}(hjQyhhhNhNubah}(h]h ]h"]h$]h&]uh1hhe/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:345: ./drivers/iommu/iommufd/device.chKhjZxubh)}(hABinding a PCI device places the entire RID under iommufd control.h]hABinding a PCI device places the entire RID under iommufd control.}(hj`yhhhNhNubah}(h]h ]h"]h$]h&]uh1hhe/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:345: ./drivers/iommu/iommufd/device.chKhjZxubh)}(h6The caller must undo this with iommufd_device_unbind()h]h6The caller must undo this with iommufd_device_unbind()}(hjoyhhhNhNubah}(h]h ]h"]h$]h&]uh1hhe/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:345: ./drivers/iommu/iommufd/device.chKhjZxubeh}(h]h ] kernelindentah"]h$]h&]uh1jhj7vhhhNhNubjG)}(hhh]h}(h]h ]h"]h$]h&]entries](jS"iommufd_ctx_has_group (C function)c.iommufd_ctx_has_grouphNtauh1jFhj7vhhhNhNubjX)}(hhh](j])}(hPbool iommufd_ctx_has_group (struct iommufd_ctx *ictx, struct iommu_group *group)h]jc)}(hObool iommufd_ctx_has_group(struct iommufd_ctx *ictx, struct iommu_group *group)h](hdesc_sig_keyword_type)}(hboolh]hbool}(hjyhhhNhNubah}(h]h ]ktah"]h$]h&]uh1jyhjyhhhe/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:345: ./drivers/iommu/iommufd/device.chM'ubj{)}(h h]h }(hjyhhhNhNubah}(h]h ]jah"]h$]h&]uh1jzhjyhhhjyhM'ubj)}(hiommufd_ctx_has_grouph]j)}(hiommufd_ctx_has_grouph]hiommufd_ctx_has_group}(hjyhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjyubah}(h]h ](jjeh"]h$]h&]hhuh1jhjyhhhjyhM'ubjv)}(h5(struct iommufd_ctx *ictx, struct iommu_group *group)h](jv)}(hstruct iommufd_ctx *ictxh](ji)}(hjlh]hstruct}(hjyhhhNhNubah}(h]h ]juah"]h$]h&]uh1jhhjyubj{)}(h h]h }(hjyhhhNhNubah}(h]h ]jah"]h$]h&]uh1jzhjyubh)}(hhh]j)}(h iommufd_ctxh]h iommufd_ctx}(hjyhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjyubah}(h]h ]h"]h$]h&] refdomainjreftypejv reftargetjymodnameN classnameNjvjv)}jv]jv)}jvjysbc.iommufd_ctx_has_groupasbuh1hhjyubj{)}(h h]h }(hjzhhhNhNubah}(h]h ]jah"]h$]h&]uh1jzhjyubjv)}(hjh]h*}(hj*zhhhNhNubah}(h]h ]jvah"]h$]h&]uh1jvhjyubj)}(hictxh]hictx}(hj7zhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjyubeh}(h]h ]h"]h$]h&]noemphhhuh1jvhjyubjv)}(hstruct iommu_group *grouph](ji)}(hjlh]hstruct}(hjPzhhhNhNubah}(h]h ]juah"]h$]h&]uh1jhhjLzubj{)}(h h]h }(hj]zhhhNhNubah}(h]h ]jah"]h$]h&]uh1jzhjLzubh)}(hhh]j)}(h iommu_grouph]h iommu_group}(hjnzhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjkzubah}(h]h ]h"]h$]h&] refdomainjreftypejv reftargetjpzmodnameN classnameNjvjv)}jv]jzc.iommufd_ctx_has_groupasbuh1hhjLzubj{)}(h h]h }(hjzhhhNhNubah}(h]h ]jah"]h$]h&]uh1jzhjLzubjv)}(hjh]h*}(hjzhhhNhNubah}(h]h ]jvah"]h$]h&]uh1jvhjLzubj)}(hgrouph]hgroup}(hjzhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjLzubeh}(h]h ]h"]h$]h&]noemphhhuh1jvhjyubeh}(h]h ]h"]h$]h&]hhuh1jvhjyhhhjyhM'ubeh}(h]h ]h"]h$]h&]hhjuh1jbjjhjyhhhjyhM'ubah}(h]jyah ](jjeh"]h$]h&]jj)jhuh1j\hjyhM'hjyhhubj)}(hhh]h)}(h8True if any device within the group is bound to the ictxh]h8True if any device within the group is bound to the ictx}(hjzhhhNhNubah}(h]h ]h"]h$]h&]uh1hhe/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:345: ./drivers/iommu/iommufd/device.chM'hjzhhubah}(h]h ]h"]h$]h&]uh1jhjyhhhjyhM'ubeh}(h]h ](jfunctioneh"]h$]h&]jjjjzjjzjjjuh1jWhhhj7vhNhNubj)}(hX2**Parameters** ``struct iommufd_ctx *ictx`` iommufd file descriptor ``struct iommu_group *group`` Pointer to a physical iommu_group struct **Description** True if any device within the group has been bound to this ictx, ex. via iommufd_device_bind(), therefore implying ictx ownership of the group.h](h)}(h**Parameters**h]j>)}(hjzh]h Parameters}(hjzhhhNhNubah}(h]h ]h"]h$]h&]uh1j=hjzubah}(h]h ]h"]h$]h&]uh1hhe/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:345: ./drivers/iommu/iommufd/device.chM+hjzubj0 )}(hhh](j5 )}(h5``struct iommufd_ctx *ictx`` iommufd file descriptor h](j; )}(h``struct iommufd_ctx *ictx``h]jA )}(hj{h]hstruct iommufd_ctx *ictx}(hj{hhhNhNubah}(h]h ]h"]h$]h&]uh1j@ hj{ubah}(h]h ]h"]h$]h&]uh1j: he/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:345: ./drivers/iommu/iommufd/device.chM)hj {ubjW )}(hhh]h)}(hiommufd file descriptorh]hiommufd file descriptor}(hj+{hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj'{hM)hj({ubah}(h]h ]h"]h$]h&]uh1jV hj {ubeh}(h]h ]h"]h$]h&]uh1j4 hj'{hM)hj {ubj5 )}(hG``struct iommu_group *group`` Pointer to a physical iommu_group struct h](j; )}(h``struct iommu_group *group``h]jA )}(hjK{h]hstruct iommu_group *group}(hjM{hhhNhNubah}(h]h ]h"]h$]h&]uh1j@ hjI{ubah}(h]h ]h"]h$]h&]uh1j: he/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:345: ./drivers/iommu/iommufd/device.chM*hjE{ubjW )}(hhh]h)}(h(Pointer to a physical iommu_group structh]h(Pointer to a physical iommu_group struct}(hjd{hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj`{hM*hja{ubah}(h]h ]h"]h$]h&]uh1jV hjE{ubeh}(h]h ]h"]h$]h&]uh1j4 hj`{hM*hj {ubeh}(h]h ]h"]h$]h&]uh1j/ hjzubh)}(h**Description**h]j>)}(hj{h]h Description}(hj{hhhNhNubah}(h]h ]h"]h$]h&]uh1j=hj{ubah}(h]h ]h"]h$]h&]uh1hhe/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:345: ./drivers/iommu/iommufd/device.chM,hjzubh)}(hTrue if any device within the group has been bound to this ictx, ex. via iommufd_device_bind(), therefore implying ictx ownership of the group.h]hTrue if any device within the group has been bound to this ictx, ex. via iommufd_device_bind(), therefore implying ictx ownership of the group.}(hj{hhhNhNubah}(h]h ]h"]h$]h&]uh1hhe/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:345: ./drivers/iommu/iommufd/device.chM+hjzubeh}(h]h ] kernelindentah"]h$]h&]uh1jhj7vhhhNhNubjG)}(hhh]h}(h]h ]h"]h$]h&]entries](jS"iommufd_device_unbind (C function)c.iommufd_device_unbindhNtauh1jFhj7vhhhNhNubjX)}(hhh](j])}(h8void iommufd_device_unbind (struct iommufd_device *idev)h]jc)}(h7void iommufd_device_unbind(struct iommufd_device *idev)h](jy)}(hvoidh]hvoid}(hj{hhhNhNubah}(h]h ]jyah"]h$]h&]uh1jyhj{hhhe/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:345: ./drivers/iommu/iommufd/device.chMFubj{)}(h h]h }(hj{hhhNhNubah}(h]h ]jah"]h$]h&]uh1jzhj{hhhj{hMFubj)}(hiommufd_device_unbindh]j)}(hiommufd_device_unbindh]hiommufd_device_unbind}(hj{hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj{ubah}(h]h ](jjeh"]h$]h&]hhuh1jhj{hhhj{hMFubjv)}(h(struct iommufd_device *idev)h]jv)}(hstruct iommufd_device *idevh](ji)}(hjlh]hstruct}(hj|hhhNhNubah}(h]h ]juah"]h$]h&]uh1jhhj|ubj{)}(h h]h }(hj|hhhNhNubah}(h]h ]jah"]h$]h&]uh1jzhj|ubh)}(hhh]j)}(hiommufd_deviceh]hiommufd_device}(hj&|hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj#|ubah}(h]h ]h"]h$]h&] refdomainjreftypejv reftargetj(|modnameN classnameNjvjv)}jv]jv)}jvj{sbc.iommufd_device_unbindasbuh1hhj|ubj{)}(h h]h }(hjF|hhhNhNubah}(h]h ]jah"]h$]h&]uh1jzhj|ubjv)}(hjh]h*}(hjT|hhhNhNubah}(h]h ]jvah"]h$]h&]uh1jvhj|ubj)}(hidevh]hidev}(hja|hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj|ubeh}(h]h ]h"]h$]h&]noemphhhuh1jvhj|ubah}(h]h ]h"]h$]h&]hhuh1jvhj{hhhj{hMFubeh}(h]h ]h"]h$]h&]hhjuh1jbjjhj{hhhj{hMFubah}(h]j{ah ](jjeh"]h$]h&]jj)jhuh1j\hj{hMFhj{hhubj)}(hhh]h)}(hUndo iommufd_device_bind()h]hUndo iommufd_device_bind()}(hj|hhhNhNubah}(h]h ]h"]h$]h&]uh1hhe/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:345: ./drivers/iommu/iommufd/device.chMFhj|hhubah}(h]h ]h"]h$]h&]uh1jhj{hhhj{hMFubeh}(h]h ](jfunctioneh"]h$]h&]jjjj|jj|jjjuh1jWhhhj7vhNhNubj)}(hXP**Parameters** ``struct iommufd_device *idev`` Device returned by iommufd_device_bind() **Description** Release the device from iommufd control. The DMA ownership will return back to unowned with DMA controlled by the DMA API. This invalidates the iommufd_device pointer, other APIs that consume it must not be called concurrently.h](h)}(h**Parameters**h]j>)}(hj|h]h Parameters}(hj|hhhNhNubah}(h]h ]h"]h$]h&]uh1j=hj|ubah}(h]h ]h"]h$]h&]uh1hhe/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:345: ./drivers/iommu/iommufd/device.chMJhj|ubj0 )}(hhh]j5 )}(hI``struct iommufd_device *idev`` Device returned by iommufd_device_bind() h](j; )}(h``struct iommufd_device *idev``h]jA )}(hj|h]hstruct iommufd_device *idev}(hj|hhhNhNubah}(h]h ]h"]h$]h&]uh1j@ hj|ubah}(h]h ]h"]h$]h&]uh1j: he/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:345: ./drivers/iommu/iommufd/device.chMGhj|ubjW )}(hhh]h)}(h(Device returned by iommufd_device_bind()h]h(Device returned by iommufd_device_bind()}(hj|hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj|hMGhj|ubah}(h]h ]h"]h$]h&]uh1jV hj|ubeh}(h]h ]h"]h$]h&]uh1j4 hj|hMGhj|ubah}(h]h ]h"]h$]h&]uh1j/ hj|ubh)}(h**Description**h]j>)}(hj}h]h Description}(hj }hhhNhNubah}(h]h ]h"]h$]h&]uh1j=hj}ubah}(h]h ]h"]h$]h&]uh1hhe/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:345: ./drivers/iommu/iommufd/device.chMIhj|ubh)}(hRelease the device from iommufd control. The DMA ownership will return back to unowned with DMA controlled by the DMA API. This invalidates the iommufd_device pointer, other APIs that consume it must not be called concurrently.h]hRelease the device from iommufd control. The DMA ownership will return back to unowned with DMA controlled by the DMA API. This invalidates the iommufd_device pointer, other APIs that consume it must not be called concurrently.}(hj}hhhNhNubah}(h]h ]h"]h$]h&]uh1hhe/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:345: ./drivers/iommu/iommufd/device.chMHhj|ubeh}(h]h ] kernelindentah"]h$]h&]uh1jhj7vhhhNhNubjG)}(hhh]h}(h]h ]h"]h$]h&]entries](jS"iommufd_device_attach (C function)c.iommufd_device_attachhNtauh1jFhj7vhhhNhNubjX)}(hhh](j])}(hSint iommufd_device_attach (struct iommufd_device *idev, ioasid_t pasid, u32 *pt_id)h]jc)}(hRint iommufd_device_attach(struct iommufd_device *idev, ioasid_t pasid, u32 *pt_id)h](jy)}(hinth]hint}(hjL}hhhNhNubah}(h]h ]jyah"]h$]h&]uh1jyhjH}hhhe/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:345: ./drivers/iommu/iommufd/device.chMubj{)}(h h]h }(hj[}hhhNhNubah}(h]h ]jah"]h$]h&]uh1jzhjH}hhhjZ}hMubj)}(hiommufd_device_attachh]j)}(hiommufd_device_attachh]hiommufd_device_attach}(hjm}hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhji}ubah}(h]h ](jjeh"]h$]h&]hhuh1jhjH}hhhjZ}hMubjv)}(h9(struct iommufd_device *idev, ioasid_t pasid, u32 *pt_id)h](jv)}(hstruct iommufd_device *idevh](ji)}(hjlh]hstruct}(hj}hhhNhNubah}(h]h ]juah"]h$]h&]uh1jhhj}ubj{)}(h h]h }(hj}hhhNhNubah}(h]h ]jah"]h$]h&]uh1jzhj}ubh)}(hhh]j)}(hiommufd_deviceh]hiommufd_device}(hj}hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj}ubah}(h]h ]h"]h$]h&] refdomainjreftypejv reftargetj}modnameN classnameNjvjv)}jv]jv)}jvjo}sbc.iommufd_device_attachasbuh1hhj}ubj{)}(h h]h }(hj}hhhNhNubah}(h]h ]jah"]h$]h&]uh1jzhj}ubjv)}(hjh]h*}(hj}hhhNhNubah}(h]h ]jvah"]h$]h&]uh1jvhj}ubj)}(hidevh]hidev}(hj}hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj}ubeh}(h]h ]h"]h$]h&]noemphhhuh1jvhj}ubjv)}(hioasid_t pasidh](h)}(hhh]j)}(hioasid_th]hioasid_t}(hj}hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj}ubah}(h]h ]h"]h$]h&] refdomainjreftypejv reftargetj~modnameN classnameNjvjv)}jv]j}c.iommufd_device_attachasbuh1hhj}ubj{)}(h h]h }(hj~hhhNhNubah}(h]h ]jah"]h$]h&]uh1jzhj}ubj)}(hpasidh]hpasid}(hj*~hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj}ubeh}(h]h ]h"]h$]h&]noemphhhuh1jvhj}ubjv)}(h u32 *pt_idh](h)}(hhh]j)}(hu32h]hu32}(hjF~hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjC~ubah}(h]h ]h"]h$]h&] refdomainjreftypejv reftargetjH~modnameN classnameNjvjv)}jv]j}c.iommufd_device_attachasbuh1hhj?~ubj{)}(h h]h }(hjd~hhhNhNubah}(h]h ]jah"]h$]h&]uh1jzhj?~ubjv)}(hjh]h*}(hjr~hhhNhNubah}(h]h ]jvah"]h$]h&]uh1jvhj?~ubj)}(hpt_idh]hpt_id}(hj~hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj?~ubeh}(h]h ]h"]h$]h&]noemphhhuh1jvhj}ubeh}(h]h ]h"]h$]h&]hhuh1jvhjH}hhhjZ}hMubeh}(h]h ]h"]h$]h&]hhjuh1jbjjhjD}hhhjZ}hMubah}(h]j?}ah ](jjeh"]h$]h&]jj)jhuh1j\hjZ}hMhjA}hhubj)}(hhh]h)}(h)Connect a device/pasid to an iommu_domainh]h)Connect a device/pasid to an iommu_domain}(hj~hhhNhNubah}(h]h ]h"]h$]h&]uh1hhe/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:345: ./drivers/iommu/iommufd/device.chMhj~hhubah}(h]h ]h"]h$]h&]uh1jhjA}hhhjZ}hMubeh}(h]h ](jfunctioneh"]h$]h&]jjjj~jj~jjjuh1jWhhhj7vhNhNubj)}(hXB**Parameters** ``struct iommufd_device *idev`` device to attach ``ioasid_t pasid`` pasid to attach ``u32 *pt_id`` Input a IOMMUFD_OBJ_IOAS, or IOMMUFD_OBJ_HWPT_PAGING Output the IOMMUFD_OBJ_HWPT_PAGING ID **Description** This connects the device/pasid to an iommu_domain, either automatically or manually selected. Once this completes the device could do DMA with **pasid**. **pasid** is IOMMU_NO_PASID if this attach is for no pasid usage. The caller should return the resulting pt_id back to userspace. This function is undone by calling iommufd_device_detach().h](h)}(h**Parameters**h]j>)}(hj~h]h Parameters}(hj~hhhNhNubah}(h]h ]h"]h$]h&]uh1j=hj~ubah}(h]h ]h"]h$]h&]uh1hhe/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:345: ./drivers/iommu/iommufd/device.chMhj~ubj0 )}(hhh](j5 )}(h1``struct iommufd_device *idev`` device to attach h](j; )}(h``struct iommufd_device *idev``h]jA )}(hj~h]hstruct iommufd_device *idev}(hj~hhhNhNubah}(h]h ]h"]h$]h&]uh1j@ hj~ubah}(h]h ]h"]h$]h&]uh1j: he/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:345: ./drivers/iommu/iommufd/device.chMhj~ubjW )}(hhh]h)}(hdevice to attachh]hdevice to attach}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhj~hMhjubah}(h]h ]h"]h$]h&]uh1jV hj~ubeh}(h]h ]h"]h$]h&]uh1j4 hj~hMhj~ubj5 )}(h#``ioasid_t pasid`` pasid to attach h](j; )}(h``ioasid_t pasid``h]jA )}(hj#h]hioasid_t pasid}(hj%hhhNhNubah}(h]h ]h"]h$]h&]uh1j@ hj!ubah}(h]h ]h"]h$]h&]uh1j: he/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:345: ./drivers/iommu/iommufd/device.chMhjubjW )}(hhh]h)}(hpasid to attachh]hpasid to attach}(hj<hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj8hMhj9ubah}(h]h ]h"]h$]h&]uh1jV hjubeh}(h]h ]h"]h$]h&]uh1j4 hj8hMhj~ubj5 )}(hj``u32 *pt_id`` Input a IOMMUFD_OBJ_IOAS, or IOMMUFD_OBJ_HWPT_PAGING Output the IOMMUFD_OBJ_HWPT_PAGING ID h](j; )}(h``u32 *pt_id``h]jA )}(hj\h]h u32 *pt_id}(hj^hhhNhNubah}(h]h ]h"]h$]h&]uh1j@ hjZubah}(h]h ]h"]h$]h&]uh1j: he/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:345: ./drivers/iommu/iommufd/device.chMhjVubjW )}(hhh]h)}(hZInput a IOMMUFD_OBJ_IOAS, or IOMMUFD_OBJ_HWPT_PAGING Output the IOMMUFD_OBJ_HWPT_PAGING IDh]hZInput a IOMMUFD_OBJ_IOAS, or IOMMUFD_OBJ_HWPT_PAGING Output the IOMMUFD_OBJ_HWPT_PAGING ID}(hjuhhhNhNubah}(h]h ]h"]h$]h&]uh1hhe/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:345: ./drivers/iommu/iommufd/device.chMhjrubah}(h]h ]h"]h$]h&]uh1jV hjVubeh}(h]h ]h"]h$]h&]uh1j4 hjqhMhj~ubeh}(h]h ]h"]h$]h&]uh1j/ hj~ubh)}(h**Description**h]j>)}(hjh]h Description}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j=hjubah}(h]h ]h"]h$]h&]uh1hhe/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:345: ./drivers/iommu/iommufd/device.chMhj~ubh)}(hThis connects the device/pasid to an iommu_domain, either automatically or manually selected. Once this completes the device could do DMA with **pasid**. **pasid** is IOMMU_NO_PASID if this attach is for no pasid usage.h](hThis connects the device/pasid to an iommu_domain, either automatically or manually selected. Once this completes the device could do DMA with }(hjhhhNhNubj>)}(h **pasid**h]hpasid}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j=hjubh. }(hjhhhNhNubj>)}(h **pasid**h]hpasid}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j=hjubh8 is IOMMU_NO_PASID if this attach is for no pasid usage.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhe/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:345: ./drivers/iommu/iommufd/device.chMhj~ubh)}(h{The caller should return the resulting pt_id back to userspace. This function is undone by calling iommufd_device_detach().h]h{The caller should return the resulting pt_id back to userspace. This function is undone by calling iommufd_device_detach().}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhe/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:345: ./drivers/iommu/iommufd/device.chMhj~ubeh}(h]h ] kernelindentah"]h$]h&]uh1jhj7vhhhNhNubjG)}(hhh]h}(h]h ]h"]h$]h&]entries](jS#iommufd_device_replace (C function)c.iommufd_device_replacehNtauh1jFhj7vhhhNhNubjX)}(hhh](j])}(hTint iommufd_device_replace (struct iommufd_device *idev, ioasid_t pasid, u32 *pt_id)h]jc)}(hSint iommufd_device_replace(struct iommufd_device *idev, ioasid_t pasid, u32 *pt_id)h](jy)}(hinth]hint}(hjhhhNhNubah}(h]h ]jyah"]h$]h&]uh1jyhj hhhe/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:345: ./drivers/iommu/iommufd/device.chMubj{)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jzhj hhhjhMubj)}(hiommufd_device_replaceh]j)}(hiommufd_device_replaceh]hiommufd_device_replace}(hj1hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj-ubah}(h]h ](jjeh"]h$]h&]hhuh1jhj hhhjhMubjv)}(h9(struct iommufd_device *idev, ioasid_t pasid, u32 *pt_id)h](jv)}(hstruct iommufd_device *idevh](ji)}(hjlh]hstruct}(hjMhhhNhNubah}(h]h ]juah"]h$]h&]uh1jhhjIubj{)}(h h]h }(hjZhhhNhNubah}(h]h ]jah"]h$]h&]uh1jzhjIubh)}(hhh]j)}(hiommufd_deviceh]hiommufd_device}(hjkhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjhubah}(h]h ]h"]h$]h&] refdomainjreftypejv reftargetjmmodnameN classnameNjvjv)}jv]jv)}jvj3sbc.iommufd_device_replaceasbuh1hhjIubj{)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jzhjIubjv)}(hjh]h*}(hjhhhNhNubah}(h]h ]jvah"]h$]h&]uh1jvhjIubj)}(hidevh]hidev}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjIubeh}(h]h ]h"]h$]h&]noemphhhuh1jvhjEubjv)}(hioasid_t pasidh](h)}(hhh]j)}(hioasid_th]hioasid_t}(hj€hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&] refdomainjreftypejv reftargetjĀmodnameN classnameNjvjv)}jv]jc.iommufd_device_replaceasbuh1hhjubj{)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jzhjubj)}(hpasidh]hpasid}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]noemphhhuh1jvhjEubjv)}(h u32 *pt_idh](h)}(hhh]j)}(hu32h]hu32}(hj hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&] refdomainjreftypejv reftargetj modnameN classnameNjvjv)}jv]jc.iommufd_device_replaceasbuh1hhjubj{)}(h h]h }(hj(hhhNhNubah}(h]h ]jah"]h$]h&]uh1jzhjubjv)}(hjh]h*}(hj6hhhNhNubah}(h]h ]jvah"]h$]h&]uh1jvhjubj)}(hpt_idh]hpt_id}(hjChhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]noemphhhuh1jvhjEubeh}(h]h ]h"]h$]h&]hhuh1jvhj hhhjhMubeh}(h]h ]h"]h$]h&]hhjuh1jbjjhjhhhjhMubah}(h]jah ](jjeh"]h$]h&]jj)jhuh1j\hjhMhjhhubj)}(hhh]h)}(h&Change the device/pasid's iommu_domainh]h(Change the device/pasid’s iommu_domain}(hjmhhhNhNubah}(h]h ]h"]h$]h&]uh1hhe/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:345: ./drivers/iommu/iommufd/device.chMhjjhhubah}(h]h ]h"]h$]h&]uh1jhjhhhjhMubeh}(h]h ](jfunctioneh"]h$]h&]jjjjjjjjjuh1jWhhhj7vhNhNubj)}(hX5**Parameters** ``struct iommufd_device *idev`` device to change ``ioasid_t pasid`` pasid to change ``u32 *pt_id`` Input a IOMMUFD_OBJ_IOAS, or IOMMUFD_OBJ_HWPT_PAGING Output the IOMMUFD_OBJ_HWPT_PAGING ID **Description** This is the same as:: iommufd_device_detach(); iommufd_device_attach(); If it fails then no change is made to the attachment. The iommu driver may implement this so there is no disruption in translation. This can only be called if iommufd_device_attach() has already succeeded. **pasid** is IOMMU_NO_PASID for no pasid usage.h](h)}(h**Parameters**h]j>)}(hjh]h Parameters}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j=hjubah}(h]h ]h"]h$]h&]uh1hhe/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:345: ./drivers/iommu/iommufd/device.chMhjubj0 )}(hhh](j5 )}(h1``struct iommufd_device *idev`` device to change h](j; )}(h``struct iommufd_device *idev``h]jA )}(hjh]hstruct iommufd_device *idev}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j@ hjubah}(h]h ]h"]h$]h&]uh1j: he/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:345: ./drivers/iommu/iommufd/device.chMhjubjW )}(hhh]h)}(hdevice to changeh]hdevice to change}(hjǁhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjÁhMhjāubah}(h]h ]h"]h$]h&]uh1jV hjubeh}(h]h ]h"]h$]h&]uh1j4 hjÁhMhjubj5 )}(h#``ioasid_t pasid`` pasid to change h](j; )}(h``ioasid_t pasid``h]jA )}(hjh]hioasid_t pasid}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j@ hjubah}(h]h ]h"]h$]h&]uh1j: he/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:345: ./drivers/iommu/iommufd/device.chMhjubjW )}(hhh]h)}(hpasid to changeh]hpasid to change}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhMhjubah}(h]h ]h"]h$]h&]uh1jV hjubeh}(h]h ]h"]h$]h&]uh1j4 hjhMhjubj5 )}(hj``u32 *pt_id`` Input a IOMMUFD_OBJ_IOAS, or IOMMUFD_OBJ_HWPT_PAGING Output the IOMMUFD_OBJ_HWPT_PAGING ID h](j; )}(h``u32 *pt_id``h]jA )}(hj h]h u32 *pt_id}(hj"hhhNhNubah}(h]h ]h"]h$]h&]uh1j@ hjubah}(h]h ]h"]h$]h&]uh1j: he/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:345: ./drivers/iommu/iommufd/device.chMhjubjW )}(hhh]h)}(hZInput a IOMMUFD_OBJ_IOAS, or IOMMUFD_OBJ_HWPT_PAGING Output the IOMMUFD_OBJ_HWPT_PAGING IDh]hZInput a IOMMUFD_OBJ_IOAS, or IOMMUFD_OBJ_HWPT_PAGING Output the IOMMUFD_OBJ_HWPT_PAGING ID}(hj9hhhNhNubah}(h]h ]h"]h$]h&]uh1hhe/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:345: ./drivers/iommu/iommufd/device.chMhj6ubah}(h]h ]h"]h$]h&]uh1jV hjubeh}(h]h ]h"]h$]h&]uh1j4 hj5hMhjubeh}(h]h ]h"]h$]h&]uh1j/ hjubh)}(h**Description**h]j>)}(hj\h]h Description}(hj^hhhNhNubah}(h]h ]h"]h$]h&]uh1j=hjZubah}(h]h ]h"]h$]h&]uh1hhe/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:345: ./drivers/iommu/iommufd/device.chMhjubh)}(hThis is the same as::h]hThis is the same as:}(hjrhhhNhNubah}(h]h ]h"]h$]h&]uh1hhe/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:345: ./drivers/iommu/iommufd/device.chMhjubj)}(h1iommufd_device_detach(); iommufd_device_attach();h]h1iommufd_device_detach(); iommufd_device_attach();}hjsbah}(h]h ]h"]h$]h&]hhuh1jhe/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:345: ./drivers/iommu/iommufd/device.chMhjubh)}(hIf it fails then no change is made to the attachment. The iommu driver may implement this so there is no disruption in translation. This can only be called if iommufd_device_attach() has already succeeded. **pasid** is IOMMU_NO_PASID for no pasid usage.h](hIf it fails then no change is made to the attachment. The iommu driver may implement this so there is no disruption in translation. This can only be called if iommufd_device_attach() has already succeeded. }(hjhhhNhNubj>)}(h **pasid**h]hpasid}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j=hjubh& is IOMMU_NO_PASID for no pasid usage.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhe/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:345: ./drivers/iommu/iommufd/device.chMhjubeh}(h]h ] kernelindentah"]h$]h&]uh1jhj7vhhhNhNubjG)}(hhh]h}(h]h ]h"]h$]h&]entries](jS"iommufd_device_detach (C function)c.iommufd_device_detachhNtauh1jFhj7vhhhNhNubjX)}(hhh](j])}(hHvoid iommufd_device_detach (struct iommufd_device *idev, ioasid_t pasid)h]jc)}(hGvoid iommufd_device_detach(struct iommufd_device *idev, ioasid_t pasid)h](jy)}(hvoidh]hvoid}(hjтhhhNhNubah}(h]h ]jyah"]h$]h&]uh1jyhj͂hhhe/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:345: ./drivers/iommu/iommufd/device.chMubj{)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jzhj͂hhhj߂hMubj)}(hiommufd_device_detachh]j)}(hiommufd_device_detachh]hiommufd_device_detach}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubah}(h]h ](jjeh"]h$]h&]hhuh1jhj͂hhhj߂hMubjv)}(h-(struct iommufd_device *idev, ioasid_t pasid)h](jv)}(hstruct iommufd_device *idevh](ji)}(hjlh]hstruct}(hjhhhNhNubah}(h]h ]juah"]h$]h&]uh1jhhj ubj{)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jzhj ubh)}(hhh]j)}(hiommufd_deviceh]hiommufd_device}(hj,hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj)ubah}(h]h ]h"]h$]h&] refdomainjreftypejv reftargetj.modnameN classnameNjvjv)}jv]jv)}jvjsbc.iommufd_device_detachasbuh1hhj ubj{)}(h h]h }(hjLhhhNhNubah}(h]h ]jah"]h$]h&]uh1jzhj ubjv)}(hjh]h*}(hjZhhhNhNubah}(h]h ]jvah"]h$]h&]uh1jvhj ubj)}(hidevh]hidev}(hjghhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj ubeh}(h]h ]h"]h$]h&]noemphhhuh1jvhjubjv)}(hioasid_t pasidh](h)}(hhh]j)}(hioasid_th]hioasid_t}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&] refdomainjreftypejv reftargetjmodnameN classnameNjvjv)}jv]jHc.iommufd_device_detachasbuh1hhj|ubj{)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jzhj|ubj)}(hpasidh]hpasid}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj|ubeh}(h]h ]h"]h$]h&]noemphhhuh1jvhjubeh}(h]h ]h"]h$]h&]hhuh1jvhj͂hhhj߂hMubeh}(h]h ]h"]h$]h&]hhjuh1jbjjhjɂhhhj߂hMubah}(h]jĂah ](jjeh"]h$]h&]jj)jhuh1j\hj߂hMhjƂhhubj)}(hhh]h)}(h-Disconnect a device/device to an iommu_domainh]h-Disconnect a device/device to an iommu_domain}(hjكhhhNhNubah}(h]h ]h"]h$]h&]uh1hhe/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:345: ./drivers/iommu/iommufd/device.chMhjփhhubah}(h]h ]h"]h$]h&]uh1jhjƂhhhj߂hMubeh}(h]h ](jfunctioneh"]h$]h&]jjjjjjjjjuh1jWhhhj7vhNhNubj)}(hX<**Parameters** ``struct iommufd_device *idev`` device to detach ``ioasid_t pasid`` pasid to detach **Description** Undo iommufd_device_attach(). This disconnects the idev from the previously attached pt_id. The device returns back to a blocked DMA translation. **pasid** is IOMMU_NO_PASID for no pasid usage.h](h)}(h**Parameters**h]j>)}(hjh]h Parameters}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j=hjubah}(h]h ]h"]h$]h&]uh1hhe/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:345: ./drivers/iommu/iommufd/device.chMhjubj0 )}(hhh](j5 )}(h1``struct iommufd_device *idev`` device to detach h](j; )}(h``struct iommufd_device *idev``h]jA )}(hjh]hstruct iommufd_device *idev}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j@ hjubah}(h]h ]h"]h$]h&]uh1j: he/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:345: ./drivers/iommu/iommufd/device.chMhjubjW )}(hhh]h)}(hdevice to detachh]hdevice to detach}(hj3hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj/hMhj0ubah}(h]h ]h"]h$]h&]uh1jV hjubeh}(h]h ]h"]h$]h&]uh1j4 hj/hMhjubj5 )}(h#``ioasid_t pasid`` pasid to detach h](j; )}(h``ioasid_t pasid``h]jA )}(hjSh]hioasid_t pasid}(hjUhhhNhNubah}(h]h ]h"]h$]h&]uh1j@ hjQubah}(h]h ]h"]h$]h&]uh1j: he/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:345: ./drivers/iommu/iommufd/device.chMhjMubjW )}(hhh]h)}(hpasid to detachh]hpasid to detach}(hjlhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhhMhjiubah}(h]h ]h"]h$]h&]uh1jV hjMubeh}(h]h ]h"]h$]h&]uh1j4 hjhhMhjubeh}(h]h ]h"]h$]h&]uh1j/ hjubh)}(h**Description**h]j>)}(hjh]h Description}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j=hjubah}(h]h ]h"]h$]h&]uh1hhe/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:345: ./drivers/iommu/iommufd/device.chMhjubh)}(hUndo iommufd_device_attach(). This disconnects the idev from the previously attached pt_id. The device returns back to a blocked DMA translation. **pasid** is IOMMU_NO_PASID for no pasid usage.h](hUndo iommufd_device_attach(). This disconnects the idev from the previously attached pt_id. The device returns back to a blocked DMA translation. }(hjhhhNhNubj>)}(h **pasid**h]hpasid}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j=hjubh& is IOMMU_NO_PASID for no pasid usage.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhe/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:345: ./drivers/iommu/iommufd/device.chMhjubeh}(h]h ] kernelindentah"]h$]h&]uh1jhj7vhhhNhNubjG)}(hhh]h}(h]h ]h"]h$]h&]entries](jS"iommufd_access_create (C function)c.iommufd_access_createhNtauh1jFhj7vhhhNhNubjX)}(hhh](j])}(hstruct iommufd_access * iommufd_access_create (struct iommufd_ctx *ictx, const struct iommufd_access_ops *ops, void *data, u32 *id)h]jc)}(hstruct iommufd_access *iommufd_access_create(struct iommufd_ctx *ictx, const struct iommufd_access_ops *ops, void *data, u32 *id)h](ji)}(hjlh]hstruct}(hjhhhNhNubah}(h]h ]juah"]h$]h&]uh1jhhjhhhe/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:345: ./drivers/iommu/iommufd/device.chMubj{)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jzhjhhhjhMubh)}(hhh]j)}(hiommufd_accessh]hiommufd_access}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&] refdomainjreftypejv reftargetjmodnameN classnameNjvjv)}jv]jv)}jviommufd_access_createsbc.iommufd_access_createasbuh1hhjhhhjhMubj{)}(h h]h }(hj%hhhNhNubah}(h]h ]jah"]h$]h&]uh1jzhjhhhjhMubjv)}(hjh]h*}(hj3hhhNhNubah}(h]h ]jvah"]h$]h&]uh1jvhjhhhjhMubj)}(hiommufd_access_createh]j)}(hj"h]hiommufd_access_create}(hjDhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj@ubah}(h]h ](jjeh"]h$]h&]hhuh1jhjhhhjhMubjv)}(hU(struct iommufd_ctx *ictx, const struct iommufd_access_ops *ops, void *data, u32 *id)h](jv)}(hstruct iommufd_ctx *ictxh](ji)}(hjlh]hstruct}(hj_hhhNhNubah}(h]h ]juah"]h$]h&]uh1jhhj[ubj{)}(h h]h }(hjlhhhNhNubah}(h]h ]jah"]h$]h&]uh1jzhj[ubh)}(hhh]j)}(h iommufd_ctxh]h iommufd_ctx}(hj}hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjzubah}(h]h ]h"]h$]h&] refdomainjreftypejv reftargetjmodnameN classnameNjvjv)}jv]j c.iommufd_access_createasbuh1hhj[ubj{)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jzhj[ubjv)}(hjh]h*}(hjhhhNhNubah}(h]h ]jvah"]h$]h&]uh1jvhj[ubj)}(hictxh]hictx}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj[ubeh}(h]h ]h"]h$]h&]noemphhhuh1jvhjWubjv)}(h$const struct iommufd_access_ops *opsh](ji)}(hconsth]hconst}(hjυhhhNhNubah}(h]h ]juah"]h$]h&]uh1jhhj˅ubj{)}(h h]h }(hj݅hhhNhNubah}(h]h ]jah"]h$]h&]uh1jzhj˅ubji)}(hjlh]hstruct}(hjhhhNhNubah}(h]h ]juah"]h$]h&]uh1jhhj˅ubj{)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jzhj˅ubh)}(hhh]j)}(hiommufd_access_opsh]hiommufd_access_ops}(hj hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&] refdomainjreftypejv reftargetj modnameN classnameNjvjv)}jv]j c.iommufd_access_createasbuh1hhj˅ubj{)}(h h]h }(hj'hhhNhNubah}(h]h ]jah"]h$]h&]uh1jzhj˅ubjv)}(hjh]h*}(hj5hhhNhNubah}(h]h ]jvah"]h$]h&]uh1jvhj˅ubj)}(hopsh]hops}(hjBhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj˅ubeh}(h]h ]h"]h$]h&]noemphhhuh1jvhjWubjv)}(h void *datah](jy)}(hvoidh]hvoid}(hj[hhhNhNubah}(h]h ]jyah"]h$]h&]uh1jyhjWubj{)}(h h]h }(hjihhhNhNubah}(h]h ]jah"]h$]h&]uh1jzhjWubjv)}(hjh]h*}(hjwhhhNhNubah}(h]h ]jvah"]h$]h&]uh1jvhjWubj)}(hdatah]hdata}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjWubeh}(h]h ]h"]h$]h&]noemphhhuh1jvhjWubjv)}(hu32 *idh](h)}(hhh]j)}(hu32h]hu32}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&] refdomainjreftypejv reftargetjmodnameN classnameNjvjv)}jv]j c.iommufd_access_createasbuh1hhjubj{)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jzhjubjv)}(hjh]h*}(hj̆hhhNhNubah}(h]h ]jvah"]h$]h&]uh1jvhjubj)}(hidh]hid}(hjنhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]noemphhhuh1jvhjWubeh}(h]h ]h"]h$]h&]hhuh1jvhjhhhjhMubeh}(h]h ]h"]h$]h&]hhjuh1jbjjhj݄hhhjhMubah}(h]j؄ah ](jjeh"]h$]h&]jj)jhuh1j\hjhMhjڄhhubj)}(hhh]h)}(hCreate an iommufd_accessh]hCreate an iommufd_access}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhe/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:345: ./drivers/iommu/iommufd/device.chMhjhhubah}(h]h ]h"]h$]h&]uh1jhjڄhhhjhMubeh}(h]h ](jfunctioneh"]h$]h&]jjjjjjjjjuh1jWhhhj7vhNhNubj)}(hX0**Parameters** ``struct iommufd_ctx *ictx`` iommufd file descriptor ``const struct iommufd_access_ops *ops`` Driver's ops to associate with the access ``void *data`` Opaque data to pass into ops functions ``u32 *id`` Output ID number to return to userspace for this access **Description** An iommufd_access allows a driver to read/write to the IOAS without using DMA. The underlying CPU memory can be accessed using the iommufd_access_pin_pages() or iommufd_access_rw() functions. The provided ops are required to use iommufd_access_pin_pages().h](h)}(h**Parameters**h]j>)}(hj%h]h Parameters}(hj'hhhNhNubah}(h]h ]h"]h$]h&]uh1j=hj#ubah}(h]h ]h"]h$]h&]uh1hhe/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:345: ./drivers/iommu/iommufd/device.chMhjubj0 )}(hhh](j5 )}(h5``struct iommufd_ctx *ictx`` iommufd file descriptor h](j; )}(h``struct iommufd_ctx *ictx``h]jA )}(hjDh]hstruct iommufd_ctx *ictx}(hjFhhhNhNubah}(h]h ]h"]h$]h&]uh1j@ hjBubah}(h]h ]h"]h$]h&]uh1j: he/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:345: ./drivers/iommu/iommufd/device.chMhj>ubjW )}(hhh]h)}(hiommufd file descriptorh]hiommufd file descriptor}(hj]hhhNhNubah}(h]h ]h"]h$]h&]uh1hhjYhMhjZubah}(h]h ]h"]h$]h&]uh1jV hj>ubeh}(h]h ]h"]h$]h&]uh1j4 hjYhMhj;ubj5 )}(hS``const struct iommufd_access_ops *ops`` Driver's ops to associate with the access h](j; )}(h(``const struct iommufd_access_ops *ops``h]jA )}(hj}h]h$const struct iommufd_access_ops *ops}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j@ hj{ubah}(h]h ]h"]h$]h&]uh1j: he/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:345: ./drivers/iommu/iommufd/device.chMhjwubjW )}(hhh]h)}(h)Driver's ops to associate with the accessh]h+Driver’s ops to associate with the access}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhMhjubah}(h]h ]h"]h$]h&]uh1jV hjwubeh}(h]h ]h"]h$]h&]uh1j4 hjhMhj;ubj5 )}(h6``void *data`` Opaque data to pass into ops functions h](j; )}(h``void *data``h]jA )}(hjh]h void *data}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j@ hjubah}(h]h ]h"]h$]h&]uh1j: he/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:345: ./drivers/iommu/iommufd/device.chMhjubjW )}(hhh]h)}(h&Opaque data to pass into ops functionsh]h&Opaque data to pass into ops functions}(hjχhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjˇhMhj̇ubah}(h]h ]h"]h$]h&]uh1jV hjubeh}(h]h ]h"]h$]h&]uh1j4 hjˇhMhj;ubj5 )}(hD``u32 *id`` Output ID number to return to userspace for this access h](j; )}(h ``u32 *id``h]jA )}(hjh]hu32 *id}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j@ hjubah}(h]h ]h"]h$]h&]uh1j: he/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:345: ./drivers/iommu/iommufd/device.chMhjubjW )}(hhh]h)}(h7Output ID number to return to userspace for this accessh]h7Output ID number to return to userspace for this access}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhMhjubah}(h]h ]h"]h$]h&]uh1jV hjubeh}(h]h ]h"]h$]h&]uh1j4 hjhMhj;ubeh}(h]h ]h"]h$]h&]uh1j/ hjubh)}(h**Description**h]j>)}(hj*h]h Description}(hj,hhhNhNubah}(h]h ]h"]h$]h&]uh1j=hj(ubah}(h]h ]h"]h$]h&]uh1hhe/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:345: ./drivers/iommu/iommufd/device.chMhjubh)}(hAn iommufd_access allows a driver to read/write to the IOAS without using DMA. The underlying CPU memory can be accessed using the iommufd_access_pin_pages() or iommufd_access_rw() functions.h]hAn iommufd_access allows a driver to read/write to the IOAS without using DMA. The underlying CPU memory can be accessed using the iommufd_access_pin_pages() or iommufd_access_rw() functions.}(hj@hhhNhNubah}(h]h ]h"]h$]h&]uh1hhe/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:345: ./drivers/iommu/iommufd/device.chMhjubh)}(h@The provided ops are required to use iommufd_access_pin_pages().h]h@The provided ops are required to use iommufd_access_pin_pages().}(hjOhhhNhNubah}(h]h ]h"]h$]h&]uh1hhe/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:345: ./drivers/iommu/iommufd/device.chMhjubeh}(h]h ] kernelindentah"]h$]h&]uh1jhj7vhhhNhNubjG)}(hhh]h}(h]h ]h"]h$]h&]entries](jS#iommufd_access_destroy (C function)c.iommufd_access_destroyhNtauh1jFhj7vhhhNhNubjX)}(hhh](j])}(h;void iommufd_access_destroy (struct iommufd_access *access)h]jc)}(h:void iommufd_access_destroy(struct iommufd_access *access)h](jy)}(hvoidh]hvoid}(hj~hhhNhNubah}(h]h ]jyah"]h$]h&]uh1jyhjzhhhe/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:345: ./drivers/iommu/iommufd/device.chMubj{)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jzhjzhhhjhMubj)}(hiommufd_access_destroyh]j)}(hiommufd_access_destroyh]hiommufd_access_destroy}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubah}(h]h ](jjeh"]h$]h&]hhuh1jhjzhhhjhMubjv)}(h(struct iommufd_access *access)h]jv)}(hstruct iommufd_access *accessh](ji)}(hjlh]hstruct}(hjhhhNhNubah}(h]h ]juah"]h$]h&]uh1jhhjubj{)}(h h]h }(hjȈhhhNhNubah}(h]h ]jah"]h$]h&]uh1jzhjubh)}(hhh]j)}(hiommufd_accessh]hiommufd_access}(hjوhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjֈubah}(h]h ]h"]h$]h&] refdomainjreftypejv reftargetjۈmodnameN classnameNjvjv)}jv]jv)}jvjsbc.iommufd_access_destroyasbuh1hhjubj{)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jzhjubjv)}(hjh]h*}(hjhhhNhNubah}(h]h ]jvah"]h$]h&]uh1jvhjubj)}(haccessh]haccess}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]noemphhhuh1jvhjubah}(h]h ]h"]h$]h&]hhuh1jvhjzhhhjhMubeh}(h]h ]h"]h$]h&]hhjuh1jbjjhjvhhhjhMubah}(h]jqah ](jjeh"]h$]h&]jj)jhuh1j\hjhMhjshhubj)}(hhh]h)}(hDestroy an iommufd_accessh]hDestroy an iommufd_access}(hj>hhhNhNubah}(h]h ]h"]h$]h&]uh1hhe/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:345: ./drivers/iommu/iommufd/device.chMhj;hhubah}(h]h ]h"]h$]h&]uh1jhjshhhjhMubeh}(h]h ](jfunctioneh"]h$]h&]jjjjVjjVjjjuh1jWhhhj7vhNhNubj)}(h**Parameters** ``struct iommufd_access *access`` The access to destroy **Description** The caller must stop using the access before destroying it.h](h)}(h**Parameters**h]j>)}(hj`h]h Parameters}(hjbhhhNhNubah}(h]h ]h"]h$]h&]uh1j=hj^ubah}(h]h ]h"]h$]h&]uh1hhe/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:345: ./drivers/iommu/iommufd/device.chMhjZubj0 )}(hhh]j5 )}(h8``struct iommufd_access *access`` The access to destroy h](j; )}(h!``struct iommufd_access *access``h]jA )}(hjh]hstruct iommufd_access *access}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j@ hj}ubah}(h]h ]h"]h$]h&]uh1j: he/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:345: ./drivers/iommu/iommufd/device.chMhjyubjW )}(hhh]h)}(hThe access to destroyh]hThe access to destroy}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhMhjubah}(h]h ]h"]h$]h&]uh1jV hjyubeh}(h]h ]h"]h$]h&]uh1j4 hjhMhjvubah}(h]h ]h"]h$]h&]uh1j/ hjZubh)}(h**Description**h]j>)}(hjh]h Description}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j=hjubah}(h]h ]h"]h$]h&]uh1hhe/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:345: ./drivers/iommu/iommufd/device.chMhjZubh)}(h;The caller must stop using the access before destroying it.h]h;The caller must stop using the access before destroying it.}(hjЉhhhNhNubah}(h]h ]h"]h$]h&]uh1hhe/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:345: ./drivers/iommu/iommufd/device.chMhjZubeh}(h]h ] kernelindentah"]h$]h&]uh1jhj7vhhhNhNubjG)}(hhh]h}(h]h ]h"]h$]h&]entries](jS'iommufd_access_unpin_pages (C function)c.iommufd_access_unpin_pageshNtauh1jFhj7vhhhNhNubjX)}(hhh](j])}(hivoid iommufd_access_unpin_pages (struct iommufd_access *access, unsigned long iova, unsigned long length)h]jc)}(hhvoid iommufd_access_unpin_pages(struct iommufd_access *access, unsigned long iova, unsigned long length)h](jy)}(hvoidh]hvoid}(hjhhhNhNubah}(h]h ]jyah"]h$]h&]uh1jyhjhhhe/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:345: ./drivers/iommu/iommufd/device.chM,ubj{)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jzhjhhhj hM,ubj)}(hiommufd_access_unpin_pagesh]j)}(hiommufd_access_unpin_pagesh]hiommufd_access_unpin_pages}(hj hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubah}(h]h ](jjeh"]h$]h&]hhuh1jhjhhhj hM,ubjv)}(hI(struct iommufd_access *access, unsigned long iova, unsigned long length)h](jv)}(hstruct iommufd_access *accessh](ji)}(hjlh]hstruct}(hj<hhhNhNubah}(h]h ]juah"]h$]h&]uh1jhhj8ubj{)}(h h]h }(hjIhhhNhNubah}(h]h ]jah"]h$]h&]uh1jzhj8ubh)}(hhh]j)}(hiommufd_accessh]hiommufd_access}(hjZhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjWubah}(h]h ]h"]h$]h&] refdomainjreftypejv reftargetj\modnameN classnameNjvjv)}jv]jv)}jvj"sbc.iommufd_access_unpin_pagesasbuh1hhj8ubj{)}(h h]h }(hjzhhhNhNubah}(h]h ]jah"]h$]h&]uh1jzhj8ubjv)}(hjh]h*}(hjhhhNhNubah}(h]h ]jvah"]h$]h&]uh1jvhj8ubj)}(haccessh]haccess}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj8ubeh}(h]h ]h"]h$]h&]noemphhhuh1jvhj4ubjv)}(hunsigned long iovah](jy)}(hunsignedh]hunsigned}(hjhhhNhNubah}(h]h ]jyah"]h$]h&]uh1jyhjubj{)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jzhjubjy)}(hlongh]hlong}(hjʊhhhNhNubah}(h]h ]jyah"]h$]h&]uh1jyhjubj{)}(h h]h }(hj؊hhhNhNubah}(h]h ]jah"]h$]h&]uh1jzhjubj)}(hiovah]hiova}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]noemphhhuh1jvhj4ubjv)}(hunsigned long lengthh](jy)}(hunsignedh]hunsigned}(hjhhhNhNubah}(h]h ]jyah"]h$]h&]uh1jyhjubj{)}(h h]h }(hj hhhNhNubah}(h]h ]jah"]h$]h&]uh1jzhjubjy)}(hlongh]hlong}(hjhhhNhNubah}(h]h ]jyah"]h$]h&]uh1jyhjubj{)}(h h]h }(hj)hhhNhNubah}(h]h ]jah"]h$]h&]uh1jzhjubj)}(hlengthh]hlength}(hj7hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]noemphhhuh1jvhj4ubeh}(h]h ]h"]h$]h&]hhuh1jvhjhhhj hM,ubeh}(h]h ]h"]h$]h&]hhjuh1jbjjhjhhhj hM,ubah}(h]jah ](jjeh"]h$]h&]jj)jhuh1j\hj hM,hjhhubj)}(hhh]h)}(hUndo iommufd_access_pin_pagesh]hUndo iommufd_access_pin_pages}(hjahhhNhNubah}(h]h ]h"]h$]h&]uh1hhe/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:345: ./drivers/iommu/iommufd/device.chM,hj^hhubah}(h]h ]h"]h$]h&]uh1jhjhhhj hM,ubeh}(h]h ](jfunctioneh"]h$]h&]jjjjyjjyjjjuh1jWhhhj7vhNhNubj)}(hXQ**Parameters** ``struct iommufd_access *access`` IOAS access to act on ``unsigned long iova`` Starting IOVA ``unsigned long length`` Number of bytes to access **Description** Return the struct page's. The caller must stop accessing them before calling this. The iova/length must exactly match the one provided to access_pages.h](h)}(h**Parameters**h]j>)}(hjh]h Parameters}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j=hjubah}(h]h ]h"]h$]h&]uh1hhe/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:345: ./drivers/iommu/iommufd/device.chM0hj}ubj0 )}(hhh](j5 )}(h8``struct iommufd_access *access`` IOAS access to act on h](j; )}(h!``struct iommufd_access *access``h]jA )}(hjh]hstruct iommufd_access *access}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j@ hjubah}(h]h ]h"]h$]h&]uh1j: he/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:345: ./drivers/iommu/iommufd/device.chM-hjubjW )}(hhh]h)}(hIOAS access to act onh]hIOAS access to act on}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhM-hjubah}(h]h ]h"]h$]h&]uh1jV hjubeh}(h]h ]h"]h$]h&]uh1j4 hjhM-hjubj5 )}(h%``unsigned long iova`` Starting IOVA h](j; )}(h``unsigned long iova``h]jA )}(hjۋh]hunsigned long iova}(hj݋hhhNhNubah}(h]h ]h"]h$]h&]uh1j@ hjًubah}(h]h ]h"]h$]h&]uh1j: he/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:345: ./drivers/iommu/iommufd/device.chM.hjՋubjW )}(hhh]h)}(h Starting IOVAh]h Starting IOVA}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhM.hjubah}(h]h ]h"]h$]h&]uh1jV hjՋubeh}(h]h ]h"]h$]h&]uh1j4 hjhM.hjubj5 )}(h3``unsigned long length`` Number of bytes to access h](j; )}(h``unsigned long length``h]jA )}(hjh]hunsigned long length}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j@ hjubah}(h]h ]h"]h$]h&]uh1j: he/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:345: ./drivers/iommu/iommufd/device.chM/hjubjW )}(hhh]h)}(hNumber of bytes to accessh]hNumber of bytes to access}(hj-hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj)hM/hj*ubah}(h]h ]h"]h$]h&]uh1jV hjubeh}(h]h ]h"]h$]h&]uh1j4 hj)hM/hjubeh}(h]h ]h"]h$]h&]uh1j/ hj}ubh)}(h**Description**h]j>)}(hjOh]h Description}(hjQhhhNhNubah}(h]h ]h"]h$]h&]uh1j=hjMubah}(h]h ]h"]h$]h&]uh1hhe/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:345: ./drivers/iommu/iommufd/device.chM1hj}ubh)}(hReturn the struct page's. The caller must stop accessing them before calling this. The iova/length must exactly match the one provided to access_pages.h]hReturn the struct page’s. The caller must stop accessing them before calling this. The iova/length must exactly match the one provided to access_pages.}(hjehhhNhNubah}(h]h ]h"]h$]h&]uh1hhe/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:345: ./drivers/iommu/iommufd/device.chM0hj}ubeh}(h]h ] kernelindentah"]h$]h&]uh1jhj7vhhhNhNubjG)}(hhh]h}(h]h ]h"]h$]h&]entries](jS%iommufd_access_pin_pages (C function)c.iommufd_access_pin_pageshNtauh1jFhj7vhhhNhNubjX)}(hhh](j])}(hint iommufd_access_pin_pages (struct iommufd_access *access, unsigned long iova, unsigned long length, struct page **out_pages, unsigned int flags)h]jc)}(hint iommufd_access_pin_pages(struct iommufd_access *access, unsigned long iova, unsigned long length, struct page **out_pages, unsigned int flags)h](jy)}(hinth]hint}(hjhhhNhNubah}(h]h ]jyah"]h$]h&]uh1jyhjhhhe/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:345: ./drivers/iommu/iommufd/device.chMnubj{)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jzhjhhhjhMnubj)}(hiommufd_access_pin_pagesh]j)}(hiommufd_access_pin_pagesh]hiommufd_access_pin_pages}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubah}(h]h ](jjeh"]h$]h&]hhuh1jhjhhhjhMnubjv)}(hv(struct iommufd_access *access, unsigned long iova, unsigned long length, struct page **out_pages, unsigned int flags)h](jv)}(hstruct iommufd_access *accessh](ji)}(hjlh]hstruct}(hjьhhhNhNubah}(h]h ]juah"]h$]h&]uh1jhhj͌ubj{)}(h h]h }(hjތhhhNhNubah}(h]h ]jah"]h$]h&]uh1jzhj͌ubh)}(hhh]j)}(hiommufd_accessh]hiommufd_access}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&] refdomainjreftypejv reftargetjmodnameN classnameNjvjv)}jv]jv)}jvjsbc.iommufd_access_pin_pagesasbuh1hhj͌ubj{)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jzhj͌ubjv)}(hjh]h*}(hjhhhNhNubah}(h]h ]jvah"]h$]h&]uh1jvhj͌ubj)}(haccessh]haccess}(hj*hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj͌ubeh}(h]h ]h"]h$]h&]noemphhhuh1jvhjɌubjv)}(hunsigned long iovah](jy)}(hunsignedh]hunsigned}(hjChhhNhNubah}(h]h ]jyah"]h$]h&]uh1jyhj?ubj{)}(h h]h }(hjQhhhNhNubah}(h]h ]jah"]h$]h&]uh1jzhj?ubjy)}(hlongh]hlong}(hj_hhhNhNubah}(h]h ]jyah"]h$]h&]uh1jyhj?ubj{)}(h h]h }(hjmhhhNhNubah}(h]h ]jah"]h$]h&]uh1jzhj?ubj)}(hiovah]hiova}(hj{hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj?ubeh}(h]h ]h"]h$]h&]noemphhhuh1jvhjɌubjv)}(hunsigned long lengthh](jy)}(hunsignedh]hunsigned}(hjhhhNhNubah}(h]h ]jyah"]h$]h&]uh1jyhjubj{)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jzhjubjy)}(hlongh]hlong}(hjhhhNhNubah}(h]h ]jyah"]h$]h&]uh1jyhjubj{)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jzhjubj)}(hlengthh]hlength}(hj̍hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]noemphhhuh1jvhjɌubjv)}(hstruct page **out_pagesh](ji)}(hjlh]hstruct}(hjhhhNhNubah}(h]h ]juah"]h$]h&]uh1jhhjubj{)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jzhjubh)}(hhh]j)}(hpageh]hpage}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&] refdomainjreftypejv reftargetjmodnameN classnameNjvjv)}jv]j c.iommufd_access_pin_pagesasbuh1hhjubj{)}(h h]h }(hj!hhhNhNubah}(h]h ]jah"]h$]h&]uh1jzhjubjv)}(hjh]h*}(hj/hhhNhNubah}(h]h ]jvah"]h$]h&]uh1jvhjubjv)}(hjh]h*}(hj<hhhNhNubah}(h]h ]jvah"]h$]h&]uh1jvhjubj)}(h out_pagesh]h out_pages}(hjIhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]noemphhhuh1jvhjɌubjv)}(hunsigned int flagsh](jy)}(hunsignedh]hunsigned}(hjbhhhNhNubah}(h]h ]jyah"]h$]h&]uh1jyhj^ubj{)}(h h]h }(hjphhhNhNubah}(h]h ]jah"]h$]h&]uh1jzhj^ubjy)}(hinth]hint}(hj~hhhNhNubah}(h]h ]jyah"]h$]h&]uh1jyhj^ubj{)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jzhj^ubj)}(hflagsh]hflags}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj^ubeh}(h]h ]h"]h$]h&]noemphhhuh1jvhjɌubeh}(h]h ]h"]h$]h&]hhuh1jvhjhhhjhMnubeh}(h]h ]h"]h$]h&]hhjuh1jbjjhjhhhjhMnubah}(h]jah ](jjeh"]h$]h&]jj)jhuh1j\hjhMnhjhhubj)}(hhh]h)}(h%Return a list of pages under the iovah]h%Return a list of pages under the iova}(hjĎhhhNhNubah}(h]h ]h"]h$]h&]uh1hhe/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:345: ./drivers/iommu/iommufd/device.chMnhjhhubah}(h]h ]h"]h$]h&]uh1jhjhhhjhMnubeh}(h]h ](jfunctioneh"]h$]h&]jjjj܎jj܎jjjuh1jWhhhj7vhNhNubj)}(hX**Parameters** ``struct iommufd_access *access`` IOAS access to act on ``unsigned long iova`` Starting IOVA ``unsigned long length`` Number of bytes to access ``struct page **out_pages`` Output page list ``unsigned int flags`` IOPMMUFD_ACCESS_RW_* flags **Description** Reads **length** bytes starting at iova and returns the struct page * pointers. These can be kmap'd by the caller for CPU access. The caller must perform iommufd_access_unpin_pages() when done to balance this. This API always requires a page aligned iova. This happens naturally if the ioas alignment is >= PAGE_SIZE and the iova is PAGE_SIZE aligned. However smaller alignments have corner cases where this API can fail on otherwise aligned iova.h](h)}(h**Parameters**h]j>)}(hjh]h Parameters}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j=hjubah}(h]h ]h"]h$]h&]uh1hhe/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:345: ./drivers/iommu/iommufd/device.chMrhjubj0 )}(hhh](j5 )}(h8``struct iommufd_access *access`` IOAS access to act on h](j; )}(h!``struct iommufd_access *access``h]jA )}(hjh]hstruct iommufd_access *access}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j@ hjubah}(h]h ]h"]h$]h&]uh1j: he/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:345: ./drivers/iommu/iommufd/device.chMohjubjW )}(hhh]h)}(hIOAS access to act onh]hIOAS access to act on}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhMohjubah}(h]h ]h"]h$]h&]uh1jV hjubeh}(h]h ]h"]h$]h&]uh1j4 hjhMohjubj5 )}(h%``unsigned long iova`` Starting IOVA h](j; )}(h``unsigned long iova``h]jA )}(hj>h]hunsigned long iova}(hj@hhhNhNubah}(h]h ]h"]h$]h&]uh1j@ hj<ubah}(h]h ]h"]h$]h&]uh1j: he/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:345: ./drivers/iommu/iommufd/device.chMphj8ubjW )}(hhh]h)}(h Starting IOVAh]h Starting IOVA}(hjWhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjShMphjTubah}(h]h ]h"]h$]h&]uh1jV hj8ubeh}(h]h ]h"]h$]h&]uh1j4 hjShMphjubj5 )}(h3``unsigned long length`` Number of bytes to access h](j; )}(h``unsigned long length``h]jA )}(hjwh]hunsigned long length}(hjyhhhNhNubah}(h]h ]h"]h$]h&]uh1j@ hjuubah}(h]h ]h"]h$]h&]uh1j: he/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:345: ./drivers/iommu/iommufd/device.chMqhjqubjW )}(hhh]h)}(hNumber of bytes to accessh]hNumber of bytes to access}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhMqhjubah}(h]h ]h"]h$]h&]uh1jV hjqubeh}(h]h ]h"]h$]h&]uh1j4 hjhMqhjubj5 )}(h-``struct page **out_pages`` Output page list h](j; )}(h``struct page **out_pages``h]jA )}(hjh]hstruct page **out_pages}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j@ hjubah}(h]h ]h"]h$]h&]uh1j: he/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:345: ./drivers/iommu/iommufd/device.chMrhjubjW )}(hhh]h)}(hOutput page listh]hOutput page list}(hjɏhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjŏhMrhjƏubah}(h]h ]h"]h$]h&]uh1jV hjubeh}(h]h ]h"]h$]h&]uh1j4 hjŏhMrhjubj5 )}(h2``unsigned int flags`` IOPMMUFD_ACCESS_RW_* flags h](j; )}(h``unsigned int flags``h]jA )}(hjh]hunsigned int flags}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j@ hjubah}(h]h ]h"]h$]h&]uh1j: he/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:345: ./drivers/iommu/iommufd/device.chMshjubjW )}(hhh]h)}(hIOPMMUFD_ACCESS_RW_* flagsh]hIOPMMUFD_ACCESS_RW_* flags}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhMshjubah}(h]h ]h"]h$]h&]uh1jV hjubeh}(h]h ]h"]h$]h&]uh1j4 hjhMshjubeh}(h]h ]h"]h$]h&]uh1j/ hjubh)}(h**Description**h]j>)}(hj$h]h Description}(hj&hhhNhNubah}(h]h ]h"]h$]h&]uh1j=hj"ubah}(h]h ]h"]h$]h&]uh1hhe/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:345: ./drivers/iommu/iommufd/device.chMuhjubh)}(hReads **length** bytes starting at iova and returns the struct page * pointers. These can be kmap'd by the caller for CPU access.h](hReads }(hj:hhhNhNubj>)}(h **length**h]hlength}(hjBhhhNhNubah}(h]h ]h"]h$]h&]uh1j=hj:ubhs bytes starting at iova and returns the struct page * pointers. These can be kmap’d by the caller for CPU access.}(hj:hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhe/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:345: ./drivers/iommu/iommufd/device.chMthjubh)}(hOThe caller must perform iommufd_access_unpin_pages() when done to balance this.h]hOThe caller must perform iommufd_access_unpin_pages() when done to balance this.}(hj[hhhNhNubah}(h]h ]h"]h$]h&]uh1hhe/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:345: ./drivers/iommu/iommufd/device.chMwhjubh)}(hThis API always requires a page aligned iova. This happens naturally if the ioas alignment is >= PAGE_SIZE and the iova is PAGE_SIZE aligned. However smaller alignments have corner cases where this API can fail on otherwise aligned iova.h]hThis API always requires a page aligned iova. This happens naturally if the ioas alignment is >= PAGE_SIZE and the iova is PAGE_SIZE aligned. However smaller alignments have corner cases where this API can fail on otherwise aligned iova.}(hjjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhe/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:345: ./drivers/iommu/iommufd/device.chMzhjubeh}(h]h ] kernelindentah"]h$]h&]uh1jhj7vhhhNhNubjG)}(hhh]h}(h]h ]h"]h$]h&]entries](jSiommufd_access_rw (C function)c.iommufd_access_rwhNtauh1jFhj7vhhhNhNubjX)}(hhh](j])}(hxint iommufd_access_rw (struct iommufd_access *access, unsigned long iova, void *data, size_t length, unsigned int flags)h]jc)}(hwint iommufd_access_rw(struct iommufd_access *access, unsigned long iova, void *data, size_t length, unsigned int flags)h](jy)}(hinth]hint}(hjhhhNhNubah}(h]h ]jyah"]h$]h&]uh1jyhjhhhe/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:345: ./drivers/iommu/iommufd/device.chMubj{)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jzhjhhhjhMubj)}(hiommufd_access_rwh]j)}(hiommufd_access_rwh]hiommufd_access_rw}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubah}(h]h ](jjeh"]h$]h&]hhuh1jhjhhhjhMubjv)}(hb(struct iommufd_access *access, unsigned long iova, void *data, size_t length, unsigned int flags)h](jv)}(hstruct iommufd_access *accessh](ji)}(hjlh]hstruct}(hj֐hhhNhNubah}(h]h ]juah"]h$]h&]uh1jhhjҐubj{)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jzhjҐubh)}(hhh]j)}(hiommufd_accessh]hiommufd_access}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&] refdomainjreftypejv reftargetjmodnameN classnameNjvjv)}jv]jv)}jvjsbc.iommufd_access_rwasbuh1hhjҐubj{)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jzhjҐubjv)}(hjh]h*}(hj"hhhNhNubah}(h]h ]jvah"]h$]h&]uh1jvhjҐubj)}(haccessh]haccess}(hj/hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjҐubeh}(h]h ]h"]h$]h&]noemphhhuh1jvhjΐubjv)}(hunsigned long iovah](jy)}(hunsignedh]hunsigned}(hjHhhhNhNubah}(h]h ]jyah"]h$]h&]uh1jyhjDubj{)}(h h]h }(hjVhhhNhNubah}(h]h ]jah"]h$]h&]uh1jzhjDubjy)}(hlongh]hlong}(hjdhhhNhNubah}(h]h ]jyah"]h$]h&]uh1jyhjDubj{)}(h h]h }(hjrhhhNhNubah}(h]h ]jah"]h$]h&]uh1jzhjDubj)}(hiovah]hiova}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjDubeh}(h]h ]h"]h$]h&]noemphhhuh1jvhjΐubjv)}(h void *datah](jy)}(hvoidh]hvoid}(hjhhhNhNubah}(h]h ]jyah"]h$]h&]uh1jyhjubj{)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jzhjubjv)}(hjh]h*}(hjhhhNhNubah}(h]h ]jvah"]h$]h&]uh1jvhjubj)}(hdatah]hdata}(hj‘hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]noemphhhuh1jvhjΐubjv)}(h size_t lengthh](h)}(hhh]j)}(hsize_th]hsize_t}(hjޑhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjۑubah}(h]h ]h"]h$]h&] refdomainjreftypejv reftargetjmodnameN classnameNjvjv)}jv]jc.iommufd_access_rwasbuh1hhjבubj{)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jzhjבubj)}(hlengthh]hlength}(hj hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjבubeh}(h]h ]h"]h$]h&]noemphhhuh1jvhjΐubjv)}(hunsigned int flagsh](jy)}(hunsignedh]hunsigned}(hj#hhhNhNubah}(h]h ]jyah"]h$]h&]uh1jyhjubj{)}(h h]h }(hj1hhhNhNubah}(h]h ]jah"]h$]h&]uh1jzhjubjy)}(hinth]hint}(hj?hhhNhNubah}(h]h ]jyah"]h$]h&]uh1jyhjubj{)}(h h]h }(hjMhhhNhNubah}(h]h ]jah"]h$]h&]uh1jzhjubj)}(hflagsh]hflags}(hj[hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]noemphhhuh1jvhjΐubeh}(h]h ]h"]h$]h&]hhuh1jvhjhhhjhMubeh}(h]h ]h"]h$]h&]hhjuh1jbjjhjhhhjhMubah}(h]jah ](jjeh"]h$]h&]jj)jhuh1j\hjhMhjhhubj)}(hhh]h)}(h!Read or write data under the iovah]h!Read or write data under the iova}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhe/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:345: ./drivers/iommu/iommufd/device.chMhjhhubah}(h]h ]h"]h$]h&]uh1jhjhhhjhMubeh}(h]h ](jfunctioneh"]h$]h&]jjjjjjjjjuh1jWhhhj7vhNhNubj)}(hX**Parameters** ``struct iommufd_access *access`` IOAS access to act on ``unsigned long iova`` Starting IOVA ``void *data`` Kernel buffer to copy to/from ``size_t length`` Number of bytes to access ``unsigned int flags`` IOMMUFD_ACCESS_RW_* flags **Description** Copy kernel to/from data into the range given by IOVA/length. If flags indicates IOMMUFD_ACCESS_RW_KTHREAD then a large copy can be optimized by changing it into copy_to/from_user().h](h)}(h**Parameters**h]j>)}(hjh]h Parameters}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j=hjubah}(h]h ]h"]h$]h&]uh1hhe/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:345: ./drivers/iommu/iommufd/device.chMhjubj0 )}(hhh](j5 )}(h8``struct iommufd_access *access`` IOAS access to act on h](j; )}(h!``struct iommufd_access *access``h]jA )}(hjƒh]hstruct iommufd_access *access}(hjȒhhhNhNubah}(h]h ]h"]h$]h&]uh1j@ hjĒubah}(h]h ]h"]h$]h&]uh1j: he/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:345: ./drivers/iommu/iommufd/device.chMhjubjW )}(hhh]h)}(hIOAS access to act onh]hIOAS access to act on}(hjߒhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjےhMhjܒubah}(h]h ]h"]h$]h&]uh1jV hjubeh}(h]h ]h"]h$]h&]uh1j4 hjےhMhjubj5 )}(h%``unsigned long iova`` Starting IOVA h](j; )}(h``unsigned long iova``h]jA )}(hjh]hunsigned long iova}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j@ hjubah}(h]h ]h"]h$]h&]uh1j: he/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:345: ./drivers/iommu/iommufd/device.chMhjubjW )}(hhh]h)}(h Starting IOVAh]h Starting IOVA}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhMhjubah}(h]h ]h"]h$]h&]uh1jV hjubeh}(h]h ]h"]h$]h&]uh1j4 hjhMhjubj5 )}(h-``void *data`` Kernel buffer to copy to/from h](j; )}(h``void *data``h]jA )}(hj8h]h void *data}(hj:hhhNhNubah}(h]h ]h"]h$]h&]uh1j@ hj6ubah}(h]h ]h"]h$]h&]uh1j: he/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:345: ./drivers/iommu/iommufd/device.chMhj2ubjW )}(hhh]h)}(hKernel buffer to copy to/fromh]hKernel buffer to copy to/from}(hjQhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjMhMhjNubah}(h]h ]h"]h$]h&]uh1jV hj2ubeh}(h]h ]h"]h$]h&]uh1j4 hjMhMhjubj5 )}(h,``size_t length`` Number of bytes to access h](j; )}(h``size_t length``h]jA )}(hjqh]h size_t length}(hjshhhNhNubah}(h]h ]h"]h$]h&]uh1j@ hjoubah}(h]h ]h"]h$]h&]uh1j: he/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:345: ./drivers/iommu/iommufd/device.chMhjkubjW )}(hhh]h)}(hNumber of bytes to accessh]hNumber of bytes to access}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhMhjubah}(h]h ]h"]h$]h&]uh1jV hjkubeh}(h]h ]h"]h$]h&]uh1j4 hjhMhjubj5 )}(h1``unsigned int flags`` IOMMUFD_ACCESS_RW_* flags h](j; )}(h``unsigned int flags``h]jA )}(hjh]hunsigned int flags}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j@ hjubah}(h]h ]h"]h$]h&]uh1j: he/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:345: ./drivers/iommu/iommufd/device.chMhjubjW )}(hhh]h)}(hIOMMUFD_ACCESS_RW_* flagsh]hIOMMUFD_ACCESS_RW_* flags}(hjÓhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhMhjubah}(h]h ]h"]h$]h&]uh1jV hjubeh}(h]h ]h"]h$]h&]uh1j4 hjhMhjubeh}(h]h ]h"]h$]h&]uh1j/ hjubh)}(h**Description**h]j>)}(hjh]h Description}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j=hjubah}(h]h ]h"]h$]h&]uh1hhe/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:345: ./drivers/iommu/iommufd/device.chMhjubh)}(hCopy kernel to/from data into the range given by IOVA/length. If flags indicates IOMMUFD_ACCESS_RW_KTHREAD then a large copy can be optimized by changing it into copy_to/from_user().h]hCopy kernel to/from data into the range given by IOVA/length. If flags indicates IOMMUFD_ACCESS_RW_KTHREAD then a large copy can be optimized by changing it into copy_to/from_user().}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhe/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:345: ./drivers/iommu/iommufd/device.chMhjubeh}(h]h ] kernelindentah"]h$]h&]uh1jhj7vhhhNhNubjG)}(hhh]h}(h]h ]h"]h$]h&]entries](jSiommufd_ctx_get (C function)c.iommufd_ctx_gethNtauh1jFhj7vhhhNhNubjX)}(hhh](j])}(h/void iommufd_ctx_get (struct iommufd_ctx *ictx)h]jc)}(h.void iommufd_ctx_get(struct iommufd_ctx *ictx)h](jy)}(hvoidh]hvoid}(hj*hhhNhNubah}(h]h ]jyah"]h$]h&]uh1jyhj&hhhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:348: ./drivers/iommu/iommufd/main.chMnubj{)}(h h]h }(hj9hhhNhNubah}(h]h ]jah"]h$]h&]uh1jzhj&hhhj8hMnubj)}(hiommufd_ctx_geth]j)}(hiommufd_ctx_geth]hiommufd_ctx_get}(hjKhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjGubah}(h]h ](jjeh"]h$]h&]hhuh1jhj&hhhj8hMnubjv)}(h(struct iommufd_ctx *ictx)h]jv)}(hstruct iommufd_ctx *ictxh](ji)}(hjlh]hstruct}(hjghhhNhNubah}(h]h ]juah"]h$]h&]uh1jhhjcubj{)}(h h]h }(hjthhhNhNubah}(h]h ]jah"]h$]h&]uh1jzhjcubh)}(hhh]j)}(h iommufd_ctxh]h iommufd_ctx}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&] refdomainjreftypejv reftargetjmodnameN classnameNjvjv)}jv]jv)}jvjMsbc.iommufd_ctx_getasbuh1hhjcubj{)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jzhjcubjv)}(hjh]h*}(hjhhhNhNubah}(h]h ]jvah"]h$]h&]uh1jvhjcubj)}(hictxh]hictx}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjcubeh}(h]h ]h"]h$]h&]noemphhhuh1jvhj_ubah}(h]h ]h"]h$]h&]hhuh1jvhj&hhhj8hMnubeh}(h]h ]h"]h$]h&]hhjuh1jbjjhj"hhhj8hMnubah}(h]jah ](jjeh"]h$]h&]jj)jhuh1j\hj8hMnhjhhubj)}(hhh]h)}(hGet a context referenceh]hGet a context reference}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:348: ./drivers/iommu/iommufd/main.chMnhjhhubah}(h]h ]h"]h$]h&]uh1jhjhhhj8hMnubeh}(h]h ](jfunctioneh"]h$]h&]jjjjjjjjjuh1jWhhhj7vhNhNubj)}(h**Parameters** ``struct iommufd_ctx *ictx`` Context to get **Description** The caller must already hold a valid reference to ictx.h](h)}(h**Parameters**h]j>)}(hj h]h Parameters}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j=hj ubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:348: ./drivers/iommu/iommufd/main.chMrhjubj0 )}(hhh]j5 )}(h,``struct iommufd_ctx *ictx`` Context to get h](j; )}(h``struct iommufd_ctx *ictx``h]jA )}(hj+h]hstruct iommufd_ctx *ictx}(hj-hhhNhNubah}(h]h ]h"]h$]h&]uh1j@ hj)ubah}(h]h ]h"]h$]h&]uh1j: hc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:348: ./drivers/iommu/iommufd/main.chMohj%ubjW )}(hhh]h)}(hContext to geth]hContext to get}(hjDhhhNhNubah}(h]h ]h"]h$]h&]uh1hhj@hMohjAubah}(h]h ]h"]h$]h&]uh1jV hj%ubeh}(h]h ]h"]h$]h&]uh1j4 hj@hMohj"ubah}(h]h ]h"]h$]h&]uh1j/ hjubh)}(h**Description**h]j>)}(hjfh]h Description}(hjhhhhNhNubah}(h]h ]h"]h$]h&]uh1j=hjdubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:348: ./drivers/iommu/iommufd/main.chMqhjubh)}(h7The caller must already hold a valid reference to ictx.h]h7The caller must already hold a valid reference to ictx.}(hj|hhhNhNubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:348: ./drivers/iommu/iommufd/main.chMphjubeh}(h]h ] kernelindentah"]h$]h&]uh1jhj7vhhhNhNubjG)}(hhh]h}(h]h ]h"]h$]h&]entries](jS"iommufd_ctx_from_file (C function)c.iommufd_ctx_from_filehNtauh1jFhj7vhhhNhNubjX)}(hhh](j])}(h>struct iommufd_ctx * iommufd_ctx_from_file (struct file *file)h]jc)}(h)}(hjȖh]h Parameters}(hjʖhhhNhNubah}(h]h ]h"]h$]h&]uh1j=hjƖubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:348: ./drivers/iommu/iommufd/main.chM~hj–ubj0 )}(hhh]j5 )}(h8``struct file *file`` File to obtain the reference from h](j; )}(h``struct file *file``h]jA )}(hjh]hstruct file *file}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j@ hjubah}(h]h ]h"]h$]h&]uh1j: hc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:348: ./drivers/iommu/iommufd/main.chM{hjubjW )}(hhh]h)}(h!File to obtain the reference fromh]h!File to obtain the reference from}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhM{hjubah}(h]h ]h"]h$]h&]uh1jV hjubeh}(h]h ]h"]h$]h&]uh1j4 hjhM{hjޖubah}(h]h ]h"]h$]h&]uh1j/ hj–ubh)}(h**Description**h]j>)}(hj"h]h Description}(hj$hhhNhNubah}(h]h ]h"]h$]h&]uh1j=hj ubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:348: ./drivers/iommu/iommufd/main.chM}hj–ubh)}(hReturns a pointer to the iommufd_ctx, otherwise ERR_PTR. The struct file remains owned by the caller and the caller must still do fput. On success the caller is responsible to call iommufd_ctx_put().h]hReturns a pointer to the iommufd_ctx, otherwise ERR_PTR. The struct file remains owned by the caller and the caller must still do fput. On success the caller is responsible to call iommufd_ctx_put().}(hj8hhhNhNubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:348: ./drivers/iommu/iommufd/main.chM|hj–ubeh}(h]h ] kernelindentah"]h$]h&]uh1jhj7vhhhNhNubjG)}(hhh]h}(h]h ]h"]h$]h&]entries](jS iommufd_ctx_from_fd (C function)c.iommufd_ctx_from_fdhNtauh1jFhj7vhhhNhNubjX)}(hhh](j])}(h1struct iommufd_ctx * iommufd_ctx_from_fd (int fd)h]jc)}(h/struct iommufd_ctx *iommufd_ctx_from_fd(int fd)h](ji)}(hjlh]hstruct}(hjghhhNhNubah}(h]h ]juah"]h$]h&]uh1jhhjchhhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:348: ./drivers/iommu/iommufd/main.chMubj{)}(h h]h }(hjuhhhNhNubah}(h]h ]jah"]h$]h&]uh1jzhjchhhjthMubh)}(hhh]j)}(h iommufd_ctxh]h iommufd_ctx}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&] refdomainjreftypejv reftargetjmodnameN classnameNjvjv)}jv]jv)}jviommufd_ctx_from_fdsbc.iommufd_ctx_from_fdasbuh1hhjchhhjthMubj{)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jzhjchhhjthMubjv)}(hjh]h*}(hjhhhNhNubah}(h]h ]jvah"]h$]h&]uh1jvhjchhhjthMubj)}(hiommufd_ctx_from_fdh]j)}(hjh]hiommufd_ctx_from_fd}(hjƗhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj—ubah}(h]h ](jjeh"]h$]h&]hhuh1jhjchhhjthMubjv)}(h(int fd)h]jv)}(hint fdh](jy)}(hinth]hint}(hjhhhNhNubah}(h]h ]jyah"]h$]h&]uh1jyhjݗubj{)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jzhjݗubj)}(hfdh]hfd}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjݗubeh}(h]h ]h"]h$]h&]noemphhhuh1jvhjٗubah}(h]h ]h"]h$]h&]hhuh1jvhjchhhjthMubeh}(h]h ]h"]h$]h&]hhjuh1jbjjhj_hhhjthMubah}(h]jZah ](jjeh"]h$]h&]jj)jhuh1j\hjthMhj\hhubj)}(hhh]h)}(h+Acquires a reference to the iommufd contexth]h+Acquires a reference to the iommufd context}(hj'hhhNhNubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:348: ./drivers/iommu/iommufd/main.chMhj$hhubah}(h]h ]h"]h$]h&]uh1jhj\hhhjthMubeh}(h]h ](jfunctioneh"]h$]h&]jjjj?jj?jjjuh1jWhhhj7vhNhNubj)}(h**Parameters** ``int fd`` File descriptor to obtain the reference from **Description** Returns a pointer to the iommufd_ctx, otherwise ERR_PTR. On success the caller is responsible to call iommufd_ctx_put().h](h)}(h**Parameters**h]j>)}(hjIh]h Parameters}(hjKhhhNhNubah}(h]h ]h"]h$]h&]uh1j=hjGubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:348: ./drivers/iommu/iommufd/main.chMhjCubj0 )}(hhh]j5 )}(h8``int fd`` File descriptor to obtain the reference from h](j; )}(h ``int fd``h]jA )}(hjhh]hint fd}(hjjhhhNhNubah}(h]h ]h"]h$]h&]uh1j@ hjfubah}(h]h ]h"]h$]h&]uh1j: hc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:348: ./drivers/iommu/iommufd/main.chMhjbubjW )}(hhh]h)}(h,File descriptor to obtain the reference fromh]h,File descriptor to obtain the reference from}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhj}hMhj~ubah}(h]h ]h"]h$]h&]uh1jV hjbubeh}(h]h ]h"]h$]h&]uh1j4 hj}hMhj_ubah}(h]h ]h"]h$]h&]uh1j/ hjCubh)}(h**Description**h]j>)}(hjh]h Description}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j=hjubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:348: ./drivers/iommu/iommufd/main.chMhjCubh)}(hxReturns a pointer to the iommufd_ctx, otherwise ERR_PTR. On success the caller is responsible to call iommufd_ctx_put().h]hxReturns a pointer to the iommufd_ctx, otherwise ERR_PTR. On success the caller is responsible to call iommufd_ctx_put().}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:348: ./drivers/iommu/iommufd/main.chMhjCubeh}(h]h ] kernelindentah"]h$]h&]uh1jhj7vhhhNhNubjG)}(hhh]h}(h]h ]h"]h$]h&]entries](jSiommufd_ctx_put (C function)c.iommufd_ctx_puthNtauh1jFhj7vhhhNhNubjX)}(hhh](j])}(h/void iommufd_ctx_put (struct iommufd_ctx *ictx)h]jc)}(h.void iommufd_ctx_put(struct iommufd_ctx *ictx)h](jy)}(hvoidh]hvoid}(hjhhhNhNubah}(h]h ]jyah"]h$]h&]uh1jyhjhhhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:348: ./drivers/iommu/iommufd/main.chMubj{)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jzhjhhhjhMubj)}(hiommufd_ctx_puth]j)}(hiommufd_ctx_puth]hiommufd_ctx_put}(hj hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubah}(h]h ](jjeh"]h$]h&]hhuh1jhjhhhjhMubjv)}(h(struct iommufd_ctx *ictx)h]jv)}(hstruct iommufd_ctx *ictxh](ji)}(hjlh]hstruct}(hj%hhhNhNubah}(h]h ]juah"]h$]h&]uh1jhhj!ubj{)}(h h]h }(hj2hhhNhNubah}(h]h ]jah"]h$]h&]uh1jzhj!ubh)}(hhh]j)}(h iommufd_ctxh]h iommufd_ctx}(hjChhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj@ubah}(h]h ]h"]h$]h&] refdomainjreftypejv reftargetjEmodnameN classnameNjvjv)}jv]jv)}jvj sbc.iommufd_ctx_putasbuh1hhj!ubj{)}(h h]h }(hjchhhNhNubah}(h]h ]jah"]h$]h&]uh1jzhj!ubjv)}(hjh]h*}(hjqhhhNhNubah}(h]h ]jvah"]h$]h&]uh1jvhj!ubj)}(hictxh]hictx}(hj~hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj!ubeh}(h]h ]h"]h$]h&]noemphhhuh1jvhjubah}(h]h ]h"]h$]h&]hhuh1jvhjhhhjhMubeh}(h]h ]h"]h$]h&]hhjuh1jbjjhjhhhjhMubah}(h]jۘah ](jjeh"]h$]h&]jj)jhuh1j\hjhMhjݘhhubj)}(hhh]h)}(hPut back a referenceh]hPut back a reference}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:348: ./drivers/iommu/iommufd/main.chMhjhhubah}(h]h ]h"]h$]h&]uh1jhjݘhhhjhMubeh}(h]h ](jfunctioneh"]h$]h&]jjjjjjjjjuh1jWhhhj7vhNhNubj)}(hB**Parameters** ``struct iommufd_ctx *ictx`` Context to put backh](h)}(h**Parameters**h]j>)}(hjʙh]h Parameters}(hj̙hhhNhNubah}(h]h ]h"]h$]h&]uh1j=hjșubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:348: ./drivers/iommu/iommufd/main.chMhjęubj0 )}(hhh]j5 )}(h0``struct iommufd_ctx *ictx`` Context to put backh](j; )}(h``struct iommufd_ctx *ictx``h]jA )}(hjh]hstruct iommufd_ctx *ictx}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j@ hjubah}(h]h ]h"]h$]h&]uh1j: hc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:348: ./drivers/iommu/iommufd/main.chMhjubjW )}(hhh]h)}(hContext to put backh]hContext to put back}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:348: ./drivers/iommu/iommufd/main.chMhjubah}(h]h ]h"]h$]h&]uh1jV hjubeh}(h]h ]h"]h$]h&]uh1j4 hjhMhjubah}(h]h ]h"]h$]h&]uh1j/ hjęubeh}(h]h ] kernelindentah"]h$]h&]uh1jhj7vhhhNhNubh)}(hhh](h)}(hVFIO and IOMMUFDh]hVFIO and IOMMUFD}(hj-hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj*hhhhhM`ubh)}(hjCjjjjjjjjj)!j.!jx"j}"jT$jY$j%j%j.'j3'j(j(jn*js*jw+j|+j,j-j1j1jo2jt2jJ4jO4j7j7j)9j.9j;j;j=j=j>j>j?j?jCjCjEjEjFjFjiIjnIjJjJj\KjaKjzMjMjNjNj,Rj1RjCSjHSjTjTjWjWjXjXjYjYj[j[j ]j%]j^j^jajajcjcj0ej5ej fjfjjj!jjkkjpkjljljmjmjrjrj&sj+sjj7vjbvjgvjyjyj{j{j?}jD}jjjĂjɂj؄j݄jqjvjjjjjjjj"jjjZj_jۘjjj*jfju footnote_refs} citation_refs} autofootnotes]autofootnote_refs]symbol_footnotes]symbol_footnote_refs] footnotes] citations]autofootnote_startKsymbol_footnote_startK id_counter collectionsCounter}Rparse_messages](hsystem_message)}(hhh]h)}(heUnexpected possible title overline or transition. Treating it as ordinary text because it's so short.h]hgUnexpected possible title overline or transition. Treating it as ordinary text because it’s so short.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjubah}(h]h ]h"]h$]h&]levelKtypeINFOlineMsourcec/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.huh1jhjhubj)}(hhh]h)}(heUnexpected possible title overline or transition. Treating it as ordinary text because it's so short.h]hgUnexpected possible title overline or transition. Treating it as ordinary text because it’s so short.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjubah}(h]h ]h"]h$]h&]levelKtypejlineMsourcec/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.huh1jhjhubj)}(hhh]h)}(heUnexpected possible title overline or transition. Treating it as ordinary text because it's so short.h]hgUnexpected possible title overline or transition. Treating it as ordinary text because it’s so short.}(hj7hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj4ubah}(h]h ]h"]h$]h&]levelKtypejlineMsourcej3uh1jhj,iubj)}(hhh]h)}(heUnexpected possible title overline or transition. Treating it as ordinary text because it's so short.h]hgUnexpected possible title overline or transition. Treating it as ordinary text because it’s so short.}(hjRhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjOubah}(h]h ]h"]h$]h&]levelKtypejlineMsourcec/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.huh1jhjqubetransform_messages]j)}(hhh]h)}(hhh]h:Hyperlink target "general-ioctl-format" is not referenced.}hjpsbah}(h]h ]h"]h$]h&]uh1hhjmubah}(h]h ]h"]h$]h&]levelKtypejsourcej8lineKuh1juba transformerN include_log] decorationNhhub.