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]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}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjubah}(h]h ]h"]h$]h&]uh1hhjubeh}(h]h ]h"]h$]h&]uh1hhhhKhhhhubeh}(h]h ]h"]h$]h&]uh1hhhhhhhhKubh)}(hhh](h)}(hOverviewh]hOverview}(hj<hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj9hhhhhK 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).}(hjJhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK hj9hhubh)}(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.}(hjXhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhj9hhubh)}(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.}(hjfhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhj9hhubeh}(h]overviewah ]h"]overviewah$]h&]uh1hhhhhhhhK ubh)}(hhh](h)}(h Key Conceptsh]h Key Concepts}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhj|hhhhhKubh)}(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" primarly 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" primarly 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” primarly 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.}(hjhhhNhNubah}(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.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK7hjubah}(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.}(hj3hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKBhj/ubah}(h]h ]h"]h$]h&]uh1jhjhhhhhNubj)}(hXoIOMMUFD_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 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 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:}(hjKhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKIhjGubj)}(hhh](j)}(hGSecurity namespace for guest owned ID, e.g. guest-controlled cache tagsh]h)}(hj^h]hGSecurity namespace for guest owned ID, e.g. guest-controlled cache tags}(hj`hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKMhj\ubah}(h]h ]h"]h$]h&]uh1jhjYubj)}(hENon-device-affiliated event reporting, e.g. invalidation queue errorsh]h)}(hjuh]hENon-device-affiliated event reporting, e.g. invalidation queue errors}(hjwhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKNhjsubah}(h]h ]h"]h$]h&]uh1jhjYubj)}(hDAccess to a sharable nesting parent pagetable across physical IOMMUsh]h)}(hjh]hDAccess to a sharable nesting parent pagetable across physical IOMMUs}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKOhjubah}(h]h ]h"]h$]h&]uh1jhjYubj)}(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&]uh1jhjYubj)}(h(Delivery of paravirtualized invalidationh]h)}(hjh]h(Delivery of paravirtualized invalidation}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKQhjubah}(h]h ]h"]h$]h&]uh1jhjYubj)}(h#Direct assigned invalidation queuesh]h)}(hjh]h#Direct assigned invalidation queues}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKRhjubah}(h]h ]h"]h$]h&]uh1jhjYubj)}(hDirect assigned interrupts h]h)}(hDirect assigned interruptsh]hDirect assigned interrupts}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKShjubah}(h]h ]h"]h$]h&]uh1jhjYubeh}(h]h ]h"]h$]h&]bullet*uh1jhhhKMhjGubh)}(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&]uh1hhhhKUhjGubhnote)}(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.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK]hjubah}(h]h ]h"]h$]h&]uh1jhjGubeh}(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.}(hj8hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKjhj4ubah}(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.}(hjPhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKwhjLubah}(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.}(hjhhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjdubah}(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&]uh1hhhhKhjubah}(h]h ]h"]h$]h&]uh1jhjubj)}(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.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(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.}(hj9hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhj5ubj)}(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.}(hjKhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjGubah}(h]h ]h"]h$]h&]uh1jhj5ubeh}(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.}(hjihhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjeubah}(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&]uh1hhhhMhj}ubah}(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&]uh1hhj|hhhhhKubh)}(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&]uh1hhj|hhhhhMubeh}(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-formatuh1jhKhjhhhc/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)hj%ubah}(h]j#ah ]h"]general ioctl formatah$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhKhjhhexpect_referenced_by_name}j<jsexpect_referenced_by_id}j#jsubh)}(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.}(hjDhhhNhNubah}(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:}(hjShhhNhNubah}(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)}(hjmh]h7ENOTTY: The IOCTL number itself is not supported at all}(hjohhhNhNubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhKhjkubah}(h]h ]h"]h$]h&]uh1jhjhubj)}(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&]uh1jhjhubj)}(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&]uh1jhjhubj)}(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&]uh1jhjhubj)}(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&]uh1jhjhubj)}(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&]uh1jhjhubj)}(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&]uh1jhjhubeh}(h]h ]h"]h$]h&]jjuh1jhj|hKhjdubah}(h]h ]h"]h$]h&]uh1jbhj|hKhjhhubh)}(h5As well as additional errnos, within specific ioctls.h]h5As well as additional errnos, within specific ioctls.}(hj#hhhNhNubah}(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_destroyhNtauh1j2hjhhhj$hNubhdesc)}(hhh](hdesc_signature)}(h iommu_destroyh]hdesc_signature_line)}(hstruct iommu_destroyh](hdesc_sig_keyword)}(hstructh]hstruct}(hjVhhhNhNubah}(h]h ]kah"]h$]h&]uh1jThjPhhhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhK&ubhdesc_sig_space)}(h h]h }(hjhhhhNhNubah}(h]h ]wah"]h$]h&]uh1jfhjPhhhjehK&ubh desc_name)}(h iommu_destroyh]h desc_sig_name)}(hjLh]h iommu_destroy}(hjhhhNhNubah}(h]h ]nah"]h$]h&]uh1j}hjyubah}(h]h ](sig-namedescnameeh"]h$]h&]hhuh1jwhjPhhhjehK&ubeh}(h]h ]h"]h$]h&]hh add_permalinkuh1jNsphinx_line_type declaratorhjJhhhjehK&ubah}(h]jAah ](sig sig-objecteh"]h$]h&] is_multiline _toc_parts) _toc_namehuh1jHhjehK&hjEhhubh 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&]uh1jhjEhhhjehK&ubeh}(h]h ](cstructeh"]h$]h&]domainjobjtypejdesctypejnoindex noindexentrynocontentsentryuh1jChhhjhj$hNubh 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; };}hjsbah}(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}(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.hhKAhj" ubh definition)}(hhh]h)}(hsizeof(struct iommu_destroy)h]hsizeof(struct iommu_destroy)}(hjG hhhNhNubah}(h]h ]h"]h$]h&]uh1hhjA hKAhjD ubah}(h]h ]h"]h$]h&]uh1jB hj" ubeh}(h]h ]h"]h$]h&]uh1j hjA hKAhj ubj! )}(hH``id`` iommufd object ID to destroy. Can be any destroyable object type.h](j' )}(h``id``h]j- )}(hjg h]hid}(hji hhhNhNubah}(h]h ]h"]h$]h&]uh1j, hje ubah}(h]h ]h"]h$]h&]uh1j& hc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhKAhja ubjC )}(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&]uh1jB hja ubeh}(h]h ]h"]h$]h&]uh1j hj| hKAhj ubeh}(h]h ]h"]h$]h&]uh1j hjubeh}(h]h ] kernelindentah"]h$]h&]uh1jhjhhhj$hNubh)}(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.hhKBhjhhubj3)}(hhh]h}(h]h ]h"]h$]h&]entries](j?iommu_ioas_alloc (C struct)c.iommu_ioas_allochNtauh1j2hjhhhj$hNubjD)}(hhh](jI)}(hiommu_ioas_alloch]jO)}(hstruct iommu_ioas_alloch](jU)}(hjXh]hstruct}(hj hhhNhNubah}(h]h ]jaah"]h$]h&]uh1jThj hhhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhKGubjg)}(h h]h }(hj hhhNhNubah}(h]h ]jsah"]h$]h&]uh1jfhj hhhj hKGubjx)}(hiommu_ioas_alloch]j~)}(hj h]hiommu_ioas_alloc}(hj hhhNhNubah}(h]h ]jah"]h$]h&]uh1j}hj ubah}(h]h ](jjeh"]h$]h&]hhuh1jwhj hhhj hKGubeh}(h]h ]h"]h$]h&]hhjuh1jNjjhj hhhj hKGubah}(h]j ah ](jjeh"]h$]h&]jj)jhuh1jHhj 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&]jjjjB jjB jjjuh1jChhhjhj$hNubj)}(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}(hjN hhhNhNubah}(h]h ]h"]h$]h&]uh1j)hjJ ubh:}(hjJ hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhKPhjF 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; };}hjg sbah}(h]h ]h"]h$]h&]hhuh1jhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhKRhjF ubh)}(h **Members**h]j*)}(hjx h]hMembers}(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.hhKXhjF ubj )}(hhh](j! )}(h)``size`` sizeof(struct iommu_ioas_alloc) h](j' )}(h``size``h]j- )}(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 ubjC )}(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&]uh1jB hj ubeh}(h]h ]h"]h$]h&]uh1j hj hKNhj ubj! )}(h``flags`` Must be 0 h](j' )}(h ``flags``h]j- )}(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 ubjC )}(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&]uh1jB hj ubeh}(h]h ]h"]h$]h&]uh1j hj hKOhj ubj! )}(h7``out_ioas_id`` Output IOAS ID for the allocated objecth](j' )}(h``out_ioas_id``h]j- )}(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 ubjC )}(hhh]h)}(h'Output IOAS ID for the allocated objecth]h'Output IOAS ID for the allocated object}(hj" hhhNhNubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhKPhj ubah}(h]h ]h"]h$]h&]uh1jB hj ubeh}(h]h ]h"]h$]h&]uh1j hj hKOhj ubeh}(h]h ]h"]h$]h&]uh1j hjF ubeh}(h]h ] kernelindentah"]h$]h&]uh1jhjhhhj$hNubh)}(h**Description**h]j*)}(hjL h]h Description}(hjN hhhNhNubah}(h]h ]h"]h$]h&]uh1j)hjJ 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.}(hjb hhhNhNubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhKPhjhhubj3)}(hhh]h}(h]h ]h"]h$]h&]entries](j?iommu_iova_range (C struct)c.iommu_iova_rangehNtauh1j2hjhhhj$hNubjD)}(hhh](jI)}(hiommu_iova_rangeh]jO)}(hstruct iommu_iova_rangeh](jU)}(hjXh]hstruct}(hj hhhNhNubah}(h]h ]jaah"]h$]h&]uh1jThj hhhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhKVubjg)}(h h]h }(hj hhhNhNubah}(h]h ]jsah"]h$]h&]uh1jfhj hhhj hKVubjx)}(hiommu_iova_rangeh]j~)}(hj h]hiommu_iova_range}(hj hhhNhNubah}(h]h ]jah"]h$]h&]uh1j}hj ubah}(h]h ](jjeh"]h$]h&]hhuh1jwhj hhhj hKVubeh}(h]h ]h"]h$]h&]hhjuh1jNjjhj hhhj hKVubah}(h]j} ah ](jjeh"]h$]h&]jj)jhuh1jHhj 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 jjjuh1jChhhjhj$hNubj)}(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}(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.hhKghj ubj )}(hhh](j! )}(h``start`` First IOVA h](j' )}(h ``start``h]j- )}(hj9 h]hstart}(hj; hhhNhNubah}(h]h ]h"]h$]h&]uh1j, hj7 ubah}(h]h ]h"]h$]h&]uh1j& hc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhK^hj3 ubjC )}(hhh]h)}(h First IOVAh]h First IOVA}(hjR hhhNhNubah}(h]h ]h"]h$]h&]uh1hhjN hK^hjO ubah}(h]h ]h"]h$]h&]uh1jB hj3 ubeh}(h]h ]h"]h$]h&]uh1j hjN hK^hj0 ubj! )}(h``last`` Inclusive last IOVAh](j' )}(h``last``h]j- )}(hjr h]hlast}(hjt hhhNhNubah}(h]h ]h"]h$]h&]uh1j, hjp ubah}(h]h ]h"]h$]h&]uh1j& hc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhK^hjl ubjC )}(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&]uh1jB hjl ubeh}(h]h ]h"]h$]h&]uh1j hj hK^hj0 ubeh}(h]h ]h"]h$]h&]uh1j hj ubeh}(h]h ] kernelindentah"]h$]h&]uh1jhjhhhj$hNubh)}(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_hjhhubj3)}(hhh]h}(h]h ]h"]h$]h&]entries](j?!iommu_ioas_iova_ranges (C struct)c.iommu_ioas_iova_rangeshNtauh1j2hjhhhj$hNubjD)}(hhh](jI)}(hiommu_ioas_iova_rangesh]jO)}(hstruct iommu_ioas_iova_rangesh](jU)}(hjXh]hstruct}(hj hhhNhNubah}(h]h ]jaah"]h$]h&]uh1jThj hhhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhKdubjg)}(h h]h }(hj hhhNhNubah}(h]h ]jsah"]h$]h&]uh1jfhj hhhj hKdubjx)}(hiommu_ioas_iova_rangesh]j~)}(hj h]hiommu_ioas_iova_ranges}(hj hhhNhNubah}(h]h ]jah"]h$]h&]uh1j}hj ubah}(h]h ](jjeh"]h$]h&]hhuh1jwhj hhhj hKdubeh}(h]h ]h"]h$]h&]hhjuh1jNjjhj hhhj hKdubah}(h]j ah ](jjeh"]h$]h&]jj)jhuh1jHhj hKdhj hhubj)}(hhh]h)}(hioctl(IOMMU_IOAS_IOVA_RANGES)h]hioctl(IOMMU_IOAS_IOVA_RANGES)}(hj5 hhhNhNubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhKhhj2 hhubah}(h]h ]h"]h$]h&]uh1jhj hhhj hKdubeh}(h]h ](jstructeh"]h$]h&]jjjjM jjM jjjuh1jChhhjhj$hNubj)}(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}(hjY hhhNhNubah}(h]h ]h"]h$]h&]uh1j)hjU ubh:}(hjU hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhKlhjQ 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; };}hjr sbah}(h]h ]h"]h$]h&]hhuh1jhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhKnhjQ 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.hhKwhjQ ubj )}(hhh](j! )}(h/``size`` sizeof(struct iommu_ioas_iova_ranges) h](j' )}(h``size``h]j- )}(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 ubjC )}(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&]uh1jB hj ubeh}(h]h ]h"]h$]h&]uh1j hj hKjhj ubj! )}(h(``ioas_id`` IOAS ID to read ranges from h](j' )}(h ``ioas_id``h]j- )}(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 ubjC )}(hhh]h)}(hIOAS ID to read ranges fromh]hIOAS ID to read ranges from}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj hKkhj ubah}(h]h ]h"]h$]h&]uh1jB hj ubeh}(h]h ]h"]h$]h&]uh1j hj hKkhj ubj! )}(h>``num_iovas`` Input/Output total number of ranges in the IOAS h](j' )}(h ``num_iovas``h]j- )}(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.hhKlhjubjC )}(hhh]h)}(h/Input/Output total number of ranges in the IOASh]h/Input/Output total number of ranges in the IOAS}(hj-hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj)hKlhj*ubah}(h]h ]h"]h$]h&]uh1jB hjubeh}(h]h ]h"]h$]h&]uh1j hj)hKlhj ubj! )}(h``__reserved`` Must be 0 h](j' )}(h``__reserved``h]j- )}(hjMh]h __reserved}(hjOhhhNhNubah}(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.hhKmhjGubjC )}(hhh]h)}(h Must be 0h]h Must be 0}(hjfhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjbhKmhjcubah}(h]h ]h"]h$]h&]uh1jB hjGubeh}(h]h ]h"]h$]h&]uh1j hjbhKmhj ubj! )}(hI``allowed_iovas`` Pointer to the output array of struct iommu_iova_range h](j' )}(h``allowed_iovas``h]j- )}(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.hhKnhjubjC )}(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&]uh1jB hjubeh}(h]h ]h"]h$]h&]uh1j hjhKnhj ubj! )}(hB``out_iova_alignment`` Minimum alignment required for mapping IOVAh](j' )}(h``out_iova_alignment``h]j- )}(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.hhKnhjubjC )}(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&]uh1jB hjubeh}(h]h ]h"]h$]h&]uh1j hjhKnhj ubeh}(h]h ]h"]h$]h&]uh1j hjQ ubeh}(h]h ] kernelindentah"]h$]h&]uh1jhjhhhj$hNubh)}(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.}(hjhhhNhNubah}(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.}(hj6hhhNhNubah}(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:}(hjEhhhNhNubah}(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}hjTsbah}(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.}(hjchhhNhNubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhKhjhhubj3)}(hhh]h}(h]h ]h"]h$]h&]entries](j?!iommu_ioas_allow_iovas (C struct)c.iommu_ioas_allow_iovashNtauh1j2hjhhhj$hNubjD)}(hhh](jI)}(hiommu_ioas_allow_iovash]jO)}(hstruct iommu_ioas_allow_iovash](jU)}(hjXh]hstruct}(hjhhhNhNubah}(h]h ]jaah"]h$]h&]uh1jThjhhhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhKubjg)}(h h]h }(hjhhhNhNubah}(h]h ]jsah"]h$]h&]uh1jfhjhhhjhKubjx)}(hiommu_ioas_allow_iovash]j~)}(hjh]hiommu_ioas_allow_iovas}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1j}hjubah}(h]h ](jjeh"]h$]h&]hhuh1jwhjhhhjhKubeh}(h]h ]h"]h$]h&]hhjuh1jNjjhjhhhjhKubah}(h]j~ah ](jjeh"]h$]h&]jj)jhuh1jHhjhKhjhhubj)}(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&]jjjjjjjjjuh1jChhhjhj$hNubj)}(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; };}hj sbah}(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.hhKhjubj )}(hhh](j! )}(h/``size`` sizeof(struct iommu_ioas_allow_iovas) h](j' )}(h``size``h]j- )}(hj:h]hsize}(hj<hhhNhNubah}(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.hhKhj4ubjC )}(hhh]h)}(h%sizeof(struct iommu_ioas_allow_iovas)h]h%sizeof(struct iommu_ioas_allow_iovas)}(hjShhhNhNubah}(h]h ]h"]h$]h&]uh1hhjOhKhjPubah}(h]h ]h"]h$]h&]uh1jB hj4ubeh}(h]h ]h"]h$]h&]uh1j hjOhKhj1ubj! )}(h(``ioas_id`` IOAS ID to allow IOVAs from h](j' )}(h ``ioas_id``h]j- )}(hjsh]hioas_id}(hjuhhhNhNubah}(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.hhKhjmubjC )}(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&]uh1jB hjmubeh}(h]h ]h"]h$]h&]uh1j hjhKhj1ubj! )}(h>``num_iovas`` Input/Output total number of ranges in the IOAS h](j' )}(h ``num_iovas``h]j- )}(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.hhKhjubjC )}(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&]uh1jB hjubeh}(h]h ]h"]h$]h&]uh1j hjhKhj1ubj! )}(h``__reserved`` Must be 0 h](j' )}(h``__reserved``h]j- )}(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.hhKhjubjC )}(hhh]h)}(h Must be 0h]h Must be 0}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhKhjubah}(h]h ]h"]h$]h&]uh1jB hjubeh}(h]h ]h"]h$]h&]uh1j hjhKhj1ubj! )}(h=``allowed_iovas`` Pointer to array of struct iommu_iova_rangeh](j' )}(h``allowed_iovas``h]j- )}(hjh]h allowed_iovas}(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.hhKhjubjC )}(hhh]h)}(h+Pointer to array of struct iommu_iova_rangeh]h+Pointer to array of struct iommu_iova_range}(hj7hhhNhNubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhKhj4ubah}(h]h ]h"]h$]h&]uh1jB hjubeh}(h]h ]h"]h$]h&]uh1j hj3hKhj1ubeh}(h]h ]h"]h$]h&]uh1j hjubeh}(h]h ] kernelindentah"]h$]h&]uh1jhjhhhj$hNubh)}(h**Description**h]j*)}(hjah]h Description}(hjchhhNhNubah}(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)}(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.}(hjwhhhNhNubah}(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.hhKhjhhubj3)}(hhh]h}(h]h ]h"]h$]h&]entries](j?iommufd_ioas_map_flags (C enum)c.iommufd_ioas_map_flagshNtauh1j2hjhhhj$hNubjD)}(hhh](jI)}(hiommufd_ioas_map_flagsh]jO)}(henum iommufd_ioas_map_flagsh](jU)}(henumh]henum}(hjhhhNhNubah}(h]h ]jaah"]h$]h&]uh1jThjhhhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhKubjg)}(h h]h }(hjhhhNhNubah}(h]h ]jsah"]h$]h&]uh1jfhjhhhjhKubjx)}(hiommufd_ioas_map_flagsh]j~)}(hjh]hiommufd_ioas_map_flags}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1j}hjubah}(h]h ](jjeh"]h$]h&]hhuh1jwhjhhhjhKubeh}(h]h ]h"]h$]h&]hhjuh1jNjjhjhhhjhKubah}(h]jah ](jjeh"]h$]h&]jj)jhuh1jHhjhKhjhhubj)}(hhh]h)}(hFlags for map and copyh]hFlags for map and copy}(hjhhhNhNubah}(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'jjjuh1jChhhjhj$hNubj)}(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*)}(hj1h]h Constants}(hj3hhhNhNubah}(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.hhKhj+ubj )}(hhh](j! )}(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]j- )}(hjPh]hIOMMU_IOAS_MAP_FIXED_IOVA}(hjRhhhNhNubah}(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.hhKhjJubjC )}(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}(hjihhhNhNubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhKhjfubah}(h]h ]h"]h$]h&]uh1jB hjJubeh}(h]h ]h"]h$]h&]uh1j hjehKhjGubj! )}(hE``IOMMU_IOAS_MAP_WRITEABLE`` DMA is allowed to write to this mapping h](j' )}(h``IOMMU_IOAS_MAP_WRITEABLE``h]j- )}(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.hhKhjubjC )}(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&]uh1jB hjubeh}(h]h ]h"]h$]h&]uh1j hjhKhjGubj! )}(hD``IOMMU_IOAS_MAP_READABLE`` DMA is allowed to read from this mappingh](j' )}(h``IOMMU_IOAS_MAP_READABLE``h]j- )}(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.hhKhjubjC )}(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&]uh1jB hjubeh}(h]h ]h"]h$]h&]uh1j hjhKhjGubeh}(h]h ]h"]h$]h&]uh1j hj+ubeh}(h]h ] kernelindentah"]h$]h&]uh1jhjhhhj$hNubj3)}(hhh]h}(h]h ]h"]h$]h&]entries](j?iommu_ioas_map (C struct)c.iommu_ioas_maphNtauh1j2hjhhhj$hNubjD)}(hhh](jI)}(hiommu_ioas_maph]jO)}(hstruct iommu_ioas_maph](jU)}(hjXh]hstruct}(hjhhhNhNubah}(h]h ]jaah"]h$]h&]uh1jThjhhhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhKubjg)}(h h]h }(hj+hhhNhNubah}(h]h ]jsah"]h$]h&]uh1jfhjhhhj*hKubjx)}(hiommu_ioas_maph]j~)}(hjh]hiommu_ioas_map}(hj=hhhNhNubah}(h]h ]jah"]h$]h&]uh1j}hj9ubah}(h]h ](jjeh"]h$]h&]hhuh1jwhjhhhj*hKubeh}(h]h ]h"]h$]h&]hhjuh1jNjjhjhhhj*hKubah}(h]jah ](jjeh"]h$]h&]jj)jhuh1jHhj*hKhjhhubj)}(hhh]h)}(hioctl(IOMMU_IOAS_MAP)h]hioctl(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.hhKhj\hhubah}(h]h ]h"]h$]h&]uh1jhjhhhj*hKubeh}(h]h ](jstructeh"]h$]h&]jjjjwjjwjjjuh1jChhhjhj$hNubj)}(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.hhKhj{ubj)}(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.hhKhj{ubh)}(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.hhKhj{ubj )}(hhh](j! )}(h'``size`` sizeof(struct iommu_ioas_map) h](j' )}(h``size``h]j- )}(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.hhKhjubjC )}(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&]uh1jB hjubeh}(h]h ]h"]h$]h&]uh1j hjhKhjubj! )}(h5``flags`` Combination of enum iommufd_ioas_map_flags h](j' )}(h ``flags``h]j- )}(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.hhKhjubjC )}(hhh]h)}(h*Combination of enum iommufd_ioas_map_flagsh]h*Combination of enum iommufd_ioas_map_flags}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhKhjubah}(h]h ]h"]h$]h&]uh1jB hjubeh}(h]h ]h"]h$]h&]uh1j hjhKhjubj! )}(h-``ioas_id`` IOAS ID to change the mapping of h](j' )}(h ``ioas_id``h]j- )}(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.hhKhj8ubjC )}(hhh]h)}(h IOAS ID to change the mapping ofh]h IOAS ID to change the mapping of}(hjWhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjShKhjTubah}(h]h ]h"]h$]h&]uh1jB hj8ubeh}(h]h ]h"]h$]h&]uh1j hjShKhjubj! )}(h``__reserved`` Must be 0 h](j' )}(h``__reserved``h]j- )}(hjwh]h __reserved}(hjyhhhNhNubah}(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.hhKhjqubjC )}(hhh]h)}(h Must be 0h]h Must be 0}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhKhjubah}(h]h ]h"]h$]h&]uh1jB hjqubeh}(h]h ]h"]h$]h&]uh1j hjhKhjubj! )}(h4``user_va`` Userspace pointer to start mapping from h](j' )}(h ``user_va``h]j- )}(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.hhKhjubjC )}(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&]uh1jB hjubeh}(h]h ]h"]h$]h&]uh1j hjhKhjubj! )}(h"``length`` Number of bytes to map h](j' )}(h ``length``h]j- )}(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.hhKhjubjC )}(hhh]h)}(hNumber of bytes to maph]hNumber of bytes to map}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhKhjubah}(h]h ]h"]h$]h&]uh1jB hjubeh}(h]h ]h"]h$]h&]uh1j hjhKhjubj! )}(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]j- )}(hj"h]hiova}(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.hhKhjubjC )}(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.}(hj;hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj7hKhj8ubah}(h]h ]h"]h$]h&]uh1jB hjubeh}(h]h ]h"]h$]h&]uh1j hj7hKhjubeh}(h]h ]h"]h$]h&]uh1j hj{ubeh}(h]h ] kernelindentah"]h$]h&]uh1jhjhhhj$hNubh)}(h**Description**h]j*)}(hjdh]h Description}(hjfhhhNhNubah}(h]h ]h"]h$]h&]uh1j)hjbubah}(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.}(hjzhhhNhNubah}(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.hhKhjhhubj3)}(hhh]h}(h]h ]h"]h$]h&]entries](j?iommu_ioas_map_file (C struct)c.iommu_ioas_map_filehNtauh1j2hjhhhj$hNubjD)}(hhh](jI)}(hiommu_ioas_map_fileh]jO)}(hstruct iommu_ioas_map_fileh](jU)}(hjXh]hstruct}(hjhhhNhNubah}(h]h ]jaah"]h$]h&]uh1jThjhhhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhKubjg)}(h h]h }(hjhhhNhNubah}(h]h ]jsah"]h$]h&]uh1jfhjhhhjhKubjx)}(hiommu_ioas_map_fileh]j~)}(hjh]hiommu_ioas_map_file}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1j}hjubah}(h]h ](jjeh"]h$]h&]hhuh1jwhjhhhjhKubeh}(h]h ]h"]h$]h&]hhjuh1jNjjhjhhhjhKubah}(h]jah ](jjeh"]h$]h&]jj)jhuh1jHhjhKhjhhubj)}(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&]jjjj jj jjjuh1jChhhjhj$hNubj)}(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}(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_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; };}hj0sbah}(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*)}(hjAh]hMembers}(hjChhhNhNubah}(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.hhKhjubj )}(hhh](j! )}(h,``size`` sizeof(struct iommu_ioas_map_file) h](j' )}(h``size``h]j- )}(hj`h]hsize}(hjbhhhNhNubah}(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.hhKhjZubjC )}(hhh]h)}(h"sizeof(struct iommu_ioas_map_file)h]h"sizeof(struct iommu_ioas_map_file)}(hjyhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjuhKhjvubah}(h]h ]h"]h$]h&]uh1jB hjZubeh}(h]h ]h"]h$]h&]uh1j hjuhKhjWubj! )}(h%``flags`` same as for iommu_ioas_map h](j' )}(h ``flags``h]j- )}(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.hhKhjubjC )}(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&]uh1jB hjubeh}(h]h ]h"]h$]h&]uh1j hjhKhjWubj! )}(h'``ioas_id`` same as for iommu_ioas_map h](j' )}(h ``ioas_id``h]j- )}(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.hhKhjubjC )}(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&]uh1jB hjubeh}(h]h ]h"]h$]h&]uh1j hjhKhjWubj! )}(h``fd`` the memfd to map h](j' )}(h``fd``h]j- )}(hj h]hfd}(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.hhKhjubjC )}(hhh]h)}(hthe memfd to maph]hthe memfd to map}(hj$hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj hKhj!ubah}(h]h ]h"]h$]h&]uh1jB hjubeh}(h]h ]h"]h$]h&]uh1j hj hKhjWubj! )}(h5``start`` byte offset from start of file to map from h](j' )}(h ``start``h]j- )}(hjDh]hstart}(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>ubjC )}(hhh]h)}(h*byte offset from start of file to map fromh]h*byte offset from start of file to map from}(hj]hhhNhNubah}(h]h ]h"]h$]h&]uh1hhjYhKhjZubah}(h]h ]h"]h$]h&]uh1jB hj>ubeh}(h]h ]h"]h$]h&]uh1j hjYhKhjWubj! )}(h&``length`` same as for iommu_ioas_map h](j' )}(h ``length``h]j- )}(hj}h]hlength}(hjhhhNhNubah}(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.hhKhjwubjC )}(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&]uh1jB hjwubeh}(h]h ]h"]h$]h&]uh1j hjhKhjWubj! )}(h#``iova`` same as for iommu_ioas_maph](j' )}(h``iova``h]j- )}(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.hhKhjubjC )}(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&]uh1jB hjubeh}(h]h ]h"]h$]h&]uh1j hjhKhjWubeh}(h]h ]h"]h$]h&]uh1j hjubeh}(h]h ] kernelindentah"]h$]h&]uh1jhjhhhj$hNubh)}(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.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.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhKhjhhubj3)}(hhh]h}(h]h ]h"]h$]h&]entries](j?iommu_ioas_copy (C struct)c.iommu_ioas_copyhNtauh1j2hjhhhj$hNubjD)}(hhh](jI)}(hiommu_ioas_copyh]jO)}(hstruct iommu_ioas_copyh](jU)}(hjXh]hstruct}(hj7hhhNhNubah}(h]h ]jaah"]h$]h&]uh1jThj3hhhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhKubjg)}(h h]h }(hjEhhhNhNubah}(h]h ]jsah"]h$]h&]uh1jfhj3hhhjDhKubjx)}(hiommu_ioas_copyh]j~)}(hj1h]hiommu_ioas_copy}(hjWhhhNhNubah}(h]h ]jah"]h$]h&]uh1j}hjSubah}(h]h ](jjeh"]h$]h&]hhuh1jwhj3hhhjDhKubeh}(h]h ]h"]h$]h&]hhjuh1jNjjhj/hhhjDhKubah}(h]j*ah ](jjeh"]h$]h&]jj)jhuh1jHhjDhKhj,hhubj)}(hhh]h)}(hioctl(IOMMU_IOAS_COPY)h]hioctl(IOMMU_IOAS_COPY)}(hjyhhhNhNubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhKhjvhhubah}(h]h ]h"]h$]h&]uh1jhj,hhhjDhKubeh}(h]h ](jstructeh"]h$]h&]jjjjjjjjjuh1jChhhjhj$hNubj)}(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.hhMhjubj )}(hhh](j! )}(h(``size`` sizeof(struct iommu_ioas_copy) h](j' )}(h``size``h]j- )}(hjh]hsize}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j, hjubaKh}(h]h ]h"]h$]h&]uh1j& hc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhKhjubjC )}(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&]uh1jB hjubeh}(h]h ]h"]h$]h&]uh1j hjhKhjubj! )}(h5``flags`` Combination of enum iommufd_ioas_map_flags h](j' )}(h ``flags``h]j- )}(hjh]hflags}(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.hhKhjubjC )}(hhh]h)}(h*Combination of enum iommufd_ioas_map_flagsh]h*Combination of enum iommufd_ioas_map_flags}(hj8hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj4hKhj5ubah}(h]h ]h"]h$]h&]uh1jB hjubeh}(h]h ]h"]h$]h&]uh1j hj4hKhjubj! )}(h1``dst_ioas_id`` IOAS ID to change the mapping of h](j' )}(h``dst_ioas_id``h]j- )}(hjXh]h dst_ioas_id}(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.hhKhjRubjC )}(hhh]h)}(h IOAS ID to change the mapping ofh]h IOAS ID to change the mapping of}(hjqhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjmhKhjnubah}(h]h ]h"]h$]h&]uh1jB hjRubeh}(h]h ]h"]h$]h&]uh1j hjmhKhjubj! )}(h%``src_ioas_id`` IOAS ID to copy from h](j' )}(h``src_ioas_id``h]j- )}(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.hhKhjubjC )}(hhh]h)}(hIOAS ID to copy fromh]hIOAS ID to copy from}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhKhjubah}(h]h ]h"]h$]h&]uh1jB hjubeh}(h]h ]h"]h$]h&]uh1j hjhKhjubj! )}(h+``length`` Number of bytes to copy and map h](j' )}(h ``length``h]j- )}(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.hhKhjubjC )}(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&]uh1jB hjubeh}(h]h ]h"]h$]h&]uh1j hjhKhjubj! )}(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]j- )}(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.hhKhjubjC )}(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.}(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&]uh1jB hjubeh}(h]h ]h"]h$]h&]uh1j hjhKhjubj! )}(h#``src_iova`` IOVA to start the copyh](j' )}(h ``src_iova``h]j- )}(hj=h]hsrc_iova}(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.hhKhj7ubjC )}(hhh]h)}(hIOVA to start the copyh]hIOVA to start the copy}(hjVhhhNhNubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMhjSubah}(h]h ]h"]h$]h&]uh1jB hj7ubeh}(h]h ]h"]h$]h&]uh1j hjRhKhjubeh}(h]h ]h"]h$]h&]uh1j hjubeh}(h]h ] kernelindentah"]h$]h&]uh1jhjhhhj$hNubh)}(h**Description**h]j*)}(hjh]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)}(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.hhMhjhhubj3)}(hhh]h}(h]h ]h"]h$]h&]entries](j?iommu_ioas_unmap (C struct)c.iommu_ioas_unmaphNtauh1j2hjhhhj$hNubjD)}(hhh](jI)}(hiommu_ioas_unmaph]jO)}(hstruct iommu_ioas_unmaph](jU)}(hjXh]hstruct}(hjhhhNhNubah}(h]h ]jaah"]h$]h&]uh1jThjhhhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhM ubjg)}(h h]h }(hjhhhNhNubah}(h]h ]jsah"]h$]h&]uh1jfhjhhhjhM ubjx)}(hiommu_ioas_unmaph]j~)}(hjh]hiommu_ioas_unmap}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1j}hjubah}(h]h ](jjeh"]h$]h&]hhuh1jwhjhhhjhM ubeh}(h]h ]h"]h$]h&]hhjuh1jNjjhjhhhjhM ubah}(h]jah ](jjeh"]h$]h&]jj)jhuh1jHhjhM hjhhubj)}(hhh]h)}(hioctl(IOMMU_IOAS_UNMAP)h]hioctl(IOMMU_IOAS_UNMAP)}(hjhhhNhNubah}(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'jjjuh1jChhhjhj$hNubj)}(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}(hj3hhhNhNubah}(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)}(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; };}hjLsbah}(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.hhM#hj+ubj )}(hhh](j! )}(h)``size`` sizeof(struct iommu_ioas_unmap) h](j' )}(h``size``h]j- )}(hj|h]hsize}(hj~hhhNhNubah}(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.hhMhjvubjC )}(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&]uh1jB hjvubeh}(h]h ]h"]h$]h&]uh1j hjhMhjsubj! )}(h-``ioas_id`` IOAS ID to change the mapping of h](j' )}(h ``ioas_id``h]j- )}(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.hhMhjubjC )}(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&]uh1jB hjubeh}(h]h ]h"]h$]h&]uh1j hjhMhjsubj! )}(h(``iova`` IOVA to start the unmapping at h](j' )}(h``iova``h]j- )}(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.hhMhjubjC )}(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&]uh1jB hjubeh}(h]h ]h"]h$]h&]uh1j hjhMhjsubj! )}(hG``length`` Number of bytes to unmap, and return back the bytes unmappedh](j' )}(h ``length``h]j- )}(hj'h]hlength}(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!ubjC )}(hhh]h)}(hubjg)}(h h]h }(hjhhhNhNubah}(h]h ]jsah"]h$]h&]uh1jfhjhhhjhM>ubjx)}(hiommufd_option_opsh]j~)}(hjh]hiommufd_option_ops}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1j}hjubah}(h]h ](jjeh"]h$]h&]hhuh1jwhjhhhjhM>ubeh}(h]h ]h"]h$]h&]hhjuh1jNjjhjhhhjhM>ubah}(h]jah ](jjeh"]h$]h&]jj)jhuh1jHhjhM>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&]jjjjjjjjjuh1jChhhjhj$hNubj)}(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*)}(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.hhM@hjubj )}(hhh](j! )}(h/``IOMMU_OPTION_OP_SET`` Set the option's value h](j' )}(h``IOMMU_OPTION_OP_SET``h]j- )}(hjBh]hIOMMU_OPTION_OP_SET}(hjDhhhNhNubah}(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<ubjC )}(hhh]h)}(hSet the option's valueh]hSet the option’s value}(hj[hhhNhNubah}(h]h ]h"]h$]h&]uh1hhjWhMChjXubah}(h]h ]h"]h$]h&]uh1jB hj<ubeh}(h]h ]h"]h$]h&]uh1j hjWhMChj9ubj! )}(h.``IOMMU_OPTION_OP_GET`` Get the option's valueh](j' )}(h``IOMMU_OPTION_OP_GET``h]j- )}(hj{h]hIOMMU_OPTION_OP_GET}(hj}hhhNhNubah}(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.hhMEhjuubjC )}(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&]uh1jB hjuubeh}(h]h ]h"]h$]h&]uh1j hjhMEhj9ubeh}(h]h ]h"]h$]h&]uh1j hjubeh}(h]h ] kernelindentah"]h$]h&]uh1jhjhhhj$hNubj3)}(hhh]h}(h]h ]h"]h$]h&]entries](j?iommu_option (C struct)c.iommu_optionhNtauh1j2hjhhhj$hNubjD)}(hhh](jI)}(h iommu_optionh]jO)}(hstruct iommu_optionh](jU)}(hjXh]hstruct}(hjhhhNhNubah}(h]h ]jaah"]h$]h&]uh1jThjhhhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMKubjg)}(h h]h }(hjhhhNhNubah}(h]h ]jsah"]h$]h&]uh1jfhjhhhjhMKubjx)}(h iommu_optionh]j~)}(hjh]h iommu_option}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1j}hjubah}(h]h ](jjeh"]h$]h&]hhuh1jwhjhhhjhMKubeh}(h]h ]h"]h$]h&]hhjuh1jNjjhjhhhjhMKubah}(h]jah ](jjeh"]h$]h&]jj)jhuh1jHhjhMKhjhhubj)}(hhh]h)}(hiommu option multiplexerh]hiommu option multiplexer}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMGhjhhubah}(h]h ]h"]h$]h&]uh1jhjhhhjhMKubeh}(h]h ](jstructeh"]h$]h&]jjjj/jj/jjjuh1jChhhjhj$hNubj)}(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}(hj;hhhNhNubah}(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.hhMKhj3ubj)}(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; };}hjTsbah}(h]h ]h"]h$]h&]hhuh1jhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMMhj3ubh)}(h **Members**h]j*)}(hjeh]hMembers}(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.hhMVhj3ubj )}(hhh](j! )}(h%``size`` sizeof(struct iommu_option) h](j' )}(h``size``h]j- )}(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.hhMIhj~ubjC )}(hhh]h)}(hsizeof(struct iommu_option)h]hsizeof(struct iommu_option)}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhMIhjubah}(h]h ]h"]h$]h&]uh1jB hj~ubeh}(h]h ]h"]h$]h&]uh1j hjhMIhj{ubj! )}(h)``option_id`` One of enum iommufd_option h](j' )}(h ``option_id``h]j- )}(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.hhMJhjubjC )}(hhh]h)}(hOne of enum iommufd_optionh]hOne of enum iommufd_option}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhMJhjubah}(h]h ]h"]h$]h&]uh1jB hjubeh}(h]h ]h"]h$]h&]uh1j hjhMJhj{ubj! )}(h&``op`` One of enum iommufd_option_ops h](j' )}(h``op``h]j- )}(hjh]hop}(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.hhMKhjubjC )}(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&]uh1jB hjubeh}(h]h ]h"]h$]h&]uh1j hj hMKhj{ubj! )}(h``__reserved`` Must be 0 h](j' )}(h``__reserved``h]j- )}(hj/ h]h __reserved}(hj1 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.hhMLhj) ubjC )}(hhh]h)}(h Must be 0h]h Must be 0}(hjH hhhNhNubah}(h]h ]h"]h$]h&]uh1hhjD hMLhjE ubah}(h]h ]h"]h$]h&]uh1jB hj) ubeh}(h]h ]h"]h$]h&]uh1j hjD hMLhj{ubj! )}(h+``object_id`` ID of the object if required h](j' )}(h ``object_id``h]j- )}(hjh h]h object_id}(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.hhMMhjb ubjC )}(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&]uh1jB hjb ubeh}(h]h ]h"]h$]h&]uh1j hj} hMMhj{ubj! )}(h6``val64`` Option value to set or value returned on geth](j' )}(h ``val64``h]j- )}(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 ubjC )}(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&]uh1jB hj ubeh}(h]h ]h"]h$]h&]uh1j hj hMMhj{ubeh}(h]h ]h"]h$]h&]uh1j hj3ubeh}(h]h ] kernelindentah"]h$]h&]uh1jhjhhhj$hNubh)}(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.hhMNhjhhubj3)}(hhh]h}(h]h ]h"]h$]h&]entries](j?iommufd_vfio_ioas_op (C enum)c.iommufd_vfio_ioas_ophNtauh1j2hjhhhj$hNubjD)}(hhh](jI)}(hiommufd_vfio_ioas_oph]jO)}(henum iommufd_vfio_ioas_oph](jU)}(hjh]henum}(hj"!hhhNhNubah}(h]h ]jaah"]h$]h&]uh1jThj!hhhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMUubjg)}(h h]h }(hj0!hhhNhNubah}(h]h ]jsah"]h$]h&]uh1jfhj!hhhj/!hMUubjx)}(hiommufd_vfio_ioas_oph]j~)}(hj!h]hiommufd_vfio_ioas_op}(hjB!hhhNhNubah}(h]h ]jah"]h$]h&]uh1j}hj>!ubah}(h]h ](jjeh"]h$]h&]hhuh1jwhj!hhhj/!hMUubeh}(h]h ]h"]h$]h&]hhjuh1jNjjhj!hhhj/!hMUubah}(h]j!ah ](jjeh"]h$]h&]jj)jhuh1jHhj/!hMUhj!hhubj)}(hhh]h)}(hIOMMU_VFIO_IOAS_* ioctlsh]hIOMMU_VFIO_IOAS_* ioctls}(hjd!hhhNhNubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhM^hja!hhubah}(h]h ]h"]h$]h&]uh1jhj!hhhj/!hMUubeh}(h]h ](jenumeh"]h$]h&]jjjj|!jj|!jjjuh1jChhhjhj$hNubj)}(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!ubj )}(hhh](j! )}(h;``IOMMU_VFIO_IOAS_GET`` Get the current compatibility IOAS h](j' )}(h``IOMMU_VFIO_IOAS_GET``h]j- )}(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!ubjC )}(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&]uh1jB hj!ubeh}(h]h ]h"]h$]h&]uh1j hj!hMehj!ubj! )}(h>``IOMMU_VFIO_IOAS_SET`` Change the current compatibility IOAS h](j' )}(h``IOMMU_VFIO_IOAS_SET``h]j- )}(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!ubjC )}(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&]uh1jB hj!ubeh}(h]h ]h"]h$]h&]uh1j hj!hMhhj!ubj! )}(h4``IOMMU_VFIO_IOAS_CLEAR`` Disable VFIO compatibilityh](j' )}(h``IOMMU_VFIO_IOAS_CLEAR``h]j- )}(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"ubjC )}(hhh]h)}(hDisable VFIO compatibilityh]hDisable VFIO compatibility}(hj0"hhhNhNubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMkhj-"ubah}(h]h ]h"]h$]h&]uh1jB hj"ubeh}(h]h ]h"]h$]h&]uh1j hj,"hMjhj!ubeh}(h]h ]h"]h$]h&]uh1j hj!ubeh}(h]h ] kernelindentah"]h$]h&]uh1jhjhhhj$hNubj3)}(hhh]h}(h]h ]h"]h$]h&]entries](j?iommu_vfio_ioas (C struct)c.iommu_vfio_ioashNtauh1j2hjhhhj$hNubjD)}(hhh](jI)}(hiommu_vfio_ioash]jO)}(hstruct iommu_vfio_ioash](jU)}(hjXh]hstruct}(hjq"hhhNhNubah}(h]h ]jaah"]h$]h&]uh1jThjm"hhhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMpubjg)}(h h]h }(hj"hhhNhNubah}(h]h ]jsah"]h$]h&]uh1jfhjm"hhhj~"hMpubjx)}(hiommu_vfio_ioash]j~)}(hjk"h]hiommu_vfio_ioas}(hj"hhhNhNubah}(h]h ]jah"]h$]h&]uh1j}hj"ubah}(h]h ](jjeh"]h$]h&]hhuh1jwhjm"hhhj~"hMpubeh}(h]h ]h"]h$]h&]hhjuh1jNjjhji"hhhj~"hMpubah}(h]jd"ah ](jjeh"]h$]h&]jj)jhuh1jHhj~"hMphjf"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&]uh1jhjf"hhhj~"hMpubeh}(h]h ](jstructeh"]h$]h&]jjjj"jj"jjjuh1jChhhjhj$hNubj)}(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"ubj )}(hhh](j! )}(h(``size`` sizeof(struct iommu_vfio_ioas) h](j' )}(h``size``h]j- )}(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.hhMlhj#ubjC )}(hhh]h)}(hsizeof(struct iommu_vfio_ioas)h]hsizeof(struct iommu_vfio_ioas)}(hj9#hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj5#hMlhj6#ubah}(h]h ]h"]h$]h&]uh1jB hj#ubeh}(h]h ]h"]h$]h&]uh1j hj5#hMlhj#ubj! )}(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]j- )}(hjY#h]hioas_id}(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.hhMnhjS#ubjC )}(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}(hjr#hhhNhNubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMmhjo#ubah}(h]h ]h"]h$]h&]uh1jB hjS#ubeh}(h]h ]h"]h$]h&]uh1j hjn#hMnhj#ubj! )}(h(``op`` One of enum iommufd_vfio_ioas_op h](j' )}(h``op``h]j- )}(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#ubjC )}(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&]uh1jB hj#ubeh}(h]h ]h"]h$]h&]uh1j hj#hMohj#ubj! )}(h``__reserved`` Must be 0h](j' )}(h``__reserved``h]j- )}(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#ubjC )}(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&]uh1jB hj#ubeh}(h]h ]h"]h$]h&]uh1j hj#hMohj#ubeh}(h]h ]h"]h$]h&]uh1j hj"ubeh}(h]h ] kernelindentah"]h$]h&]uh1jhjhhhj$hNubh)}(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.}(hj%$hhhNhNubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMphjhhubj3)}(hhh]h}(h]h ]h"]h$]h&]entries](j?!iommufd_hwpt_alloc_flags (C enum)c.iommufd_hwpt_alloc_flagshNtauh1j2hjhhhj$hNubjD)}(hhh](jI)}(hiommufd_hwpt_alloc_flagsh]jO)}(henum iommufd_hwpt_alloc_flagsh](jU)}(hjh]henum}(hjM$hhhNhNubah}(h]h ]jaah"]h$]h&]uh1jThjI$hhhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMzubjg)}(h h]h }(hj[$hhhNhNubah}(h]h ]jsah"]h$]h&]uh1jfhjI$hhhjZ$hMzubjx)}(hiommufd_hwpt_alloc_flagsh]j~)}(hjG$h]hiommufd_hwpt_alloc_flags}(hjm$hhhNhNubah}(h]h ]jah"]h$]h&]uh1j}hji$ubah}(h]h ](jjeh"]h$]h&]hhuh1jwhjI$hhhjZ$hMzubeh}(h]h ]h"]h$]h&]hhjuh1jNjjhjE$hhhjZ$hMzubah}(h]j@$ah ](jjeh"]h$]h&]jj)jhuh1jHhjZ$hMzhjB$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&]uh1jhjB$hhhjZ$hMzubeh}(h]h ](jenumeh"]h$]h&]jjjj$jj$jjjuh1jChhhjhj$hNubj)}(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$ubj )}(hhh](j! )}(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]j- )}(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$ubjC )}(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&]uh1jB hj$ubeh}(h]h ]h"]h$]h&]uh1j hj$hMhj$ubj! )}(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]j- )}(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%ubjC )}(hhh]h)}(hHDirty tracking support for device IOMMU is enforced on device attachmenth]hHDirty tracking support for device IOMMU is enforced on device attachment}(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&]uh1jB hj%ubeh}(h]h ]h"]h$]h&]uh1j hj%hMhj$ubj! )}(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]j- )}(hjD%h]hIOMMU_HWPT_FAULT_ID_VALID}(hjF%hhhNhNubah}(h]h ]h"]h$]h&]uh1j, hjB%ubah}(h]h ]h"]h$]h&]uh1j& hc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMhj>%ubjC )}(hhh]h)}(h4The fault_id field of hwpt allocation data is valid.h]h4The fault_id field of hwpt allocation data is valid.}(hj]%hhhNhNubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMhjZ%ubah}(h]h ]h"]h$]h&]uh1jB hj>%ubeh}(h]h ]h"]h$]h&]uh1j hjY%hMhj$ubj! )}(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]j- )}(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.hhMhjx%ubjC )}(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&]uh1jB hjx%ubeh}(h]h ]h"]h$]h&]uh1j hj%hMhj$ubeh}(h]h ]h"]h$]h&]uh1j hj$ubeh}(h]h ] kernelindentah"]h$]h&]uh1jhjhhhj$hNubj3)}(hhh]h}(h]h ]h"]h$]h&]entries](j? iommu_hwpt_vtd_s1_flags (C enum)c.iommu_hwpt_vtd_s1_flagshNtauh1j2hjhhhj$hNubjD)}(hhh](jI)}(hiommu_hwpt_vtd_s1_flagsh]jO)}(henum iommu_hwpt_vtd_s1_flagsh](jU)}(hjh]henum}(hj%hhhNhNubah}(h]h ]jaah"]h$]h&]uh1jThj%hhhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMubjg)}(h h]h }(hj%hhhNhNubah}(h]h ]jsah"]h$]h&]uh1jfhj%hhhj%hMubjx)}(hiommu_hwpt_vtd_s1_flagsh]j~)}(hj%h]hiommu_hwpt_vtd_s1_flags}(hj%hhhNhNubah}(h]h ]jah"]h$]h&]uh1j}hj%ubah}(h]h ](jjeh"]h$]h&]hhuh1jwhj%hhhj%hMubeh}(h]h ]h"]h$]h&]hhjuh1jNjjhj%hhhj%hMubah}(h]j%ah ](jjeh"]h$]h&]jj)jhuh1jHhj%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&]jjjj2&jj2&jjjuh1jChhhjhj$hNubj)}(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*)}(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.hhMhj6&ubj )}(hhh](j! )}(h(``IOMMU_VTD_S1_SRE`` Supervisor request h](j' )}(h``IOMMU_VTD_S1_SRE``h]j- )}(hj[&h]hIOMMU_VTD_S1_SRE}(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.hhMhjU&ubjC )}(hhh]h)}(hSupervisor requesth]hSupervisor request}(hjt&hhhNhNubah}(h]h ]h"]h$]h&]uh1hhjp&hMhjq&ubah}(h]h ]h"]h$]h&]uh1jB hjU&ubeh}(h]h ]h"]h$]h&]uh1j hjp&hMhjR&ubj! )}(h-``IOMMU_VTD_S1_EAFE`` Extended access enable h](j' )}(h``IOMMU_VTD_S1_EAFE``h]j- )}(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&ubjC )}(hhh]h)}(hExtended access enableh]hExtended access enable}(hj&hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj&hMhj&ubah}(h]h ]h"]h$]h&]uh1jB hj&ubeh}(h]h ]h"]h$]h&]uh1j hj&hMhjR&ubj! )}(h)``IOMMU_VTD_S1_WPE`` Write protect enableh](j' )}(h``IOMMU_VTD_S1_WPE``h]j- )}(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&ubjC )}(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&]uh1jB hj&ubeh}(h]h ]h"]h$]h&]uh1j hj&hMhjR&ubeh}(h]h ]h"]h$]h&]uh1j hj6&ubeh}(h]h ] kernelindentah"]h$]h&]uh1jhjhhhj$hNubj3)}(hhh]h}(h]h ]h"]h$]h&]entries](j?iommu_hwpt_vtd_s1 (C struct)c.iommu_hwpt_vtd_s1hNtauh1j2hjhhhj$hNubjD)}(hhh](jI)}(hiommu_hwpt_vtd_s1h]jO)}(hstruct iommu_hwpt_vtd_s1h](jU)}(hjXh]hstruct}(hj''hhhNhNubah}(h]h ]jaah"]h$]h&]uh1jThj#'hhhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMubjg)}(h h]h }(hj5'hhhNhNubah}(h]h ]jsah"]h$]h&]uh1jfhj#'hhhj4'hMubjx)}(hiommu_hwpt_vtd_s1h]j~)}(hj!'h]hiommu_hwpt_vtd_s1}(hjG'hhhNhNubah}(h]h ]jah"]h$]h&]uh1j}hjC'ubah}(h]h ](jjeh"]h$]h&]hhuh1jwhj#'hhhj4'hMubeh}(h]h ]h"]h$]h&]hhjuh1jNjjhj'hhhj4'hMubah}(h]j'ah ](jjeh"]h$]h&]jj)jhuh1jHhj4'hMhj'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)}(hji'hhhNhNubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMhjf'hhubah}(h]h ]h"]h$]h&]uh1jhj'hhhj4'hMubeh}(h]h ](jstructeh"]h$]h&]jjjj'jj'jjjuh1jChhhjhj$hNubj)}(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'ubj )}(hhh](j! )}(h6``flags`` Combination of enum iommu_hwpt_vtd_s1_flags h](j' )}(h ``flags``h]j- )}(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'ubjC )}(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&]uh1jB hj'ubeh}(h]h ]h"]h$]h&]uh1j hj'hMhj'ubj! )}(h;``pgtbl_addr`` The base address of the stage-1 page table. h](j' )}(h``pgtbl_addr``h]j- )}(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 (ubjC )}(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&]uh1hhj$(hMhj%(ubah}(h]h ]h"]h$]h&]uh1jB hj (ubeh}(h]h ]h"]h$]h&]uh1j hj$(hMhj'ubj! )}(h;``addr_width`` The address width of the stage-1 page table h](j' )}(h``addr_width``h]j- )}(hjH(h]h addr_width}(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(ubjC )}(hhh]h)}(h+The address width of the stage-1 page tableh]h+The address width of the stage-1 page table}(hja(hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj](hMhj^(ubah}(h]h ]h"]h$]h&]uh1jB hjB(ubeh}(h]h ]h"]h$]h&]uh1j hj](hMhj'ubj! )}(h``__reserved`` Must be 0h](j' )}(h``__reserved``h]j- )}(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{(ubjC )}(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&]uh1jB hj{(ubeh}(h]h ]h"]h$]h&]uh1j hj(hMhj'ubeh}(h]h ]h"]h$]h&]uh1j hj'ubeh}(h]h ] kernelindentah"]h$]h&]uh1jhjhhhj$hNubj3)}(hhh]h}(h]h ]h"]h$]h&]entries](j? iommu_hwpt_arm_smmuv3 (C struct)c.iommu_hwpt_arm_smmuv3hNtauh1j2hjhhhj$hNubjD)}(hhh](jI)}(hiommu_hwpt_arm_smmuv3h]jO)}(hstruct iommu_hwpt_arm_smmuv3h](jU)}(hjXh]hstruct}(hj(hhhNhNubah}(h]h ]jaah"]h$]h&]uh1jThj(hhhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMubjg)}(h h]h }(hj(hhhNhNubah}(h]h ]jsah"]h$]h&]uh1jfhj(hhhj(hMubjx)}(hiommu_hwpt_arm_smmuv3h]j~)}(hj(h]hiommu_hwpt_arm_smmuv3}(hj(hhhNhNubah}(h]h ]jah"]h$]h&]uh1j}hj(ubah}(h]h ](jjeh"]h$]h&]hhuh1jwhj(hhhj(hMubeh}(h]h ]h"]h$]h&]hhjuh1jNjjhj(hhhj(hMubah}(h]j(ah ](jjeh"]h$]h&]jj)jhuh1jHhj(hMhj(hhubj)}(hhh]h)}(h2ARM SMMUv3 nested STE (IOMMU_HWPT_DATA_ARM_SMMUV3)h]h2ARM SMMUv3 nested STE (IOMMU_HWPT_DATA_ARM_SMMUV3)}(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&]jjjj5)jj5)jjjuh1jChhhjhj$hNubj)}(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}(hjA)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.hhMhj9)ubj)}(h1ubh:}(hj>1hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMhj:1ubj)}(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; };}hj[1sbah}(h]h ]h"]h$]h&]hhuh1jhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMhj:1ubh)}(h **Members**h]j*)}(hjl1h]hMembers}(hjn1hhhNhNubah}(h]h ]h"]h$]h&]uh1j)hjj1ubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhM!hj:1ubj )}(hhh](j! )}(h6``flags`` Combination of enum iommu_hw_info_vtd_flags h](j' )}(h ``flags``h]j- )}(hj1h]hflags}(hj1hhhNhNubah}(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.hhMhj1ubjC )}(hhh]h)}(h+Combination of enum iommu_hw_info_vtd_flagsh]h+Combination of enum iommu_hw_info_vtd_flags}(hj1hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj1hMhj1ubah}(h]h ]h"]h$]h&]uh1jB hj1ubeh}(h]h ]h"]h$]h&]uh1j hj1hMhj1ubj! )}(h``__reserved`` Must be 0 h](j' )}(h``__reserved``h]j- )}(hj1h]h __reserved}(hj1hhhNhNubah}(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.hhMhj1ubjC )}(hhh]h)}(h Must be 0h]h Must be 0}(hj1hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj1hMhj1ubah}(h]h ]h"]h$]h&]uh1jB hj1ubeh}(h]h ]h"]h$]h&]uh1j hj1hMhj1ubj! )}(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]j- )}(hj1h]hcap_reg}(hj1hhhNhNubah}(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.hhMhj1ubjC )}(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.}(hj2hhhNhNubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMhj2ubah}(h]h ]h"]h$]h&]uh1jB hj1ubeh}(h]h ]h"]h$]h&]uh1j hj2hMhj1ubj! )}(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]j- )}(hj72h]hecap_reg}(hj92hhhNhNubah}(h]h ]h"]h$]h&]uh1j, hj52ubah}(h]h ]h"]h$]h&]uh1j& hc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMhj12ubjC )}(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.}(hjP2hhhNhNubah}(h]h ]h"]h$]h&]uh1hhjL2hMhjM2ubah}(h]h ]h"]h$]h&]uh1jB hj12ubeh}(h]h ]h"]h$]h&]uh1j hjL2hMhj1ubeh}(h]h ]h"]h$]h&]uh1j hj:1ubeh}(h]h ] kernelindentah"]h$]h&]uh1jhjhhhj$hNubh)}(h**Description**h]j*)}(hjy2h]h Description}(hj{2hhhNhNubah}(h]h ]h"]h$]h&]uh1j)hjw2ubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhM hjhhubh)}(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.}(hj2hhhNhNubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMhjhhubj3)}(hhh]h}(h]h ]h"]h$]h&]entries](j?#iommu_hw_info_arm_smmuv3 (C struct)c.iommu_hw_info_arm_smmuv3hNtauh1j2hjhhhj$hNubjD)}(hhh](jI)}(hiommu_hw_info_arm_smmuv3h]jO)}(hstruct iommu_hw_info_arm_smmuv3h](jU)}(hjXh]hstruct}(hj2hhhNhNubah}(h]h ]jaah"]h$]h&]uh1jThj2hhhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhM#ubjg)}(h h]h }(hj2hhhNhNubah}(h]h ]jsah"]h$]h&]uh1jfhj2hhhj2hM#ubjx)}(hiommu_hw_info_arm_smmuv3h]j~)}(hj2h]hiommu_hw_info_arm_smmuv3}(hj2hhhNhNubah}(h]h ]jah"]h$]h&]uh1j}hj2ubah}(h]h ](jjeh"]h$]h&]hhuh1jwhj2hhhj2hM#ubeh}(h]h ]h"]h$]h&]hhjuh1jNjjhj2hhhj2hM#ubah}(h]j2ah ](jjeh"]h$]h&]jj)jhuh1jHhj2hM#hj2hhubj)}(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)}(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&]uh1jhj2hhhj2hM#ubeh}(h]h ](jstructeh"]h$]h&]jjjj3jj3jjjuh1jChhhjhj$hNubj)}(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}(hj3hhhNhNubah}(h]h ]h"]h$]h&]uh1j)hj3ubh:}(hj3hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhM-hj3ubj)}(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; };}hj63sbah}(h]h ]h"]h$]h&]hhuh1jhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhM/hj3ubh)}(h **Members**h]j*)}(hjG3h]hMembers}(hjI3hhhNhNubah}(h]h ]h"]h$]h&]uh1j)hjE3ubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhM7hj3ubj )}(hhh](j! )}(h``flags`` Must be set to 0 h](j' )}(h ``flags``h]j- )}(hjf3h]hflags}(hjh3hhhNhNubah}(h]h ]h"]h$]h&]uh1j, hjd3ubah}(h]h ]h"]h$]h&]uh1j& hc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhM-hj`3ubjC )}(hhh]h)}(hMust be set to 0h]hMust be set to 0}(hj3hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj{3hM-hj|3ubah}(h]h ]h"]h$]h&]uh1jB hj`3ubeh}(h]h ]h"]h$]h&]uh1j hj{3hM-hj]3ubj! )}(h``__reserved`` Must be 0 h](j' )}(h``__reserved``h]j- )}(hj3h]h __reserved}(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.hhM.hj3ubjC )}(hhh]h)}(h Must be 0h]h Must be 0}(hj3hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj3hM.hj3ubah}(h]h ]h"]h$]h&]uh1jB hj3ubeh}(h]h ]h"]h$]h&]uh1j hj3hM.hj]3ubj! )}(hK``idr`` Implemented features for ARM SMMU Non-secure programming interface h](j' )}(h``idr``h]j- )}(hj3h]hidr}(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.hhM/hj3ubjC )}(hhh]h)}(hBImplemented features for ARM SMMU Non-secure programming interfaceh]hBImplemented features for ARM SMMU Non-secure programming interface}(hj3hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj3hM/hj3ubah}(h]h ]h"]h$]h&]uh1jB hj3ubeh}(h]h ]h"]h$]h&]uh1j hj3hM/hj]3ubj! )}(hn``iidr`` Information about the implementation and implementer of ARM SMMU, and architecture version supported h](j' )}(h``iidr``h]j- )}(hj4h]hiidr}(hj4hhhNhNubah}(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.hhM1hj 4ubjC )}(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}(hj*4hhhNhNubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhM0hj'4ubah}(h]h ]h"]h$]h&]uh1jB hj 4ubeh}(h]h ]h"]h$]h&]uh1j hj&4hM1hj]3ubj! )}(h&``aidr`` ARM SMMU architecture versionh](j' )}(h``aidr``h]j- )}(hjK4h]haidr}(hjM4hhhNhNubah}(h]h ]h"]h$]h&]uh1j, hjI4ubah}(h]h ]h"]h$]h&]uh1j& hc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhM1hjE4ubjC )}(hhh]h)}(hARM SMMU architecture versionh]hARM SMMU architecture version}(hjd4hhhNhNubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhM2hja4ubah}(h]h ]h"]h$]h&]uh1jB hjE4ubeh}(h]h ]h"]h$]h&]uh1j hj`4hM1hj]3ubeh}(h]h ]h"]h$]h&]uh1j hj3ubeh}(h]h ] kernelindentah"]h$]h&]uh1jhjhhhj$hNubh)}(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)}(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 }(hj4hhhNhNubj*)}(h**idr**h]hidr}(hj4hhhNhNubah}(h]h ]h"]h$]h&]uh1j)hj4ubh, }(hj4hhhNhNubj*)}(h**iidr**h]hiidr}(hj4hhhNhNubah}(h]h ]h"]h$]h&]uh1j)hj4ubh and }(hj4hhhNhNubj*)}(h**aidr**h]haidr}(hj4hhhNhNubah}(h]h ]h"]h$]h&]uh1j)hj4ubhF, please refer to the chapters from 6.3.1 to 6.3.6 in the SMMUv3 Spec.}(hj4hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhM2hjhhubh)}(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:}(hj4hhhNhNubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhM5hjhhubh)}(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}(hj4hhhNhNubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhM8hjhhubj)}(hhh](j)}(h@S1P should be assumed to be true if a NESTED HWPT can be createdh]h)}(hj 5h]h@S1P should be assumed to be true if a NESTED HWPT can be created}(hj5hhhNhNubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhM=hj 5ubah}(h]h ]h"]h$]h&]uh1jhj5ubj)}(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.}(hj&5hhhNhNubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhM>hj"5ubah}(h]h ]h"]h$]h&]uh1jhj5ubj)}(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.}(hj?5hhhNhNubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhM@hj;5ubah}(h]h ]h"]h$]h&]uh1jhj5ubeh}(h]h ]h"]h$]h&]jjuh1jhj5hM=hjhhubh)}(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.}(hjZ5hhhNhNubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMChjhhubj3)}(hhh]h}(h]h ]h"]h$]h&]entries](j?'iommu_hw_info_tegra241_cmdqv (C struct)c.iommu_hw_info_tegra241_cmdqvhNtauh1j2hjhhhj$hNubjD)}(hhh](jI)}(hiommu_hw_info_tegra241_cmdqvh]jO)}(h#struct iommu_hw_info_tegra241_cmdqvh](jU)}(hjXh]hstruct}(hj5hhhNhNubah}(h]h ]jaah"]h$]h&]uh1jThj~5hhhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMLubjg)}(h h]h }(hj5hhhNhNubah}(h]h ]jsah"]h$]h&]uh1jfhj~5hhhj5hMLubjx)}(hiommu_hw_info_tegra241_cmdqvh]j~)}(hj|5h]hiommu_hw_info_tegra241_cmdqv}(hj5hhhNhNubah}(h]h ]jah"]h$]h&]uh1j}hj5ubah}(h]h ](jjeh"]h$]h&]hhuh1jwhj~5hhhj5hMLubeh}(h]h ]h"]h$]h&]hhjuh1jNjjhjz5hhhj5hMLubah}(h]ju5ah ](jjeh"]h$]h&]jj)jhuh1jHhj5hMLhjw5hhubj)}(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)}(hj5hhhNhNubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMShj5hhubah}(h]h ]h"]h$]h&]uh1jhjw5hhhj5hMLubeh}(h]h ](jstructeh"]h$]h&]jjjj5jj5jjjuh1jChhhjhj$hNubj)}(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}(hj5hhhNhNubah}(h]h ]h"]h$]h&]uh1j)hj5ubh:}(hj5hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMWhj5ubj)}(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; };}hj6sbah}(h]h ]h"]h$]h&]hhuh1jhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMYhj5ubh)}(h **Members**h]j*)}(hj6h]hMembers}(hj6hhhNhNubah}(h]h ]h"]h$]h&]uh1j)hj6ubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMahj5ubj )}(hhh](j! )}(h``flags`` Must be 0 h](j' )}(h ``flags``h]j- )}(hj16h]hflags}(hj36hhhNhNubah}(h]h ]h"]h$]h&]uh1j, hj/6ubah}(h]h ]h"]h$]h&]uh1j& hc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMWhj+6ubjC )}(hhh]h)}(h Must be 0h]h Must be 0}(hjJ6hhhNhNubah}(h]h ]h"]h$]h&]uh1hhjF6hMWhjG6ubah}(h]h ]h"]h$]h&]uh1jB hj+6ubeh}(h]h ]h"]h$]h&]uh1j hjF6hMWhj(6ubj! )}(hC``version`` Version number for the CMDQ-V HW for PARAM bits[03:00] h](j' )}(h ``version``h]j- )}(hjj6h]hversion}(hjl6hhhNhNubah}(h]h ]h"]h$]h&]uh1j, hjh6ubah}(h]h ]h"]h$]h&]uh1j& hc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMXhjd6ubjC )}(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]}(hj6hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj6hMXhj6ubah}(h]h ]h"]h$]h&]uh1jB hjd6ubeh}(h]h ]h"]h$]h&]uh1j hj6hMXhj(6ubj! )}(hH``log2vcmdqs`` Log2 of the total number of VCMDQs for PARAM bits[07:04] h](j' )}(h``log2vcmdqs``h]j- )}(hj6h]h log2vcmdqs}(hj6hhhNhNubah}(h]h ]h"]h$]h&]uh1j, hj6ubah}(h]h ]h"]h$]h&]uh1j& hc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMYhj6ubjC )}(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]}(hj6hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj6hMYhj6ubah}(h]h ]h"]h$]h&]uh1jB hj6ubeh}(h]h ]h"]h$]h&]uh1j hj6hMYhj(6ubj! )}(hQ``log2vsids`` Log2 of the total number of SID replacements for PARAM bits[15:12] h](j' )}(h ``log2vsids``h]j- )}(hj6h]h log2vsids}(hj6hhhNhNubah}(h]h ]h"]h$]h&]uh1j, hj6ubah}(h]h ]h"]h$]h&]uh1j& hc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMZhj6ubjC )}(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]}(hj6hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj6hMZhj6ubah}(h]h ]h"]h$]h&]uh1jB hj6ubeh}(h]h ]h"]h$]h&]uh1j hj6hMZhj(6ubj! )}(h``__reserved`` Must be 0h](j' )}(h``__reserved``h]j- )}(hj7h]h __reserved}(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.hhMZhj7ubjC )}(hhh]h)}(h Must be 0h]h Must be 0}(hj.7hhhNhNubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhM[hj+7ubah}(h]h ]h"]h$]h&]uh1jB hj7ubeh}(h]h ]h"]h$]h&]uh1j hj*7hMZhj(6ubeh}(h]h ]h"]h$]h&]uh1j hj5ubeh}(h]h ] kernelindentah"]h$]h&]uh1jhjhhhj$hNubh)}(h**Description**h]j*)}(hjX7h]h Description}(hjZ7hhhNhNubah}(h]h ]h"]h$]h&]uh1j)hjV7ubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhM^hjhhubh)}(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.}(hjn7hhhNhNubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhM[hjhhubj3)}(hhh]h}(h]h ]h"]h$]h&]entries](j?iommu_hw_info_type (C enum)c.iommu_hw_info_typehNtauh1j2hjhhhj$hNubjD)}(hhh](jI)}(hiommu_hw_info_typeh]jO)}(henum iommu_hw_info_typeh](jU)}(hjh]henum}(hj7hhhNhNubah}(h]h ]jaah"]h$]h&]uh1jThj7hhhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMbubjg)}(h h]h }(hj7hhhNhNubah}(h]h ]jsah"]h$]h&]uh1jfhj7hhhj7hMbubjx)}(hiommu_hw_info_typeh]j~)}(hj7h]hiommu_hw_info_type}(hj7hhhNhNubah}(h]h ]jah"]h$]h&]uh1j}hj7ubah}(h]h ](jjeh"]h$]h&]hhuh1jwhj7hhhj7hMbubeh}(h]h ]h"]h$]h&]hhjuh1jNjjhj7hhhj7hMbubah}(h]j7ah ](jjeh"]h$]h&]jj)jhuh1jHhj7hMbhj7hhubj)}(hhh]h)}(hIOMMU Hardware Info Typesh]hIOMMU Hardware Info Types}(hj7hhhNhNubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMihj7hhubah}(h]h ]h"]h$]h&]uh1jhj7hhhj7hMbubeh}(h]h ](jenumeh"]h$]h&]jjjj7jj7jjjuh1jChhhjhj$hNubj)}(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 typeh](h)}(h **Constants**h]j*)}(hj7h]h Constants}(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.hhMmhj7ubj )}(hhh](j! )}(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]j- )}(hj8h]hIOMMU_HW_INFO_TYPE_NONE}(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.hhMqhj8ubjC )}(hhh]h)}(h6Output by the drivers that do not report hardware infoh]h6Output by the drivers that do not report hardware info}(hj28hhhNhNubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMphj/8ubah}(h]h ]h"]h$]h&]uh1jB hj8ubeh}(h]h ]h"]h$]h&]uh1j hj.8hMqhj8ubj! )}(hC``IOMMU_HW_INFO_TYPE_DEFAULT`` Input to request for a default type h](j' )}(h``IOMMU_HW_INFO_TYPE_DEFAULT``h]j- )}(hjS8h]hIOMMU_HW_INFO_TYPE_DEFAULT}(hjU8hhhNhNubah}(h]h ]h"]h$]h&]uh1j, hjQ8ubah}(h]h ]h"]h$]h&]uh1j& hc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMthjM8ubjC )}(hhh]h)}(h#Input to request for a default typeh]h#Input to request for a default type}(hjl8hhhNhNubah}(h]h ]h"]h$]h&]uh1hhjh8hMthji8ubah}(h]h ]h"]h$]h&]uh1jB hjM8ubeh}(h]h ]h"]h$]h&]uh1j hjh8hMthj8ubj! )}(h<``IOMMU_HW_INFO_TYPE_INTEL_VTD`` Intel VT-d iommu info type h](j' )}(h ``IOMMU_HW_INFO_TYPE_INTEL_VTD``h]j- )}(hj8h]hIOMMU_HW_INFO_TYPE_INTEL_VTD}(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.hhMwhj8ubjC )}(hhh]h)}(hIntel VT-d iommu info typeh]hIntel VT-d iommu info type}(hj8hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj8hMwhj8ubah}(h]h ]h"]h$]h&]uh1jB hj8ubeh}(h]h ]h"]h$]h&]uh1j hj8hMwhj8ubj! )}(h=``IOMMU_HW_INFO_TYPE_ARM_SMMUV3`` ARM SMMUv3 iommu info type h](j' )}(h!``IOMMU_HW_INFO_TYPE_ARM_SMMUV3``h]j- )}(hj8h]hIOMMU_HW_INFO_TYPE_ARM_SMMUV3}(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.hhMzhj8ubjC )}(hhh]h)}(hARM SMMUv3 iommu info typeh]hARM SMMUv3 iommu info type}(hj8hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj8hMzhj8ubah}(h]h ]h"]h$]h&]uh1jB hj8ubeh}(h]h ]h"]h$]h&]uh1j hj8hMzhj8ubj! )}(h```IOMMU_HW_INFO_TYPE_TEGRA241_CMDQV`` NVIDIA Tegra241 CMDQV (extension for ARM SMMUv3) info typeh](j' )}(h%``IOMMU_HW_INFO_TYPE_TEGRA241_CMDQV``h]j- )}(hj8h]h!IOMMU_HW_INFO_TYPE_TEGRA241_CMDQV}(hj9hhhNhNubah}(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.hhM}hj8ubjC )}(hhh]h)}(h:NVIDIA Tegra241 CMDQV (extension for ARM SMMUv3) info typeh]h:NVIDIA Tegra241 CMDQV (extension for ARM SMMUv3) info type}(hj9hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj9hM}hj9ubah}(h]h ]h"]h$]h&]uh1jB hj8ubeh}(h]h ]h"]h$]h&]uh1j hj9hM}hj8ubeh}(h]h ]h"]h$]h&]uh1j hj7ubeh}(h]h ] kernelindentah"]h$]h&]uh1jhjhhhj$hNubj3)}(hhh]h}(h]h ]h"]h$]h&]entries](j? iommufd_hw_capabilities (C enum)c.iommufd_hw_capabilitieshNtauh1j2hjhhhj$hNubjD)}(hhh](jI)}(hiommufd_hw_capabilitiesh]jO)}(henum iommufd_hw_capabilitiesh](jU)}(hjh]henum}(hjW9hhhNhNubah}(h]h ]jaah"]h$]h&]uh1jThjS9hhhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMubjg)}(h h]h }(hje9hhhNhNubah}(h]h ]jsah"]h$]h&]uh1jfhjS9hhhjd9hMubjx)}(hiommufd_hw_capabilitiesh]j~)}(hjQ9h]hiommufd_hw_capabilities}(hjw9hhhNhNubah}(h]h ]jah"]h$]h&]uh1j}hjs9ubah}(h]h ](jjeh"]h$]h&]hhuh1jwhjS9hhhjd9hMubeh}(h]h ]h"]h$]h&]hhjuh1jNjjhjO9hhhjd9hMubah}(h]jJ9ah ](jjeh"]h$]h&]jj)jhuh1jHhjd9hMhjL9hhubj)}(hhh]h}(h]h ]h"]h$]h&]uh1jhjL9hhhjd9hMubeh}(h]h ](jenumeh"]h$]h&]jjjj9jj9jjjuh1jChhhjhj$hNubj)}(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.h](h)}(h **Constants**h]j*)}(hj9h]h Constants}(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.hhMhj9ubj )}(hhh](j! )}(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]j- )}(hj9h]hIOMMU_HW_CAP_DIRTY_TRACKING}(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.hhMhj9ubjC )}(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:}(hj9hhhNhNubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMhj9ubah}(h]h ]h"]h$]h&]uh1jB hj9ubeh}(h]h ]h"]h$]h&]uh1j hj9hMhj9ubj! )}(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]j- )}(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.hhMhj9ubjC )}(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&]uh1jB hj9ubeh}(h]h ]h"]h$]h&]uh1j hj:hMhj9ubj! )}(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]j- )}(hj?:h]hIOMMU_HW_CAP_PCI_PASID_PRIV}(hjA: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.hhMhj9:ubjC )}(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.}(hjX:hhhNhNubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMhjU:ubah}(h]h ]h"]h$]h&]uh1jB hj9:ubeh}(h]h ]h"]h$]h&]uh1j hjT:hMhj9ubeh}(h]h ]h"]h$]h&]uh1j hj9ubeh}(h]h ] kernelindentah"]h$]h&]uh1jhjhhhj$hNubh)}(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.hhMhjhhubjc)}(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&]uh1jbhj:hMhjhhubj3)}(hhh]h}(h]h ]h"]h$]h&]entries](j?iommufd_hw_info_flags (C enum)c.iommufd_hw_info_flagshNtauh1j2hjhhhj$hNubjD)}(hhh](jI)}(hiommufd_hw_info_flagsh]jO)}(henum iommufd_hw_info_flagsh](jU)}(hjh]henum}(hj:hhhNhNubah}(h]h ]jaah"]h$]h&]uh1jThj:hhhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMubjg)}(h h]h }(hj:hhhNhNubah}(h]h ]jsah"]h$]h&]uh1jfhj:hhhj:hMubjx)}(hiommufd_hw_info_flagsh]j~)}(hj:h]hiommufd_hw_info_flags}(hj:hhhNhNubah}(h]h ]jah"]h$]h&]uh1j}hj:ubah}(h]h ](jjeh"]h$]h&]hhuh1jwhj:hhhj:hMubeh}(h]h ]h"]h$]h&]hhjuh1jNjjhj:hhhj:hMubah}(h]j:ah ](jjeh"]h$]h&]jj)jhuh1jHhj: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$;jjjuh1jChhhjhj$hNubj)}(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}(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.hhMhj(;ubj )}(hhh]j! )}(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]j- )}(hjM;h]hIOMMU_HW_INFO_FLAG_INPUT_TYPE}(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.hhMhjG;ubjC )}(hhh]h)}(h\If set, **in_data_type** carries an input type for user space to request for a specific infoh](hIf set, }(hjf;hhhNhNubj*)}(h**in_data_type**h]h in_data_type}(hjn;hhhNhNubah}(h]h ]h"]h$]h&]uh1j)hjf;ubhD carries an input type for user space to request for a specific info}(hjf;hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhjb;hMhjc;ubah}(h]h ]h"]h$]h&]uh1jB hjG;ubeh}(h]h ]h"]h$]h&]uh1j hjb;hMhjD;ubah}(h]h ]h"]h$]h&]uh1j hj(;ubeh}(h]h ] kernelindentah"]h$]h&]uh1jhjhhhj$hNubj3)}(hhh]h}(h]h ]h"]h$]h&]entries](j?iommu_hw_info (C struct)c.iommu_hw_infohNtauh1j2hjhhhj$hNubjD)}(hhh](jI)}(h iommu_hw_infoh]jO)}(hstruct iommu_hw_infoh](jU)}(hjXh]hstruct}(hj;hhhNhNubah}(h]h ]jaah"]h$]h&]uh1jThj;hhhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMubjg)}(h h]h }(hj;hhhNhNubah}(h]h ]jsah"]h$]h&]uh1jfhj;hhhj;hMubjx)}(h iommu_hw_infoh]j~)}(hj;h]h iommu_hw_info}(hj;hhhNhNubah}(h]h ]jah"]h$]h&]uh1j}hj;ubah}(h]h ](jjeh"]h$]h&]hhuh1jwhj;hhhj;hMubeh}(h]h ]h"]h$]h&]hhjuh1jNjjhj;hhhj;hMubah}(h]j;ah ](jjeh"]h$]h&]jj)jhuh1jHhj;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<jjjuh1jChhhjhj$hNubj)}(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; };}hj7<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*)}(hjH<h]hMembers}(hjJ<hhhNhNubah}(h]h ]h"]h$]h&]uh1j)hjF<ubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMhj<ubj )}(hhh](j! )}(h&``size`` sizeof(struct iommu_hw_info) h](j' )}(h``size``h]j- )}(hjg<h]hsize}(hji<hhhNhNubah}(h]h ]h"]h$]h&]uh1j, hje<ubah}(h]h ]h"]h$]h&]uh1j& hc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMhja<ubjC )}(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&]uh1jB hja<ubeh}(h]h ]h"]h$]h&]uh1j hj|<hMhj^<ubj! )}(h``flags`` Must be 0 h](j' )}(h ``flags``h]j- )}(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<ubjC )}(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&]uh1jB hj<ubeh}(h]h ]h"]h$]h&]uh1j hj<hMhj^<ubj! )}(h+``dev_id`` The device bound to the iommufd h](j' )}(h ``dev_id``h]j- )}(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<ubjC )}(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&]uh1jB hj<ubeh}(h]h ]h"]h$]h&]uh1j hj<hMhj^<ubj! )}(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]j- )}(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.hhMhj =ubjC )}(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+=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&]uh1jB hj =ubeh}(h]h ]h"]h$]h&]uh1j hj'=hMhj^<ubj! )}(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]j- )}(hjL=h]h data_uptr}(hjN=hhhNhNubah}(h]h ]h"]h$]h&]uh1j, hjJ=ubah}(h]h ]h"]h$]h&]uh1j& hc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMhjF=ubjC )}(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}(hje=hhhNhNubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMhjb=ubah}(h]h ]h"]h$]h&]uh1jB hjF=ubeh}(h]h ]h"]h$]h&]uh1j hja=hMhj^<ubj! )}(h``{unnamed_union}`` anonymous h](j' )}(h``{unnamed_union}``h]j- )}(hj=h]h{unnamed_union}}(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.hhKhj=ubjC )}(hhh]h)}(h anonymoush]h anonymous}(hj=hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj=hKhj=ubah}(h]h ]h"]h$]h&]uh1jB hj=ubeh}(h]h ]h"]h$]h&]uh1j hj=hKhj^<ubj! )}(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]j- )}(hj=h]h in_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=ubjC )}(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 }(hj=hhhNhNubj*)}(h**out_data_type**h]h out_data_type}(hj=hhhNhNubah}(h]h ]h"]h$]h&]uh1j)hj=ubhp, making it be a bidirectional field. When IOMMU_HW_INFO_FLAG_INPUT_TYPE is set, an input type carried via this }(hj=hhhNhNubj*)}(h**in_data_type**h]h in_data_type}(hj=hhhNhNubah}(h]h ]h"]h$]h&]uh1j)hj=ubh 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}(hj=hhhNhNubeh}(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&]uh1jB hj=ubeh}(h]h ]h"]h$]h&]uh1j hj=hMhj^<ubj! )}(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]j- )}(hj>h]h out_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>ubjC )}(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.}(hj6>hhhNhNubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMhj3>ubah}(h]h ]h"]h$]h&]uh1jB hj>ubeh}(h]h ]h"]h$]h&]uh1j hj2>hMhj^<ubj! )}(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]j- )}(hjW>h]hout_max_pasid_log2}(hjY>hhhNhNubah}(h]h ]h"]h$]h&]uh1j, hjU>ubah}(h]h ]h"]h$]h&]uh1j& hc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMhjQ>ubjC )}(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.}(hjp>hhhNhNubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMhjm>ubah}(h]h ]h"]h$]h&]uh1jB hjQ>ubeh}(h]h ]h"]h$]h&]uh1j hjl>hMhj^<ubj! )}(h``__reserved`` Must be 0 h](j' )}(h``__reserved``h]j- )}(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>ubjC )}(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&]uh1jB hj>ubeh}(h]h ]h"]h$]h&]uh1j hj>hMhj^<ubj! )}(hp``out_capabilities`` Output the generic iommu capability info type as defined in the enum iommu_hw_capabilities.h](j' )}(h``out_capabilities``h]j- )}(hj>h]hout_capabilities}(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>ubjC )}(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.}(hj>hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj>hMhj>ubah}(h]h ]h"]h$]h&]uh1jB hj>ubeh}(h]h ]h"]h$]h&]uh1j hj>hMhj^<ubeh}(h]h ]h"]h$]h&]uh1j hj<ubeh}(h]h ] kernelindentah"]h$]h&]uh1jhjhhhj$hNubh)}(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)}(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"?hhhNhNubah}(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, }(hj1?hhhNhNubj*)}(h **data_uptr**h]h data_uptr}(hj9?hhhNhNubah}(h]h ]h"]h$]h&]uh1j)hj1?ubh and its length }(hj1?hhhNhNubj*)}(h **data_len**h]hdata_len}(hjK?hhhNhNubah}(h]h ]h"]h$]h&]uh1j)hj1?ubh 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 }(hj1?hhhNhNubj*)}(h **data_len**h]hdata_len}(hj]?hhhNhNubah}(h]h ]h"]h$]h&]uh1j)hj1?ubh. If the ioctl succeeds, }(hj1?hhhNhNubj*)}(h **data_len**h]hdata_len}(hjo?hhhNhNubah}(h]h ]h"]h$]h&]uh1j)hj1?ubh> will be updated to the length that kernel actually supports, }(hj1?hhhNhNubj*)}(h**out_data_type**h]h out_data_type}(hj?hhhNhNubah}(h]h ]h"]h$]h&]uh1j)hj1?ubhC will be filled to decode the data filled in the buffer pointed by }(hj1?hhhNhNubj*)}(h **data_uptr**h]h data_uptr}(hj?hhhNhNubah}(h]h ]h"]h$]h&]uh1j)hj1?ubh. Input }(hj1?hhhNhNubj*)}(h **data_len**h]hdata_len}(hj?hhhNhNubah}(h]h ]h"]h$]h&]uh1j)hj1?ubh == zero is allowed.}(hj1?hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMhjhhubj3)}(hhh]h}(h]h ]h"]h$]h&]entries](j?(iommu_hwpt_set_dirty_tracking (C struct)c.iommu_hwpt_set_dirty_trackinghNtauh1j2hjhhhj$hNubjD)}(hhh](jI)}(hiommu_hwpt_set_dirty_trackingh]jO)}(h$struct iommu_hwpt_set_dirty_trackingh](jU)}(hjXh]hstruct}(hj?hhhNhNubah}(h]h ]jaah"]h$]h&]uh1jThj?hhhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMubjg)}(h h]h }(hj?hhhNhNubah}(h]h ]jsah"]h$]h&]uh1jfhj?hhhj?hMubjx)}(hiommu_hwpt_set_dirty_trackingh]j~)}(hj?h]hiommu_hwpt_set_dirty_tracking}(hj?hhhNhNubah}(h]h ]jah"]h$]h&]uh1j}hj?ubah}(h]h ](jjeh"]h$]h&]hhuh1jwhj?hhhj?hMubeh}(h]h ]h"]h$]h&]hhjuh1jNjjhj?hhhj?hMubah}(h]j?ah ](jjeh"]h$]h&]jj)jhuh1jHhj?hMhj?hhubj)}(hhh]h)}(h$ioctl(IOMMU_HWPT_SET_DIRTY_TRACKING)h]h$ioctl(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@hhubah}(h]h ]h"]h$]h&]uh1jhj?hhhj?hMubeh}(h]h ](jstructeh"]h$]h&]jjjj1@jj1@jjjuh1jChhhjhj$hNubj)}(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=@hhhNhNubah}(h]h ]h"]h$]h&]uh1j)hj9@ubh:}(hj9@hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMhj5@ubj)}(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; };}hjV@sbah}(h]h ]h"]h$]h&]hhuh1jhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMhj5@ubh)}(h **Members**h]j*)}(hjg@h]hMembers}(hji@hhhNhNubah}(h]h ]h"]h$]h&]uh1j)hje@ubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMhj5@ubj )}(hhh](j! )}(h6``size`` sizeof(struct iommu_hwpt_set_dirty_tracking) h](j' )}(h``size``h]j- )}(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@ubjC )}(hhh]h)}(h,sizeof(struct iommu_hwpt_set_dirty_tracking)h]h,sizeof(struct iommu_hwpt_set_dirty_tracking)}(hj@hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj@hMhj@ubah}(h]h ]h"]h$]h&]uh1jB hj@ubeh}(h]h ]h"]h$]h&]uh1j hj@hMhj}@ubj! )}(hD``flags`` Combination of enum iommufd_hwpt_set_dirty_tracking_flags h](j' )}(h ``flags``h]j- )}(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@ubjC )}(hhh]h)}(h9Combination of enum iommufd_hwpt_set_dirty_tracking_flagsh]h9Combination of enum iommufd_hwpt_set_dirty_tracking_flags}(hj@hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj@hMhj@ubah}(h]h ]h"]h$]h&]uh1jB hj@ubeh}(h]h ]h"]h$]h&]uh1j hj@hMhj}@ubj! )}(h=``hwpt_id`` HW pagetable ID that represents the IOMMU domain h](j' )}(h ``hwpt_id``h]j- )}(hj@h]hhwpt_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@ubjC )}(hhh]h)}(h0HW pagetable ID that represents the IOMMU domainh]h0HW pagetable ID that represents the IOMMU domain}(hjAhhhNhNubah}(h]h ]h"]h$]h&]uh1hhj AhMhjAubah}(h]h ]h"]h$]h&]uh1jB hj@ubeh}(h]h ]h"]h$]h&]uh1j hj AhMhj}@ubj! )}(h``__reserved`` Must be 0h](j' )}(h``__reserved``h]j- )}(hj1Ah]h __reserved}(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.hhMhj+AubjC )}(hhh]h)}(h Must be 0h]h Must be 0}(hjJAhhhNhNubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMhjGAubah}(h]h ]h"]h$]h&]uh1jB hj+Aubeh}(h]h ]h"]h$]h&]uh1j hjFAhMhj}@ubeh}(h]h ]h"]h$]h&]uh1j hj5@ubeh}(h]h ] kernelindentah"]h$]h&]uh1jhjhhhj$hNubh)}(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.hhMhjhhubh)}(h)Toggle dirty tracking on an HW pagetable.h]h)Toggle dirty tracking on an HW pagetable.}(hjAhhhNhNubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMhjhhubj3)}(hhh]h}(h]h ]h"]h$]h&]entries](j?,iommufd_hwpt_get_dirty_bitmap_flags (C enum)%c.iommufd_hwpt_get_dirty_bitmap_flagshNtauh1j2hjhhhj$hNubjD)}(hhh](jI)}(h#iommufd_hwpt_get_dirty_bitmap_flagsh]jO)}(h(enum iommufd_hwpt_get_dirty_bitmap_flagsh](jU)}(hjh]henum}(hjAhhhNhNubah}(h]h ]jaah"]h$]h&]uh1jThjAhhhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMubjg)}(h h]h }(hjAhhhNhNubah}(h]h ]jsah"]h$]h&]uh1jfhjAhhhjAhMubjx)}(h#iommufd_hwpt_get_dirty_bitmap_flagsh]j~)}(hjAh]h#iommufd_hwpt_get_dirty_bitmap_flags}(hjAhhhNhNubah}(h]h ]jah"]h$]h&]uh1j}hjAubah}(h]h ](jjeh"]h$]h&]hhuh1jwhjAhhhjAhMubeh}(h]h ]h"]h$]h&]hhjuh1jNjjhjAhhhjAhMubah}(h]jAah ](jjeh"]h$]h&]jj)jhuh1jHhjAhMhjAhhubj)}(hhh]h)}(hFlags for getting dirty bitsh]hFlags for getting dirty bits}(hjAhhhNhNubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMhjAhhubah}(h]h ]h"]h$]h&]uh1jhjAhhhjAhMubeh}(h]h ](jenumeh"]h$]h&]jjjj Bjj Bjjjuh1jChhhjhj$hNubj)}(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*)}(hjBh]h Constants}(hjBhhhNhNubah}(h]h ]h"]h$]h&]uh1j)hjBubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMhjBubj )}(hhh]j! )}(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]j- )}(hj5Bh]h$IOMMU_HWPT_GET_DIRTY_BITMAP_NO_CLEAR}(hj7BhhhNhNubah}(h]h ]h"]h$]h&]uh1j, hj3Bubah}(h]h ]h"]h$]h&]uh1j& hc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMhj/BubjC )}(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.}(hjNBhhhNhNubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMhjKBubah}(h]h ]h"]h$]h&]uh1jB hj/Bubeh}(h]h ]h"]h$]h&]uh1j hjJBhMhj,Bubah}(h]h ]h"]h$]h&]uh1j hjBubeh}(h]h ] kernelindentah"]h$]h&]uh1jhjhhhj$hNubj3)}(hhh]h}(h]h ]h"]h$]h&]entries](j?&iommu_hwpt_get_dirty_bitmap (C struct)c.iommu_hwpt_get_dirty_bitmaphNtauh1j2hjhhhj$hNubjD)}(hhh](jI)}(hiommu_hwpt_get_dirty_bitmaph]jO)}(h"struct iommu_hwpt_get_dirty_bitmaph](jU)}(hjXh]hstruct}(hjBhhhNhNubah}(h]h ]jaah"]h$]h&]uh1jThjBhhhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMubjg)}(h h]h }(hjBhhhNhNubah}(h]h ]jsah"]h$]h&]uh1jfhjBhhhjBhMubjx)}(hiommu_hwpt_get_dirty_bitmaph]j~)}(hjBh]hiommu_hwpt_get_dirty_bitmap}(hjBhhhNhNubah}(h]h ]jah"]h$]h&]uh1j}hjBubah}(h]h ](jjeh"]h$]h&]hhuh1jwhjBhhhjBhMubeh}(h]h ]h"]h$]h&]hhjuh1jNjjhjBhhhjBhMubah}(h]jBah ](jjeh"]h$]h&]jj)jhuh1jHhjBhMhjBhhubj)}(hhh]h)}(h"ioctl(IOMMU_HWPT_GET_DIRTY_BITMAP)h]h"ioctl(IOMMU_HWPT_GET_DIRTY_BITMAP)}(hjBhhhNhNubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMhjBhhubah}(h]h ]h"]h$]h&]uh1jhjBhhhjBhMubeh}(h]h ](jstructeh"]h$]h&]jjjjBjjBjjjuh1jChhhjhj$hNubj)}(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}(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.hhMhjBubj)}(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; };}hjCsbah}(h]h ]h"]h$]h&]hhuh1jhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMhjBubh)}(h **Members**h]j*)}(hjCh]hMembers}(hj!ChhhNhNubah}(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.hhM hjBubj )}(hhh](j! )}(h4``size`` sizeof(struct iommu_hwpt_get_dirty_bitmap) h](j' )}(h``size``h]j- )}(hj>Ch]hsize}(hj@ChhhNhNubah}(h]h ]h"]h$]h&]uh1j, hj``page_size`` page size granularity of each bit in the bitmap h](j' )}(h ``page_size``h]j- )}(hjDh]h page_size}(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.hhMhjDubjC )}(hhh]h)}(h/page size granularity of each bit in the bitmaph]h/page size granularity of each bit in the bitmap}(hjDhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjDhMhjDubah}(h]h ]h"]h$]h&]uh1jB hjDubeh}(h]h ]h"]h$]h&]uh1j hjDhMhj5Cubj! )}(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]j- )}(hjDh]hdata}(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.hhMhjDubjC )}(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.}(hjDhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjDhMhjDubah}(h]h ]h"]h$]h&]uh1jB hjDubeh}(h]h ]h"]h$]h&]uh1j hjDhMhj5Cubeh}(h]h ]h"]h$]h&]uh1j hjBubeh}(h]h ] kernelindentah"]h$]h&]uh1jhjhhhj$hNubh)}(h**Description**h]j*)}(hjEh]h Description}(hjEhhhNhNubah}(h]h ]h"]h$]h&]uh1j)hj Eubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMhjhhubh)}(hChecking a given IOVA is dirty:h]hChecking a given IOVA is dirty:}(hj%EhhhNhNubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMhjhhubjc)}(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))}(hj8EhhhNhNubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMhj4Eubah}(h]h ]h"]h$]h&]uh1jbhjFEhMhjhhubh)}(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.}(hjMEhhhNhNubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMhjhhubj3)}(hhh]h}(h]h ]h"]h$]h&]entries](j?(iommu_hwpt_invalidate_data_type (C enum)!c.iommu_hwpt_invalidate_data_typehNtauh1j2hjhhhj$hNubjD)}(hhh](jI)}(hiommu_hwpt_invalidate_data_typeh]jO)}(h$enum iommu_hwpt_invalidate_data_typeh](jU)}(hjh]henum}(hjuEhhhNhNubah}(h]h ]jaah"]h$]h&]uh1jThjqEhhhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhM ubjg)}(h h]h }(hjEhhhNhNubah}(h]h ]jsah"]h$]h&]uh1jfhjqEhhhjEhM ubjx)}(hiommu_hwpt_invalidate_data_typeh]j~)}(hjoEh]hiommu_hwpt_invalidate_data_type}(hjEhhhNhNubah}(h]h ]jah"]h$]h&]uh1j}hjEubah}(h]h ](jjeh"]h$]h&]hhuh1jwhjqEhhhjEhM ubeh}(h]h ]h"]h$]h&]hhjuh1jNjjhjmEhhhjEhM ubah}(h]jhEah ](jjeh"]h$]h&]jj)jhuh1jHhjEhM hjjEhhubj)}(hhh]h)}(h'IOMMU HWPT Cache Invalidation Data Typeh]h'IOMMU HWPT Cache Invalidation Data Type}(hjEhhhNhNubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMhjEhhubah}(h]h ]h"]h$]h&]uh1jhjjEhhhjEhM ubeh}(h]h ](jenumeh"]h$]h&]jjjjEjjEjjjuh1jChhhjhj$hNubj)}(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*)}(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.hhMhjEubj )}(hhh](j! )}(hC``IOMMU_HWPT_INVALIDATE_DATA_VTD_S1`` Invalidation data for VTD_S1 h](j' )}(h%``IOMMU_HWPT_INVALIDATE_DATA_VTD_S1``h]j- )}(hjEh]h!IOMMU_HWPT_INVALIDATE_DATA_VTD_S1}(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.hhM hjEubjC )}(hhh]h)}(hInvalidation data for VTD_S1h]hInvalidation data for VTD_S1}(hjFhhhNhNubah}(h]h ]h"]h$]h&]uh1hhj FhM hjFubah}(h]h ]h"]h$]h&]uh1jB hjEubeh}(h]h ]h"]h$]h&]uh1j hj FhM hjEubj! )}(hL``IOMMU_VIOMMU_INVALIDATE_DATA_ARM_SMMUV3`` Invalidation data for ARM SMMUv3h](j' )}(h+``IOMMU_VIOMMU_INVALIDATE_DATA_ARM_SMMUV3``h]j- )}(hj1Fh]h'IOMMU_VIOMMU_INVALIDATE_DATA_ARM_SMMUV3}(hj3FhhhNhNubah}(h]h ]h"]h$]h&]uh1j, hj/Fubah}(h]h ]h"]h$]h&]uh1j& hc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhM"hj+FubjC )}(hhh]h)}(h Invalidation data for ARM SMMUv3h]h Invalidation data for ARM SMMUv3}(hjJFhhhNhNubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhM#hjGFubah}(h]h ]h"]h$]h&]uh1jB hj+Fubeh}(h]h ]h"]h$]h&]uh1j hjFFhM"hjEubeh}(h]h ]h"]h$]h&]uh1j hjEubeh}(h]h ] kernelindentah"]h$]h&]uh1jhjhhhj$hNubj3)}(hhh]h}(h]h ]h"]h$]h&]entries](j?+iommu_hwpt_vtd_s1_invalidate_flags (C enum)$c.iommu_hwpt_vtd_s1_invalidate_flagshNtauh1j2hjhhhj$hNubjD)}(hhh](jI)}(h"iommu_hwpt_vtd_s1_invalidate_flagsh]jO)}(h'enum iommu_hwpt_vtd_s1_invalidate_flagsh](jU)}(hjh]henum}(hjFhhhNhNubah}(h]h ]jaah"]h$]h&]uh1jThjFhhhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhM(ubjg)}(h h]h }(hjFhhhNhNubah}(h]h ]jsah"]h$]h&]uh1jfhjFhhhjFhM(ubjx)}(h"iommu_hwpt_vtd_s1_invalidate_flagsh]j~)}(hjFh]h"iommu_hwpt_vtd_s1_invalidate_flags}(hjFhhhNhNubah}(h]h ]jah"]h$]h&]uh1j}hjFubah}(h]h ](jjeh"]h$]h&]hhuh1jwhjFhhhjFhM(ubeh}(h]h ]h"]h$]h&]hhjuh1jNjjhjFhhhjFhM(ubah}(h]j~Fah ](jjeh"]h$]h&]jj)jhuh1jHhjFhM(hjFhhubj)}(hhh]h)}(h/Flags for Intel VT-d stage-1 cache invalidationh]h/Flags for Intel VT-d stage-1 cache invalidation}(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&]uh1jhjFhhhjFhM(ubeh}(h]h ](jenumeh"]h$]h&]jjjjFjjFjjjuh1jChhhjhj$hNubj)}(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*)}(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(hjFubj )}(hhh]j! )}(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]j- )}(hjGh]hIOMMU_VTD_INV_FLAGS_LEAF}(hjGhhhNhNubah}(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,hjGubjC )}(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'GhhhNhNubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhM+hj$Gubah}(h]h ]h"]h$]h&]uh1jB hjGubeh}(h]h ]h"]h$]h&]uh1j hj#GhM,hjGubah}(h]h ]h"]h$]h&]uh1j hjFubeh}(h]h ] kernelindentah"]h$]h&]uh1jhjhhhj$hNubj3)}(hhh]h}(h]h ]h"]h$]h&]entries](j?'iommu_hwpt_vtd_s1_invalidate (C struct)c.iommu_hwpt_vtd_s1_invalidatehNtauh1j2hjhhhj$hNubjD)}(hhh](jI)}(hiommu_hwpt_vtd_s1_invalidateh]jO)}(h#struct iommu_hwpt_vtd_s1_invalidateh](jU)}(hjXh]hstruct}(hjhGhhhNhNubah}(h]h ]jaah"]h$]h&]uh1jThjdGhhhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhM2ubjg)}(h h]h }(hjvGhhhNhNubah}(h]h ]jsah"]h$]h&]uh1jfhjdGhhhjuGhM2ubjx)}(hiommu_hwpt_vtd_s1_invalidateh]j~)}(hjbGh]hiommu_hwpt_vtd_s1_invalidate}(hjGhhhNhNubah}(h]h ]jah"]h$]h&]uh1j}hjGubah}(h]h ](jjeh"]h$]h&]hhuh1jwhjdGhhhjuGhM2ubeh}(h]h ]h"]h$]h&]hhjuh1jNjjhj`GhhhjuGhM2ubah}(h]j[Gah ](jjeh"]h$]h&]jj)jhuh1jHhjuGhM2hj]Ghhubj)}(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)}(hjGhhhNhNubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhM/hjGhhubah}(h]h ]h"]h$]h&]uh1jhj]GhhhjuGhM2ubeh}(h]h ](jstructeh"]h$]h&]jjjjGjjGjjjuh1jChhhjhj$hNubj)}(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}(hjGhhhNhNubah}(h]h ]h"]h$]h&]uh1j)hjGubh:}(hjGhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhM3hjGubj)}(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; };}hjGsbah}(h]h ]h"]h$]h&]hhuh1jhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhM5hjGubh)}(h **Members**h]j*)}(hjGh]hMembers}(hjGhhhNhNubah}(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<hjGubj )}(hhh](j! )}(hW``addr`` The start address of the range to be invalidated. It needs to be 4KB aligned. h](j' )}(h``addr``h]j- )}(hjHh]haddr}(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.hhM3hjHubjC )}(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.}(hj0HhhhNhNubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhM2hj-Hubah}(h]h ]h"]h$]h&]uh1jB hjHubeh}(h]h ]h"]h$]h&]uh1j hj,HhM3hjHubj! )}(h<``npages`` Number of contiguous 4K pages to be invalidated. h](j' )}(h ``npages``h]j- )}(hjQHh]hnpages}(hjSHhhhNhNubah}(h]h ]h"]h$]h&]uh1j, hjOHubah}(h]h ]h"]h$]h&]uh1j& hc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhM4hjKHubjC )}(hhh]h)}(h0Number of contiguous 4K pages to be invalidated.h]h0Number of contiguous 4K pages to be invalidated.}(hjjHhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjfHhM4hjgHubah}(h]h ]h"]h$]h&]uh1jB hjKHubeh}(h]h ]h"]h$]h&]uh1j hjfHhM4hjHubj! )}(hA``flags`` Combination of enum iommu_hwpt_vtd_s1_invalidate_flags h](j' )}(h ``flags``h]j- )}(hjHh]hflags}(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.hhM5hjHubjC )}(hhh]h)}(h6Combination of enum iommu_hwpt_vtd_s1_invalidate_flagsh]h6Combination of enum iommu_hwpt_vtd_s1_invalidate_flags}(hjHhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjHhM5hjHubah}(h]h ]h"]h$]h&]uh1jB hjHubeh}(h]h ]h"]h$]h&]uh1j hjHhM5hjHubj! )}(h``__reserved`` Must be 0h](j' )}(h``__reserved``h]j- )}(hjHh]h __reserved}(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.hhM5hjHubjC )}(hhh]h)}(h Must be 0h]h Must be 0}(hjHhhhNhNubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhM6hjHubah}(h]h ]h"]h$]h&]uh1jB hjHubeh}(h]h ]h"]h$]h&]uh1j hjHhM5hjHubeh}(h]h ]h"]h$]h&]uh1j hjGubeh}(h]h ] kernelindentah"]h$]h&]uh1jhjhhhj$hNubh)}(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.hhM9hjhhubh)}(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.}(hjIhhhNhNubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhM6hjhhubh)}(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+IhhhNhNubj*)}(h**addr**h]haddr}(hj3IhhhNhNubah}(h]h ]h"]h$]h&]uh1j)hj+Iubh to be 0 and }(hj+IhhhNhNubj*)}(h **npages**h]hnpages}(hjEIhhhNhNubah}(h]h ]h"]h$]h&]uh1j)hj+Iubh to be U64_MAX.}(hj+IhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhM:hjhhubh)}(hCThe device TLB will be invalidated automatically if ATS is enabled.h]hCThe device TLB will be invalidated automatically if ATS is enabled.}(hj^IhhhNhNubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhM=hjhhubj3)}(hhh]h}(h]h ]h"]h$]h&]entries](j?-iommu_viommu_arm_smmuv3_invalidate (C struct)$c.iommu_viommu_arm_smmuv3_invalidatehNtauh1j2hjhhhj$hNubjD)}(hhh](jI)}(h"iommu_viommu_arm_smmuv3_invalidateh]jO)}(h)struct iommu_viommu_arm_smmuv3_invalidateh](jU)}(hjXh]hstruct}(hjIhhhNhNubah}(h]h ]jaah"]h$]h&]uh1jThjIhhhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMBubjg)}(h h]h }(hjIhhhNhNubah}(h]h ]jsah"]h$]h&]uh1jfhjIhhhjIhMBubjx)}(h"iommu_viommu_arm_smmuv3_invalidateh]j~)}(hjIh]h"iommu_viommu_arm_smmuv3_invalidate}(hjIhhhNhNubah}(h]h ]jah"]h$]h&]uh1j}hjIubah}(h]h ](jjeh"]h$]h&]hhuh1jwhjIhhhjIhMBubeh}(h]h ]h"]h$]h&]hhjuh1jNjjhj~IhhhjIhMBubah}(h]jyIah ](jjeh"]h$]h&]jj)jhuh1jHhjIhMBhj{Ihhubj)}(hhh]h)}(hGARM SMMUv3 cache invalidation (IOMMU_VIOMMU_INVALIDATE_DATA_ARM_SMMUV3)h]hGARM SMMUv3 cache invalidation (IOMMU_VIOMMU_INVALIDATE_DATA_ARM_SMMUV3)}(hjIhhhNhNubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMHhjIhhubah}(h]h ]h"]h$]h&]uh1jhj{IhhhjIhMBubeh}(h]h ](jstructeh"]h$]h&]jjjjIjjIjjjuh1jChhhjhj$hNubj)}(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}(hjIhhhNhNubah}(h]h ]h"]h$]h&]uh1j)hjIubh:}(hjIhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMLhjIubj)}(hIstruct iommu_viommu_arm_smmuv3_invalidate { __aligned_le64 cmd[2]; };h]hIstruct iommu_viommu_arm_smmuv3_invalidate { __aligned_le64 cmd[2]; };}hjJsbah}(h]h ]h"]h$]h&]hhuh1jhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMNhjIubh)}(h **Members**h]j*)}(hjJh]hMembers}(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.hhMRhjIubj )}(hhh]j! )}(hY``cmd`` 128-bit cache invalidation command that runs in SMMU CMDQ. Must be little-endian.h](j' )}(h``cmd``h]j- )}(hj5Jh]hcmd}(hj7JhhhNhNubah}(h]h ]h"]h$]h&]uh1j, hj3Jubah}(h]h ]h"]h$]h&]uh1j& hc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMKhj/JubjC )}(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.}(hjNJhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjJJhMKhjKJubah}(h]h ]h"]h$]h&]uh1jB hj/Jubeh}(h]h ]h"]h$]h&]uh1j hjJJhMKhj,Jubah}(h]h ]h"]h$]h&]uh1j hjIubeh}(h]h ] kernelindentah"]h$]h&]uh1jhjhhhj$hNubh)}(h**Description**h]j*)}(hjwJh]h Description}(hjyJhhhNhNubah}(h]h ]h"]h$]h&]uh1j)hjuJubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMOhjhhubj )}(hhh]j! )}(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 }(hjJhhhNhNubj*)}(h **hwpt_id**h]hhwpt_id}(hjJhhhNhNubah}(h]h ]h"]h$]h&]uh1j)hjJubh:}(hjJhhhNhNubeh}(h]h ]h"]h$]h&]uh1j& hc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMThjJubjC )}(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}(hjJhhhNhNubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMMhjJubah}(h]h ]h"]h$]h&]uh1jB hjJubeh}(h]h ]h"]h$]h&]uh1j hjJhMThjJubah}(h]h ]h"]h$]h&]uh1j hjhhhj$hNubh)}(h6-EIO will be returned if the command is not supported.h]h6-EIO will be returned if the command is not supported.}(hjJhhhNhNubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMVhjhhubj3)}(hhh]h}(h]h ]h"]h$]h&]entries](j? iommu_hwpt_invalidate (C struct)c.iommu_hwpt_invalidatehNtauh1j2hjhhhj$hNubjD)}(hhh](jI)}(hiommu_hwpt_invalidateh]jO)}(hstruct iommu_hwpt_invalidateh](jU)}(hjXh]hstruct}(hjKhhhNhNubah}(h]h ]jaah"]h$]h&]uh1jThjJhhhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhM[ubjg)}(h h]h }(hjKhhhNhNubah}(h]h ]jsah"]h$]h&]uh1jfhjJhhhjKhM[ubjx)}(hiommu_hwpt_invalidateh]j~)}(hjJh]hiommu_hwpt_invalidate}(hj!KhhhNhNubah}(h]h ]jah"]h$]h&]uh1j}hjKubah}(h]h ](jjeh"]h$]h&]hhuh1jwhjJhhhjKhM[ubeh}(h]h ]h"]h$]h&]hhjuh1jNjjhjJhhhjKhM[ubah}(h]jJah ](jjeh"]h$]h&]jj)jhuh1jHhjKhM[hjJhhubj)}(hhh]h)}(hioctl(IOMMU_HWPT_INVALIDATE)h]hioctl(IOMMU_HWPT_INVALIDATE)}(hjCKhhhNhNubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhM^hj@Khhubah}(h]h ]h"]h$]h&]uh1jhjJhhhjKhM[ubeh}(h]h ](jstructeh"]h$]h&]jjjj[Kjj[Kjjjuh1jChhhjhj$hNubj)}(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}(hjgKhhhNhNubah}(h]h ]h"]h$]h&]uh1j)hjcKubh:}(hjcKhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMbhj_Kubj)}(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; };}hjKsbah}(h]h ]h"]h$]h&]hhuh1jhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMdhj_Kubh)}(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.hhMnhj_Kubj )}(hhh](j! )}(h.``size`` sizeof(struct iommu_hwpt_invalidate) h](j' )}(h``size``h]j- )}(hjKh]hsize}(hjKhhhNhNubah}(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.hhM`hjKubjC )}(hhh]h)}(h$sizeof(struct iommu_hwpt_invalidate)h]h$sizeof(struct iommu_hwpt_invalidate)}(hjKhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjKhM`hjKubah}(h]h ]h"]h$]h&]uh1jB hjKubeh}(h]h ]h"]h$]h&]uh1j hjKhM`hjKubj! )}(hD``hwpt_id`` ID of a nested HWPT or a vIOMMU, for cache invalidation h](j' )}(h ``hwpt_id``h]j- )}(hjKh]hhwpt_id}(hjKhhhNhNubah}(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.hhMahjKubjC )}(hhh]h)}(h7ID of a nested HWPT or a vIOMMU, for cache invalidationh]h7ID of a nested HWPT or a vIOMMU, for cache invalidation}(hjLhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjKhMahjKubah}(h]h ]h"]h$]h&]uh1jB hjKubeh}(h]h ]h"]h$]h&]uh1j hjKhMahjKubj! )}(hS``data_uptr`` User pointer to an array of driver-specific cache invalidation data. h](j' )}(h ``data_uptr``h]j- )}(hj"Lh]h data_uptr}(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.hhMchjLubjC )}(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;LhhhNhNubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMbhj8Lubah}(h]h ]h"]h$]h&]uh1jB hjLubeh}(h]h ]h"]h$]h&]uh1j hj7LhMchjKubj! )}(h``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**. h](j' )}(h ``data_type``h]j- )}(hj\Lh]h data_type}(hj^LhhhNhNubah}(h]h ]h"]h$]h&]uh1j, hjZLubah}(h]h ]h"]h$]h&]uh1j& hc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMfhjVLubjC )}(hhh]h)}(hOne 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**.h](hOne 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 }(hjuLhhhNhNubj*)}(h **hwpt_id**h]hhwpt_id}(hj}LhhhNhNubah}(h]h ]h"]h$]h&]uh1j)hjuLubh.}(hjuLhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMdhjrLubah}(h]h ]h"]h$]h&]uh1jB hjVLubeh}(h]h ]h"]h$]h&]uh1j hjqLhMfhjKubj! )}(hH``entry_len`` Length (in bytes) of a request entry in the request array h](j' )}(h ``entry_len``h]j- )}(hjLh]h entry_len}(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.hhMghjLubjC )}(hhh]h)}(h9Length (in bytes) of a request entry in the request arrayh]h9Length (in bytes) of a request entry in the request array}(hjLhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjLhMghjLubah}(h]h ]h"]h$]h&]uh1jB hjLubeh}(h]h ]h"]h$]h&]uh1j hjLhMghjKubj! )}(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]j- )}(hjLh]h entry_num}(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.hhMihjLubjC )}(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.}(hjLhhhNhNubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMhhjLubah}(h]h ]h"]h$]h&]uh1jB hjLubeh}(h]h ]h"]h$]h&]uh1j hjLhMihjKubj! )}(h``__reserved`` Must be 0.h](j' )}(h``__reserved``h]j- )}(hjMh]h __reserved}(hjMhhhNhNubah}(h]h ]h"]h$]h&]uh1j, hjMubah}(h]h ]h"]h$]h&]uh1j& hc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMihjMubjC )}(hhh]h)}(h Must be 0.h]h Must be 0.}(hj4MhhhNhNubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMjhj1Mubah}(h]h ]h"]h$]h&]uh1jB hjMubeh}(h]h ]h"]h$]h&]uh1j hj0MhMihjKubeh}(h]h ]h"]h$]h&]uh1j hj_Kubeh}(h]h ] kernelindentah"]h$]h&]uh1jhjhhhj$hNubh)}(h**Description**h]j*)}(hj^Mh]h Description}(hj`MhhhNhNubah}(h]h ]h"]h$]h&]uh1j)hj\Mubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMmhjhhubh)}(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 }(hjtMhhhNhNubj*)}(h **hwpt_id**h]hhwpt_id}(hj|MhhhNhNubah}(h]h ]h"]h$]h&]uh1j)hjtMubhi. Other caches, such as device cache or descriptor cache can be flushed if a vIOMMU is passed in via the }(hjtMhhhNhNubj*)}(h **hwpt_id**h]hhwpt_id}(hjMhhhNhNubah}(h]h ]h"]h$]h&]uh1j)hjtMubh field.}(hjtMhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMjhjhhubh)}(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 }(hjMhhhNhNubj*)}(h **entry_len**h]h entry_len}(hjMhhhNhNubah}(h]h ]h"]h$]h&]uh1j)hjMubh * }(hjMhhhNhNubj*)}(h **entry_num**h]h entry_num}(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.hhMohjhhubh)}(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 }(hjMhhhNhNubj*)}(h.**entry_num**==0 is allowed, and **entry_len**h]h*entry_num**==0 is allowed, and **entry_len}(hjMhhhNhNubah}(h]h ]h"]h$]h&]uh1j)hjMubh and }(hjMhhhNhNubj*)}(h **data_uptr**h]h data_uptr}(hjMhhhNhNubah}(h]h ]h"]h$]h&]uh1j)hjMubhG would be ignored in this case. This can be used to check if the given }(hjMhhhNhNubj*)}(h **data_type**h]h data_type}(hjNhhhNhNubah}(h]h ]h"]h$]h&]uh1j)hjMubh is supported or not by kernel.}(hjMhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMrhjhhubj3)}(hhh]h}(h]h ]h"]h$]h&]entries](j?!iommu_hwpt_pgfault_flags (C enum)c.iommu_hwpt_pgfault_flagshNtauh1j2hjhhhj$hNubjD)}(hhh](jI)}(hiommu_hwpt_pgfault_flagsh]jO)}(henum iommu_hwpt_pgfault_flagsh](jU)}(hjh]henum}(hj8NhhhNhNubah}(h]h ]jaah"]h$]h&]uh1jThj4Nhhhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMyubjg)}(h h]h }(hjFNhhhNhNubah}(h]h ]jsah"]h$]h&]uh1jfhj4NhhhjENhMyubjx)}(hiommu_hwpt_pgfault_flagsh]j~)}(hj2Nh]hiommu_hwpt_pgfault_flags}(hjXNhhhNhNubah}(h]h ]jah"]h$]h&]uh1j}hjTNubah}(h]h ](jjeh"]h$]h&]hhuh1jwhj4NhhhjENhMyubeh}(h]h ]h"]h$]h&]hhjuh1jNjjhj0NhhhjENhMyubah}(h]j+Nah ](jjeh"]h$]h&]jj)jhuh1jHhjENhMyhj-Nhhubj)}(hhh]h)}(h#flags for struct iommu_hwpt_pgfaulth]h#flags for struct iommu_hwpt_pgfault}(hjzNhhhNhNubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMhjwNhhubah}(h]h ]h"]h$]h&]uh1jhj-NhhhjENhMyubeh}(h]h ](jenumeh"]h$]h&]jjjjNjjNjjjuh1jChhhjhj$hNubj)}(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*)}(hjNh]h Constants}(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.hhMhjNubj )}(hhh](j! )}(hP``IOMMU_PGFAULT_FLAGS_PASID_VALID`` The pasid field of the fault data is valid. h](j' )}(h#``IOMMU_PGFAULT_FLAGS_PASID_VALID``h]j- )}(hjNh]hIOMMU_PGFAULT_FLAGS_PASID_VALID}(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.hhMhjNubjC )}(hhh]h)}(h+The pasid field of the fault data is valid.h]h+The pasid field of the fault data is valid.}(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&]uh1jB hjNubeh}(h]h ]h"]h$]h&]uh1j hjNhMhjNubj! )}(hG``IOMMU_PGFAULT_FLAGS_LAST_PAGE`` It's the last fault of a fault group.h](j' )}(h!``IOMMU_PGFAULT_FLAGS_LAST_PAGE``h]j- )}(hjNh]hIOMMU_PGFAULT_FLAGS_LAST_PAGE}(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.hhMhjNubjC )}(hhh]h)}(h%It's the last fault of a fault group.h]h'It’s the last fault of a fault group.}(hjOhhhNhNubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMhj Oubah}(h]h ]h"]h$]h&]uh1jB hjNubeh}(h]h ]h"]h$]h&]uh1j hj OhMhjNubeh}(h]h ]h"]h$]h&]uh1j hjNubeh}(h]h ] kernelindentah"]h$]h&]uh1jhjhhhj$hNubj3)}(hhh]h}(h]h ]h"]h$]h&]entries](j? iommu_hwpt_pgfault_perm (C enum)c.iommu_hwpt_pgfault_permhNtauh1j2hjhhhj$hNubjD)}(hhh](jI)}(hiommu_hwpt_pgfault_permh]jO)}(henum iommu_hwpt_pgfault_permh](jU)}(hjh]henum}(hjOOhhhNhNubah}(h]h ]jaah"]h$]h&]uh1jThjKOhhhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMubjg)}(h h]h }(hj]OhhhNhNubah}(h]h ]jsah"]h$]h&]uh1jfhjKOhhhj\OhMubjx)}(hiommu_hwpt_pgfault_permh]j~)}(hjIOh]hiommu_hwpt_pgfault_perm}(hjoOhhhNhNubah}(h]h ]jah"]h$]h&]uh1j}hjkOubah}(h]h ](jjeh"]h$]h&]hhuh1jwhjKOhhhj\OhMubeh}(h]h ]h"]h$]h&]hhjuh1jNjjhjGOhhhj\OhMubah}(h]jBOah ](jjeh"]h$]h&]jj)jhuh1jHhj\OhMhjDOhhubj)}(hhh]h)}(h'perm bits for struct iommu_hwpt_pgfaulth]h'perm bits for struct iommu_hwpt_pgfault}(hjOhhhNhNubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMhjOhhubah}(h]h ]h"]h$]h&]uh1jhjDOhhhj\OhMubeh}(h]h ](jenumeh"]h$]h&]jjjjOjjOjjjuh1jChhhjhj$hNubj)}(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*)}(hjOh]h Constants}(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.hhMhjOubj )}(hhh](j! )}(h8``IOMMU_PGFAULT_PERM_READ`` request for read permission h](j' )}(h``IOMMU_PGFAULT_PERM_READ``h]j- )}(hjOh]hIOMMU_PGFAULT_PERM_READ}(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.hhMhjOubjC )}(hhh]h)}(hrequest for read permissionh]hrequest for read permission}(hjOhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjOhMhjOubah}(h]h ]h"]h$]h&]uh1jB hjOubeh}(h]h ]h"]h$]h&]uh1j hjOhMhjOubj! )}(h:``IOMMU_PGFAULT_PERM_WRITE`` request for write permission h](j' )}(h``IOMMU_PGFAULT_PERM_WRITE``h]j- )}(hj Ph]hIOMMU_PGFAULT_PERM_WRITE}(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.hhMhjPubjC )}(hhh]h)}(hrequest for write permissionh]hrequest for write permission}(hj$PhhhNhNubah}(h]h ]h"]h$]h&]uh1hhj PhMhj!Pubah}(h]h ]h"]h$]h&]uh1jB hjPubeh}(h]h ]h"]h$]h&]uh1j hj PhMhjOubj! )}(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]j- )}(hjDPh]hIOMMU_PGFAULT_PERM_EXEC}(hjFPhhhNhNubah}(h]h ]h"]h$]h&]uh1j, hjBPubah}(h]h ]h"]h$]h&]uh1j& hc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMhj>PubjC )}(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]PhhhNhNubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMhjZPubah}(h]h ]h"]h$]h&]uh1jB hj>Pubeh}(h]h ]h"]h$]h&]uh1j hjYPhMhjOubj! )}(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]j- )}(hj~Ph]hIOMMU_PGFAULT_PERM_PRIV}(hjPhhhNhNubah}(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.hhMhjxPubjC )}(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.}(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&]uh1jB hjxPubeh}(h]h ]h"]h$]h&]uh1j hjPhMhjOubeh}(h]h ]h"]h$]h&]uh1j hjOubeh}(h]h ] kernelindentah"]h$]h&]uh1jhjhhhj$hNubj3)}(hhh]h}(h]h ]h"]h$]h&]entries](j?iommu_hwpt_pgfault (C struct)c.iommu_hwpt_pgfaulthNtauh1j2hjhhhj$hNubjD)}(hhh](jI)}(hiommu_hwpt_pgfaulth]jO)}(hstruct iommu_hwpt_pgfaulth](jU)}(hjXh]hstruct}(hjPhhhNhNubah}(h]h ]jaah"]h$]h&]uh1jThjPhhhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMubjg)}(h h]h }(hjPhhhNhNubah}(h]h ]jsah"]h$]h&]uh1jfhjPhhhjPhMubjx)}(hiommu_hwpt_pgfaulth]j~)}(hjPh]hiommu_hwpt_pgfault}(hjPhhhNhNubah}(h]h ]jah"]h$]h&]uh1j}hjPubah}(h]h ](jjeh"]h$]h&]hhuh1jwhjPhhhjPhMubeh}(h]h ]h"]h$]h&]hhjuh1jNjjhjPhhhjPhMubah}(h]jPah ](jjeh"]h$]h&]jj)jhuh1jHhjPhMhjPhhubj)}(hhh]h)}(hiommu page fault datah]hiommu page fault data}(hjQhhhNhNubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMhjQhhubah}(h]h ]h"]h$]h&]uh1jhjPhhhjPhMubeh}(h]h ](jstructeh"]h$]h&]jjjj2Qjj2Qjjjuh1jChhhjhj$hNubj)}(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>QhhhNhNubah}(h]h ]h"]h$]h&]uh1j)hj:Qubh:}(hj:QhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMhj6Qubj)}(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; };}hjWQsbah}(h]h ]h"]h$]h&]hhuh1jhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMhj6Qubh)}(h **Members**h]j*)}(hjhQh]hMembers}(hjjQhhhNhNubah}(h]h ]h"]h$]h&]uh1j)hjfQubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMhj6Qubj )}(hhh](j! )}(h7``flags`` Combination of enum iommu_hwpt_pgfault_flags h](j' )}(h ``flags``h]j- )}(hjQh]hflags}(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.hhMhjQubjC )}(hhh]h)}(h,Combination of enum iommu_hwpt_pgfault_flagsh]h,Combination of enum iommu_hwpt_pgfault_flags}(hjQhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjQhMhjQubah}(h]h ]h"]h$]h&]uh1jB hjQubeh}(h]h ]h"]h$]h&]uh1j hjQhMhj~Qubj! )}(h'``dev_id`` id of the originated device h](j' )}(h ``dev_id``h]j- )}(hjQh]hdev_id}(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.hhMhjQubjC )}(hhh]h)}(hid of the originated deviceh]hid of the originated device}(hjQhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjQhMhjQubah}(h]h ]h"]h$]h&]uh1jB hjQubeh}(h]h ]h"]h$]h&]uh1j hjQhMhj~Qubj! )}(h#``pasid`` Process Address Space ID h](j' )}(h ``pasid``h]j- )}(hjQh]hpasid}(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.hhMhjQubjC )}(hhh]h)}(hProcess Address Space IDh]hProcess Address Space ID}(hjRhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjRhMhjRubah}(h]h ]h"]h$]h&]uh1jB hjQubeh}(h]h ]h"]h$]h&]uh1j hjRhMhj~Qubj! )}(h#``grpid`` Page Request Group Index h](j' )}(h ``grpid``h]j- )}(hj2Rh]hgrpid}(hj4RhhhNhNubah}(h]h ]h"]h$]h&]uh1j, hj0Rubah}(h]h ]h"]h$]h&]uh1j& hc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMhj,RubjC )}(hhh]h)}(hPage Request Group Indexh]hPage Request Group Index}(hjKRhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjGRhMhjHRubah}(h]h ]h"]h$]h&]uh1jB hj,Rubeh}(h]h ]h"]h$]h&]uh1j hjGRhMhj~Qubj! )}(h5``perm`` Combination of enum iommu_hwpt_pgfault_perm h](j' )}(h``perm``h]j- )}(hjkRh]hperm}(hjmRhhhNhNubah}(h]h ]h"]h$]h&]uh1j, hjiRubah}(h]h ]h"]h$]h&]uh1j& hc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMhjeRubjC )}(hhh]h)}(h+Combination of enum iommu_hwpt_pgfault_permh]h+Combination of enum iommu_hwpt_pgfault_perm}(hjRhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjRhMhjRubah}(h]h ]h"]h$]h&]uh1jB hjeRubeh}(h]h ]h"]h$]h&]uh1j hjRhMhj~Qubj! )}(h``__reserved`` Must be 0. h](j' )}(h``__reserved``h]j- )}(hjRh]h __reserved}(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.hhMhjRubjC )}(hhh]h)}(h Must be 0.h]h Must be 0.}(hjRhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjRhMhjRubah}(h]h ]h"]h$]h&]uh1jB hjRubeh}(h]h ]h"]h$]h&]uh1j hjRhMhj~Qubj! )}(h``addr`` Fault address h](j' )}(h``addr``h]j- )}(hjRh]haddr}(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.hhMhjRubjC )}(hhh]h)}(h Fault addressh]h Fault address}(hjRhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjRhMhjRubah}(h]h ]h"]h$]h&]uh1jB hjRubeh}(h]h ]h"]h$]h&]uh1j hjRhMhj~Qubj! )}(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]j- )}(hjSh]hlength}(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.hhMhjSubjC )}(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.}(hj/ShhhNhNubah}(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&]uh1jB hjSubeh}(h]h ]h"]h$]h&]uh1j hj+ShMhj~Qubj! )}(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]j- )}(hjPSh]hcookie}(hjRShhhNhNubah}(h]h ]h"]h$]h&]uh1j, hjNSubah}(h]h ]h"]h$]h&]uh1j& hc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMhjJSubjC )}(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.}(hjiShhhNhNubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMhjfSubah}(h]h ]h"]h$]h&]uh1jB hjJSubeh}(h]h ]h"]h$]h&]uh1j hjeShMhj~Qubeh}(h]h ]h"]h$]h&]uh1j hj6Qubeh}(h]h ] kernelindentah"]h$]h&]uh1jhjhhhj$hNubj3)}(hhh]h}(h]h ]h"]h$]h&]entries](j?#iommufd_page_response_code (C enum)c.iommufd_page_response_codehNtauh1j2hjhhhj$hNubjD)}(hhh](jI)}(hiommufd_page_response_codeh]jO)}(henum iommufd_page_response_codeh](jU)}(hjh]henum}(hjShhhNhNubah}(h]h ]jaah"]h$]h&]uh1jThjShhhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMubjg)}(h h]h }(hjShhhNhNubah}(h]h ]jsah"]h$]h&]uh1jfhjShhhjShMubjx)}(hiommufd_page_response_codeh]j~)}(hjSh]hiommufd_page_response_code}(hjShhhNhNubah}(h]h ]jah"]h$]h&]uh1j}hjSubah}(h]h ](jjeh"]h$]h&]hhuh1jwhjShhhjShMubeh}(h]h ]h"]h$]h&]hhjuh1jNjjhjShhhjShMubah}(h]jSah ](jjeh"]h$]h&]jj)jhuh1jHhjShMhjShhubj)}(hhh]h)}(hReturn status of fault handlersh]hReturn status of fault handlers}(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&]uh1jhjShhhjShMubeh}(h]h ](jenumeh"]h$]h&]jjjjTjjTjjjuh1jChhhjhj$hNubj)}(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*)}(hjTh]h Constants}(hjThhhNhNubah}(h]h ]h"]h$]h&]uh1j)hj Tubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMhjTubj )}(hhh](j! )}(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]j- )}(hj-Th]hIOMMUFD_PAGE_RESP_SUCCESS}(hj/ThhhNhNubah}(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.hhMhj'TubjC )}(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.}(hjFThhhNhNubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMhjCTubah}(h]h ]h"]h$]h&]uh1jB hj'Tubeh}(h]h ]h"]h$]h&]uh1j hjBThMhj$Tubj! )}(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]j- )}(hjgTh]hIOMMUFD_PAGE_RESP_INVALID}(hjiThhhNhNubah}(h]h ]h"]h$]h&]uh1j, hjeTubah}(h]h ]h"]h$]h&]uh1j& hc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMhjaTubjC )}(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.}(hjThhhNhNubah}(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&]uh1jB hjaTubeh}(h]h ]h"]h$]h&]uh1j hj|ThMhj$Tubeh}(h]h ]h"]h$]h&]uh1j hjTubeh}(h]h ] kernelindentah"]h$]h&]uh1jhjhhhj$hNubj3)}(hhh]h}(h]h ]h"]h$]h&]entries](j?#iommu_hwpt_page_response (C struct)c.iommu_hwpt_page_responsehNtauh1j2hjhhhj$hNubjD)}(hhh](jI)}(hiommu_hwpt_page_responseh]jO)}(hstruct iommu_hwpt_page_responseh](jU)}(hjXh]hstruct}(hjThhhNhNubah}(h]h ]jaah"]h$]h&]uh1jThjThhhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMubjg)}(h h]h }(hjThhhNhNubah}(h]h ]jsah"]h$]h&]uh1jfhjThhhjThMubjx)}(hiommu_hwpt_page_responseh]j~)}(hjTh]hiommu_hwpt_page_response}(hjThhhNhNubah}(h]h ]jah"]h$]h&]uh1j}hjTubah}(h]h ](jjeh"]h$]h&]hhuh1jwhjThhhjThMubeh}(h]h ]h"]h$]h&]hhjuh1jNjjhjThhhjThMubah}(h]jTah ](jjeh"]h$]h&]jj)jhuh1jHhjThMhjThhubj)}(hhh]h)}(hIOMMU page fault responseh]hIOMMU page fault response}(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&]jjjjUjjUjjjuh1jChhhjhj$hNubj)}(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'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.hhMhjUubj)}(hFstruct iommu_hwpt_page_response { __u32 cookie; __u32 code; };h]hFstruct iommu_hwpt_page_response { __u32 cookie; __u32 code; };}hj@Usbah}(h]h ]h"]h$]h&]hhuh1jhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMhjUubh)}(h **Members**h]j*)}(hjQUh]hMembers}(hjSUhhhNhNubah}(h]h ]h"]h$]h&]uh1j)hjOUubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMhjUubj )}(hhh](j! )}(hD``cookie`` The kernel-managed cookie reported in the fault message. h](j' )}(h ``cookie``h]j- )}(hjpUh]hcookie}(hjrUhhhNhNubah}(h]h ]h"]h$]h&]uh1j, hjnUubah}(h]h ]h"]h$]h&]uh1j& hc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMhjjUubjC )}(hhh]h)}(h8The kernel-managed cookie reported in the fault message.h]h8The kernel-managed cookie reported in the fault message.}(hjUhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjUhMhjUubah}(h]h ]h"]h$]h&]uh1jB hjjUubeh}(h]h ]h"]h$]h&]uh1j hjUhMhjgUubj! )}(hA``code`` One of response code in enum iommufd_page_response_code.h](j' )}(h``code``h]j- )}(hjUh]hcode}(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.hhMhjUubjC )}(hhh]h)}(h8One of response code in enum iommufd_page_response_code.h]h8One of response code in enum iommufd_page_response_code.}(hjUhhhNhNubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMhjUubah}(h]h ]h"]h$]h&]uh1jB hjUubeh}(h]h ]h"]h$]h&]uh1j hjUhMhjgUubeh}(h]h ]h"]h$]h&]uh1j hjUubeh}(h]h ] kernelindentah"]h$]h&]uh1jhjhhhj$hNubj3)}(hhh]h}(h]h ]h"]h$]h&]entries](j?iommu_fault_alloc (C struct)c.iommu_fault_allochNtauh1j2hjhhhj$hNubjD)}(hhh](jI)}(hiommu_fault_alloch]jO)}(hstruct iommu_fault_alloch](jU)}(hjXh]hstruct}(hjVhhhNhNubah}(h]h ]jaah"]h$]h&]uh1jThjUhhhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMubjg)}(h h]h }(hjVhhhNhNubah}(h]h ]jsah"]h$]h&]uh1jfhjUhhhjVhMubjx)}(hiommu_fault_alloch]j~)}(hjUh]hiommu_fault_alloc}(hj#VhhhNhNubah}(h]h ]jah"]h$]h&]uh1j}hjVubah}(h]h ](jjeh"]h$]h&]hhuh1jwhjUhhhjVhMubeh}(h]h ]h"]h$]h&]hhjuh1jNjjhjUhhhjVhMubah}(h]jUah ](jjeh"]h$]h&]jj)jhuh1jHhjVhMhjUhhubj)}(hhh]h)}(hioctl(IOMMU_FAULT_QUEUE_ALLOC)h]hioctl(IOMMU_FAULT_QUEUE_ALLOC)}(hjEVhhhNhNubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMhjBVhhubah}(h]h ]h"]h$]h&]uh1jhjUhhhjVhMubeh}(h]h ](jstructeh"]h$]h&]jjjj]Vjj]Vjjjuh1jChhhjhj$hNubj)}(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}(hjiVhhhNhNubah}(h]h ]h"]h$]h&]uh1j)hjeVubh:}(hjeVhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMhjaVubj)}(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; };}hjVsbah}(h]h ]h"]h$]h&]hhuh1jhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMhjaVubh)}(h **Members**h]j*)}(hjVh]hMembers}(hjVhhhNhNubah}(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.hhMhjaVubj )}(hhh](j! )}(h*``size`` sizeof(struct iommu_fault_alloc) h](j' )}(h``size``h]j- )}(hjVh]hsize}(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.hhMhjVubjC )}(hhh]h)}(h sizeof(struct iommu_fault_alloc)h]h sizeof(struct iommu_fault_alloc)}(hjVhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjVhMhjVubah}(h]h ]h"]h$]h&]uh1jB hjVubeh}(h]h ]h"]h$]h&]uh1j hjVhMhjVubj! )}(h``flags`` Must be 0 h](j' )}(h ``flags``h]j- )}(hjVh]hflags}(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.hhMhjVubjC )}(hhh]h)}(h Must be 0h]h Must be 0}(hjWhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjWhMhjWubah}(h]h ]h"]h$]h&]uh1jB hjVubeh}(h]h ]h"]h$]h&]uh1j hjWhMhjVubj! )}(h)``out_fault_id`` The ID of the new FAULT h](j' )}(h``out_fault_id``h]j- )}(hj$Wh]h out_fault_id}(hj&WhhhNhNubah}(h]h ]h"]h$]h&]uh1j, hj"Wubah}(h]h ]h"]h$]h&]uh1j& hc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMhjWubjC )}(hhh]h)}(hThe ID of the new FAULTh]hThe ID of the new FAULT}(hj=WhhhNhNubah}(h]h ]h"]h$]h&]uh1hhj9WhMhj:Wubah}(h]h ]h"]h$]h&]uh1jB hjWubeh}(h]h ]h"]h$]h&]uh1j hj9WhMhjVubj! )}(h(``out_fault_fd`` The fd of the new FAULTh](j' )}(h``out_fault_fd``h]j- )}(hj]Wh]h out_fault_fd}(hj_WhhhNhNubah}(h]h ]h"]h$]h&]uh1j, hj[Wubah}(h]h ]h"]h$]h&]uh1j& hc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMhjWWubjC )}(hhh]h)}(hThe fd of the new FAULTh]hThe fd of the new FAULT}(hjvWhhhNhNubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMhjsWubah}(h]h ]h"]h$]h&]uh1jB hjWWubeh}(h]h ]h"]h$]h&]uh1j hjrWhMhjVubeh}(h]h ]h"]h$]h&]uh1j hjaVubeh}(h]h ] kernelindentah"]h$]h&]uh1jhjhhhj$hNubh)}(h**Description**h]j*)}(hjWh]h Description}(hjWhhhNhNubah}(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.hhMhjhhubh)}(h,Explicitly allocate a fault handling object.h]h,Explicitly allocate a fault handling object.}(hjWhhhNhNubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMhjhhubj3)}(hhh]h}(h]h ]h"]h$]h&]entries](j?iommu_viommu_type (C enum)c.iommu_viommu_typehNtauh1j2hjhhhj$hNubjD)}(hhh](jI)}(hiommu_viommu_typeh]jO)}(henum iommu_viommu_typeh](jU)}(hjh]henum}(hjWhhhNhNubah}(h]h ]jaah"]h$]h&]uh1jThjWhhhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMubjg)}(h h]h }(hjWhhhNhNubah}(h]h ]jsah"]h$]h&]uh1jfhjWhhhjWhMubjx)}(hiommu_viommu_typeh]j~)}(hjWh]hiommu_viommu_type}(hjWhhhNhNubah}(h]h ]jah"]h$]h&]uh1j}hjWubah}(h]h ](jjeh"]h$]h&]hhuh1jwhjWhhhjWhMubeh}(h]h ]h"]h$]h&]hhjuh1jNjjhjWhhhjWhMubah}(h]jWah ](jjeh"]h$]h&]jj)jhuh1jHhjWhMhjWhhubj)}(hhh]h)}(hVirtual IOMMU Typeh]hVirtual IOMMU Type}(hj XhhhNhNubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMhjXhhubah}(h]h ]h"]h$]h&]uh1jhjWhhhjWhMubeh}(h]h ](jenumeh"]h$]h&]jjjj8Xjj8Xjjjuh1jChhhjhj$hNubj)}(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*)}(hjBXh]h Constants}(hjDXhhhNhNubah}(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_ubjC )}(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]_hhhNhNubah}(h]h ]h"]h$]h&]uh1hhjY_hM-hjZ_ubah}(h]h ]h"]h$]h&]uh1jB hj>_ubeh}(h]h ]h"]h$]h&]uh1j hjY_hM-hjW^ubeh}(h]h ]h"]h$]h&]uh1j hj^ubeh}(h]h ] kernelindentah"]h$]h&]uh1jhjhhhj$hNubh)}(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.hhM1hjhhubh)}(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.}(hj_hhhNhNubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhM.hjhhubj3)}(hhh]h}(h]h ]h"]h$]h&]entries](j?$iommu_ioas_change_process (C struct)c.iommu_ioas_change_processhNtauh1j2hjhhhj$hNubjD)}(hhh](jI)}(hiommu_ioas_change_processh]jO)}(h struct iommu_ioas_change_processh](jU)}(hjXh]hstruct}(hj_hhhNhNubah}(h]h ]jaah"]h$]h&]uh1jThj_hhhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhM9ubjg)}(h h]h }(hj_hhhNhNubah}(h]h ]jsah"]h$]h&]uh1jfhj_hhhj_hM9ubjx)}(hiommu_ioas_change_processh]j~)}(hj_h]hiommu_ioas_change_process}(hj_hhhNhNubah}(h]h ]jah"]h$]h&]uh1j}hj_ubah}(h]h ](jjeh"]h$]h&]hhuh1jwhj_hhhj_hM9ubeh}(h]h ]h"]h$]h&]hhjuh1jNjjhj_hhhj_hM9ubah}(h]j_ah ](jjeh"]h$]h&]jj)jhuh1jHhj_hM9hj_hhubj)}(hhh]h)}(hioctl(VFIO_IOAS_CHANGE_PROCESS)h]hioctl(VFIO_IOAS_CHANGE_PROCESS)}(hj`hhhNhNubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMAhj`hhubah}(h]h ]h"]h$]h&]uh1jhj_hhhj_hM9ubeh}(h]h ](jstructeh"]h$]h&]jjjj`jj`jjjuh1jChhhjhj$hNubj)}(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*`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.hhMEhj"`ubj)}(hKstruct iommu_ioas_change_process { __u32 size; __u32 __reserved; };h]hKstruct iommu_ioas_change_process { __u32 size; __u32 __reserved; };}hjC`sbah}(h]h ]h"]h$]h&]hhuh1jhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMGhj"`ubh)}(h **Members**h]j*)}(hjT`h]hMembers}(hjV`hhhNhNubah}(h]h ]h"]h$]h&]uh1j)hjR`ubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMLhj"`ubj )}(hhh](j! )}(h2``size`` sizeof(struct iommu_ioas_change_process) h](j' )}(h``size``h]j- )}(hjs`h]hsize}(hju`hhhNhNubah}(h]h ]h"]h$]h&]uh1j, hjq`ubah}(h]h ]h"]h$]h&]uh1j& hc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMChjm`ubjC )}(hhh]h)}(h(sizeof(struct iommu_ioas_change_process)h]h(sizeof(struct iommu_ioas_change_process)}(hj`hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj`hMChj`ubah}(h]h ]h"]h$]h&]uh1jB hjm`ubeh}(h]h ]h"]h$]h&]uh1j hj`hMChjj`ubj! )}(h``__reserved`` Must be 0h](j' )}(h``__reserved``h]j- )}(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.hhMChj`ubjC )}(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.hhMDhj`ubah}(h]h ]h"]h$]h&]uh1jB hj`ubeh}(h]h ]h"]h$]h&]uh1j hj`hMChjj`ubeh}(h]h ]h"]h$]h&]uh1j hj"`ubeh}(h]h ] kernelindentah"]h$]h&]uh1jhjhhhj$hNubh)}(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.hhMGhjhhubh)}(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.}(hjahhhNhNubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMDhjhhubh)}(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.}(hjahhhNhNubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMIhjhhubj3)}(hhh]h}(h]h ]h"]h$]h&]entries](j?iommu_veventq_flag (C enum)c.iommu_veventq_flaghNtauh1j2hjhhhj$hNubjD)}(hhh](jI)}(hiommu_veventq_flagh]jO)}(henum iommu_veventq_flagh](jU)}(hjh]henum}(hjstruct iommu_vevent_arm_smmuv3 { __aligned_le64 evt[4]; };h]h>struct iommu_vevent_arm_smmuv3 { __aligned_le64 evt[4]; };}hjgsbah}(h]h ]h"]h$]h&]hhuh1jhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMhjgubh)}(h **Members**h]j*)}(hjhh]hMembers}(hj hhhhNhNubah}(h]h ]h"]h$]h&]uh1j)hjhubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMhjgubj )}(hhh]j! )}(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]j- )}(hj&hh]hevt}(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.hhMhj hubjC )}(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?hhhhNhNubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMhj``viommu_id`` Virtual IOMMU ID to associate the HW queue with h](j' )}(h ``viommu_id``h]j- )}(hjSph]h viommu_id}(hjUphhhNhNubah}(h]h ]h"]h$]h&]uh1j, hjQpubah}(h]h ]h"]h$]h&]uh1j& hc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMhjMpubjC )}(hhh]h)}(h/Virtual IOMMU ID to associate the HW queue withh]h/Virtual IOMMU ID to associate the HW queue with}(hjlphhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhphMhjipubah}(h]h ]h"]h$]h&]uh1jB hjMpubeh}(h]h ]h"]h$]h&]uh1j hjhphMhjoubj! )}(h)``type`` One of enum iommu_hw_queue_type h](j' )}(h``type``h]j- )}(hjph]htype}(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.hhMhjpubjC )}(hhh]h)}(hOne of enum iommu_hw_queue_typeh]hOne of enum iommu_hw_queue_type}(hjphhhNhNubah}(h]h ]h"]h$]h&]uh1hhjphMhjpubah}(h]h ]h"]h$]h&]uh1jB hjpubeh}(h]h ]h"]h$]h&]uh1j hjphMhjoubj! )}(hV``index`` The logical index to the HW queue per virtual IOMMU for a multi-queue model h](j' )}(h ``index``h]j- )}(hjph]hindex}(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.hhMhjpubjC )}(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}(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&]uh1jB hjpubeh}(h]h ]h"]h$]h&]uh1j hjphMhjoubj! )}(h/``out_hw_queue_id`` The ID of the new HW queue h](j' )}(h``out_hw_queue_id``h]j- )}(hjph]hout_hw_queue_id}(hjqhhhNhNubah}(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.hhMhjpubjC )}(hhh]h)}(hThe ID of the new HW queueh]hThe ID of the new HW queue}(hjqhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjqhMhjqubah}(h]h ]h"]h$]h&]uh1jB hjpubeh}(h]h ]h"]h$]h&]uh1j hjqhMhjoubj! )}(h]``nesting_parent_iova`` Base address of the queue memory in the guest physical address space h](j' )}(h``nesting_parent_iova``h]j- )}(hj8qh]hnesting_parent_iova}(hj:qhhhNhNubah}(h]h ]h"]h$]h&]uh1j, hj6qubah}(h]h ]h"]h$]h&]uh1j& hc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMhj2qubjC )}(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}(hjQqhhhNhNubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMhjNqubah}(h]h ]h"]h$]h&]uh1jB hj2qubeh}(h]h ]h"]h$]h&]uh1j hjMqhMhjoubj! )}(h%``length`` Length of the queue memoryh](j' )}(h ``length``h]j- )}(hjrqh]hlength}(hjtqhhhNhNubah}(h]h ]h"]h$]h&]uh1j, hjpqubah}(h]h ]h"]h$]h&]uh1j& hc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMhjlqubjC )}(hhh]h)}(hLength of the queue memoryh]hLength of the queue memory}(hjqhhhNhNubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMhjqubah}(h]h ]h"]h$]h&]uh1jB hjlqubeh}(h]h ]h"]h$]h&]uh1j hjqhMhjoubeh}(h]h ]h"]h$]h&]uh1j hjoubeh}(h]h ] kernelindentah"]h$]h&]uh1jhjhhhj$hNubh)}(h**Description**h]j*)}(hjqh]h Description}(hjqhhhNhNubah}(h]h ]h"]h$]h&]uh1j)hjqubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMhjhhubh)}(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 }(hjqhhhNhNubj*)}(h**nesting_parent_iova**h]hnesting_parent_iova}(hjqhhhNhNubah}(h]h ]h"]h$]h&]uh1j)hjqubh and }(hjqhhhNhNubj*)}(h **length**h]hlength}(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)}(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 }(hjqhhhNhNubj*)}(h **index**h]hindex}(hjrhhhNhNubah}(h]h ]h"]h$]h&]uh1j)hjqubh+ per type to separate each allocation, e.g:}(hjqhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMhjhhubj)}(h6Type1 HW queue0, Type1 HW queue1, Type2 HW queue0, ...h]h6Type1 HW queue0, Type1 HW queue1, Type2 HW queue0, ...}hjrsbah}(h]h ]h"]h$]h&]hhuh1jhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMhjhhubeh}(h]iommufd-user-apiah ]h"]iommufd user apiah$]h&]uh1hhhhhhhhMMubh)}(hhh](h)}(hIOMMUFD Kernel APIh]hIOMMUFD Kernel API}(hj9rhhhNhNubah}(h]h ]h"]h$]h&]uh1hhj6rhhhhhMRubh)}(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.}(hjGrhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMThj6rhhubj3)}(hhh]h}(h]h ]h"]h$]h&]entries](j? iommufd_device_bind (C function)c.iommufd_device_bindhNtauh1j2hj6rhhhNhNubjD)}(hhh](jI)}(hcstruct iommufd_device * iommufd_device_bind (struct iommufd_ctx *ictx, struct device *dev, u32 *id)h]jO)}(hastruct iommufd_device *iommufd_device_bind(struct iommufd_ctx *ictx, struct device *dev, u32 *id)h](jU)}(hjXh]hstruct}(hjnrhhhNhNubah}(h]h ]jaah"]h$]h&]uh1jThjjrhhhe/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:345: ./drivers/iommu/iommufd/device.chKubjg)}(h h]h }(hj|rhhhNhNubah}(h]h ]jsah"]h$]h&]uh1jfhjjrhhhj{rhKubh)}(hhh]j~)}(hiommufd_deviceh]hiommufd_device}(hjrhhhNhNubah}(h]h ]jah"]h$]h&]uh1j}hjrubah}(h]h ]h"]h$]h&] refdomainjreftype identifier reftargetjrmodnameN classnameN c:parent_keysphinx.domains.c LookupKey)}data]jr ASTIdentifier)}jriommufd_device_bindsbc.iommufd_device_bindasbuh1hhjjrhhhj{rhKubjg)}(h h]h }(hjrhhhNhNubah}(h]h ]jsah"]h$]h&]uh1jfhjjrhhhj{rhKubhdesc_sig_punctuation)}(hjh]h*}(hjrhhhNhNubah}(h]h ]pah"]h$]h&]uh1jrhjjrhhhj{rhKubjx)}(hiommufd_device_bindh]j~)}(hjrh]hiommufd_device_bind}(hjrhhhNhNubah}(h]h ]jah"]h$]h&]uh1j}hjrubah}(h]h ](jjeh"]h$]h&]hhuh1jwhjjrhhhj{rhKubhdesc_parameterlist)}(h7(struct iommufd_ctx *ictx, struct device *dev, u32 *id)h](hdesc_parameter)}(hstruct iommufd_ctx *ictxh](jU)}(hjXh]hstruct}(hjrhhhNhNubah}(h]h ]jaah"]h$]h&]uh1jThjrubjg)}(h h]h }(hjshhhNhNubah}(h]h ]jsah"]h$]h&]uh1jfhjrubh)}(hhh]j~)}(h iommufd_ctxh]h iommufd_ctx}(hjshhhNhNubah}(h]h ]jah"]h$]h&]uh1j}hjsubah}(h]h ]h"]h$]h&] refdomainjreftypejr reftargetjsmodnameN classnameNjrjr)}jr]jrc.iommufd_device_bindasbuh1hhjrubjg)}(h h]h }(hj3shhhNhNubah}(h]h ]jsah"]h$]h&]uh1jfhjrubjr)}(hjh]h*}(hjAshhhNhNubah}(h]h ]jrah"]h$]h&]uh1jrhjrubj~)}(hictxh]hictx}(hjNshhhNhNubah}(h]h ]jah"]h$]h&]uh1j}hjrubeh}(h]h ]h"]h$]h&]noemphhhuh1jrhjrubjr)}(hstruct device *devh](jU)}(hjXh]hstruct}(hjgshhhNhNubah}(h]h ]jaah"]h$]h&]uh1jThjcsubjg)}(h h]h }(hjtshhhNhNubah}(h]h ]jsah"]h$]h&]uh1jfhjcsubh)}(hhh]j~)}(hdeviceh]hdevice}(hjshhhNhNubah}(h]h ]jah"]h$]h&]uh1j}hjsubah}(h]h ]h"]h$]h&] refdomainjreftypejr reftargetjsmodnameN classnameNjrjr)}jr]jrc.iommufd_device_bindasbuh1hhjcsubjg)}(h h]h }(hjshhhNhNubah}(h]h ]jsah"]h$]h&]uh1jfhjcsubjr)}(hjh]h*}(hjshhhNhNubah}(h]h ]jrah"]h$]h&]uh1jrhjcsubj~)}(hdevh]hdev}(hjshhhNhNubah}(h]h ]jah"]h$]h&]uh1j}hjcsubeh}(h]h ]h"]h$]h&]noemphhhuh1jrhjrubjr)}(hu32 *idh](h)}(hhh]j~)}(hu32h]hu32}(hjshhhNhNubah}(h]h ]jah"]h$]h&]uh1j}hjsubah}(h]h ]h"]h$]h&] refdomainjreftypejr reftargetjsmodnameN classnameNjrjr)}jr]jrc.iommufd_device_bindasbuh1hhjsubjg)}(h h]h }(hjshhhNhNubah}(h]h ]jsah"]h$]h&]uh1jfhjsubjr)}(hjh]h*}(hjthhhNhNubah}(h]h ]jrah"]h$]h&]uh1jrhjsubj~)}(hidh]hid}(hjthhhNhNubah}(h]h ]jah"]h$]h&]uh1j}hjsubeh}(h]h ]h"]h$]h&]noemphhhuh1jrhjrubeh}(h]h ]h"]h$]h&]hhuh1jrhjjrhhhj{rhKubeh}(h]h ]h"]h$]h&]hhjuh1jNjjhjfrhhhj{rhKubah}(h]jarah ](jjeh"]h$]h&]jj)jhuh1jHhj{rhKhjcrhhubj)}(hhh]h)}(h%Bind a physical device to an iommu fdh]h%Bind a physical device to an iommu fd}(hj=thhhNhNubah}(h]h ]h"]h$]h&]uh1hhe/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:345: ./drivers/iommu/iommufd/device.chKhj:thhubah}(h]h ]h"]h$]h&]uh1jhjcrhhhj{rhKubeh}(h]h ](jfunctioneh"]h$]h&]jjjjUtjjUtjjjuh1jChhhj6rhNhNubj)}(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_th]h Parameters}(hjathhhNhNubah}(h]h ]h"]h$]h&]uh1j)hj]tubah}(h]h ]h"]h$]h&]uh1hhe/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:345: ./drivers/iommu/iommufd/device.chKhjYtubj )}(hhh](j! )}(h5``struct iommufd_ctx *ictx`` iommufd file descriptor h](j' )}(h``struct iommufd_ctx *ictx``h]j- )}(hj~th]hstruct iommufd_ctx *ictx}(hjthhhNhNubah}(h]h ]h"]h$]h&]uh1j, hj|tubah}(h]h ]h"]h$]h&]uh1j& he/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:345: ./drivers/iommu/iommufd/device.chKhjxtubjC )}(hhh]h)}(hiommufd file descriptorh]hiommufd file descriptor}(hjthhhNhNubah}(h]h ]h"]h$]h&]uh1hhjthKhjtubah}(h]h ]h"]h$]h&]uh1jB hjxtubeh}(h]h ]h"]h$]h&]uh1j hjthKhjutubj! )}(h;``struct device *dev`` Pointer to a physical device struct h](j' )}(h``struct device *dev``h]j- )}(hjth]hstruct device *dev}(hjthhhNhNubah}(h]h ]h"]h$]h&]uh1j, hjtubah}(h]h ]h"]h$]h&]uh1j& he/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:345: ./drivers/iommu/iommufd/device.chKhjtubjC )}(hhh]h)}(h#Pointer to a physical device structh]h#Pointer to a physical device struct}(hjthhhNhNubah}(h]h ]h"]h$]h&]uh1hhjthKhjtubah}(h]h ]h"]h$]h&]uh1jB hjtubeh}(h]h ]h"]h$]h&]uh1j hjthKhjutubj! )}(hD``u32 *id`` Output ID number to return to userspace for this device h](j' )}(h ``u32 *id``h]j- )}(hjth]hu32 *id}(hjthhhNhNubah}(h]h ]h"]h$]h&]uh1j, hjtubah}(h]h ]h"]h$]h&]uh1j& he/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:345: ./drivers/iommu/iommufd/device.chKhjtubjC )}(hhh]h)}(h7Output ID number to return to userspace for this deviceh]h7Output ID number to return to userspace for this device}(hj uhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjuhKhjuubah}(h]h ]h"]h$]h&]uh1jB hjtubeh}(h]h ]h"]h$]h&]uh1j hjuhKhjutubeh}(h]h ]h"]h$]h&]uh1j hjYtubh)}(h**Description**h]j*)}(hj+uh]h Description}(hj-uhhhNhNubah}(h]h ]h"]h$]h&]uh1j)hj)uubah}(h]h ]h"]h$]h&]uh1hhe/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:345: ./drivers/iommu/iommufd/device.chKhjYtubh)}(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.}(hjAuhhhNhNubah}(h]h ]h"]h$]h&]uh1hhe/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:345: ./drivers/iommu/iommufd/device.chKhjYtubh)}(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.}(hjPuhhhNhNubah}(h]h ]h"]h$]h&]uh1hhe/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:345: ./drivers/iommu/iommufd/device.chKhjYtubh)}(hABinding a PCI device places the entire RID under iommufd control.h]hABinding a PCI device places the entire RID under iommufd control.}(hj_uhhhNhNubah}(h]h ]h"]h$]h&]uh1hhe/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:345: ./drivers/iommu/iommufd/device.chKhjYtubh)}(h6The caller must undo this with iommufd_device_unbind()h]h6The caller must undo this with iommufd_device_unbind()}(hjnuhhhNhNubah}(h]h ]h"]h$]h&]uh1hhe/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:345: ./drivers/iommu/iommufd/device.chKhjYtubeh}(h]h ] kernelindentah"]h$]h&]uh1jhj6rhhhNhNubj3)}(hhh]h}(h]h ]h"]h$]h&]entries](j?"iommufd_ctx_has_group (C function)c.iommufd_ctx_has_grouphNtauh1j2hj6rhhhNhNubjD)}(hhh](jI)}(hPbool iommufd_ctx_has_group (struct iommufd_ctx *ictx, struct iommu_group *group)h]jO)}(hObool iommufd_ctx_has_group(struct iommufd_ctx *ictx, struct iommu_group *group)h](hdesc_sig_keyword_type)}(hboolh]hbool}(hjuhhhNhNubah}(h]h ]ktah"]h$]h&]uh1juhjuhhhe/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:345: ./drivers/iommu/iommufd/device.chM'ubjg)}(h h]h }(hjuhhhNhNubah}(h]h ]jsah"]h$]h&]uh1jfhjuhhhjuhM'ubjx)}(hiommufd_ctx_has_grouph]j~)}(hiommufd_ctx_has_grouph]hiommufd_ctx_has_group}(hjuhhhNhNubah}(h]h ]jah"]h$]h&]uh1j}hjuubah}(h]h ](jjeh"]h$]h&]hhuh1jwhjuhhhjuhM'ubjr)}(h5(struct iommufd_ctx *ictx, struct iommu_group *group)h](jr)}(hstruct iommufd_ctx *ictxh](jU)}(hjXh]hstruct}(hjuhhhNhNubah}(h]h ]jaah"]h$]h&]uh1jThjuubjg)}(h h]h }(hjuhhhNhNubah}(h]h ]jsah"]h$]h&]uh1jfhjuubh)}(hhh]j~)}(h iommufd_ctxh]h iommufd_ctx}(hjuhhhNhNubah}(h]h ]jah"]h$]h&]uh1j}hjuubah}(h]h ]h"]h$]h&] refdomainjreftypejr reftargetjumodnameN classnameNjrjr)}jr]jr)}jrjusbc.iommufd_ctx_has_groupasbuh1hhjuubjg)}(h h]h }(hjvhhhNhNubah}(h]h ]jsah"]h$]h&]uh1jfhjuubjr)}(hjh]h*}(hj)vhhhNhNubah}(h]h ]jrah"]h$]h&]uh1jrhjuubj~)}(hictxh]hictx}(hj6vhhhNhNubah}(h]h ]jah"]h$]h&]uh1j}hjuubeh}(h]h ]h"]h$]h&]noemphhhuh1jrhjuubjr)}(hstruct iommu_group *grouph](jU)}(hjXh]hstruct}(hjOvhhhNhNubah}(h]h ]jaah"]h$]h&]uh1jThjKvubjg)}(h h]h }(hj\vhhhNhNubah}(h]h ]jsah"]h$]h&]uh1jfhjKvubh)}(hhh]j~)}(h iommu_grouph]h iommu_group}(hjmvhhhNhNubah}(h]h ]jah"]h$]h&]uh1j}hjjvubah}(h]h ]h"]h$]h&] refdomainjreftypejr reftargetjovmodnameN classnameNjrjr)}jr]jvc.iommufd_ctx_has_groupasbuh1hhjKvubjg)}(h h]h }(hjvhhhNhNubah}(h]h ]jsah"]h$]h&]uh1jfhjKvubjr)}(hjh]h*}(hjvhhhNhNubah}(h]h ]jrah"]h$]h&]uh1jrhjKvubj~)}(hgrouph]hgroup}(hjvhhhNhNubah}(h]h ]jah"]h$]h&]uh1j}hjKvubeh}(h]h ]h"]h$]h&]noemphhhuh1jrhjuubeh}(h]h ]h"]h$]h&]hhuh1jrhjuhhhjuhM'ubeh}(h]h ]h"]h$]h&]hhjuh1jNjjhjuhhhjuhM'ubah}(h]juah ](jjeh"]h$]h&]jj)jhuh1jHhjuhM'hjuhhubj)}(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}(hjvhhhNhNubah}(h]h ]h"]h$]h&]uh1hhe/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:345: ./drivers/iommu/iommufd/device.chM'hjvhhubah}(h]h ]h"]h$]h&]uh1jhjuhhhjuhM'ubeh}(h]h ](jfunctioneh"]h$]h&]jjjjvjjvjjjuh1jChhhj6rhNhNubj)}(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*)}(hjvh]h Parameters}(hjvhhhNhNubah}(h]h ]h"]h$]h&]uh1j)hjvubah}(h]h ]h"]h$]h&]uh1hhe/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:345: ./drivers/iommu/iommufd/device.chM+hjvubj )}(hhh](j! )}(h5``struct iommufd_ctx *ictx`` iommufd file descriptor h](j' )}(h``struct iommufd_ctx *ictx``h]j- )}(hjwh]hstruct iommufd_ctx *ictx}(hjwhhhNhNubah}(h]h ]h"]h$]h&]uh1j, hjwubah}(h]h ]h"]h$]h&]uh1j& he/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:345: ./drivers/iommu/iommufd/device.chM)hj wubjC )}(hhh]h)}(hiommufd file descriptorh]hiommufd file descriptor}(hj*whhhNhNubah}(h]h ]h"]h$]h&]uh1hhj&whM)hj'wubah}(h]h ]h"]h$]h&]uh1jB hj wubeh}(h]h ]h"]h$]h&]uh1j hj&whM)hjwubj! )}(hG``struct iommu_group *group`` Pointer to a physical iommu_group struct h](j' )}(h``struct iommu_group *group``h]j- )}(hjJwh]hstruct iommu_group *group}(hjLwhhhNhNubah}(h]h ]h"]h$]h&]uh1j, hjHwubah}(h]h ]h"]h$]h&]uh1j& he/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:345: ./drivers/iommu/iommufd/device.chM*hjDwubjC )}(hhh]h)}(h(Pointer to a physical iommu_group structh]h(Pointer to a physical iommu_group struct}(hjcwhhhNhNubah}(h]h ]h"]h$]h&]uh1hhj_whM*hj`wubah}(h]h ]h"]h$]h&]uh1jB hjDwubeh}(h]h ]h"]h$]h&]uh1j hj_whM*hjwubeh}(h]h ]h"]h$]h&]uh1j hjvubh)}(h**Description**h]j*)}(hjwh]h Description}(hjwhhhNhNubah}(h]h ]h"]h$]h&]uh1j)hjwubah}(h]h ]h"]h$]h&]uh1hhe/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:345: ./drivers/iommu/iommufd/device.chM,hjvubh)}(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.}(hjwhhhNhNubah}(h]h ]h"]h$]h&]uh1hhe/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:345: ./drivers/iommu/iommufd/device.chM+hjvubeh}(h]h ] kernelindentah"]h$]h&]uh1jhj6rhhhNhNubj3)}(hhh]h}(h]h ]h"]h$]h&]entries](j?"iommufd_device_unbind (C function)c.iommufd_device_unbindhNtauh1j2hj6rhhhNhNubjD)}(hhh](jI)}(h8void iommufd_device_unbind (struct iommufd_device *idev)h]jO)}(h7void iommufd_device_unbind(struct iommufd_device *idev)h](ju)}(hvoidh]hvoid}(hjwhhhNhNubah}(h]h ]juah"]h$]h&]uh1juhjwhhhe/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:345: ./drivers/iommu/iommufd/device.chMFubjg)}(h h]h }(hjwhhhNhNubah}(h]h ]jsah"]h$]h&]uh1jfhjwhhhjwhMFubjx)}(hiommufd_device_unbindh]j~)}(hiommufd_device_unbindh]hiommufd_device_unbind}(hjwhhhNhNubah}(h]h ]jah"]h$]h&]uh1j}hjwubah}(h]h ](jjeh"]h$]h&]hhuh1jwhjwhhhjwhMFubjr)}(h(struct iommufd_device *idev)h]jr)}(hstruct iommufd_device *idevh](jU)}(hjXh]hstruct}(hjxhhhNhNubah}(h]h ]jaah"]h$]h&]uh1jThjxubjg)}(h h]h }(hjxhhhNhNubah}(h]h ]jsah"]h$]h&]uh1jfhjxubh)}(hhh]j~)}(hiommufd_deviceh]hiommufd_device}(hj%xhhhNhNubah}(h]h ]jah"]h$]h&]uh1j}hj"xubah}(h]h ]h"]h$]h&] refdomainjreftypejr reftargetj'xmodnameN classnameNjrjr)}jr]jr)}jrjwsbc.iommufd_device_unbindasbuh1hhjxubjg)}(h h]h }(hjExhhhNhNubah}(h]h ]jsah"]h$]h&]uh1jfhjxubjr)}(hjh]h*}(hjSxhhhNhNubah}(h]h ]jrah"]h$]h&]uh1jrhjxubj~)}(hidevh]hidev}(hj`xhhhNhNubah}(h]h ]jah"]h$]h&]uh1j}hjxubeh}(h]h ]h"]h$]h&]noemphhhuh1jrhjwubah}(h]h ]h"]h$]h&]hhuh1jrhjwhhhjwhMFubeh}(h]h ]h"]h$]h&]hhjuh1jNjjhjwhhhjwhMFubah}(h]jwah ](jjeh"]h$]h&]jj)jhuh1jHhjwhMFhjwhhubj)}(hhh]h)}(hUndo iommufd_device_bind()h]hUndo iommufd_device_bind()}(hjxhhhNhNubah}(h]h ]h"]h$]h&]uh1hhe/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:345: ./drivers/iommu/iommufd/device.chMFhjxhhubah}(h]h ]h"]h$]h&]uh1jhjwhhhjwhMFubeh}(h]h ](jfunctioneh"]h$]h&]jjjjxjjxjjjuh1jChhhj6rhNhNubj)}(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*)}(hjxh]h Parameters}(hjxhhhNhNubah}(h]h ]h"]h$]h&]uh1j)hjxubah}(h]h ]h"]h$]h&]uh1hhe/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:345: ./drivers/iommu/iommufd/device.chMJhjxubj )}(hhh]j! )}(hI``struct iommufd_device *idev`` Device returned by iommufd_device_bind() h](j' )}(h``struct iommufd_device *idev``h]j- )}(hjxh]hstruct iommufd_device *idev}(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.chMGhjxubjC )}(hhh]h)}(h(Device returned by iommufd_device_bind()h]h(Device returned by iommufd_device_bind()}(hjxhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjxhMGhjxubah}(h]h ]h"]h$]h&]uh1jB hjxubeh}(h]h ]h"]h$]h&]uh1j hjxhMGhjxubah}(h]h ]h"]h$]h&]uh1j hjxubh)}(h**Description**h]j*)}(hjyh]h Description}(hjyhhhNhNubah}(h]h ]h"]h$]h&]uh1j)hjyubah}(h]h ]h"]h$]h&]uh1hhe/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:345: ./drivers/iommu/iommufd/device.chMIhjxubh)}(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.}(hjyhhhNhNubah}(h]h ]h"]h$]h&]uh1hhe/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:345: ./drivers/iommu/iommufd/device.chMHhjxubeh}(h]h ] kernelindentah"]h$]h&]uh1jhj6rhhhNhNubj3)}(hhh]h}(h]h ]h"]h$]h&]entries](j?"iommufd_device_attach (C function)c.iommufd_device_attachhNtauh1j2hj6rhhhNhNubjD)}(hhh](jI)}(hSint iommufd_device_attach (struct iommufd_device *idev, ioasid_t pasid, u32 *pt_id)h]jO)}(hRint iommufd_device_attach(struct iommufd_device *idev, ioasid_t pasid, u32 *pt_id)h](ju)}(hinth]hint}(hjKyhhhNhNubah}(h]h ]juah"]h$]h&]uh1juhjGyhhhe/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:345: ./drivers/iommu/iommufd/device.chMubjg)}(h h]h }(hjZyhhhNhNubah}(h]h ]jsah"]h$]h&]uh1jfhjGyhhhjYyhMubjx)}(hiommufd_device_attachh]j~)}(hiommufd_device_attachh]hiommufd_device_attach}(hjlyhhhNhNubah}(h]h ]jah"]h$]h&]uh1j}hjhyubah}(h]h ](jjeh"]h$]h&]hhuh1jwhjGyhhhjYyhMubjr)}(h9(struct iommufd_device *idev, ioasid_t pasid, u32 *pt_id)h](jr)}(hstruct iommufd_device *idevh](jU)}(hjXh]hstruct}(hjyhhhNhNubah}(h]h ]jaah"]h$]h&]uh1jThjyubjg)}(h h]h }(hjyhhhNhNubah}(h]h ]jsah"]h$]h&]uh1jfhjyubh)}(hhh]j~)}(hiommufd_deviceh]hiommufd_device}(hjyhhhNhNubah}(h]h ]jah"]h$]h&]uh1j}hjyubah}(h]h ]h"]h$]h&] refdomainjreftypejr reftargetjymodnameN classnameNjrjr)}jr]jr)}jrjnysbc.iommufd_device_attachasbuh1hhjyubjg)}(h h]h }(hjyhhhNhNubah}(h]h ]jsah"]h$]h&]uh1jfhjyubjr)}(hjh]h*}(hjyhhhNhNubah}(h]h ]jrah"]h$]h&]uh1jrhjyubj~)}(hidevh]hidev}(hjyhhhNhNubah}(h]h ]jah"]h$]h&]uh1j}hjyubeh}(h]h ]h"]h$]h&]noemphhhuh1jrhjyubjr)}(hioasid_t pasidh](h)}(hhh]j~)}(hioasid_th]hioasid_t}(hjyhhhNhNubah}(h]h ]jah"]h$]h&]uh1j}hjyubah}(h]h ]h"]h$]h&] refdomainjreftypejr reftargetjymodnameN classnameNjrjr)}jr]jyc.iommufd_device_attachasbuh1hhjyubjg)}(h h]h }(hjzhhhNhNubah}(h]h ]jsah"]h$]h&]uh1jfhjyubj~)}(hpasidh]hpasid}(hj)zhhhNhNubah}(h]h ]jah"]h$]h&]uh1j}hjyubeh}(h]h ]h"]h$]h&]noemphhhuh1jrhjyubjr)}(h u32 *pt_idh](h)}(hhh]j~)}(hu32h]hu32}(hjEzhhhNhNubah}(h]h ]jah"]h$]h&]uh1j}hjBzubah}(h]h ]h"]h$]h&] refdomainjreftypejr reftargetjGzmodnameN classnameNjrjr)}jr]jyc.iommufd_device_attachasbuh1hhj>zubjg)}(h h]h }(hjczhhhNhNubah}(h]h ]jsah"]h$]h&]uh1jfhj>zubjr)}(hjh]h*}(hjqzhhhNhNubah}(h]h ]jrah"]h$]h&]uh1jrhj>zubj~)}(hpt_idh]hpt_id}(hj~zhhhNhNubah}(h]h ]jah"]h$]h&]uh1j}hj>zubeh}(h]h ]h"]h$]h&]noemphhhuh1jrhjyubeh}(h]h ]h"]h$]h&]hhuh1jrhjGyhhhjYyhMubeh}(h]h ]h"]h$]h&]hhjuh1jNjjhjCyhhhjYyhMubah}(h]j>yah ](jjeh"]h$]h&]jj)jhuh1jHhjYyhMhj@yhhubj)}(hhh]h)}(h)Connect a device/pasid to an iommu_domainh]h)Connect a device/pasid to an iommu_domain}(hjzhhhNhNubah}(h]h ]h"]h$]h&]uh1hhe/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:345: ./drivers/iommu/iommufd/device.chMhjzhhubah}(h]h ]h"]h$]h&]uh1jhj@yhhhjYyhMubeh}(h]h ](jfunctioneh"]h$]h&]jjjjzjjzjjjuh1jChhhj6rhNhNubj)}(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*)}(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.chMhjzubj )}(hhh](j! )}(h1``struct iommufd_device *idev`` device to attach h](j' )}(h``struct iommufd_device *idev``h]j- )}(hjzh]hstruct iommufd_device *idev}(hjzhhhNhNubah}(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.chMhjzubjC )}(hhh]h)}(hdevice to attachh]hdevice to attach}(hj{hhhNhNubah}(h]h ]h"]h$]h&]uh1hhjzhMhjzubah}(h]h ]h"]h$]h&]uh1jB hjzubeh}(h]h ]h"]h$]h&]uh1j hjzhMhjzubj! )}(h#``ioasid_t pasid`` pasid to attach h](j' )}(h``ioasid_t pasid``h]j- )}(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.chMhj{ubjC )}(hhh]h)}(hpasid to attachh]hpasid to attach}(hj;{hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj7{hMhj8{ubah}(h]h ]h"]h$]h&]uh1jB hj{ubeh}(h]h ]h"]h$]h&]uh1j hj7{hMhjzubj! )}(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]j- )}(hj[{h]h u32 *pt_id}(hj]{hhhNhNubah}(h]h ]h"]h$]h&]uh1j, hjY{ubah}(h]h ]h"]h$]h&]uh1j& he/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:345: ./drivers/iommu/iommufd/device.chMhjU{ubjC )}(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}(hjt{hhhNhNubah}(h]h ]h"]h$]h&]uh1hhe/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:345: ./drivers/iommu/iommufd/device.chMhjq{ubah}(h]h ]h"]h$]h&]uh1jB hjU{ubeh}(h]h ]h"]h$]h&]uh1j hjp{hMhjzubeh}(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.chMhjzubh)}(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 }(hj{hhhNhNubj*)}(h **pasid**h]hpasid}(hj{hhhNhNubah}(h]h ]h"]h$]h&]uh1j)hj{ubh. }(hj{hhhNhNubj*)}(h **pasid**h]hpasid}(hj{hhhNhNubah}(h]h ]h"]h$]h&]uh1j)hj{ubh8 is IOMMU_NO_PASID if this attach is for no pasid usage.}(hj{hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhe/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:345: ./drivers/iommu/iommufd/device.chMhjzubh)}(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().}(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&]uh1jhj6rhhhNhNubj3)}(hhh]h}(h]h ]h"]h$]h&]entries](j?#iommufd_device_replace (C function)c.iommufd_device_replacehNtauh1j2hj6rhhhNhNubjD)}(hhh](jI)}(hTint iommufd_device_replace (struct iommufd_device *idev, ioasid_t pasid, u32 *pt_id)h]jO)}(hSint iommufd_device_replace(struct iommufd_device *idev, ioasid_t pasid, u32 *pt_id)h](ju)}(hinth]hint}(hj|hhhNhNubah}(h]h ]juah"]h$]h&]uh1juhj |hhhe/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:345: ./drivers/iommu/iommufd/device.chMubjg)}(h h]h }(hj|hhhNhNubah}(h]h ]jsah"]h$]h&]uh1jfhj |hhhj|hMubjx)}(hiommufd_device_replaceh]j~)}(hiommufd_device_replaceh]hiommufd_device_replace}(hj0|hhhNhNubah}(h]h ]jah"]h$]h&]uh1j}hj,|ubah}(h]h ](jjeh"]h$]h&]hhuh1jwhj |hhhj|hMubjr)}(h9(struct iommufd_device *idev, ioasid_t pasid, u32 *pt_id)h](jr)}(hstruct iommufd_device *idevh](jU)}(hjXh]hstruct}(hjL|hhhNhNubah}(h]h ]jaah"]h$]h&]uh1jThjH|ubjg)}(h h]h }(hjY|hhhNhNubah}(h]h ]jsah"]h$]h&]uh1jfhjH|ubh)}(hhh]j~)}(hiommufd_deviceh]hiommufd_device}(hjj|hhhNhNubah}(h]h ]jah"]h$]h&]uh1j}hjg|ubah}(h]h ]h"]h$]h&] refdomainjreftypejr reftargetjl|modnameN classnameNjrjr)}jr]jr)}jrj2|sbc.iommufd_device_replaceasbuh1hhjH|ubjg)}(h h]h }(hj|hhhNhNubah}(h]h ]jsah"]h$]h&]uh1jfhjH|ubjr)}(hjh]h*}(hj|hhhNhNubah}(h]h ]jrah"]h$]h&]uh1jrhjH|ubj~)}(hidevh]hidev}(hj|hhhNhNubah}(h]h ]jah"]h$]h&]uh1j}hjH|ubeh}(h]h ]h"]h$]h&]noemphhhuh1jrhjD|ubjr)}(hioasid_t pasidh](h)}(hhh]j~)}(hioasid_th]hioasid_t}(hj|hhhNhNubah}(h]h ]jah"]h$]h&]uh1j}hj|ubah}(h]h ]h"]h$]h&] refdomainjreftypejr reftargetj|modnameN classnameNjrjr)}jr]j|c.iommufd_device_replaceasbuh1hhj|ubjg)}(h h]h }(hj|hhhNhNubah}(h]h ]jsah"]h$]h&]uh1jfhj|ubj~)}(hpasidh]hpasid}(hj|hhhNhNubah}(h]h ]jah"]h$]h&]uh1j}hj|ubeh}(h]h ]h"]h$]h&]noemphhhuh1jrhjD|ubjr)}(h u32 *pt_idh](h)}(hhh]j~)}(hu32h]hu32}(hj }hhhNhNubah}(h]h ]jah"]h$]h&]uh1j}hj}ubah}(h]h ]h"]h$]h&] refdomainjreftypejr reftargetj }modnameN classnameNjrjr)}jr]j|c.iommufd_device_replaceasbuh1hhj}ubjg)}(h h]h }(hj'}hhhNhNubah}(h]h ]jsah"]h$]h&]uh1jfhj}ubjr)}(hjh]h*}(hj5}hhhNhNubah}(h]h ]jrah"]h$]h&]uh1jrhj}ubj~)}(hpt_idh]hpt_id}(hjB}hhhNhNubah}(h]h ]jah"]h$]h&]uh1j}hj}ubeh}(h]h ]h"]h$]h&]noemphhhuh1jrhjD|ubeh}(h]h ]h"]h$]h&]hhuh1jrhj |hhhj|hMubeh}(h]h ]h"]h$]h&]hhjuh1jNjjhj|hhhj|hMubah}(h]j|ah ](jjeh"]h$]h&]jj)jhuh1jHhj|hMhj|hhubj)}(hhh]h)}(h&Change the device/pasid's iommu_domainh]h(Change the device/pasid’s iommu_domain}(hjl}hhhNhNubah}(h]h ]h"]h$]h&]uh1hhe/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:345: ./drivers/iommu/iommufd/device.chMhji}hhubah}(h]h ]h"]h$]h&]uh1jhj|hhhj|hMubeh}(h]h ](jfunctioneh"]h$]h&]jjjj}jj}jjjuh1jChhhj6rhNhNubj)}(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*)}(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}ubj )}(hhh](j! )}(h1``struct iommufd_device *idev`` device to change h](j' )}(h``struct iommufd_device *idev``h]j- )}(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}ubjC )}(hhh]h)}(hdevice to changeh]hdevice to change}(hj}hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj}hMhj}ubah}(h]h ]h"]h$]h&]uh1jB hj}ubeh}(h]h ]h"]h$]h&]uh1j hj}hMhj}ubj! )}(h#``ioasid_t pasid`` pasid to change h](j' )}(h``ioasid_t pasid``h]j- )}(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.chMhj}ubjC )}(hhh]h)}(hpasid to changeh]hpasid to change}(hj}hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj}hMhj}ubah}(h]h ]h"]h$]h&]uh1jB hj}ubeh}(h]h ]h"]h$]h&]uh1j hj}hMhj}ubj! )}(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]j- )}(hj~h]h u32 *pt_id}(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~ubjC )}(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}(hj8~hhhNhNubah}(h]h ]h"]h$]h&]uh1hhe/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:345: ./drivers/iommu/iommufd/device.chMhj5~ubah}(h]h ]h"]h$]h&]uh1jB hj~ubeh}(h]h ]h"]h$]h&]uh1j hj4~hMhj}ubeh}(h]h ]h"]h$]h&]uh1j hj}ubh)}(h**Description**h]j*)}(hj[~h]h Description}(hj]~hhhNhNubah}(h]h ]h"]h$]h&]uh1j)hjY~ubah}(h]h ]h"]h$]h&]uh1hhe/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:345: ./drivers/iommu/iommufd/device.chMhj}ubh)}(hThis is the same as::h]hThis is the same as:}(hjq~hhhNhNubah}(h]h ]h"]h$]h&]uh1hhe/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:345: ./drivers/iommu/iommufd/device.chMhj}ubj)}(h1iommufd_device_detach(); iommufd_device_attach();h]h1iommufd_device_detach(); iommufd_device_attach();}hj~sbah}(h]h ]h"]h$]h&]hhuh1jhe/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:345: ./drivers/iommu/iommufd/device.chMhj}ubh)}(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. }(hj~hhhNhNubj*)}(h **pasid**h]hpasid}(hj~hhhNhNubah}(h]h ]h"]h$]h&]uh1j)hj~ubh& is IOMMU_NO_PASID for no pasid usage.}(hj~hhhNhNubeh}(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&]uh1jhj6rhhhNhNubj3)}(hhh]h}(h]h ]h"]h$]h&]entries](j?"iommufd_device_detach (C function)c.iommufd_device_detachhNtauh1j2hj6rhhhNhNubjD)}(hhh](jI)}(hHvoid iommufd_device_detach (struct iommufd_device *idev, ioasid_t pasid)h]jO)}(hGvoid iommufd_device_detach(struct iommufd_device *idev, ioasid_t pasid)h](ju)}(hvoidh]hvoid}(hj~hhhNhNubah}(h]h ]juah"]h$]h&]uh1juhj~hhhe/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:345: ./drivers/iommu/iommufd/device.chMubjg)}(h h]h }(hj~hhhNhNubah}(h]h ]jsah"]h$]h&]uh1jfhj~hhhj~hMubjx)}(hiommufd_device_detachh]j~)}(hiommufd_device_detachh]hiommufd_device_detach}(hj~hhhNhNubah}(h]h ]jah"]h$]h&]uh1j}hj~ubah}(h]h ](jjeh"]h$]h&]hhuh1jwhj~hhhj~hMubjr)}(h-(struct iommufd_device *idev, ioasid_t pasid)h](jr)}(hstruct iommufd_device *idevh](jU)}(hjXh]hstruct}(hj hhhNhNubah}(h]h ]jaah"]h$]h&]uh1jThj ubjg)}(h h]h }(hjhhhNhNubah}(h]h ]jsah"]h$]h&]uh1jfhj ubh)}(hhh]j~)}(hiommufd_deviceh]hiommufd_device}(hj+hhhNhNubah}(h]h ]jah"]h$]h&]uh1j}hj(ubah}(h]h ]h"]h$]h&] refdomainjreftypejr reftargetj-modnameN classnameNjrjr)}jr]jr)}jrj~sbc.iommufd_device_detachasbuh1hhj ubjg)}(h h]h }(hjKhhhNhNubah}(h]h ]jsah"]h$]h&]uh1jfhj ubjr)}(hjh]h*}(hjYhhhNhNubah}(h]h ]jrah"]h$]h&]uh1jrhj ubj~)}(hidevh]hidev}(hjfhhhNhNubah}(h]h ]jah"]h$]h&]uh1j}hj ubeh}(h]h ]h"]h$]h&]noemphhhuh1jrhjubjr)}(hioasid_t pasidh](h)}(hhh]j~)}(hioasid_th]hioasid_t}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1j}hjubah}(h]h ]h"]h$]h&] refdomainjreftypejr reftargetjmodnameN classnameNjrjr)}jr]jGc.iommufd_device_detachasbuh1hhj{ubjg)}(h h]h }(hjhhhNhNubah}(h]h ]jsah"]h$]h&]uh1jfhj{ubj~)}(hpasidh]hpasid}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1j}hj{ubeh}(h]h ]h"]h$]h&]noemphhhuh1jrhjubeh}(h]h ]h"]h$]h&]hhuh1jrhj~hhhj~hMubeh}(h]h ]h"]h$]h&]hhjuh1jNjjhj~hhhj~hMubah}(h]j~ah ](jjeh"]h$]h&]jj)jhuh1jHhj~hMhj~hhubj)}(hhh]h)}(h-Disconnect a device/device to an iommu_domainh]h-Disconnect a device/device to an iommu_domain}(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~hhhj~hMubeh}(h]h ](jfunctioneh"]h$]h&]jjjjjjjjjuh1jChhhj6rhNhNubj)}(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.chMhjubj )}(hhh](j! )}(h1``struct iommufd_device *idev`` device to detach h](j' )}(h``struct iommufd_device *idev``h]j- )}(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.chMhjubjC )}(hhh]h)}(hdevice to detachh]hdevice to detach}(hj2hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj.hMhj/ubah}(h]h ]h"]h$]h&]uh1jB hjubeh}(h]h ]h"]h$]h&]uh1j hj.hMhjubj! )}(h#``ioasid_t pasid`` pasid to detach h](j' )}(h``ioasid_t pasid``h]j- )}(hjRh]hioasid_t pasid}(hjThhhNhNubah}(h]h ]h"]h$]h&]uh1j, hjPubah}(h]h ]h"]h$]h&]uh1j& he/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:345: ./drivers/iommu/iommufd/device.chMhjLubjC )}(hhh]h)}(hpasid to detachh]hpasid to detach}(hjkhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjghMhjhubah}(h]h ]h"]h$]h&]uh1jB hjLubeh}(h]h ]h"]h$]h&]uh1j hjghMhjubeh}(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&]uh1jhj6rhhhNhNubj3)}(hhh]h}(h]h ]h"]h$]h&]entries](j?"iommufd_access_create (C function)c.iommufd_access_createhNtauh1j2hj6rhhhNhNubjD)}(hhh](jI)}(hstruct iommufd_access * iommufd_access_create (struct iommufd_ctx *ictx, const struct iommufd_access_ops *ops, void *data, u32 *id)h]jO)}(hstruct iommufd_access *iommufd_access_create(struct iommufd_ctx *ictx, const struct iommufd_access_ops *ops, void *data, u32 *id)h](jU)}(hjXh]hstruct}(hjhhhNhNubah}(h]h ]jaah"]h$]h&]uh1jThjhhhe/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:345: ./drivers/iommu/iommufd/device.chMubjg)}(h h]h }(hjhhhNhNubah}(h]h ]jsah"]h$]h&]uh1jfhjhhhjhMubh)}(hhh]j~)}(hiommufd_accessh]hiommufd_access}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1j}hjubah}(h]h ]h"]h$]h&] refdomainjreftypejr reftargetjmodnameN classnameNjrjr)}jr]jr)}jriommufd_access_createsbc.iommufd_access_createasbuh1hhjhhhjhMubjg)}(h h]h }(hj$hhhNhNubah}(h]h ]jsah"]h$]h&]uh1jfhjhhhjhMubjr)}(hjh]h*}(hj2hhhNhNubah}(h]h ]jrah"]h$]h&]uh1jrhjhhhjhMubjx)}(hiommufd_access_createh]j~)}(hj!h]hiommufd_access_create}(hjChhhNhNubah}(h]h ]jah"]h$]h&]uh1j}hj?ubah}(h]h ](jjeh"]h$]h&]hhuh1jwhjhhhjhMubjr)}(hU(struct iommufd_ctx *ictx, const struct iommufd_access_ops *ops, void *data, u32 *id)h](jr)}(hstruct iommufd_ctx *ictxh](jU)}(hjXh]hstruct}(hj^hhhNhNubah}(h]h ]jaah"]h$]h&]uh1jThjZubjg)}(h h]h }(hjkhhhNhNubah}(h]h ]jsah"]h$]h&]uh1jfhjZubh)}(hhh]j~)}(h iommufd_ctxh]h iommufd_ctx}(hj|hhhNhNubah}(h]h ]jah"]h$]h&]uh1j}hjyubah}(h]h ]h"]h$]h&] refdomainjreftypejr reftargetj~modnameN classnameNjrjr)}jr]jc.iommufd_access_createasbuh1hhjZubjg)}(h h]h }(hjhhhNhNubah}(h]h ]jsah"]h$]h&]uh1jfhjZubjr)}(hjh]h*}(hjhhhNhNubah}(h]h ]jrah"]h$]h&]uh1jrhjZubj~)}(hictxh]hictx}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1j}hjZubeh}(h]h ]h"]h$]h&]noemphhhuh1jrhjVubjr)}(h$const struct iommufd_access_ops *opsh](jU)}(hconsth]hconst}(hj΁hhhNhNubah}(h]h ]jaah"]h$]h&]uh1jThjʁubjg)}(h h]h }(hj܁hhhNhNubah}(h]h ]jsah"]h$]h&]uh1jfhjʁubjU)}(hjXh]hstruct}(hjhhhNhNubah}(h]h ]jaah"]h$]h&]uh1jThjʁubjg)}(h h]h }(hjhhhNhNubah}(h]h ]jsah"]h$]h&]uh1jfhjʁubh)}(hhh]j~)}(hiommufd_access_opsh]hiommufd_access_ops}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1j}hjubah}(h]h ]h"]h$]h&] refdomainjreftypejr reftargetj modnameN classnameNjrjr)}jr]jc.iommufd_access_createasbuh1hhjʁubjg)}(h h]h }(hj&hhhNhNubah}(h]h ]jsah"]h$]h&]uh1jfhjʁubjr)}(hjh]h*}(hj4hhhNhNubah}(h]h ]jrah"]h$]h&]uh1jrhjʁubj~)}(hopsh]hops}(hjAhhhNhNubah}(h]h ]jah"]h$]h&]uh1j}hjʁubeh}(h]h ]h"]h$]h&]noemphhhuh1jrhjVubjr)}(h void *datah](ju)}(hvoidh]hvoid}(hjZhhhNhNubah}(h]h ]juah"]h$]h&]uh1juhjVubjg)}(h h]h }(hjhhhhNhNubah}(h]h ]jsah"]h$]h&]uh1jfhjVubjr)}(hjh]h*}(hjvhhhNhNubah}(h]h ]jrah"]h$]h&]uh1jrhjVubj~)}(hdatah]hdata}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1j}hjVubeh}(h]h ]h"]h$]h&]noemphhhuh1jrhjVubjr)}(hu32 *idh](h)}(hhh]j~)}(hu32h]hu32}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1j}hjubah}(h]h ]h"]h$]h&] refdomainjreftypejr reftargetjmodnameN classnameNjrjr)}jr]jc.iommufd_access_createasbuh1hhjubjg)}(h h]h }(hjhhhNhNubah}(h]h ]jsah"]h$]h&]uh1jfhjubjr)}(hjh]h*}(hj˂hhhNhNubah}(h]h ]jrah"]h$]h&]uh1jrhjubj~)}(hidh]hid}(hj؂hhhNhNubah}(h]h ]jah"]h$]h&]uh1j}hjubeh}(h]h ]h"]h$]h&]noemphhhuh1jrhjVubeh}(h]h ]h"]h$]h&]hhuh1jrhjhhhjhMubeh}(h]h ]h"]h$]h&]hhjuh1jNjjhj܀hhhjhMubah}(h]j׀ah ](jjeh"]h$]h&]jj)jhuh1jHhjhMhjـ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&]jjjjjjjjjuh1jChhhj6rhNhNubj)}(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.chMhjubj )}(hhh](j! )}(h5``struct iommufd_ctx *ictx`` iommufd file descriptor h](j' )}(h``struct iommufd_ctx *ictx``h]j- )}(hjCh]hstruct iommufd_ctx *ictx}(hjEhhhNhNubah}(h]h ]h"]h$]h&]uh1j, hjAubah}(h]h ]h"]h$]h&]uh1j& he/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:345: ./drivers/iommu/iommufd/device.chMhj=ubjC )}(hhh]h)}(hiommufd file descriptorh]hiommufd file descriptor}(hj\hhhNhNubah}(h]h ]h"]h$]h&]uh1hhjXhMhjYubah}(h]h ]h"]h$]h&]uh1jB hj=ubeh}(h]h ]h"]h$]h&]uh1j hjXhMhj:ubj! )}(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]j- )}(hj|h]h$const struct iommufd_access_ops *ops}(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.chMhjvubjC )}(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&]uh1jB hjvubeh}(h]h ]h"]h$]h&]uh1j hjhMhj:ubj! )}(h6``void *data`` Opaque data to pass into ops functions h](j' )}(h``void *data``h]j- )}(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.chMhjubjC )}(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&]uh1jB hjubeh}(h]h ]h"]h$]h&]uh1j hjʃhMhj:ubj! )}(hD``u32 *id`` Output ID number to return to userspace for this access h](j' )}(h ``u32 *id``h]j- )}(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.chMhjubjC )}(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&]uh1jB hjubeh}(h]h ]h"]h$]h&]uh1j 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().}(hjNhhhNhNubah}(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&]uh1jhj6rhhhNhNubj3)}(hhh]h}(h]h ]h"]h$]h&]entries](j?#iommufd_access_destroy (C function)c.iommufd_access_destroyhNtauh1j2hj6rhhhNhNubjD)}(hhh](jI)}(h;void iommufd_access_destroy (struct iommufd_access *access)h]jO)}(h:void iommufd_access_destroy(struct iommufd_access *access)h](ju)}(hvoidh]hvoid}(hj}hhhNhNubah}(h]h ]juah"]h$]h&]uh1juhjyhhhe/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:345: ./drivers/iommu/iommufd/device.chMubjg)}(h h]h }(hjhhhNhNubah}(h]h ]jsah"]h$]h&]uh1jfhjyhhhjhMubjx)}(hiommufd_access_destroyh]j~)}(hiommufd_access_destroyh]hiommufd_access_destroy}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1j}hjubah}(h]h ](jjeh"]h$]h&]hhuh1jwhjyhhhjhMubjr)}(h(struct iommufd_access *access)h]jr)}(hstruct iommufd_access *accessh](jU)}(hjXh]hstruct}(hjhhhNhNubah}(h]h ]jaah"]h$]h&]uh1jThjubjg)}(h h]h }(hjDŽhhhNhNubah}(h]h ]jsah"]h$]h&]uh1jfhjubh)}(hhh]j~)}(hiommufd_accessh]hiommufd_access}(hj؄hhhNhNubah}(h]h ]jah"]h$]h&]uh1j}hjՄubah}(h]h ]h"]h$]h&] refdomainjreftypejr reftargetjڄmodnameN classnameNjrjr)}jr]jr)}jrjsbc.iommufd_access_destroyasbuh1hhjubjg)}(h h]h }(hjhhhNhNubah}(h]h ]jsah"]h$]h&]uh1jfhjubjr)}(hjh]h*}(hjhhhNhNubah}(h]h ]jrah"]h$]h&]uh1jrhjubj~)}(haccessh]haccess}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1j}hjubeh}(h]h ]h"]h$]h&]noemphhhuh1jrhjubah}(h]h ]h"]h$]h&]hhuh1jrhjyhhhjhMubeh}(h]h ]h"]h$]h&]hhjuh1jNjjhjuhhhjhMubah}(h]jpah ](jjeh"]h$]h&]jj)jhuh1jHhjhMhjrhhubj)}(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&]uh1jhjrhhhjhMubeh}(h]h ](jfunctioneh"]h$]h&]jjjjUjjUjjjuh1jChhhj6rhNhNubj)}(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}(hjahhhNhNubah}(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.chMhjYubj )}(hhh]j! )}(h8``struct iommufd_access *access`` The access to destroy h](j' )}(h!``struct iommufd_access *access``h]j- )}(hj~h]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.chMhjxubjC )}(hhh]h)}(hThe access to destroyh]hThe access to destroy}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhMhjubah}(h]h ]h"]h$]h&]uh1jB hjxubeh}(h]h ]h"]h$]h&]uh1j hjhMhjuubah}(h]h ]h"]h$]h&]uh1j hjYubh)}(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.chMhjYubh)}(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.chMhjYubeh}(h]h ] kernelindentah"]h$]h&]uh1jhj6rhhhNhNubj3)}(hhh]h}(h]h ]h"]h$]h&]entries](j?'iommufd_access_unpin_pages (C function)c.iommufd_access_unpin_pageshNtauh1j2hj6rhhhNhNubjD)}(hhh](jI)}(hivoid iommufd_access_unpin_pages (struct iommufd_access *access, unsigned long iova, unsigned long length)h]jO)}(hhvoid iommufd_access_unpin_pages(struct iommufd_access *access, unsigned long iova, unsigned long length)h](ju)}(hvoidh]hvoid}(hjhhhNhNubah}(h]h ]juah"]h$]h&]uh1juhjhhhe/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:345: ./drivers/iommu/iommufd/device.chM+ubjg)}(h h]h }(hj hhhNhNubah}(h]h ]jsah"]h$]h&]uh1jfhjhhhj hM+ubjx)}(hiommufd_access_unpin_pagesh]j~)}(hiommufd_access_unpin_pagesh]hiommufd_access_unpin_pages}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1j}hjubah}(h]h ](jjeh"]h$]h&]hhuh1jwhjhhhj hM+ubjr)}(hI(struct iommufd_access *access, unsigned long iova, unsigned long length)h](jr)}(hstruct iommufd_access *accessh](jU)}(hjXh]hstruct}(hj;hhhNhNubah}(h]h ]jaah"]h$]h&]uh1jThj7ubjg)}(h h]h }(hjHhhhNhNubah}(h]h ]jsah"]h$]h&]uh1jfhj7ubh)}(hhh]j~)}(hiommufd_accessh]hiommufd_access}(hjYhhhNhNubah}(h]h ]jah"]h$]h&]uh1j}hjVubah}(h]h ]h"]h$]h&] refdomainjreftypejr reftargetj[modnameN classnameNjrjr)}jr]jr)}jrj!sbc.iommufd_access_unpin_pagesasbuh1hhj7ubjg)}(h h]h }(hjyhhhNhNubah}(h]h ]jsah"]h$]h&]uh1jfhj7ubjr)}(hjh]h*}(hjhhhNhNubah}(h]h ]jrah"]h$]h&]uh1jrhj7ubj~)}(haccessh]haccess}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1j}hj7ubeh}(h]h ]h"]h$]h&]noemphhhuh1jrhj3ubjr)}(hunsigned long iovah](ju)}(hunsignedh]hunsigned}(hjhhhNhNubah}(h]h ]juah"]h$]h&]uh1juhjubjg)}(h h]h }(hjhhhNhNubah}(h]h ]jsah"]h$]h&]uh1jfhjubju)}(hlongh]hlong}(hjɆhhhNhNubah}(h]h ]juah"]h$]h&]uh1juhjubjg)}(h h]h }(hj׆hhhNhNubah}(h]h ]jsah"]h$]h&]uh1jfhjubj~)}(hiovah]hiova}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1j}hjubeh}(h]h ]h"]h$]h&]noemphhhuh1jrhj3ubjr)}(hunsigned long lengthh](ju)}(hunsignedh]hunsigned}(hjhhhNhNubah}(h]h ]juah"]h$]h&]uh1juhjubjg)}(h h]h }(hj hhhNhNubah}(h]h ]jsah"]h$]h&]uh1jfhjubju)}(hlongh]hlong}(hjhhhNhNubah}(h]h ]juah"]h$]h&]uh1juhjubjg)}(h h]h }(hj(hhhNhNubah}(h]h ]jsah"]h$]h&]uh1jfhjubj~)}(hlengthh]hlength}(hj6hhhNhNubah}(h]h ]jah"]h$]h&]uh1j}hjubeh}(h]h ]h"]h$]h&]noemphhhuh1jrhj3ubeh}(h]h ]h"]h$]h&]hhuh1jrhjhhhj hM+ubeh}(h]h ]h"]h$]h&]hhjuh1jNjjhjhhhj hM+ubah}(h]jah ](jjeh"]h$]h&]jj)jhuh1jHhj hM+hjhhubj)}(hhh]h)}(hUndo iommufd_access_pin_pagesh]hUndo iommufd_access_pin_pages}(hj`hhhNhNubah}(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&]jjjjxjjxjjjuh1jChhhj6rhNhNubj)}(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.chM/hj|ubj )}(hhh](j! )}(h8``struct iommufd_access *access`` IOAS access to act on h](j' )}(h!``struct iommufd_access *access``h]j- )}(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,hjubjC )}(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&]uh1jB hjubeh}(h]h ]h"]h$]h&]uh1j hjhM,hjubj! )}(h%``unsigned long iova`` Starting IOVA h](j' )}(h``unsigned long iova``h]j- )}(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ԇubjC )}(hhh]h)}(h Starting IOVAh]h Starting IOVA}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhM-hjubah}(h]h ]h"]h$]h&]uh1jB hjԇubeh}(h]h ]h"]h$]h&]uh1j hjhM-hjubj! )}(h3``unsigned long length`` Number of bytes to access h](j' )}(h``unsigned long length``h]j- )}(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.hj ubjC )}(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&]uh1jB hj ubeh}(h]h ]h"]h$]h&]uh1j hj(hM.hjubeh}(h]h ]h"]h$]h&]uh1j hj|ubh)}(h**Description**h]j*)}(hjNh]h Description}(hjPhhhNhNubah}(h]h ]h"]h$]h&]uh1j)hjLubah}(h]h ]h"]h$]h&]uh1hhe/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:345: ./drivers/iommu/iommufd/device.chM0hj|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.}(hjdhhhNhNubah}(h]h ]h"]h$]h&]uh1hhe/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:345: ./drivers/iommu/iommufd/device.chM/hj|ubeh}(h]h ] kernelindentah"]h$]h&]uh1jhj6rhhhNhNubj3)}(hhh]h}(h]h ]h"]h$]h&]entries](j?%iommufd_access_pin_pages (C function)c.iommufd_access_pin_pageshNtauh1j2hj6rhhhNhNubjD)}(hhh](jI)}(hint iommufd_access_pin_pages (struct iommufd_access *access, unsigned long iova, unsigned long length, struct page **out_pages, unsigned int flags)h]jO)}(hint iommufd_access_pin_pages(struct iommufd_access *access, unsigned long iova, unsigned long length, struct page **out_pages, unsigned int flags)h](ju)}(hinth]hint}(hjhhhNhNubah}(h]h ]juah"]h$]h&]uh1juhjhhhe/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:345: ./drivers/iommu/iommufd/device.chMmubjg)}(h h]h }(hjhhhNhNubah}(h]h ]jsah"]h$]h&]uh1jfhjhhhjhMmubjx)}(hiommufd_access_pin_pagesh]j~)}(hiommufd_access_pin_pagesh]hiommufd_access_pin_pages}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1j}hjubah}(h]h ](jjeh"]h$]h&]hhuh1jwhjhhhjhMmubjr)}(hv(struct iommufd_access *access, unsigned long iova, unsigned long length, struct page **out_pages, unsigned int flags)h](jr)}(hstruct iommufd_access *accessh](jU)}(hjXh]hstruct}(hjЈhhhNhNubah}(h]h ]jaah"]h$]h&]uh1jThj̈ubjg)}(h h]h }(hj݈hhhNhNubah}(h]h ]jsah"]h$]h&]uh1jfhj̈ubh)}(hhh]j~)}(hiommufd_accessh]hiommufd_access}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1j}hjubah}(h]h ]h"]h$]h&] refdomainjreftypejr reftargetjmodnameN classnameNjrjr)}jr]jr)}jrjsbc.iommufd_access_pin_pagesasbuh1hhj̈ubjg)}(h h]h }(hjhhhNhNubah}(h]h ]jsah"]h$]h&]uh1jfhj̈ubjr)}(hjh]h*}(hjhhhNhNubah}(h]h ]jrah"]h$]h&]uh1jrhj̈ubj~)}(haccessh]haccess}(hj)hhhNhNubah}(h]h ]jah"]h$]h&]uh1j}hj̈ubeh}(h]h ]h"]h$]h&]noemphhhuh1jrhjȈubjr)}(hunsigned long iovah](ju)}(hunsignedh]hunsigned}(hjBhhhNhNubah}(h]h ]juah"]h$]h&]uh1juhj>ubjg)}(h h]h }(hjPhhhNhNubah}(h]h ]jsah"]h$]h&]uh1jfhj>ubju)}(hlongh]hlong}(hj^hhhNhNubah}(h]h ]juah"]h$]h&]uh1juhj>ubjg)}(h h]h }(hjlhhhNhNubah}(h]h ]jsah"]h$]h&]uh1jfhj>ubj~)}(hiovah]hiova}(hjzhhhNhNubah}(h]h ]jah"]h$]h&]uh1j}hj>ubeh}(h]h ]h"]h$]h&]noemphhhuh1jrhjȈubjr)}(hunsigned long lengthh](ju)}(hunsignedh]hunsigned}(hjhhhNhNubah}(h]h ]juah"]h$]h&]uh1juhjubjg)}(h h]h }(hjhhhNhNubah}(h]h ]jsah"]h$]h&]uh1jfhjubju)}(hlongh]hlong}(hjhhhNhNubah}(h]h ]juah"]h$]h&]uh1juhjubjg)}(h h]h }(hjhhhNhNubah}(h]h ]jsah"]h$]h&]uh1jfhjubj~)}(hlengthh]hlength}(hjˉhhhNhNubah}(h]h ]jah"]h$]h&]uh1j}hjubeh}(h]h ]h"]h$]h&]noemphhhuh1jrhjȈubjr)}(hstruct page **out_pagesh](jU)}(hjXh]hstruct}(hjhhhNhNubah}(h]h ]jaah"]h$]h&]uh1jThjubjg)}(h h]h }(hjhhhNhNubah}(h]h ]jsah"]h$]h&]uh1jfhjubh)}(hhh]j~)}(hpageh]hpage}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1j}hjubah}(h]h ]h"]h$]h&] refdomainjreftypejr reftargetjmodnameN classnameNjrjr)}jr]j c.iommufd_access_pin_pagesasbuh1hhjubjg)}(h h]h }(hj hhhNhNubah}(h]h ]jsah"]h$]h&]uh1jfhjubjr)}(hjh]h*}(hj.hhhNhNubah}(h]h ]jrah"]h$]h&]uh1jrhjubjr)}(hjh]h*}(hj;hhhNhNubah}(h]h ]jrah"]h$]h&]uh1jrhjubj~)}(h out_pagesh]h out_pages}(hjHhhhNhNubah}(h]h ]jah"]h$]h&]uh1j}hjubeh}(h]h ]h"]h$]h&]noemphhhuh1jrhjȈubjr)}(hunsigned int flagsh](ju)}(hunsignedh]hunsigned}(hjahhhNhNubah}(h]h ]juah"]h$]h&]uh1juhj]ubjg)}(h h]h }(hjohhhNhNubah}(h]h ]jsah"]h$]h&]uh1jfhj]ubju)}(hinth]hint}(hj}hhhNhNubah}(h]h ]juah"]h$]h&]uh1juhj]ubjg)}(h h]h }(hjhhhNhNubah}(h]h ]jsah"]h$]h&]uh1jfhj]ubj~)}(hflagsh]hflags}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1j}hj]ubeh}(h]h ]h"]h$]h&]noemphhhuh1jrhjȈubeh}(h]h ]h"]h$]h&]hhuh1jrhjhhhjhMmubeh}(h]h ]h"]h$]h&]hhjuh1jNjjhjhhhjhMmubah}(h]jah ](jjeh"]h$]h&]jj)jhuh1jHhjhMmhjhhubj)}(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.chMmhjhhubah}(h]h ]h"]h$]h&]uh1jhjhhhjhMmubeh}(h]h ](jfunctioneh"]h$]h&]jjjjۊjjۊjjjuh1jChhhj6rhNhNubj)}(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.chMqhjߊubj )}(hhh](j! )}(h8``struct iommufd_access *access`` IOAS access to act on h](j' )}(h!``struct iommufd_access *access``h]j- )}(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.chMnhjubjC )}(hhh]h)}(hIOAS access to act onh]hIOAS access to act on}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhMnhjubah}(h]h ]h"]h$]h&]uh1jB hjubeh}(h]h ]h"]h$]h&]uh1j hjhMnhjubj! )}(h%``unsigned long iova`` Starting IOVA h](j' )}(h``unsigned long iova``h]j- )}(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.chMohj7ubjC )}(hhh]h)}(h Starting IOVAh]h Starting IOVA}(hjVhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjRhMohjSubah}(h]h ]h"]h$]h&]uh1jB hj7ubeh}(h]h ]h"]h$]h&]uh1j hjRhMohjubj! )}(h3``unsigned long length`` Number of bytes to access h](j' )}(h``unsigned long length``h]j- )}(hjvh]hunsigned long length}(hjxhhhNhNubah}(h]h ]h"]h$]h&]uh1j, hjtubah}(h]h ]h"]h$]h&]uh1j& he/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:345: ./drivers/iommu/iommufd/device.chMphjpubjC )}(hhh]h)}(hNumber of bytes to accessh]hNumber of bytes to access}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhMphjubah}(h]h ]h"]h$]h&]uh1jB hjpubeh}(h]h ]h"]h$]h&]uh1j hjhMphjubj! )}(h-``struct page **out_pages`` Output page list h](j' )}(h``struct page **out_pages``h]j- )}(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.chMqhjubjC )}(hhh]h)}(hOutput page listh]hOutput page list}(hjȋhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjċhMqhjŋubah}(h]h ]h"]h$]h&]uh1jB hjubeh}(h]h ]h"]h$]h&]uh1j hjċhMqhjubj! )}(h2``unsigned int flags`` IOPMMUFD_ACCESS_RW_* flags h](j' )}(h``unsigned int flags``h]j- )}(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.chMrhjubjC )}(hhh]h)}(hIOPMMUFD_ACCESS_RW_* flagsh]hIOPMMUFD_ACCESS_RW_* flags}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhMrhjubah}(h]h ]h"]h$]h&]uh1jB hjubeh}(h]h ]h"]h$]h&]uh1j hjhMrhjubeh}(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.chMthjߊubh)}(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 }(hj9hhhNhNubj*)}(h **length**h]hlength}(hjAhhhNhNubah}(h]h ]h"]h$]h&]uh1j)hj9ubhs bytes starting at iova and returns the struct page * pointers. These can be kmap’d by the caller for CPU access.}(hj9hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhe/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:345: ./drivers/iommu/iommufd/device.chMshjߊubh)}(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.}(hjZhhhNhNubah}(h]h ]h"]h$]h&]uh1hhe/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:345: ./drivers/iommu/iommufd/device.chMvhjߊubh)}(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.}(hjihhhNhNubah}(h]h ]h"]h$]h&]uh1hhe/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:345: ./drivers/iommu/iommufd/device.chMyhjߊubeh}(h]h ] kernelindentah"]h$]h&]uh1jhj6rhhhNhNubj3)}(hhh]h}(h]h ]h"]h$]h&]entries](j?iommufd_access_rw (C function)c.iommufd_access_rwhNtauh1j2hj6rhhhNhNubjD)}(hhh](jI)}(hxint iommufd_access_rw (struct iommufd_access *access, unsigned long iova, void *data, size_t length, unsigned int flags)h]jO)}(hwint iommufd_access_rw(struct iommufd_access *access, unsigned long iova, void *data, size_t length, unsigned int flags)h](ju)}(hinth]hint}(hjhhhNhNubah}(h]h ]juah"]h$]h&]uh1juhjhhhe/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:345: ./drivers/iommu/iommufd/device.chMubjg)}(h h]h }(hjhhhNhNubah}(h]h ]jsah"]h$]h&]uh1jfhjhhhjhMubjx)}(hiommufd_access_rwh]j~)}(hiommufd_access_rwh]hiommufd_access_rw}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1j}hjubah}(h]h ](jjeh"]h$]h&]hhuh1jwhjhhhjhMubjr)}(hb(struct iommufd_access *access, unsigned long iova, void *data, size_t length, unsigned int flags)h](jr)}(hstruct iommufd_access *accessh](jU)}(hjXh]hstruct}(hjՌhhhNhNubah}(h]h ]jaah"]h$]h&]uh1jThjьubjg)}(h h]h }(hjhhhNhNubah}(h]h ]jsah"]h$]h&]uh1jfhjьubh)}(hhh]j~)}(hiommufd_accessh]hiommufd_access}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1j}hjubah}(h]h ]h"]h$]h&] refdomainjreftypejr reftargetjmodnameN classnameNjrjr)}jr]jr)}jrjsbc.iommufd_access_rwasbuh1hhjьubjg)}(h h]h }(hjhhhNhNubah}(h]h ]jsah"]h$]h&]uh1jfhjьubjr)}(hjh]h*}(hj!hhhNhNubah}(h]h ]jrah"]h$]h&]uh1jrhjьubj~)}(haccessh]haccess}(hj.hhhNhNubah}(h]h ]jah"]h$]h&]uh1j}hjьubeh}(h]h ]h"]h$]h&]noemphhhuh1jrhj͌ubjr)}(hunsigned long iovah](ju)}(hunsignedh]hunsigned}(hjGhhhNhNubah}(h]h ]juah"]h$]h&]uh1juhjCubjg)}(h h]h }(hjUhhhNhNubah}(h]h ]jsah"]h$]h&]uh1jfhjCubju)}(hlongh]hlong}(hjchhhNhNubah}(h]h ]juah"]h$]h&]uh1juhjCubjg)}(h h]h }(hjqhhhNhNubah}(h]h ]jsah"]h$]h&]uh1jfhjCubj~)}(hiovah]hiova}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1j}hjCubeh}(h]h ]h"]h$]h&]noemphhhuh1jrhj͌ubjr)}(h void *datah](ju)}(hvoidh]hvoid}(hjhhhNhNubah}(h]h ]juah"]h$]h&]uh1juhjubjg)}(h h]h }(hjhhhNhNubah}(h]h ]jsah"]h$]h&]uh1jfhjubjr)}(hjh]h*}(hjhhhNhNubah}(h]h ]jrah"]h$]h&]uh1jrhjubj~)}(hdatah]hdata}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1j}hjubeh}(h]h ]h"]h$]h&]noemphhhuh1jrhj͌ubjr)}(h size_t lengthh](h)}(hhh]j~)}(hsize_th]hsize_t}(hjݍhhhNhNubah}(h]h ]jah"]h$]h&]uh1j}hjڍubah}(h]h ]h"]h$]h&] refdomainjreftypejr reftargetjߍmodnameN classnameNjrjr)}jr]jc.iommufd_access_rwasbuh1hhj֍ubjg)}(h h]h }(hjhhhNhNubah}(h]h ]jsah"]h$]h&]uh1jfhj֍ubj~)}(hlengthh]hlength}(hj hhhNhNubah}(h]h ]jah"]h$]h&]uh1j}hj֍ubeh}(h]h ]h"]h$]h&]noemphhhuh1jrhj͌ubjr)}(hunsigned int flagsh](ju)}(hunsignedh]hunsigned}(hj"hhhNhNubah}(h]h ]juah"]h$]h&]uh1juhjubjg)}(h h]h }(hj0hhhNhNubah}(h]h ]jsah"]h$]h&]uh1jfhjubju)}(hinth]hint}(hj>hhhNhNubah}(h]h ]juah"]h$]h&]uh1juhjubjg)}(h h]h }(hjLhhhNhNubah}(h]h ]jsah"]h$]h&]uh1jfhjubj~)}(hflagsh]hflags}(hjZhhhNhNubah}(h]h ]jah"]h$]h&]uh1j}hjubeh}(h]h ]h"]h$]h&]noemphhhuh1jrhj͌ubeh}(h]h ]h"]h$]h&]hhuh1jrhjhhhjhMubeh}(h]h ]h"]h$]h&]hhjuh1jNjjhjhhhjhMubah}(h]jah ](jjeh"]h$]h&]jj)jhuh1jHhjhMhjhhubj)}(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&]jjjjjjjjjuh1jChhhj6rhNhNubj)}(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.chMhjubj )}(hhh](j! )}(h8``struct iommufd_access *access`` IOAS access to act on h](j' )}(h!``struct iommufd_access *access``h]j- )}(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.chMhjubjC )}(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&]uh1jB hjubeh}(h]h ]h"]h$]h&]uh1j hjڎhMhjubj! )}(h%``unsigned long iova`` Starting IOVA h](j' )}(h``unsigned long iova``h]j- )}(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.chMhjubjC )}(hhh]h)}(h Starting IOVAh]h Starting IOVA}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhMhjubah}(h]h ]h"]h$]h&]uh1jB hjubeh}(h]h ]h"]h$]h&]uh1j hjhMhjubj! )}(h-``void *data`` Kernel buffer to copy to/from h](j' )}(h``void *data``h]j- )}(hj7h]h void *data}(hj9hhhNhNubah}(h]h ]h"]h$]h&]uh1j, hj5ubah}(h]h ]h"]h$]h&]uh1j& he/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:345: ./drivers/iommu/iommufd/device.chMhj1ubjC )}(hhh]h)}(hKernel buffer to copy to/fromh]hKernel buffer to copy to/from}(hjPhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjLhMhjMubah}(h]h ]h"]h$]h&]uh1jB hj1ubeh}(h]h ]h"]h$]h&]uh1j hjLhMhjubj! )}(h,``size_t length`` Number of bytes to access h](j' )}(h``size_t length``h]j- )}(hjph]h size_t length}(hjrhhhNhNubah}(h]h ]h"]h$]h&]uh1j, hjnubah}(h]h ]h"]h$]h&]uh1j& he/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:345: ./drivers/iommu/iommufd/device.chMhjjubjC )}(hhh]h)}(hNumber of bytes to accessh]hNumber of bytes to access}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhMhjubah}(h]h ]h"]h$]h&]uh1jB hjjubeh}(h]h ]h"]h$]h&]uh1j hjhMhjubj! )}(h1``unsigned int flags`` IOMMUFD_ACCESS_RW_* flags h](j' )}(h``unsigned int flags``h]j- )}(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.chMhjubjC )}(hhh]h)}(hIOMMUFD_ACCESS_RW_* flagsh]hIOMMUFD_ACCESS_RW_* flags}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhMhjubah}(h]h ]h"]h$]h&]uh1jB hjubeh}(h]h ]h"]h$]h&]uh1j 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&]uh1jhj6rhhhNhNubj3)}(hhh]h}(h]h ]h"]h$]h&]entries](j?iommufd_ctx_get (C function)c.iommufd_ctx_gethNtauh1j2hj6rhhhNhNubjD)}(hhh](jI)}(h/void iommufd_ctx_get (struct iommufd_ctx *ictx)h]jO)}(h.void iommufd_ctx_get(struct iommufd_ctx *ictx)h](ju)}(hvoidh]hvoid}(hj)hhhNhNubah}(h]h ]juah"]h$]h&]uh1juhj%hhhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:348: ./drivers/iommu/iommufd/main.chMMubjg)}(h h]h }(hj8hhhNhNubah}(h]h ]jsah"]h$]h&]uh1jfhj%hhhj7hMMubjx)}(hiommufd_ctx_geth]j~)}(hiommufd_ctx_geth]hiommufd_ctx_get}(hjJhhhNhNubah}(h]h ]jah"]h$]h&]uh1j}hjFubah}(h]h ](jjeh"]h$]h&]hhuh1jwhj%hhhj7hMMubjr)}(h(struct iommufd_ctx *ictx)h]jr)}(hstruct iommufd_ctx *ictxh](jU)}(hjXh]hstruct}(hjfhhhNhNubah}(h]h ]jaah"]h$]h&]uh1jThjbubjg)}(h h]h }(hjshhhNhNubah}(h]h ]jsah"]h$]h&]uh1jfhjbubh)}(hhh]j~)}(h iommufd_ctxh]h iommufd_ctx}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1j}hjubah}(h]h ]h"]h$]h&] refdomainjreftypejr reftargetjmodnameN classnameNjrjr)}jr]jr)}jrjLsbc.iommufd_ctx_getasbuh1hhjbubjg)}(h h]h }(hjhhhNhNubah}(h]h ]jsah"]h$]h&]uh1jfhjbubjr)}(hjh]h*}(hjhhhNhNubah}(h]h ]jrah"]h$]h&]uh1jrhjbubj~)}(hictxh]hictx}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1j}hjbubeh}(h]h ]h"]h$]h&]noemphhhuh1jrhj^ubah}(h]h ]h"]h$]h&]hhuh1jrhj%hhhj7hMMubeh}(h]h ]h"]h$]h&]hhjuh1jNjjhj!hhhj7hMMubah}(h]jah ](jjeh"]h$]h&]jj)jhuh1jHhj7hMMhjhhubj)}(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.chMMhjhhubah}(h]h ]h"]h$]h&]uh1jhjhhhj7hMMubeh}(h]h ](jfunctioneh"]h$]h&]jjjjjjjjjuh1jChhhj6rhNhNubj)}(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}(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.chMQhjubj )}(hhh]j! )}(h,``struct iommufd_ctx *ictx`` Context to get h](j' )}(h``struct iommufd_ctx *ictx``h]j- )}(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.chMNhj$ubjC )}(hhh]h)}(hContext to geth]hContext to get}(hjChhhNhNubah}(h]h ]h"]h$]h&]uh1hhj?hMNhj@ubah}(h]h ]h"]h$]h&]uh1jB hj$ubeh}(h]h ]h"]h$]h&]uh1j hj?hMNhj!ubah}(h]h ]h"]h$]h&]uh1j hjubh)}(h**Description**h]j*)}(hjeh]h Description}(hjghhhNhNubah}(h]h ]h"]h$]h&]uh1j)hjcubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:348: ./drivers/iommu/iommufd/main.chMPhjubh)}(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.chMOhjubeh}(h]h ] kernelindentah"]h$]h&]uh1jhj6rhhhNhNubj3)}(hhh]h}(h]h ]h"]h$]h&]entries](j?"iommufd_ctx_from_file (C function)c.iommufd_ctx_from_filehNtauh1j2hj6rhhhNhNubjD)}(hhh](jI)}(h>struct iommufd_ctx * iommufd_ctx_from_file (struct file *file)h]jO)}(hjj>jjjuh1jChhhj6rhNhNubj)}(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*)}(hjHh]h Parameters}(hjJhhhNhNubah}(h]h ]h"]h$]h&]uh1j)hjFubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:348: ./drivers/iommu/iommufd/main.chMqhjBubj )}(hhh]j! )}(h8``int fd`` File descriptor to obtain the reference from h](j' )}(h ``int fd``h]j- )}(hjgh]hint fd}(hjihhhNhNubah}(h]h ]h"]h$]h&]uh1j, hjeubah}(h]h ]h"]h$]h&]uh1j& hc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:348: ./drivers/iommu/iommufd/main.chMnhjaubjC )}(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|hMnhj}ubah}(h]h ]h"]h$]h&]uh1jB hjaubeh}(h]h ]h"]h$]h&]uh1j hj|hMnhj^ubah}(h]h ]h"]h$]h&]uh1j hjBubh)}(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.chMphjBubh)}(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.chMohjBubeh}(h]h ] kernelindentah"]h$]h&]uh1jhj6rhhhNhNubj3)}(hhh]h}(h]h ]h"]h$]h&]entries](j?iommufd_ctx_put (C function)c.iommufd_ctx_puthNtauh1j2hj6rhhhNhNubjD)}(hhh](jI)}(h/void iommufd_ctx_put (struct iommufd_ctx *ictx)h]jO)}(h.void iommufd_ctx_put(struct iommufd_ctx *ictx)h](ju)}(hvoidh]hvoid}(hjhhhNhNubah}(h]h ]juah"]h$]h&]uh1juhjhhhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:348: ./drivers/iommu/iommufd/main.chMubjg)}(h h]h }(hjhhhNhNubah}(h]h ]jsah"]h$]h&]uh1jfhjhhhjhMubjx)}(hiommufd_ctx_puth]j~)}(hiommufd_ctx_puth]hiommufd_ctx_put}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1j}hjubah}(h]h ](jjeh"]h$]h&]hhuh1jwhjhhhjhMubjr)}(h(struct iommufd_ctx *ictx)h]jr)}(hstruct iommufd_ctx *ictxh](jU)}(hjXh]hstruct}(hj$hhhNhNubah}(h]h ]jaah"]h$]h&]uh1jThj ubjg)}(h h]h }(hj1hhhNhNubah}(h]h ]jsah"]h$]h&]uh1jfhj ubh)}(hhh]j~)}(h iommufd_ctxh]h iommufd_ctx}(hjBhhhNhNubah}(h]h ]jah"]h$]h&]uh1j}hj?ubah}(h]h ]h"]h$]h&] refdomainjreftypejr reftargetjDmodnameN classnameNjrjr)}jr]jr)}jrj sbc.iommufd_ctx_putasbuh1hhj ubjg)}(h h]h }(hjbhhhNhNubah}(h]h ]jsah"]h$]h&]uh1jfhj ubjr)}(hjh]h*}(hjphhhNhNubah}(h]h ]jrah"]h$]h&]uh1jrhj ubj~)}(hictxh]hictx}(hj}hhhNhNubah}(h]h ]jah"]h$]h&]uh1j}hj ubeh}(h]h ]h"]h$]h&]noemphhhuh1jrhjubah}(h]h ]h"]h$]h&]hhuh1jrhjhhhjhMubeh}(h]h ]h"]h$]h&]hhjuh1jNjjhjߔhhhjhMubah}(h]jڔah ](jjeh"]h$]h&]jj)jhuh1jHhjhMhjܔ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&]jjjjjjjjjuh1jChhhj6rhNhNubj)}(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Õubj )}(hhh]j! )}(h0``struct iommufd_ctx *ictx`` Context to put backh](j' )}(h``struct iommufd_ctx *ictx``h]j- )}(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.chMhjubjC )}(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&]uh1jB hjubeh}(h]h ]h"]h$]h&]uh1j hjhMhjߕubah}(h]h ]h"]h$]h&]uh1j hjÕubeh}(h]h ] kernelindentah"]h$]h&]uh1jhj6rhhhNhNubh)}(hhh](h)}(hVFIO and IOMMUFDh]hVFIO and IOMMUFD}(hj,hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj)hhhhhM`ubh)}(hyjCyj|j|j~j~j׀j܀jpjujjjjjjjj!jjjYj^jڔjߔjj)jeju 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&]levelKtypeINFOlineMfsourcec/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.huh1jhjdubj)}(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&]levelKtypejlineMnsourcec/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.huh1jhjdubj)}(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.}(hj6hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj3ubah}(h]h ]h"]h$]h&]levelKtypejlineMnsourcej2uh1jhj+eubj)}(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.}(hjQhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjNubah}(h]h ]h"]h$]h&]levelKtypejlineMsourcec/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.huh1jhjmubetransform_messages]j)}(hhh]h)}(hhh]h:Hyperlink target "general-ioctl-format" is not referenced.}hjosbah}(h]h ]h"]h$]h&]uh1hhjlubah}(h]h ]h"]h$]h&]levelKtypejsourcej$lineKuh1juba transformerN include_log] decorationNhhub.