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" primarily indicates this type of HWPT should be linked to an IOAS. It also indicates that it is backed by an iommu_domain with __IOMMU_DOMAIN_PAGING feature flag. This can be either an UNMANAGED stage-1 domain for a device running in the user space, or a nesting parent stage-2 domain for mappings from guest-level physical addresses to host-level physical addresses. The IOAS has a list of HWPT_PAGINGs that share the same IOVA mapping and it will synchronize its mapping with each member HWPT_PAGING. h](h)}(hXIOMMUFD_OBJ_HWPT_PAGING, representing an actual hardware I/O page table (i.e. a single struct iommu_domain) managed by the iommu driver. "PAGING" primarily indicates this type of HWPT should be linked to an IOAS. It also indicates that it is backed by an iommu_domain with __IOMMU_DOMAIN_PAGING feature flag. This can be either an UNMANAGED stage-1 domain for a device running in the user space, or a nesting parent stage-2 domain for mappings from guest-level physical addresses to host-level physical addresses.h]hXIOMMUFD_OBJ_HWPT_PAGING, representing an actual hardware I/O page table (i.e. a single struct iommu_domain) managed by the iommu driver. “PAGING” primarily indicates this type of HWPT should be linked to an IOAS. It also indicates that it is backed by an iommu_domain with __IOMMU_DOMAIN_PAGING feature flag. This can be either an UNMANAGED stage-1 domain for a device running in the user space, or a nesting parent stage-2 domain for mappings from guest-level physical addresses to host-level physical addresses.}(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)}(hXpIOMMUFD_OBJ_VIOMMU, representing a slice of the physical IOMMU instance, passed to or shared with a VM. It may be some HW-accelerated virtualization features and some SW resources used by the VM. For examples: * Security namespace for guest owned ID, e.g. guest-controlled cache tags * Non-device-affiliated event reporting, e.g. invalidation queue errors * Access to a shareable nesting parent pagetable across physical IOMMUs * Virtualization of various platforms IDs, e.g. RIDs and others * Delivery of paravirtualized invalidation * Direct assigned invalidation queues * Direct assigned interrupts Such a vIOMMU object generally has the access to a nesting parent pagetable to support some HW-accelerated virtualization features. So, a vIOMMU object must be created given a nesting parent HWPT_PAGING object, and then it would encapsulate that HWPT_PAGING object. Therefore, a vIOMMU object can be used to allocate an HWPT_NESTED object in place of the encapsulated HWPT_PAGING. .. note:: The name "vIOMMU" isn't necessarily identical to a virtualized IOMMU in a VM. A VM can have one giant virtualized IOMMU running on a machine having multiple physical IOMMUs, in which case the VMM will dispatch the requests or configurations from this single virtualized IOMMU instance to multiple vIOMMU objects created for individual slices of different physical IOMMUs. In other words, a vIOMMU object is always a representation of one physical IOMMU, not necessarily of a virtualized IOMMU. For VMMs that want the full virtualization features from physical IOMMUs, it is suggested to build the same number of virtualized IOMMUs as the number of physical IOMMUs, so the passed-through devices would be connected to their own virtualized IOMMUs backed by corresponding vIOMMU objects, in which case a guest OS would do the "dispatch" naturally instead of VMM trappings. h](h)}(hIOMMUFD_OBJ_VIOMMU, representing a slice of the physical IOMMU instance, passed to or shared with a VM. It may be some HW-accelerated virtualization features and some SW resources used by the VM. For examples:h]hIOMMUFD_OBJ_VIOMMU, representing a slice of the physical IOMMU instance, passed to or shared with a VM. It may be some HW-accelerated virtualization features and some SW resources used by the VM. For examples:}(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)}(hEAccess to a shareable nesting parent pagetable across physical IOMMUsh]h)}(hjh]hEAccess to a shareable nesting parent pagetable across physical IOMMUs}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKOhjubah}(h]h ]h"]h$]h&]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, 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_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)}(h8ubj )}(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- )}(hjc8h]hIOMMU_HW_INFO_TYPE_NONE}(hje8hhhNhNubah}(h]h ]h"]h$]h&]uh1j, hja8ubah}(h]h ]h"]h$]h&]uh1j& hc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhM{hj]8ubjC )}(hhh]h)}(h6Output by the drivers that do not report hardware infoh]h6Output by the drivers that do not report hardware info}(hj|8hhhNhNubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMzhjy8ubah}(h]h ]h"]h$]h&]uh1jB hj]8ubeh}(h]h ]h"]h$]h&]uh1j hjx8hM{hjZ8ubj! )}(hC``IOMMU_HW_INFO_TYPE_DEFAULT`` Input to request for a default type h](j' )}(h``IOMMU_HW_INFO_TYPE_DEFAULT``h]j- )}(hj8h]hIOMMU_HW_INFO_TYPE_DEFAULT}(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.hhM~hj8ubjC )}(hhh]h)}(h#Input to request for a default typeh]h#Input to request for a default type}(hj8hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj8hM~hj8ubah}(h]h ]h"]h$]h&]uh1jB hj8ubeh}(h]h ]h"]h$]h&]uh1j hj8hM~hjZ8ubj! )}(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.hhMhj8ubjC )}(hhh]h)}(hIntel VT-d iommu info typeh]hIntel VT-d iommu info type}(hj8hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj8hMhj8ubah}(h]h ]h"]h$]h&]uh1jB hj8ubeh}(h]h ]h"]h$]h&]uh1j hj8hMhjZ8ubj! )}(h=``IOMMU_HW_INFO_TYPE_ARM_SMMUV3`` ARM SMMUv3 iommu info type h](j' )}(h!``IOMMU_HW_INFO_TYPE_ARM_SMMUV3``h]j- )}(hj9h]hIOMMU_HW_INFO_TYPE_ARM_SMMUV3}(hj9hhhNhNubah}(h]h ]h"]h$]h&]uh1j, hj 9ubah}(h]h ]h"]h$]h&]uh1j& hc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMhj 9ubjC )}(hhh]h)}(hARM SMMUv3 iommu info typeh]hARM SMMUv3 iommu info type}(hj(9hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj$9hMhj%9ubah}(h]h ]h"]h$]h&]uh1jB hj 9ubeh}(h]h ]h"]h$]h&]uh1j hj$9hMhjZ8ubj! )}(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- )}(hjH9h]h!IOMMU_HW_INFO_TYPE_TEGRA241_CMDQV}(hjJ9hhhNhNubah}(h]h ]h"]h$]h&]uh1j, hjF9ubah}(h]h ]h"]h$]h&]uh1j& hc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMhjB9ubjC )}(hhh]h)}(h:NVIDIA Tegra241 CMDQV (extension for ARM SMMUv3) info typeh]h:NVIDIA Tegra241 CMDQV (extension for ARM SMMUv3) info type}(hja9hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj]9hMhj^9ubah}(h]h ]h"]h$]h&]uh1jB hjB9ubeh}(h]h ]h"]h$]h&]uh1j hj]9hMhjZ8ubeh}(h]h ]h"]h$]h&]uh1j hj>8ubeh}(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}(hj9hhhNhNubah}(h]h ]jaah"]h$]h&]uh1jThj9hhhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMubjg)}(h h]h }(hj9hhhNhNubah}(h]h ]jsah"]h$]h&]uh1jfhj9hhhj9hMubjx)}(hiommufd_hw_capabilitiesh]j~)}(hj9h]hiommufd_hw_capabilities}(hj9hhhNhNubah}(h]h ]jah"]h$]h&]uh1j}hj9ubah}(h]h ](jjeh"]h$]h&]hhuh1jwhj9hhhj9hMubeh}(h]h ]h"]h$]h&]hhjuh1jNjjhj9hhhj9hMubah}(h]j9ah ](jjeh"]h$]h&]jj)jhuh1jHhj9hMhj9hhubj)}(hhh]h}(h]h ]h"]h$]h&]uh1jhj9hhhj9hMubeh}(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- )}(hj:h]hIOMMU_HW_CAP_DIRTY_TRACKING}(hj:hhhNhNubah}(h]h ]h"]h$]h&]uh1j, hj:ubah}(h]h ]h"]h$]h&]uh1j& hc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMhj:ubjC )}(hhh]h)}(hbIOMMU hardware support for dirty tracking If available, it means the following APIs are supported:h]hbIOMMU hardware support for dirty tracking If available, it means the following APIs are supported:}(hj.:hhhNhNubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMhj+:ubah}(h]h ]h"]h$]h&]uh1jB hj:ubeh}(h]h ]h"]h$]h&]uh1j hj*:hMhj :ubj! )}(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- )}(hjO:h]hIOMMU_HW_CAP_PCI_PASID_EXEC}(hjQ:hhhNhNubah}(h]h ]h"]h$]h&]uh1j, hjM:ubah}(h]h ]h"]h$]h&]uh1j& hc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMhjI:ubjC )}(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.}(hjh:hhhNhNubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMhje:ubah}(h]h ]h"]h$]h&]uh1jB hjI:ubeh}(h]h ]h"]h$]h&]uh1j hjd:hMhj :ubj! )}(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}(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)}(hePrivileged Mode Supported, user ignores it when the struct iommu_hw_info::out_max_pasid_log2 is zero.h]hePrivileged Mode Supported, user ignores it when the struct iommu_hw_info::out_max_pasid_log2 is zero.}(hj:hhhNhNubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMhj:ubah}(h]h ]h"]h$]h&]uh1jB hj:ubeh}(h]h ]h"]h$]h&]uh1j hj:hMhj :ubeh}(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}(hj4;hhhNhNubah}(h]h ]jah"]h$]h&]uh1j}hj0;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}(hjV;hhhNhNubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMhjS;hhubah}(h]h ]h"]h$]h&]uh1jhj ;hhhj!;hMubeh}(h]h ](jenumeh"]h$]h&]jjjjn;jjn;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*)}(hjx;h]h Constants}(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.hhMhjr;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- )}(hj;h]hIOMMU_HW_INFO_FLAG_INPUT_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)}(h\If set, **in_data_type** carries an input type for user space to request for a specific infoh](hIf set, }(hj;hhhNhNubj*)}(h**in_data_type**h]h in_data_type}(hj;hhhNhNubah}(h]h ]h"]h$]h&]uh1j)hj;ubhD carries an input type for user space to request for a specific info}(hj;hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhj;hMhj;ubah}(h]h ]h"]h$]h&]uh1jB hj;ubeh}(h]h ]h"]h$]h&]uh1j hj;hMhj;ubah}(h]h ]h"]h$]h&]uh1j hjr;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)}(hjD<hhhNhNubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMhjA<hhubah}(h]h ]h"]h$]h&]uh1jhj;hhhj<hMubeh}(h]h ](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}(hjh<hhhNhNubah}(h]h ]h"]h$]h&]uh1j)hjd<ubh:}(hjd<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; };}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! )}(h&``size`` sizeof(struct iommu_hw_info) 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)}(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 hj<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&]uh1hhj8=hMhj9=ubah}(h]h ]h"]h$]h&]uh1jB hj=ubeh}(h]h ]h"]h$]h&]uh1j hj8=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, hjZ=ubah}(h]h ]h"]h$]h&]uh1j& hc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMhjV=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}(hju=hhhNhNubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMhjr=ubah}(h]h ]h"]h$]h&]uh1jB hjV=ubeh}(h]h ]h"]h$]h&]uh1j hjq=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- )}(hj=h]h data_uptr}(hj=hhhNhNubah}(h]h ]h"]h$]h&]uh1j, hj=ubah}(h]h ]h"]h$]h&]uh1j& hc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMhj=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}(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``{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- )}(hjg>h]h out_data_type}(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)}(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.}(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 hja>ubeh}(h]h ]h"]h$]h&]uh1j hj|>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- )}(hj>h]hout_max_pasid_log2}(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)}(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.}(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``__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*)}(hjV?h]h Description}(hjX?hhhNhNubah}(h]h ]h"]h$]h&]uh1j)hjT?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.}(hjl?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, }(hj{?hhhNhNubj*)}(h **data_uptr**h]h data_uptr}(hj?hhhNhNubah}(h]h ]h"]h$]h&]uh1j)hj{?ubh and its length }(hj{?hhhNhNubj*)}(h **data_len**h]hdata_len}(hj?hhhNhNubah}(h]h ]h"]h$]h&]uh1j)hj{?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 }(hj{?hhhNhNubj*)}(h **data_len**h]hdata_len}(hj?hhhNhNubah}(h]h ]h"]h$]h&]uh1j)hj{?ubh. If the ioctl succeeds, }(hj{?hhhNhNubj*)}(h **data_len**h]hdata_len}(hj?hhhNhNubah}(h]h ]h"]h$]h&]uh1j)hj{?ubh> will be updated to the length that kernel actually supports, }(hj{?hhhNhNubj*)}(h**out_data_type**h]h out_data_type}(hj?hhhNhNubah}(h]h ]h"]h$]h&]uh1j)hj{?ubhC will be filled to decode the data filled in the buffer pointed by }(hj{?hhhNhNubj*)}(h **data_uptr**h]h data_uptr}(hj?hhhNhNubah}(h]h ]h"]h$]h&]uh1j)hj{?ubh. Input }(hj{?hhhNhNubj*)}(h **data_len**h]hdata_len}(hj?hhhNhNubah}(h]h ]h"]h$]h&]uh1j)hj{?ubh == zero is allowed.}(hj{?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}(hjA@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)}(hjc@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)}(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)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)}(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; };}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``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 Ah]hflags}(hj AhhhNhNubah}(h]h ]h"]h$]h&]uh1j, hjAubah}(h]h ]h"]h$]h&]uh1j& hc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMhjAubjC )}(hhh]h)}(h9Combination of enum iommufd_hwpt_set_dirty_tracking_flagsh]h9Combination of enum iommufd_hwpt_set_dirty_tracking_flags}(hj"AhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjAhMhjAubah}(h]h ]h"]h$]h&]uh1jB hjAubeh}(h]h ]h"]h$]h&]uh1j hjAhMhj@ubj! )}(h=``hwpt_id`` HW pagetable ID that represents the IOMMU domain h](j' )}(h ``hwpt_id``h]j- )}(hjBAh]hhwpt_id}(hjDAhhhNhNubah}(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.hhMhjBhhhNhNubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMhj;Bhhubah}(h]h ]h"]h$]h&]uh1jhjAhhhj BhMubeh}(h]h ](jenumeh"]h$]h&]jjjjVBjjVBjjjuh1jChhhjhj$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*)}(hj`Bh]h Constants}(hjbBhhhNhNubah}(h]h ]h"]h$]h&]uh1j)hj^Bubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMhjZBubj )}(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- )}(hjBh]h$IOMMU_HWPT_GET_DIRTY_BITMAP_NO_CLEAR}(hjBhhhNhNubah}(h]h ]h"]h$]h&]uh1j, hj}Bubah}(h]h ]h"]h$]h&]uh1j& hc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMhjyBubjC )}(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.}(hjBhhhNhNubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMhjBubah}(h]h ]h"]h$]h&]uh1jB hjyBubeh}(h]h ]h"]h$]h&]uh1j hjBhMhjvBubah}(h]h ]h"]h$]h&]uh1j hjZBubeh}(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)}(hjChhhNhNubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMhjChhubah}(h]h ]h"]h$]h&]uh1jhjBhhhjBhMubeh}(h]h ](jstructeh"]h$]h&]jjjj3Cjj3Cjjjuh1jChhhjhj$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}(hj?ChhhNhNubah}(h]h ]h"]h$]h&]uh1j)hj;Cubh:}(hj;ChhhNhNubeh}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMhj7Cubj)}(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; };}hjXCsbah}(h]h ]h"]h$]h&]hhuh1jhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMhj7Cubh)}(h **Members**h]j*)}(hjiCh]hMembers}(hjkChhhNhNubah}(h]h ]h"]h$]h&]uh1j)hjgCubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMhj7Cubj )}(hhh](j! )}(h4``size`` sizeof(struct iommu_hwpt_get_dirty_bitmap) h](j' )}(h``size``h]j- )}(hjCh]hsize}(hjChhhNhNubah}(h]h ]h"]h$]h&]uh1j, hjCubah}(h]h ]h"]h$]h&]uh1j& hc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMhjCubjC )}(hhh]h)}(h*sizeof(struct iommu_hwpt_get_dirty_bitmap)h]h*sizeof(struct iommu_hwpt_get_dirty_bitmap)}(hjChhhNhNubah}(h]h ]h"]h$]h&]uh1hhjChMhjCubah}(h]h ]h"]h$]h&]uh1jB hjCubeh}(h]h ]h"]h$]h&]uh1j hjChMhjCubj! )}(h=``hwpt_id`` HW pagetable ID that represents the IOMMU domain h](j' )}(h ``hwpt_id``h]j- )}(hjCh]hhwpt_id}(hjChhhNhNubah}(h]h ]h"]h$]h&]uh1j, hjCubah}(h]h ]h"]h$]h&]uh1j& hc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMhjCubjC )}(hhh]h)}(h0HW pagetable ID that represents the IOMMU domainh]h0HW pagetable ID that represents the IOMMU domain}(hjChhhNhNubah}(h]h ]h"]h$]h&]uh1hhjChMhjCubah}(h]h ]h"]h$]h&]uh1jB hjCubeh}(h]h ]h"]h$]h&]uh1j hjChMhjCubj! )}(hB``flags`` Combination of enum iommufd_hwpt_get_dirty_bitmap_flags h](j' )}(h ``flags``h]j- )}(hjCh]hflags}(hjChhhNhNubah}(h]h ]h"]h$]h&]uh1j, hjCubah}(h]h ]h"]h$]h&]uh1j& hc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMhjCubjC )}(hhh]h)}(h7Combination of enum iommufd_hwpt_get_dirty_bitmap_flagsh]h7Combination of enum iommufd_hwpt_get_dirty_bitmap_flags}(hjDhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjDhMhjDubah}(h]h ]h"]h$]h&]uh1jB hjCubeh}(h]h ]h"]h$]h&]uh1j hjDhMhjCubj! )}(h``__reserved`` Must be 0 h](j' )}(h``__reserved``h]j- )}(hj3Dh]h __reserved}(hj5DhhhNhNubah}(h]h ]h"]h$]h&]uh1j, hj1Dubah}(h]h ]h"]h$]h&]uh1j& hc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMhj-DubjC )}(hhh]h)}(h Must be 0h]h Must be 0}(hjLDhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjHDhMhjIDubah}(h]h ]h"]h$]h&]uh1jB hj-Dubeh}(h]h ]h"]h$]h&]uh1j hjHDhMhjCubj! )}(h+``iova`` base IOVA of the bitmap first bit h](j' )}(h``iova``h]j- )}(hjlDh]hiova}(hjnDhhhNhNubah}(h]h ]h"]h$]h&]uh1j, hjjDubah}(h]h ]h"]h$]h&]uh1j& hc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMhjfDubjC )}(hhh]h)}(h!base IOVA of the bitmap first bith]h!base IOVA of the bitmap first bit}(hjDhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjDhMhjDubah}(h]h ]h"]h$]h&]uh1jB hjfDubeh}(h]h ]h"]h$]h&]uh1j hjDhMhjCubj! )}(h``length`` IOVA range size h](j' )}(h ``length``h]j- )}(hjDh]hlength}(hjDhhhNhNubah}(h]h ]h"]h$]h&]uh1j, hjDubah}(h]h ]h"]h$]h&]uh1j& hc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhM hjDubjC )}(hhh]h)}(hIOVA range sizeh]hIOVA range size}(hjDhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjDhM hjDubah}(h]h ]h"]h$]h&]uh1jB hjDubeh}(h]h ]h"]h$]h&]uh1j hjDhM hjCubj! )}(h>``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.hhM hjDubjC )}(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&]uh1hhjDhM hjDubah}(h]h ]h"]h$]h&]uh1jB hjDubeh}(h]h ]h"]h$]h&]uh1j hjDhM hjCubj! )}(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- )}(hjEh]hdata}(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)}(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.}(hj0EhhhNhNubah}(h]h ]h"]h$]h&]uh1hhj,EhM hj-Eubah}(h]h ]h"]h$]h&]uh1jB hjEubeh}(h]h ]h"]h$]h&]uh1j hj,EhM hjCubeh}(h]h ]h"]h$]h&]uh1j hj7Cubeh}(h]h ] kernelindentah"]h$]h&]uh1jhjhhhj$hNubh)}(h**Description**h]j*)}(hjYEh]h Description}(hj[EhhhNhNubah}(h]h ]h"]h$]h&]uh1j)hjWEubah}(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:}(hjoEhhhNhNubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhM hjhhubjc)}(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))}(hjEhhhNhNubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMhj~Eubah}(h]h ]h"]h$]h&]uh1jbhjEhMhjhhubh)}(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.}(hjEhhhNhNubah}(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}(hjEhhhNhNubah}(h]h ]jaah"]h$]h&]uh1jThjEhhhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMubjg)}(h h]h }(hjEhhhNhNubah}(h]h ]jsah"]h$]h&]uh1jfhjEhhhjEhMubjx)}(hiommu_hwpt_invalidate_data_typeh]j~)}(hjEh]hiommu_hwpt_invalidate_data_type}(hjEhhhNhNubah}(h]h ]jah"]h$]h&]uh1j}hjEubah}(h]h ](jjeh"]h$]h&]hhuh1jwhjEhhhjEhMubeh}(h]h ]h"]h$]h&]hhjuh1jNjjhjEhhhjEhMubah}(h]jEah ](jjeh"]h$]h&]jj)jhuh1jHhjEhMhjEhhubj)}(hhh]h)}(h'IOMMU HWPT Cache Invalidation Data Typeh]h'IOMMU HWPT Cache Invalidation Data Type}(hjFhhhNhNubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhM#hjEhhubah}(h]h ]h"]h$]h&]uh1jhjEhhhjEhMubeh}(h]h ](jenumeh"]h$]h&]jjjjFjjFjjjuh1jChhhjhj$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*)}(hj#Fh]h Constants}(hj%FhhhNhNubah}(h]h ]h"]h$]h&]uh1j)hj!Fubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhM'hjFubj )}(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- )}(hjBFh]h!IOMMU_HWPT_INVALIDATE_DATA_VTD_S1}(hjDFhhhNhNubah}(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*hjhjHubjC )}(hhh]h)}(h0Number of contiguous 4K pages to be invalidated.h]h0Number of contiguous 4K pages to be invalidated.}(hjHhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjHhM>hjHubah}(h]h ]h"]h$]h&]uh1jB hjHubeh}(h]h ]h"]h$]h&]uh1j hjHhM>hjXHubj! )}(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.hhM?hjHubjC )}(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&]uh1hhjHhM?hjHubah}(h]h ]h"]h$]h&]uh1jB hjHubeh}(h]h ]h"]h$]h&]uh1j hjHhM?hjXHubj! )}(h``__reserved`` Must be 0h](j' )}(h``__reserved``h]j- )}(hj Ih]h __reserved}(hjIhhhNhNubah}(h]h ]h"]h$]h&]uh1j, hj Iubah}(h]h ]h"]h$]h&]uh1j& hc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhM?hjIubjC )}(hhh]h)}(h Must be 0h]h Must be 0}(hj&IhhhNhNubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhM@hj#Iubah}(h]h ]h"]h$]h&]uh1jB hjIubeh}(h]h ]h"]h$]h&]uh1j hj"IhM?hjXHubeh}(h]h ]h"]h$]h&]uh1j hjHubeh}(h]h ] kernelindentah"]h$]h&]uh1jhjhhhj$hNubh)}(h**Description**h]j*)}(hjPIh]h Description}(hjRIhhhNhNubah}(h]h ]h"]h$]h&]uh1j)hjNIubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMChjhhubh)}(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.}(hjfIhhhNhNubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhM@hjhhubh)}(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 }(hjuIhhhNhNubj*)}(h**addr**h]haddr}(hj}IhhhNhNubah}(h]h ]h"]h$]h&]uh1j)hjuIubh to be 0 and }(hjuIhhhNhNubj*)}(h **npages**h]hnpages}(hjIhhhNhNubah}(h]h ]h"]h$]h&]uh1j)hjuIubh to be U64_MAX.}(hjuIhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMDhjhhubh)}(hCThe device TLB will be invalidated automatically if ATS is enabled.h]hCThe device TLB will be invalidated automatically if ATS is enabled.}(hjIhhhNhNubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMGhjhhubj3)}(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.hhMLubjg)}(h h]h }(hjIhhhNhNubah}(h]h ]jsah"]h$]h&]uh1jfhjIhhhjIhMLubjx)}(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&]hhuh1jwhjIhhhjIhMLubeh}(h]h ]h"]h$]h&]hhjuh1jNjjhjIhhhjIhMLubah}(h]jIah ](jjeh"]h$]h&]jj)jhuh1jHhjIhMLhjIhhubj)}(hhh]h)}(hGARM SMMUv3 cache invalidation (IOMMU_VIOMMU_INVALIDATE_DATA_ARM_SMMUV3)h]hGARM SMMUv3 cache invalidation (IOMMU_VIOMMU_INVALIDATE_DATA_ARM_SMMUV3)}(hjJhhhNhNubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMRhjJhhubah}(h]h ]h"]h$]h&]uh1jhjIhhhjIhMLubeh}(h]h ](jstructeh"]h$]h&]jjjj*Jjj*Jjjjuh1jChhhjhj$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}(hj6JhhhNhNubah}(h]h ]h"]h$]h&]uh1j)hj2Jubh:}(hj2JhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMVhj.Jubj)}(hIstruct iommu_viommu_arm_smmuv3_invalidate { __aligned_le64 cmd[2]; };h]hIstruct iommu_viommu_arm_smmuv3_invalidate { __aligned_le64 cmd[2]; };}hjOJsbah}(h]h ]h"]h$]h&]hhuh1jhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMXhj.Jubh)}(h **Members**h]j*)}(hj`Jh]hMembers}(hjbJhhhNhNubah}(h]h ]h"]h$]h&]uh1j)hj^Jubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhM\hj.Jubj )}(hhh]j! )}(hY``cmd`` 128-bit cache invalidation command that runs in SMMU CMDQ. Must be little-endian.h](j' )}(h``cmd``h]j- )}(hjJh]hcmd}(hjJhhhNhNubah}(h]h ]h"]h$]h&]uh1j, hj}Jubah}(h]h ]h"]h$]h&]uh1j& hc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMUhjyJubjC )}(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.}(hjJhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjJhMUhjJubah}(h]h ]h"]h$]h&]uh1jB hjyJubeh}(h]h ]h"]h$]h&]uh1j hjJhMUhjvJubah}(h]h ]h"]h$]h&]uh1j hj.Jubeh}(h]h ] kernelindentah"]h$]h&]uh1jhjhhhj$hNubh)}(h**Description**h]j*)}(hjJh]h Description}(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.hhMYhjhhubj )}(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.hhM^hjJubjC )}(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}(hjKhhhNhNubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMWhjJubah}(h]h ]h"]h$]h&]uh1jB hjJubeh}(h]h ]h"]h$]h&]uh1j hjJhM^hjJubah}(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.}(hj#KhhhNhNubah}(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_hwpt_invalidate (C struct)c.iommu_hwpt_invalidatehNtauh1j2hjhhhj$hNubjD)}(hhh](jI)}(hiommu_hwpt_invalidateh]jO)}(hstruct iommu_hwpt_invalidateh](jU)}(hjXh]hstruct}(hjKKhhhNhNubah}(h]h ]jaah"]h$]h&]uh1jThjGKhhhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMeubjg)}(h h]h }(hjYKhhhNhNubah}(h]h ]jsah"]h$]h&]uh1jfhjGKhhhjXKhMeubjx)}(hiommu_hwpt_invalidateh]j~)}(hjEKh]hiommu_hwpt_invalidate}(hjkKhhhNhNubah}(h]h ]jah"]h$]h&]uh1j}hjgKubah}(h]h ](jjeh"]h$]h&]hhuh1jwhjGKhhhjXKhMeubeh}(h]h ]h"]h$]h&]hhjuh1jNjjhjCKhhhjXKhMeubah}(h]j>Kah ](jjeh"]h$]h&]jj)jhuh1jHhjXKhMehj@Khhubj)}(hhh]h)}(hioctl(IOMMU_HWPT_INVALIDATE)h]hioctl(IOMMU_HWPT_INVALIDATE)}(hjKhhhNhNubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMhhjKhhubah}(h]h ]h"]h$]h&]uh1jhj@KhhhjXKhMeubeh}(h]h ](jstructeh"]h$]h&]jjjjKjjKjjjuh1jChhhjhj$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}(hjKhhhNhNubah}(h]h ]h"]h$]h&]uh1j)hjKubh:}(hjKhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMlhjKubj)}(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.hhMnhjKubh)}(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.hhMxhjKubj )}(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.hhMjhjKubjC )}(hhh]h)}(h$sizeof(struct iommu_hwpt_invalidate)h]h$sizeof(struct iommu_hwpt_invalidate)}(hjLhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjLhMjhjLubah}(h]h ]h"]h$]h&]uh1jB hjKubeh}(h]h ]h"]h$]h&]uh1j hjLhMjhjKubj! )}(hD``hwpt_id`` ID of a nested HWPT or a vIOMMU, for cache invalidation h](j' )}(h ``hwpt_id``h]j- )}(hj3Lh]hhwpt_id}(hj5LhhhNhNubah}(h]h ]h"]h$]h&]uh1j, hj1Lubah}(h]h ]h"]h$]h&]uh1j& hc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMkhj-LubjC )}(hhh]h)}(h7ID of a nested HWPT or a vIOMMU, for cache invalidationh]h7ID of a nested HWPT or a vIOMMU, for cache invalidation}(hjLLhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjHLhMkhjILubah}(h]h ]h"]h$]h&]uh1jB hj-Lubeh}(h]h ]h"]h$]h&]uh1j hjHLhMkhjKubj! )}(hS``data_uptr`` User pointer to an array of driver-specific cache invalidation data. h](j' )}(h ``data_uptr``h]j- )}(hjlLh]h data_uptr}(hjnLhhhNhNubah}(h]h ]h"]h$]h&]uh1j, hjjLubah}(h]h ]h"]h$]h&]uh1j& hc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMmhjfLubjC )}(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.}(hjLhhhNhNubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMlhjLubah}(h]h ]h"]h$]h&]uh1jB hjfLubeh}(h]h ]h"]h$]h&]uh1j hjLhMmhjKubj! )}(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- )}(hjLh]h data_type}(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.hhMphjLubjC )}(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 }(hjLhhhNhNubj*)}(h **hwpt_id**h]hhwpt_id}(hjLhhhNhNubah}(h]h ]h"]h$]h&]uh1j)hjLubh.}(hjLhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMnhjLubah}(h]h ]h"]h$]h&]uh1jB hjLubeh}(h]h ]h"]h$]h&]uh1j hjLhMphjKubj! )}(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.hhMqhjLubjC )}(hhh]h)}(h9Length (in bytes) of a request entry in the request arrayh]h9Length (in bytes) of a request entry in the request array}(hj MhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjMhMqhjMubah}(h]h ]h"]h$]h&]uh1jB hjLubeh}(h]h ]h"]h$]h&]uh1j hjMhMqhjKubj! )}(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- )}(hj+Mh]h entry_num}(hj-MhhhNhNubah}(h]h ]h"]h$]h&]uh1j, hj)Mubah}(h]h ]h"]h$]h&]uh1j& hc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMshj%MubjC )}(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.}(hjDMhhhNhNubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMrhjAMubah}(h]h ]h"]h$]h&]uh1jB hj%Mubeh}(h]h ]h"]h$]h&]uh1j hj@MhMshjKubj! )}(h``__reserved`` Must be 0.h](j' )}(h``__reserved``h]j- )}(hjeMh]h __reserved}(hjgMhhhNhNubah}(h]h ]h"]h$]h&]uh1j, hjcMubah}(h]h ]h"]h$]h&]uh1j& hc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMshj_MubjC )}(hhh]h)}(h Must be 0.h]h Must be 0.}(hj~MhhhNhNubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMthj{Mubah}(h]h ]h"]h$]h&]uh1jB hj_Mubeh}(h]h ]h"]h$]h&]uh1j hjzMhMshjKubeh}(h]h ]h"]h$]h&]uh1j hjKubeh}(h]h ] kernelindentah"]h$]h&]uh1jhjhhhj$hNubh)}(h**Description**h]j*)}(hjMh]h Description}(hjMhhhNhNubah}(h]h ]h"]h$]h&]uh1j)hjMubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMwhjhhubh)}(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 }(hjMhhhNhNubj*)}(h **hwpt_id**h]hhwpt_id}(hjMhhhNhNubah}(h]h ]h"]h$]h&]uh1j)hjMubhi. Other caches, such as device cache or descriptor cache can be flushed if a vIOMMU is passed in via the }(hjMhhhNhNubj*)}(h **hwpt_id**h]hhwpt_id}(hjMhhhNhNubah}(h]h ]h"]h$]h&]uh1j)hjMubh field.}(hjMhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMthjhhubh)}(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}(hj NhhhNhNubah}(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.hhMyhjhhubh)}(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 }(hj$NhhhNhNubj*)}(h.**entry_num**==0 is allowed, and **entry_len**h]h*entry_num**==0 is allowed, and **entry_len}(hj,NhhhNhNubah}(h]h ]h"]h$]h&]uh1j)hj$Nubh and }(hj$NhhhNhNubj*)}(h **data_uptr**h]h data_uptr}(hj>NhhhNhNubah}(h]h ]h"]h$]h&]uh1j)hj$NubhG would be ignored in this case. This can be used to check if the given }(hj$NhhhNhNubj*)}(h **data_type**h]h data_type}(hjPNhhhNhNubah}(h]h ]h"]h$]h&]uh1j)hj$Nubh is supported or not by kernel.}(hj$NhhhNhNubeh}(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_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}(hjNhhhNhNubah}(h]h ]jaah"]h$]h&]uh1jThj~Nhhhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMubjg)}(h h]h }(hjNhhhNhNubah}(h]h ]jsah"]h$]h&]uh1jfhj~NhhhjNhMubjx)}(hiommu_hwpt_pgfault_flagsh]j~)}(hj|Nh]hiommu_hwpt_pgfault_flags}(hjNhhhNhNubah}(h]h ]jah"]h$]h&]uh1j}hjNubah}(h]h ](jjeh"]h$]h&]hhuh1jwhj~NhhhjNhMubeh}(h]h ]h"]h$]h&]hhjuh1jNjjhjzNhhhjNhMubah}(h]juNah ](jjeh"]h$]h&]jj)jhuh1jHhjNhMhjwNhhubj)}(hhh]h)}(h#flags for struct iommu_hwpt_pgfaulth]h#flags for struct iommu_hwpt_pgfault}(hjNhhhNhNubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMhjNhhubah}(h]h ]h"]h$]h&]uh1jhjwNhhhjNhMubeh}(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- )}(hjOh]hIOMMU_PGFAULT_FLAGS_PASID_VALID}(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.hhMhjNubjC )}(hhh]h)}(h+The pasid field of the fault data is valid.h]h+The pasid field of the fault data is valid.}(hjOhhhNhNubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMhjOubah}(h]h ]h"]h$]h&]uh1jB hjNubeh}(h]h ]h"]h$]h&]uh1j hjOhMhjNubj! )}(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- )}(hj?Oh]hIOMMU_PGFAULT_FLAGS_LAST_PAGE}(hjAOhhhNhNubah}(h]h ]h"]h$]h&]uh1j, hj=Oubah}(h]h ]h"]h$]h&]uh1j& hc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMhj9OubjC )}(hhh]h)}(h%It's the last fault of a fault group.h]h'It’s the last fault of a fault group.}(hjXOhhhNhNubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMhjUOubah}(h]h ]h"]h$]h&]uh1jB hj9Oubeh}(h]h ]h"]h$]h&]uh1j hjTOhMhjNubeh}(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}(hjOhhhNhNubah}(h]h ]jaah"]h$]h&]uh1jThjOhhhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMubjg)}(h h]h }(hjOhhhNhNubah}(h]h ]jsah"]h$]h&]uh1jfhjOhhhjOhMubjx)}(hiommu_hwpt_pgfault_permh]j~)}(hjOh]hiommu_hwpt_pgfault_perm}(hjOhhhNhNubah}(h]h ]jah"]h$]h&]uh1j}hjOubah}(h]h ](jjeh"]h$]h&]hhuh1jwhjOhhhjOhMubeh}(h]h ]h"]h$]h&]hhjuh1jNjjhjOhhhjOhMubah}(h]jOah ](jjeh"]h$]h&]jj)jhuh1jHhjOhMhjOhhubj)}(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&]uh1jhjOhhhjOhMubeh}(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- )}(hjPh]hIOMMU_PGFAULT_PERM_READ}(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)}(hrequest for read permissionh]hrequest for read permission}(hj5PhhhNhNubah}(h]h ]h"]h$]h&]uh1hhj1PhMhj2Pubah}(h]h ]h"]h$]h&]uh1jB hjPubeh}(h]h ]h"]h$]h&]uh1j hj1PhMhjPubj! )}(h:``IOMMU_PGFAULT_PERM_WRITE`` request for write permission h](j' )}(h``IOMMU_PGFAULT_PERM_WRITE``h]j- )}(hjUPh]hIOMMU_PGFAULT_PERM_WRITE}(hjWPhhhNhNubah}(h]h ]h"]h$]h&]uh1j, hjSPubah}(h]h ]h"]h$]h&]uh1j& hc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMhjOPubjC )}(hhh]h)}(hrequest for write permissionh]hrequest for write permission}(hjnPhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjjPhMhjkPubah}(h]h ]h"]h$]h&]uh1jB hjOPubeh}(h]h ]h"]h$]h&]uh1j hjjPhMhjPubj! )}(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- )}(hjPh]hIOMMU_PGFAULT_PERM_EXEC}(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)}(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.}(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 hjPhMhjPubj! )}(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- )}(hjPh]hIOMMU_PGFAULT_PERM_PRIV}(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)}(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 hjPubeh}(h]h ]h"]h$]h&]uh1j hjPhMhjPubeh}(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}(hj"QhhhNhNubah}(h]h ]jaah"]h$]h&]uh1jThjQhhhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMubjg)}(h h]h }(hj0QhhhNhNubah}(h]h ]jsah"]h$]h&]uh1jfhjQhhhj/QhMubjx)}(hiommu_hwpt_pgfaulth]j~)}(hjQh]hiommu_hwpt_pgfault}(hjBQhhhNhNubah}(h]h ]jah"]h$]h&]uh1j}hj>Qubah}(h]h ](jjeh"]h$]h&]hhuh1jwhjQhhhj/QhMubeh}(h]h ]h"]h$]h&]hhjuh1jNjjhjQhhhj/QhMubah}(h]jQah ](jjeh"]h$]h&]jj)jhuh1jHhj/QhMhjQhhubj)}(hhh]h)}(hiommu page fault datah]hiommu page fault data}(hjdQhhhNhNubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMhjaQhhubah}(h]h ]h"]h$]h&]uh1jhjQhhhj/QhMubeh}(h]h ](jstructeh"]h$]h&]jjjj|Qjj|Qjjjuh1jChhhjhj$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}(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.hhMhjQubj)}(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; };}hjQsbah}(h]h ]h"]h$]h&]hhuh1jhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMhjQubh)}(h **Members**h]j*)}(hjQh]hMembers}(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.hhMhjQubj )}(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 hjQhMhjQubj! )}(h'``dev_id`` id of the originated device h](j' )}(h ``dev_id``h]j- )}(hj Rh]hdev_id}(hj RhhhNhNubah}(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)}(hid of the originated deviceh]hid of the originated device}(hj#RhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjRhMhj Rubah}(h]h ]h"]h$]h&]uh1jB hjRubeh}(h]h ]h"]h$]h&]uh1j hjRhMhjQubj! )}(h#``pasid`` Process Address Space ID h](j' )}(h ``pasid``h]j- )}(hjCRh]hpasid}(hjERhhhNhNubah}(h]h ]h"]h$]h&]uh1j, hjARubah}(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)}(hProcess Address Space IDh]hProcess Address Space ID}(hj\RhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjXRhMhjYRubah}(h]h ]h"]h$]h&]uh1jB hj=Rubeh}(h]h ]h"]h$]h&]uh1j hjXRhMhjQubj! )}(h#``grpid`` Page Request Group Index h](j' )}(h ``grpid``h]j- )}(hj|Rh]hgrpid}(hj~RhhhNhNubah}(h]h ]h"]h$]h&]uh1j, hjzRubah}(h]h ]h"]h$]h&]uh1j& hc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMhjvRubjC )}(hhh]h)}(hPage Request Group Indexh]hPage Request Group Index}(hjRhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjRhMhjRubah}(h]h ]h"]h$]h&]uh1jB hjvRubeh}(h]h ]h"]h$]h&]uh1j hjRhMhjQubj! )}(h5``perm`` Combination of enum iommu_hwpt_pgfault_perm h](j' )}(h``perm``h]j- )}(hjRh]hperm}(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+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 hjRubeh}(h]h ]h"]h$]h&]uh1j hjRhMhjQubj! )}(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.}(hjShhhNhNubah}(h]h ]h"]h$]h&]uh1hhjShMhjSubah}(h]h ]h"]h$]h&]uh1jB hjRubeh}(h]h ]h"]h$]h&]uh1j hjShMhjQubj! )}(h``addr`` Fault address h](j' )}(h``addr``h]j- )}(hj'Sh]haddr}(hj)ShhhNhNubah}(h]h ]h"]h$]h&]uh1j, hj%Subah}(h]h ]h"]h$]h&]uh1j& hc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMhj!SubjC )}(hhh]h)}(h Fault addressh]h Fault address}(hj@ShhhNhNubah}(h]h ]h"]h$]h&]uh1hhjZhhhNhNubah}(h]h ]h"]h$]h&]uh1hhj:ZhMhj;Zubah}(h]h ]h"]h$]h&]uh1jB hjZubeh}(h]h ]h"]h$]h&]uh1j hj:ZhMhjZubj! )}(h@``out_vintf_mmap_length`` mmap length argument for VINTF's page0h](j' )}(h``out_vintf_mmap_length``h]j- )}(hj^Zh]hout_vintf_mmap_length}(hj`ZhhhNhNubah}(h]h ]h"]h$]h&]uh1j, hj\Zubah}(h]h ]h"]h$]h&]uh1j& hc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMhjXZubjC )}(hhh]h)}(h&mmap length argument for VINTF's page0h]h(mmap length argument for VINTF’s page0}(hjwZhhhNhNubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMhjtZubah}(h]h ]h"]h$]h&]uh1jB hjXZubeh}(h]h ]h"]h$]h&]uh1j hjsZhMhjZubeh}(h]h ]h"]h$]h&]uh1j hjYubeh}(h]h ] kernelindentah"]h$]h&]uh1jhjhhhj$hNubh)}(h**Description**h]j*)}(hjZh]h Description}(hjZhhhNhNubah}(h]h ]h"]h$]h&]uh1j)hjZubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMhjhhubh)}(hX5Both **out_vintf_mmap_offset** and **out_vintf_mmap_length** are reported by kernel for user space to mmap the VINTF page0 from the host physical address space to the guest physical address space so that a guest kernel can directly R/W access to the VINTF page0 in order to control its virtual command queues.h](hBoth }(hjZhhhNhNubj*)}(h**out_vintf_mmap_offset**h]hout_vintf_mmap_offset}(hjZhhhNhNubah}(h]h ]h"]h$]h&]uh1j)hjZubh and }(hjZhhhNhNubj*)}(h**out_vintf_mmap_length**h]hout_vintf_mmap_length}(hjZhhhNhNubah}(h]h ]h"]h$]h&]uh1j)hjZubh are reported by kernel for user space to mmap the VINTF page0 from the host physical address space to the guest physical address space so that a guest kernel can directly R/W access to the VINTF page0 in order to control its virtual command queues.}(hjZhhhNhNubeh}(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_alloc (C struct)c.iommu_viommu_allochNtauh1j2hjhhhj$hNubjD)}(hhh](jI)}(hiommu_viommu_alloch]jO)}(hstruct iommu_viommu_alloch](jU)}(hjXh]hstruct}(hj[hhhNhNubah}(h]h ]jaah"]h$]h&]uh1jThjZhhhc/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&]uh1jfhjZhhhj[hMubjx)}(hiommu_viommu_alloch]j~)}(hjZh]hiommu_viommu_alloc}(hj#[hhhNhNubah}(h]h ]jah"]h$]h&]uh1j}hj[ubah}(h]h ](jjeh"]h$]h&]hhuh1jwhjZhhhj[hMubeh}(h]h ]h"]h$]h&]hhjuh1jNjjhjZhhhj[hMubah}(h]jZah ](jjeh"]h$]h&]jj)jhuh1jHhj[hMhjZhhubj)}(hhh]h)}(hioctl(IOMMU_VIOMMU_ALLOC)h]hioctl(IOMMU_VIOMMU_ALLOC)}(hjE[hhhNhNubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhM hjB[hhubah}(h]h ]h"]h$]h&]uh1jhjZhhhj[hMubeh}(h]h ](jstructeh"]h$]h&]jjjj][jj][jjjuh1jChhhjhj$hNubj)}(hX**Definition**:: struct iommu_viommu_alloc { __u32 size; __u32 flags; __u32 type; __u32 dev_id; __u32 hwpt_id; __u32 out_viommu_id; __u32 data_len; __u32 __reserved; __aligned_u64 data_uptr; }; **Members** ``size`` sizeof(struct iommu_viommu_alloc) ``flags`` Must be 0 ``type`` Type of the virtual IOMMU. Must be defined in enum iommu_viommu_type ``dev_id`` The device's physical IOMMU will be used to back the virtual IOMMU ``hwpt_id`` ID of a nesting parent HWPT to associate to ``out_viommu_id`` Output virtual IOMMU ID for the allocated object ``data_len`` Length of the type specific data ``__reserved`` Must be 0 ``data_uptr`` User pointer to a driver-specific virtual IOMMU datah](h)}(h**Definition**::h](j*)}(h**Definition**h]h Definition}(hji[hhhNhNubah}(h]h ]h"]h$]h&]uh1j)hje[ubh:}(hje[hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMhja[ubj)}(hstruct iommu_viommu_alloc { __u32 size; __u32 flags; __u32 type; __u32 dev_id; __u32 hwpt_id; __u32 out_viommu_id; __u32 data_len; __u32 __reserved; __aligned_u64 data_uptr; };h]hstruct iommu_viommu_alloc { __u32 size; __u32 flags; __u32 type; __u32 dev_id; __u32 hwpt_id; __u32 out_viommu_id; __u32 data_len; __u32 __reserved; __aligned_u64 data_uptr; };}hj[sbah}(h]h ]h"]h$]h&]hhuh1jhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMhja[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.hhMhja[ubj )}(hhh](j! )}(h+``size`` sizeof(struct iommu_viommu_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.hhMhj[ubjC )}(hhh]h)}(h!sizeof(struct iommu_viommu_alloc)h]h!sizeof(struct iommu_viommu_alloc)}(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``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! )}(hN``type`` Type of the virtual IOMMU. Must be defined in enum iommu_viommu_type h](j' )}(h``type``h]j- )}(hj$\h]htype}(hj&\hhhNhNubah}(h]h ]h"]h$]h&]uh1j, hj"\ubah}(h]h ]h"]h$]h&]uh1j& hc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMhj\ubjC )}(hhh]h)}(hDType of the virtual IOMMU. Must be defined in enum iommu_viommu_typeh]hDType of the virtual IOMMU. Must be defined in enum iommu_viommu_type}(hj=\hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj9\hMhj:\ubah}(h]h ]h"]h$]h&]uh1jB hj\ubeh}(h]h ]h"]h$]h&]uh1j hj9\hMhj[ubj! )}(hN``dev_id`` The device's physical IOMMU will be used to back the virtual IOMMU 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.hhMhjW\ubjC )}(hhh]h)}(hBThe device's physical IOMMU will be used to back the virtual IOMMUh]hDThe device’s physical IOMMU will be used to back the virtual IOMMU}(hjv\hhhNhNubah}(h]h ]h"]h$]h&]uh1hhjr\hMhjs\ubah}(h]h ]h"]h$]h&]uh1jB hjW\ubeh}(h]h ]h"]h$]h&]uh1j hjr\hMhj[ubj! )}(h8``hwpt_id`` ID of a nesting parent HWPT to associate to 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)}(h+ID of a nesting parent HWPT to associate toh]h+ID of a nesting parent HWPT to associate to}(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! )}(hC``out_viommu_id`` Output virtual IOMMU ID for the allocated object h](j' )}(h``out_viommu_id``h]j- )}(hj\h]h out_viommu_id}(hj\hhhNhNubah}(h]h ]h"]h$]h&]uh1j, hj\ubah}(h]h ]h"]h$]h&]uh1j& hc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMhj\ubjC )}(hhh]h)}(h0Output virtual IOMMU ID for the allocated objecth]h0Output virtual IOMMU ID for the allocated object}(hj\hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj\hMhj\ubah}(h]h ]h"]h$]h&]uh1jB hj\ubeh}(h]h ]h"]h$]h&]uh1j hj\hMhj[ubj! )}(h.``data_len`` Length of the type specific data 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)}(h Length of the type specific datah]h Length of the type specific data}(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``__reserved`` Must be 0 h](j' )}(h``__reserved``h]j- )}(hjA]h]h __reserved}(hjC]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}(hjZ]hhhNhNubah}(h]h ]h"]h$]h&]uh1hhjV]hMhjW]ubah}(h]h ]h"]h$]h&]uh1jB hj;]ubeh}(h]h ]h"]h$]h&]uh1j hjV]hMhj[ubj! )}(hB``data_uptr`` User pointer to a driver-specific virtual IOMMU datah](j' )}(h ``data_uptr``h]j- )}(hjz]h]h data_uptr}(hj|]hhhNhNubah}(h]h ]h"]h$]h&]uh1j, hjx]ubah}(h]h ]h"]h$]h&]uh1j& hc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMhjt]ubjC )}(hhh]h)}(h4User pointer to a driver-specific virtual IOMMU datah]h4User pointer to a driver-specific virtual IOMMU data}(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 hjt]ubeh}(h]h ]h"]h$]h&]uh1j hj]hMhj[ubeh}(h]h ]h"]h$]h&]uh1j hja[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)}(hXAllocate a virtual IOMMU object, representing the underlying physical IOMMU's virtualization support that is a security-isolated slice of the real IOMMU HW that is unique to a specific VM. Operations global to the IOMMU are connected to the vIOMMU, such as: - Security namespace for guest owned ID, e.g. guest-controlled cache tags - Non-device-affiliated event reporting, e.g. invalidation queue errors - Access to a sharable nesting parent pagetable across physical IOMMUs - Virtualization of various platforms IDs, e.g. RIDs and others - Delivery of paravirtualized invalidation - Direct assigned invalidation queues - Direct assigned interruptsh]hXAllocate a virtual IOMMU object, representing the underlying physical IOMMU’s virtualization support that is a security-isolated slice of the real IOMMU HW that is unique to a specific VM. Operations global to the IOMMU are connected to the vIOMMU, such as: - Security namespace for guest owned ID, e.g. guest-controlled cache tags - Non-device-affiliated event reporting, e.g. invalidation queue errors - Access to a sharable nesting parent pagetable across physical IOMMUs - Virtualization of various platforms IDs, e.g. RIDs and others - Delivery of paravirtualized invalidation - Direct assigned invalidation queues - Direct assigned interrupts}(hj]hhhNhNubah}(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_vdevice_alloc (C struct)c.iommu_vdevice_allochNtauh1j2hjhhhj$hNubjD)}(hhh](jI)}(hiommu_vdevice_alloch]jO)}(hstruct iommu_vdevice_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.hhM%ubjg)}(h h]h }(hj ^hhhNhNubah}(h]h ]jsah"]h$]h&]uh1jfhj]hhhj^hM%ubjx)}(hiommu_vdevice_alloch]j~)}(hj]h]hiommu_vdevice_alloc}(hj^hhhNhNubah}(h]h ]jah"]h$]h&]uh1j}hj^ubah}(h]h ](jjeh"]h$]h&]hhuh1jwhj]hhhj^hM%ubeh}(h]h ]h"]h$]h&]hhjuh1jNjjhj]hhhj^hM%ubah}(h]j]ah ](jjeh"]h$]h&]jj)jhuh1jHhj^hM%hj]hhubj)}(hhh]h)}(hioctl(IOMMU_VDEVICE_ALLOC)h]hioctl(IOMMU_VDEVICE_ALLOC)}(hj=^hhhNhNubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhM1hj:^hhubah}(h]h ]h"]h$]h&]uh1jhj]hhhj^hM%ubeh}(h]h ](jstructeh"]h$]h&]jjjjU^jjU^jjjuh1jChhhjhj$hNubj)}(hX8**Definition**:: struct iommu_vdevice_alloc { __u32 size; __u32 viommu_id; __u32 dev_id; __u32 out_vdevice_id; __aligned_u64 virt_id; }; **Members** ``size`` sizeof(struct iommu_vdevice_alloc) ``viommu_id`` vIOMMU ID to associate with the virtual device ``dev_id`` The physical device to allocate a virtual instance on the vIOMMU ``out_vdevice_id`` Object handle for the vDevice. Pass to IOMMU_DESTORY ``virt_id`` Virtual device ID per vIOMMU, e.g. vSID of ARM SMMUv3, vDeviceID of AMD IOMMU, and vRID of Intel VT-dh](h)}(h**Definition**::h](j*)}(h**Definition**h]h Definition}(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.hhM5hjY^ubj)}(hstruct iommu_vdevice_alloc { __u32 size; __u32 viommu_id; __u32 dev_id; __u32 out_vdevice_id; __aligned_u64 virt_id; };h]hstruct iommu_vdevice_alloc { __u32 size; __u32 viommu_id; __u32 dev_id; __u32 out_vdevice_id; __aligned_u64 virt_id; };}hjz^sbah}(h]h ]h"]h$]h&]hhuh1jhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhM7hjY^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?hjY^ubj )}(hhh](j! )}(h,``size`` sizeof(struct iommu_vdevice_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.hhM3hj^ubjC )}(hhh]h)}(h"sizeof(struct iommu_vdevice_alloc)h]h"sizeof(struct iommu_vdevice_alloc)}(hj^hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj^hM3hj^ubah}(h]h ]h"]h$]h&]uh1jB hj^ubeh}(h]h ]h"]h$]h&]uh1j hj^hM3hj^ubj! )}(h=``viommu_id`` vIOMMU ID to associate with the virtual device h](j' )}(h ``viommu_id``h]j- )}(hj^h]h viommu_id}(hj^hhhNhNubah}(h]h ]h"]h$]h&]uh1j, hj^ubah}(h]h ]h"]h$]h&]uh1j& hc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhM4hj^ubjC )}(hhh]h)}(h.vIOMMU ID to associate with the virtual deviceh]h.vIOMMU ID to associate with the virtual device}(hj^hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj^hM4hj^ubah}(h]h ]h"]h$]h&]uh1jB hj^ubeh}(h]h ]h"]h$]h&]uh1j hj^hM4hj^ubj! )}(hL``dev_id`` The physical device to allocate a virtual instance on the vIOMMU 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.hhM5hj_ubjC )}(hhh]h)}(h@The physical device to allocate a virtual instance on the vIOMMUh]h@The physical device to allocate a virtual instance on the vIOMMU}(hj5_hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj1_hM5hj2_ubah}(h]h ]h"]h$]h&]uh1jB hj_ubeh}(h]h ]h"]h$]h&]uh1j hj1_hM5hj^ubj! )}(hH``out_vdevice_id`` Object handle for the vDevice. Pass to IOMMU_DESTORY h](j' )}(h``out_vdevice_id``h]j- )}(hjU_h]hout_vdevice_id}(hjW_hhhNhNubah}(h]h ]h"]h$]h&]uh1j, hjS_ubah}(h]h ]h"]h$]h&]uh1j& hc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhM6hjO_ubjC )}(hhh]h)}(h4Object handle for the vDevice. Pass to IOMMU_DESTORYh]h4Object handle for the vDevice. Pass to IOMMU_DESTORY}(hjn_hhhNhNubah}(h]h ]h"]h$]h&]uh1hhjj_hM6hjk_ubah}(h]h ]h"]h$]h&]uh1jB hjO_ubeh}(h]h ]h"]h$]h&]uh1j hjj_hM6hj^ubj! )}(hq``virt_id`` Virtual device ID per vIOMMU, e.g. vSID of ARM SMMUv3, vDeviceID of AMD IOMMU, and vRID of Intel VT-dh](j' )}(h ``virt_id``h]j- )}(hj_h]hvirt_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.hhM7hj_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&]uh1hhj_hM7hj_ubah}(h]h ]h"]h$]h&]uh1jB hj_ubeh}(h]h ]h"]h$]h&]uh1j hj_hM7hj^ubeh}(h]h ]h"]h$]h&]uh1j hjY^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.hhM;hjhhubh)}(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.hhM8hjhhubj3)}(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.hhMCubjg)}(h h]h }(hj`hhhNhNubah}(h]h ]jsah"]h$]h&]uh1jfhj `hhhj`hMCubjx)}(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`hMCubeh}(h]h ]h"]h$]h&]hhjuh1jNjjhj`hhhj`hMCubah}(h]j`ah ](jjeh"]h$]h&]jj)jhuh1jHhj`hMChj`hhubj)}(hhh]h)}(hioctl(VFIO_IOAS_CHANGE_PROCESS)h]hioctl(VFIO_IOAS_CHANGE_PROCESS)}(hjP`hhhNhNubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMKhjM`hhubah}(h]h ]h"]h$]h&]uh1jhj`hhhj`hMCubeh}(h]h ](jstructeh"]h$]h&]jjjjh`jjh`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}(hjt`hhhNhNubah}(h]h ]h"]h$]h&]uh1j)hjp`ubh:}(hjp`hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMOhjl`ubj)}(hKstruct iommu_ioas_change_process { __u32 size; __u32 __reserved; };h]hKstruct iommu_ioas_change_process { __u32 size; __u32 __reserved; };}hj`sbah}(h]h ]h"]h$]h&]hhuh1jhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMQhjl`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.hhMVhjl`ubj )}(hhh](j! )}(h2``size`` sizeof(struct iommu_ioas_change_process) 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.hhMMhj`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`hMMhj`ubah}(h]h ]h"]h$]h&]uh1jB hj`ubeh}(h]h ]h"]h$]h&]uh1j hj`hMMhj`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.hhMMhj`ubjC )}(hhh]h)}(h Must be 0h]h Must be 0}(hjahhhNhNubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMNhj aubah}(h]h ]h"]h$]h&]uh1jB hj`ubeh}(h]h ]h"]h$]h&]uh1j hj ahMMhj`ubeh}(h]h ]h"]h$]h&]uh1j hjl`ubeh}(h]h ] kernelindentah"]h$]h&]uh1jhjhhhj$hNubh)}(h**Description**h]j*)}(hj9ah]h Description}(hj;ahhhNhNubah}(h]h ]h"]h$]h&]uh1j)hj7aubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMQhjhhubh)}(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.}(hjOahhhNhNubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMNhjhhubh)}(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.}(hj^ahhhNhNubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMShjhhubj3)}(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}(hjahhhNhNubah}(h]h ]jaah"]h$]h&]uh1jThjahhhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMYubjg)}(h h]h }(hjahhhNhNubah}(h]h ]jsah"]h$]h&]uh1jfhjahhhjahMYubjx)}(hiommu_veventq_flagh]j~)}(hjah]hiommu_veventq_flag}(hjahhhNhNubah}(h]h ]jah"]h$]h&]uh1j}hjaubah}(h]h ](jjeh"]h$]h&]hhuh1jwhjahhhjahMYubeh}(h]h ]h"]h$]h&]hhjuh1jNjjhj~ahhhjahMYubah}(h]jyaah ](jjeh"]h$]h&]jj)jhuh1jHhjahMYhj{ahhubj)}(hhh]h)}(h%flag for struct iommufd_vevent_headerh]h%flag for struct iommufd_vevent_header}(hjahhhNhNubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhM`hjahhubah}(h]h ]h"]h$]h&]uh1jhj{ahhhjahMYubeh}(h]h ](jenumeh"]h$]h&]jjjjajjajjjuh1jChhhjhj$hNubj)}(hL**Constants** ``IOMMU_VEVENTQ_FLAG_LOST_EVENTS`` vEVENTQ has lost vEVENTsh](h)}(h **Constants**h]j*)}(hjah]h Constants}(hjahhhNhNubah}(h]h ]h"]h$]h&]uh1j)hjaubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMdhjaubj )}(hhh]j! )}(h;``IOMMU_VEVENTQ_FLAG_LOST_EVENTS`` vEVENTQ has lost vEVENTsh](j' )}(h"``IOMMU_VEVENTQ_FLAG_LOST_EVENTS``h]j- )}(hj bh]hIOMMU_VEVENTQ_FLAG_LOST_EVENTS}(hj bhhhNhNubah}(h]h ]h"]h$]h&]uh1j, hjbubah}(h]h ]h"]h$]h&]uh1j& hc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMfhjbubjC )}(hhh]h)}(hvEVENTQ has lost vEVENTsh]hvEVENTQ has lost vEVENTs}(hj"bhhhNhNubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMghjbubah}(h]h ]h"]h$]h&]uh1jB hjbubeh}(h]h ]h"]h$]h&]uh1j hjbhMfhjbubah}(h]h ]h"]h$]h&]uh1j hjaubeh}(h]h ] kernelindentah"]h$]h&]uh1jhjhhhj$hNubj3)}(hhh]h}(h]h ]h"]h$]h&]entries](j? iommufd_vevent_header (C struct)c.iommufd_vevent_headerhNtauh1j2hjhhhj$hNubjD)}(hhh](jI)}(hiommufd_vevent_headerh]jO)}(hstruct iommufd_vevent_headerh](jU)}(hjXh]hstruct}(hjcbhhhNhNubah}(h]h ]jaah"]h$]h&]uh1jThj_bhhhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMlubjg)}(h h]h }(hjqbhhhNhNubah}(h]h ]jsah"]h$]h&]uh1jfhj_bhhhjpbhMlubjx)}(hiommufd_vevent_headerh]j~)}(hj]bh]hiommufd_vevent_header}(hjbhhhNhNubah}(h]h ]jah"]h$]h&]uh1j}hjbubah}(h]h ](jjeh"]h$]h&]hhuh1jwhj_bhhhjpbhMlubeh}(h]h ]h"]h$]h&]hhjuh1jNjjhj[bhhhjpbhMlubah}(h]jVbah ](jjeh"]h$]h&]jj)jhuh1jHhjpbhMlhjXbhhubj)}(hhh]h)}(h)Virtual Event Header for a vEVENTQ Statush]h)Virtual Event Header for a vEVENTQ Status}(hjbhhhNhNubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMhhjbhhubah}(h]h ]h"]h$]h&]uh1jhjXbhhhjpbhMlubeh}(h]h ](jstructeh"]h$]h&]jjjjbjjbjjjuh1jChhhjhj$hNubj)}(hX)**Definition**:: struct iommufd_vevent_header { __u32 flags; __u32 sequence; }; **Members** ``flags`` Combination of enum iommu_veventq_flag ``sequence`` The sequence index of a vEVENT in the vEVENTQ, with a range of [0, INT_MAX] where the following index of INT_MAX is 0h](h)}(h**Definition**::h](j*)}(h**Definition**h]h Definition}(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.hhMlhjbubj)}(hFstruct iommufd_vevent_header { __u32 flags; __u32 sequence; };h]hFstruct iommufd_vevent_header { __u32 flags; __u32 sequence; };}hjbsbah}(h]h ]h"]h$]h&]hhuh1jhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMnhjbubh)}(h **Members**h]j*)}(hjbh]hMembers}(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.hhMshjbubj )}(hhh](j! )}(h1``flags`` Combination of enum iommu_veventq_flag h](j' )}(h ``flags``h]j- )}(hjch]hflags}(hjchhhNhNubah}(h]h ]h"]h$]h&]uh1j, hjcubah}(h]h ]h"]h$]h&]uh1j& hc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMjhj cubjC )}(hhh]h)}(h&Combination of enum iommu_veventq_flagh]h&Combination of enum iommu_veventq_flag}(hj+chhhNhNubah}(h]h ]h"]h$]h&]uh1hhj'chMjhj(cubah}(h]h ]h"]h$]h&]uh1jB hj cubeh}(h]h ]h"]h$]h&]uh1j hj'chMjhj cubj! )}(h``sequence`` The sequence index of a vEVENT in the vEVENTQ, with a range of [0, INT_MAX] where the following index of INT_MAX is 0h](j' )}(h ``sequence``h]j- )}(hjKch]hsequence}(hjMchhhNhNubah}(h]h ]h"]h$]h&]uh1j, hjIcubah}(h]h ]h"]h$]h&]uh1j& hc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMkhjEcubjC )}(hhh]h)}(huThe sequence index of a vEVENT in the vEVENTQ, with a range of [0, INT_MAX] where the following index of INT_MAX is 0h]huThe sequence index of a vEVENT in the vEVENTQ, with a range of [0, INT_MAX] where the following index of INT_MAX is 0}(hjdchhhNhNubah}(h]h ]h"]h$]h&]uh1hhj`chMkhjacubah}(h]h ]h"]h$]h&]uh1jB hjEcubeh}(h]h ]h"]h$]h&]uh1j hj`chMkhj cubeh}(h]h ]h"]h$]h&]uh1j hjbubeh}(h]h ] kernelindentah"]h$]h&]uh1jhjhhhj$hNubh)}(h**Description**h]j*)}(hjch]h Description}(hjchhhNhNubah}(h]h ]h"]h$]h&]uh1j)hjcubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMohjhhubh)}(hLEach iommufd_vevent_header reports a sequence index of the following vEVENT:h]hLEach iommufd_vevent_header reports a sequence index of the following vEVENT:}(hjchhhNhNubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMlhjhhubhtable)}(hhh]htgroup)}(hhh](hcolspec)}(hhh]h}(h]h ]h"]h$]h&]colwidthKuh1jchjcubjc)}(hhh]h}(h]h ]h"]h$]h&]colwidthKuh1jchjcubjc)}(hhh]h}(h]h ]h"]h$]h&]colwidthKuh1jchjcubjc)}(hhh]h}(h]h ]h"]h$]h&]colwidthKuh1jchjcubjc)}(hhh]h}(h]h ]h"]h$]h&]colwidthKuh1jchjcubjc)}(hhh]h}(h]h ]h"]h$]h&]colwidthKuh1jchjcubhtbody)}(hhh]hrow)}(hhh](hentry)}(hhh]h)}(hheader0 {sequence=0}h]hheader0 {sequence=0}}(hj dhhhNhNubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMohjdubah}(h]h ]h"]h$]h&]uh1jdhjdubjd)}(hhh]h)}(hdata0h]hdata0}(hj!dhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjdhMohjdubah}(h]h ]h"]h$]h&]uh1jdhjdubjd)}(hhh]h)}(hheader1 {sequence=1}h]hheader1 {sequence=1}}(hj8dhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjdhMohj5dubah}(h]h ]h"]h$]h&]uh1jdhjdubjd)}(hhh]h)}(hdata1h]hdata1}(hjOdhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjdhMohjLdubah}(h]h ]h"]h$]h&]uh1jdhjdubjd)}(hhh]h)}(h...h]h...}(hjfdhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjdhMohjcdubah}(h]h ]h"]h$]h&]uh1jdhjdubjd)}(hhh]h)}(hdataNh]hdataN}(hj}dhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjdhMohjzdubah}(h]h ]h"]h$]h&]uh1jdhjdubeh}(h]h ]h"]h$]h&]uh1jchjcubah}(h]h ]h"]h$]h&]uh1jchjcubeh}(h]h ]h"]h$]h&]colsKuh1jchjcubah}(h]h ]h"]h$]h&]uh1jchjhhhj$hNubh)}(hAnd this sequence index is expected to be monotonic to the sequence index of the previous vEVENT. If two adjacent sequence indexes has a delta larger than 1, it means that delta - 1 number of vEVENTs has lost, e.g. two lost vEVENTs:h]hAnd this sequence index is expected to be monotonic to the sequence index of the previous vEVENT. If two adjacent sequence indexes has a delta larger than 1, it means that delta - 1 number of vEVENTs has lost, e.g. two lost vEVENTs:}(hjdhhhNhNubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMrhjhhubjc)}(hhh]jc)}(hhh](jc)}(hhh]h}(h]h ]h"]h$]h&]colwidthKuh1jchjdubjc)}(hhh]h}(h]h ]h"]h$]h&]colwidthKuh1jchjdubjc)}(hhh]h}(h]h ]h"]h$]h&]colwidthKuh1jchjdubjc)}(hhh]h}(h]h ]h"]h$]h&]colwidthKuh1jchjdubjc)}(hhh]h}(h]h ]h"]h$]h&]colwidthKuh1jchjdubjc)}(hhh]h}(h]h ]h"]h$]h&]colwidthKuh1jchjdubjc)}(hhh]jd)}(hhh](jd)}(hhh]h)}(h...h]h...}(hjehhhNhNubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMwhjeubah}(h]h ]h"]h$]h&]uh1jdhjdubjd)}(hhh]h)}(hheader3 {sequence=3}h]hheader3 {sequence=3}}(hjehhhNhNubah}(h]h ]h"]h$]h&]uh1hhjehMwhjeubah}(h]h ]h"]h$]h&]uh1jdhjdubjd)}(hhh]h)}(hdata3h]hdata3}(hj3ehhhNhNubah}(h]h ]h"]h$]h&]uh1hhjehMwhj0eubah}(h]h ]h"]h$]h&]uh1jdhjdubjd)}(hhh]h)}(hheader6 {sequence=6}h]hheader6 {sequence=6}}(hjJehhhNhNubah}(h]h ]h"]h$]h&]uh1hhjehMwhjGeubah}(h]h ]h"]h$]h&]uh1jdhjdubjd)}(hhh]h)}(hdata6h]hdata6}(hjaehhhNhNubah}(h]h ]h"]h$]h&]uh1hhjehMwhj^eubah}(h]h ]h"]h$]h&]uh1jdhjdubjd)}(hhh]h)}(h...h]h...}(hjxehhhNhNubah}(h]h ]h"]h$]h&]uh1hhjehMwhjueubah}(h]h ]h"]h$]h&]uh1jdhjdubeh}(h]h ]h"]h$]h&]uh1jchjdubah}(h]h ]h"]h$]h&]uh1jchjdubeh}(h]h ]h"]h$]h&]colsKuh1jchjdubah}(h]h ]h"]h$]h&]uh1jchjhhhj$hNubh)}(hIf a vEVENT lost at the tail of the vEVENTQ and there is no following vEVENT providing the next sequence index, an IOMMU_VEVENTQ_FLAG_LOST_EVENTS header would be added to the tail, and no data would follow this header:h]hIf a vEVENT lost at the tail of the vEVENTQ and there is no following vEVENT providing the next sequence index, an IOMMU_VEVENTQ_FLAG_LOST_EVENTS header would be added to the tail, and no data would follow this header:}(hjehhhNhNubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMzhjhhubjc)}(hhh]jc)}(hhh](jc)}(hhh]h}(h]h ]h"]h$]h&]colwidthKuh1jchjeubjc)}(hhh]h}(h]h ]h"]h$]h&]colwidthKuh1jchjeubjc)}(hhh]h}(h]h ]h"]h$]h&]colwidthKuh1jchjeubjc)}(hhh]h}(h]h ]h"]h$]h&]colwidthK)uh1jchjeubjc)}(hhh]jd)}(hhh](jd)}(hhh]h)}(hhh]h}(h]h ]h"]h$]h&]hhuh1hhjeubah}(h]h ]h"]h$]h&]uh1jdhjeubjd)}(hhh]h)}(hheader3 {sequence=3}h]hheader3 {sequence=3}}(hjehhhNhNubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMhjeubah}(h]h ]h"]h$]h&]uh1jdhjeubjd)}(hhh]h)}(hdata3h]hdata3}(hjfhhhNhNubah}(h]h ]h"]h$]h&]uh1hhj fhMhjfubah}(h]h ]h"]h$]h&]uh1jdhjeubjd)}(hhh]h)}(h'header4 {flags=LOST_EVENTS, sequence=4}h]h'header4 {flags=LOST_EVENTS, sequence=4}}(hj,fhhhNhNubah}(h]h ]h"]h$]h&]uh1hhj fhMhj)fubah}(h]h ]h"]h$]h&]uh1jdhjeubeh}(h]h ]h"]h$]h&]uh1jchjeubah}(h]h ]h"]h$]h&]uh1jchjeubeh}(h]h ]h"]h$]h&]colsKuh1jchjeubah}(h]h ]h"]h$]h&]uh1jchjhhhj$hNubj3)}(hhh]h}(h]h ]h"]h$]h&]entries](j?iommu_veventq_type (C enum)c.iommu_veventq_typehNtauh1j2hjhhhj$hNubjD)}(hhh](jI)}(hiommu_veventq_typeh]jO)}(henum iommu_veventq_typeh](jU)}(hjh]henum}(hjrfhhhNhNubah}(h]h ]jaah"]h$]h&]uh1jThjnfhhhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMubjg)}(h h]h }(hjfhhhNhNubah}(h]h ]jsah"]h$]h&]uh1jfhjnfhhhjfhMubjx)}(hiommu_veventq_typeh]j~)}(hjlfh]hiommu_veventq_type}(hjfhhhNhNubah}(h]h ]jah"]h$]h&]uh1j}hjfubah}(h]h ](jjeh"]h$]h&]hhuh1jwhjnfhhhjfhMubeh}(h]h ]h"]h$]h&]hhjuh1jNjjhjjfhhhjfhMubah}(h]jefah ](jjeh"]h$]h&]jj)jhuh1jHhjfhMhjgfhhubj)}(hhh]h)}(hVirtual Event Queue Typeh]hVirtual Event Queue Type}(hjfhhhNhNubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMhjfhhubah}(h]h ]h"]h$]h&]uh1jhjgfhhhjfhMubeh}(h]h ](jenumeh"]h$]h&]jjjjfjjfjjjuh1jChhhjhj$hNubj)}(h**Constants** ``IOMMU_VEVENTQ_TYPE_DEFAULT`` Reserved for future use ``IOMMU_VEVENTQ_TYPE_ARM_SMMUV3`` ARM SMMUv3 Virtual Event Queue ``IOMMU_VEVENTQ_TYPE_TEGRA241_CMDQV`` NVIDIA Tegra241 CMDQV Extension IRQh](h)}(h **Constants**h]j*)}(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.hhMhjfubj )}(hhh](j! )}(h7``IOMMU_VEVENTQ_TYPE_DEFAULT`` Reserved for future use h](j' )}(h``IOMMU_VEVENTQ_TYPE_DEFAULT``h]j- )}(hjfh]hIOMMU_VEVENTQ_TYPE_DEFAULT}(hjfhhhNhNubah}(h]h ]h"]h$]h&]uh1j, hjfubah}(h]h ]h"]h$]h&]uh1j& hc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMhjfubjC )}(hhh]h)}(hReserved for future useh]hReserved for future use}(hjghhhNhNubah}(h]h ]h"]h$]h&]uh1hhj ghMhj gubah}(h]h ]h"]h$]h&]uh1jB hjfubeh}(h]h ]h"]h$]h&]uh1j hj ghMhjfubj! )}(hA``IOMMU_VEVENTQ_TYPE_ARM_SMMUV3`` ARM SMMUv3 Virtual Event Queue h](j' )}(h!``IOMMU_VEVENTQ_TYPE_ARM_SMMUV3``h]j- )}(hj.gh]hIOMMU_VEVENTQ_TYPE_ARM_SMMUV3}(hj0ghhhNhNubah}(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.hhMhj(gubjC )}(hhh]h)}(hARM SMMUv3 Virtual Event Queueh]hARM SMMUv3 Virtual Event Queue}(hjGghhhNhNubah}(h]h ]h"]h$]h&]uh1hhjCghMhjDgubah}(h]h ]h"]h$]h&]uh1jB hj(gubeh}(h]h ]h"]h$]h&]uh1j hjCghMhjfubj! )}(hI``IOMMU_VEVENTQ_TYPE_TEGRA241_CMDQV`` NVIDIA Tegra241 CMDQV Extension IRQh](j' )}(h%``IOMMU_VEVENTQ_TYPE_TEGRA241_CMDQV``h]j- )}(hjggh]h!IOMMU_VEVENTQ_TYPE_TEGRA241_CMDQV}(hjighhhNhNubah}(h]h ]h"]h$]h&]uh1j, hjegubah}(h]h ]h"]h$]h&]uh1j& hc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMhjagubjC )}(hhh]h)}(h#NVIDIA Tegra241 CMDQV Extension IRQh]h#NVIDIA Tegra241 CMDQV Extension IRQ}(hjghhhNhNubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMhj}gubah}(h]h ]h"]h$]h&]uh1jB hjagubeh}(h]h ]h"]h$]h&]uh1j hj|ghMhjfubeh}(h]h ]h"]h$]h&]uh1j hjfubeh}(h]h ] kernelindentah"]h$]h&]uh1jhjhhhj$hNubj3)}(hhh]h}(h]h ]h"]h$]h&]entries](j?"iommu_vevent_arm_smmuv3 (C struct)c.iommu_vevent_arm_smmuv3hNtauh1j2hjhhhj$hNubjD)}(hhh](jI)}(hiommu_vevent_arm_smmuv3h]jO)}(hstruct iommu_vevent_arm_smmuv3h](jU)}(hjXh]hstruct}(hjghhhNhNubah}(h]h ]jaah"]h$]h&]uh1jThjghhhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMubjg)}(h h]h }(hjghhhNhNubah}(h]h ]jsah"]h$]h&]uh1jfhjghhhjghMubjx)}(hiommu_vevent_arm_smmuv3h]j~)}(hjgh]hiommu_vevent_arm_smmuv3}(hjghhhNhNubah}(h]h ]jah"]h$]h&]uh1j}hjgubah}(h]h ](jjeh"]h$]h&]hhuh1jwhjghhhjghMubeh}(h]h ]h"]h$]h&]hhjuh1jNjjhjghhhjghMubah}(h]jgah ](jjeh"]h$]h&]jj)jhuh1jHhjghMhjghhubj)}(hhh]h)}(h8ARM SMMUv3 Virtual Event (IOMMU_VEVENTQ_TYPE_ARM_SMMUV3)h]h8ARM SMMUv3 Virtual Event (IOMMU_VEVENTQ_TYPE_ARM_SMMUV3)}(hjhhhhNhNubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMhjhhhubah}(h]h ]h"]h$]h&]uh1jhjghhhjghMubeh}(h]h ](jstructeh"]h$]h&]jjjjhjjhjjjuh1jChhhjhj$hNubj)}(hX**Definition**:: struct iommu_vevent_arm_smmuv3 { __aligned_le64 evt[4]; }; **Members** ``evt`` 256-bit ARM SMMUv3 Event record, little-endian. Reported event records: (Refer to "7.3 Event records" in SMMUv3 HW Spec) - 0x04 C_BAD_STE - 0x06 F_STREAM_DISABLED - 0x08 C_BAD_SUBSTREAMID - 0x0a C_BAD_CD - 0x10 F_TRANSLATION - 0x11 F_ADDR_SIZE - 0x12 F_ACCESS - 0x13 F_PERMISSIONh](h)}(h**Definition**::h](j*)}(h**Definition**h]h Definition}(hj'hhhhNhNubah}(h]h ]h"]h$]h&]uh1j)hj#hubh:}(hj#hhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMhjhubj)}(h>struct iommu_vevent_arm_smmuv3 { __aligned_le64 evt[4]; };h]h>struct iommu_vevent_arm_smmuv3 { __aligned_le64 evt[4]; };}hj@hsbah}(h]h ]h"]h$]h&]hhuh1jhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMhjhubh)}(h **Members**h]j*)}(hjQhh]hMembers}(hjShhhhNhNubah}(h]h ]h"]h$]h&]uh1j)hjOhubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMhjhubj )}(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- )}(hjphh]hevt}(hjrhhhhNhNubah}(h]h ]h"]h$]h&]uh1j, hjnhubah}(h]h ]h"]h$]h&]uh1j& hc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMhjjhubjC )}(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}(hjhhhhNhNubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMhjhubah}(h]h ]h"]h$]h&]uh1jB hjjhubeh}(h]h ]h"]h$]h&]uh1j hjhhMhjghubah}(h]h ]h"]h$]h&]uh1j hjhubeh}(h]h ] kernelindentah"]h$]h&]uh1jhjhhhj$hNubh)}(h**Description**h]j*)}(hjhh]h Description}(hjhhhhNhNubah}(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.hhMhjhhubh)}(hStreamID field reports a virtual device ID. To receive a virtual event for a device, a vDEVICE must be allocated via IOMMU_VDEVICE_ALLOC.h]hStreamID field reports a virtual device ID. To receive a virtual event for a device, a vDEVICE must be allocated via IOMMU_VDEVICE_ALLOC.}(hjhhhhNhNubah}(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_vevent_tegra241_cmdqv (C struct)c.iommu_vevent_tegra241_cmdqvhNtauh1j2hjhhhj$hNubjD)}(hhh](jI)}(hiommu_vevent_tegra241_cmdqvh]jO)}(h"struct iommu_vevent_tegra241_cmdqvh](jU)}(hjXh]hstruct}(hjhhhhNhNubah}(h]h ]jaah"]h$]h&]uh1jThjhhhhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMubjg)}(h h]h }(hjhhhhNhNubah}(h]h ]jsah"]h$]h&]uh1jfhjhhhhjhhMubjx)}(hiommu_vevent_tegra241_cmdqvh]j~)}(hjhh]hiommu_vevent_tegra241_cmdqv}(hjihhhNhNubah}(h]h ]jah"]h$]h&]uh1j}hj iubah}(h]h ](jjeh"]h$]h&]hhuh1jwhjhhhhjhhMubeh}(h]h ]h"]h$]h&]hhjuh1jNjjhjhhhhjhhMubah}(h]jhah ](jjeh"]h$]h&]jj)jhuh1jHhjhhMhjhhhubj)}(hhh]h)}(h6Tegra241 CMDQV IRQ (IOMMU_VEVENTQ_TYPE_TEGRA241_CMDQV)h]h6Tegra241 CMDQV IRQ (IOMMU_VEVENTQ_TYPE_TEGRA241_CMDQV)}(hj3ihhhNhNubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMhj0ihhubah}(h]h ]h"]h$]h&]uh1jhjhhhhjhhMubeh}(h]h ](jstructeh"]h$]h&]jjjjKijjKijjjuh1jChhhjhj$hNubj)}(h**Definition**:: struct iommu_vevent_tegra241_cmdqv { __aligned_le64 lvcmdq_err_map[2]; }; **Members** ``lvcmdq_err_map`` 128-bit logical vcmdq error map, little-endian. (Refer to register LVCMDQ_ERR_MAPs per VINTF )h](h)}(h**Definition**::h](j*)}(h**Definition**h]h Definition}(hjWihhhNhNubah}(h]h ]h"]h$]h&]uh1j)hjSiubh:}(hjSihhhNhNubeh}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMhjOiubj)}(hMstruct iommu_vevent_tegra241_cmdqv { __aligned_le64 lvcmdq_err_map[2]; };h]hMstruct iommu_vevent_tegra241_cmdqv { __aligned_le64 lvcmdq_err_map[2]; };}hjpisbah}(h]h ]h"]h$]h&]hhuh1jhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMhjOiubh)}(h **Members**h]j*)}(hjih]hMembers}(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.hhMhjOiubj )}(hhh]j! )}(hq``lvcmdq_err_map`` 128-bit logical vcmdq error map, little-endian. (Refer to register LVCMDQ_ERR_MAPs per VINTF )h](j' )}(h``lvcmdq_err_map``h]j- )}(hjih]hlvcmdq_err_map}(hjihhhNhNubah}(h]h ]h"]h$]h&]uh1j, hjiubah}(h]h ]h"]h$]h&]uh1j& hc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMhjiubjC )}(hhh]h)}(h^128-bit logical vcmdq error map, little-endian. (Refer to register LVCMDQ_ERR_MAPs per VINTF )h]h^128-bit logical vcmdq error map, little-endian. (Refer to register LVCMDQ_ERR_MAPs per VINTF )}(hjihhhNhNubah}(h]h ]h"]h$]h&]uh1hhjihMhjiubah}(h]h ]h"]h$]h&]uh1jB hjiubeh}(h]h ]h"]h$]h&]uh1j hjihMhjiubah}(h]h ]h"]h$]h&]uh1j hjOiubeh}(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.hhMhjhhubh)}(hThe 128-bit register value from HW exclusively reflect the error bits for a Virtual Interface represented by a vIOMMU object. Read and report directly.h]hThe 128-bit register value from HW exclusively reflect the error bits for a Virtual Interface represented by a vIOMMU object. Read and report directly.}(hjihhhNhNubah}(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_veventq_alloc (C struct)c.iommu_veventq_allochNtauh1j2hjhhhj$hNubjD)}(hhh](jI)}(hiommu_veventq_alloch]jO)}(hstruct iommu_veventq_alloch](jU)}(hjXh]hstruct}(hj jhhhNhNubah}(h]h ]jaah"]h$]h&]uh1jThjjhhhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMubjg)}(h h]h }(hj.jhhhNhNubah}(h]h ]jsah"]h$]h&]uh1jfhjjhhhj-jhMubjx)}(hiommu_veventq_alloch]j~)}(hjjh]hiommu_veventq_alloc}(hj@jhhhNhNubah}(h]h ]jah"]h$]h&]uh1j}hjlhhhNhNubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMhj;lubah}(h]h ]h"]h$]h&]uh1jB hjlubeh}(h]h ]h"]h$]h&]uh1j hj:lhMhjjubj! )}(h``__reserved`` Must be 0h](j' )}(h``__reserved``h]j- )}(hj_lh]h __reserved}(hjalhhhNhNubah}(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.hhMhjYlubjC )}(hhh]h)}(h Must be 0h]h Must be 0}(hjxlhhhNhNubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMhjulubah}(h]h ]h"]h$]h&]uh1jB hjYlubeh}(h]h ]h"]h$]h&]uh1j hjtlhMhjjubeh}(h]h ]h"]h$]h&]uh1j hj~jubeh}(h]h ] kernelindentah"]h$]h&]uh1jhjhhhj$hNubh)}(h**Description**h]j*)}(hjlh]h Description}(hjlhhhNhNubah}(h]h ]h"]h$]h&]uh1j)hjlubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMhjhhubh)}(hXkExplicitly allocate a virtual event queue interface for a vIOMMU. A vIOMMU can have multiple FDs for different types, but is confined to one per **type**. User space should open the **out_veventq_fd** to read vEVENTs out of a vEVENTQ, if there are vEVENTs available. A vEVENTQ will lose events due to overflow, if the number of the vEVENTs hits **veventq_depth**.h](hExplicitly allocate a virtual event queue interface for a vIOMMU. A vIOMMU can have multiple FDs for different types, but is confined to one per }(hjlhhhNhNubj*)}(h**type**h]htype}(hjlhhhNhNubah}(h]h ]h"]h$]h&]uh1j)hjlubh. User space should open the }(hjlhhhNhNubj*)}(h**out_veventq_fd**h]hout_veventq_fd}(hjlhhhNhNubah}(h]h ]h"]h$]h&]uh1j)hjlubh to read vEVENTs out of a vEVENTQ, if there are vEVENTs available. A vEVENTQ will lose events due to overflow, if the number of the vEVENTs hits }(hjlhhhNhNubj*)}(h**veventq_depth**h]h veventq_depth}(hjlhhhNhNubah}(h]h ]h"]h$]h&]uh1j)hjlubh.}(hjlhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMhjhhubh)}(h~Each vEVENT in a vEVENTQ encloses a struct iommufd_vevent_header followed by a type-specific data structure, in a normal case:h]h~Each vEVENT in a vEVENTQ encloses a struct iommufd_vevent_header followed by a type-specific data structure, in a normal case:}(hjlhhhNhNubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMhjhhubjc)}(hhh]jc)}(hhh](jc)}(hhh]h}(h]h ]h"]h$]h&]colwidthKuh1jchjmubjc)}(hhh]h}(h]h ]h"]h$]h&]colwidthK uh1jchjmubjc)}(hhh]h}(h]h ]h"]h$]h&]colwidthKuh1jchjmubjc)}(hhh]h}(h]h ]h"]h$]h&]colwidthK uh1jchjmubjc)}(hhh]h}(h]h ]h"]h$]h&]colwidthKuh1jchjmubjc)}(hhh]h}(h]h ]h"]h$]h&]colwidthKuh1jchjmubjc)}(hhh]h}(h]h ]h"]h$]h&]colwidthK uh1jchjmubjc)}(hhh]h}(h]h ]h"]h$]h&]colwidthKuh1jchjmubjc)}(hhh]h}(h]h ]h"]h$]h&]colwidthKuh1jchjmubjc)}(hhh]jd)}(hhh](jd)}(hhh]h}(h]h ]h"]h$]h&]uh1jdhjomubjd)}(hhh]h)}(hheader0h]hheader0}(hj~mhhhNhNubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMhj{mubah}(h]h ]h"]h$]h&]uh1jdhjomubjd)}(hhh]h)}(hdata0h]hdata0}(hjmhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjmhMhjmubah}(h]h ]h"]h$]h&]uh1jdhjomubjd)}(hhh]h)}(hheader1h]hheader1}(hjmhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjmhMhjmubah}(h]h ]h"]h$]h&]uh1jdhjomubjd)}(hhh]h)}(hdata1h]hdata1}(hjmhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjmhMhjmubah}(h]h ]h"]h$]h&]uh1jdhjomubjd)}(hhh]h)}(h...h]h...}(hjmhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjmhMhjmubah}(h]h ]h"]h$]h&]uh1jdhjomubjd)}(hhh]h)}(hheaderNh]hheaderN}(hjmhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjmhMhjmubah}(h]h ]h"]h$]h&]uh1jdhjomubjd)}(hhh]h)}(hdataNh]hdataN}(hj nhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjmhMhjnubah}(h]h ]h"]h$]h&]uh1jdhjomubjd)}(hhh]h}(h]h ]h"]h$]h&]uh1jdhjomubeh}(h]h ]h"]h$]h&]uh1jchjlmubah}(h]h ]h"]h$]h&]uh1jchjmubeh}(h]h ]h"]h$]h&]colsK uh1jchj mubah}(h]h ]h"]h$]h&]uh1jchjhhhj$hNubh)}(hiunless a tailing IOMMU_VEVENTQ_FLAG_LOST_EVENTS header is logged (refer to struct iommufd_vevent_header).h]hiunless a tailing IOMMU_VEVENTQ_FLAG_LOST_EVENTS header is logged (refer to struct iommufd_vevent_header).}(hj?nhhhNhNubah}(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_queue_type (C enum)c.iommu_hw_queue_typehNtauh1j2hjhhhj$hNubjD)}(hhh](jI)}(hiommu_hw_queue_typeh]jO)}(henum iommu_hw_queue_typeh](jU)}(hjh]henum}(hjgnhhhNhNubah}(h]h ]jaah"]h$]h&]uh1jThjcnhhhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMubjg)}(h h]h }(hjunhhhNhNubah}(h]h ]jsah"]h$]h&]uh1jfhjcnhhhjtnhMubjx)}(hiommu_hw_queue_typeh]j~)}(hjanh]hiommu_hw_queue_type}(hjnhhhNhNubah}(h]h ]jah"]h$]h&]uh1j}hjnubah}(h]h ](jjeh"]h$]h&]hhuh1jwhjcnhhhjtnhMubeh}(h]h ]h"]h$]h&]hhjuh1jNjjhj_nhhhjtnhMubah}(h]jZnah ](jjeh"]h$]h&]jj)jhuh1jHhjtnhMhj\nhhubj)}(hhh]h)}(h HW Queue Typeh]h HW Queue Type}(hjnhhhNhNubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMhjnhhubah}(h]h ]h"]h$]h&]uh1jhj\nhhhjtnhMubeh}(h]h ](jenumeh"]h$]h&]jjjjnjjnjjjuh1jChhhjhj$hNubj)}(h**Constants** ``IOMMU_HW_QUEUE_TYPE_DEFAULT`` Reserved for future use ``IOMMU_HW_QUEUE_TYPE_TEGRA241_CMDQV`` NVIDIA Tegra241 CMDQV (extension for ARM SMMUv3) Virtual Command Queue (VCMDQ)h](h)}(h **Constants**h]j*)}(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! )}(h8``IOMMU_HW_QUEUE_TYPE_DEFAULT`` Reserved for future use h](j' )}(h``IOMMU_HW_QUEUE_TYPE_DEFAULT``h]j- )}(hjnh]hIOMMU_HW_QUEUE_TYPE_DEFAULT}(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)}(hReserved for future useh]hReserved for future use}(hjohhhNhNubah}(h]h ]h"]h$]h&]uh1hhjnhMhjoubah}(h]h ]h"]h$]h&]uh1jB hjnubeh}(h]h ]h"]h$]h&]uh1j hjnhMhjnubj! )}(hu``IOMMU_HW_QUEUE_TYPE_TEGRA241_CMDQV`` NVIDIA Tegra241 CMDQV (extension for ARM SMMUv3) Virtual Command Queue (VCMDQ)h](j' )}(h&``IOMMU_HW_QUEUE_TYPE_TEGRA241_CMDQV``h]j- )}(hj#oh]h"IOMMU_HW_QUEUE_TYPE_TEGRA241_CMDQV}(hj%ohhhNhNubah}(h]h ]h"]h$]h&]uh1j, hj!oubah}(h]h ]h"]h$]h&]uh1j& hc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMhjoubjC )}(hhh]h)}(hNNVIDIA Tegra241 CMDQV (extension for ARM SMMUv3) Virtual Command Queue (VCMDQ)h]hNNVIDIA Tegra241 CMDQV (extension for ARM SMMUv3) Virtual Command Queue (VCMDQ)}(hj``viommu_id`` Virtual IOMMU ID to associate the HW queue with h](j' )}(h ``viommu_id``h]j- )}(hjph]h viommu_id}(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)}(h/Virtual IOMMU ID to associate the HW queue withh]h/Virtual IOMMU ID to associate the HW queue with}(hjphhhNhNubah}(h]h ]h"]h$]h&]uh1hhjphMhjpubah}(h]h ]h"]h$]h&]uh1jB hjpubeh}(h]h ]h"]h$]h&]uh1j hjphMhj"pubj! )}(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 hjphMhj"pubj! )}(hV``index`` The logical index to the HW queue per virtual IOMMU for a multi-queue model h](j' )}(h ``index``h]j- )}(hjqh]hindex}(hjqhhhNhNubah}(h]h ]h"]h$]h&]uh1j, hj qubah}(h]h ]h"]h$]h&]uh1j& hc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMhj qubjC )}(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}(hj(qhhhNhNubah}(h]h ]h"]h$]h&]uh1hhc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMhj%qubah}(h]h ]h"]h$]h&]uh1jB hj qubeh}(h]h ]h"]h$]h&]uh1j hj$qhMhj"pubj! )}(h/``out_hw_queue_id`` The ID of the new HW queue h](j' )}(h``out_hw_queue_id``h]j- )}(hjIqh]hout_hw_queue_id}(hjKqhhhNhNubah}(h]h ]h"]h$]h&]uh1j, hjGqubah}(h]h ]h"]h$]h&]uh1j& hc/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.hhMhjCqubjC )}(hhh]h)}(hThe ID of the new HW queueh]hThe ID of the new HW queue}(hjbqhhhNhNubah}(h]h ]h"]h$]h&]uh1hhj^qhMhj_qubah}(h]h ]h"]h$]h&]uh1jB hjCqubeh}(h]h ]h"]h$]h&]uh1j hj^qhMhj"pubj! )}(h]``nesting_parent_iova`` Base address of the queue memory in the guest physical address space h](j' )}(h``nesting_parent_iova``h]j- )}(hjqh]hnesting_parent_iova}(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.hhMhj|qubjC )}(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}(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 hj|qubeh}(h]h ]h"]h$]h&]uh1j hjqhMhj"pubj! )}(h%``length`` Length of the queue memoryh](j' )}(h ``length``h]j- )}(hjqh]hlength}(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)}(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 hjqubeh}(h]h ]h"]h$]h&]uh1j hjqhMhj"pubeh}(h]h ]h"]h$]h&]uh1j hjoubeh}(h]h ] kernelindentah"]h$]h&]uh1jhjhhhj$hNubh)}(h**Description**h]j*)}(hjqh]h Description}(hjrhhhNhNubah}(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 }(hjrhhhNhNubj*)}(h**nesting_parent_iova**h]hnesting_parent_iova}(hjrhhhNhNubah}(h]h ]h"]h$]h&]uh1j)hjrubh and }(hjrhhhNhNubj*)}(h **length**h]hlength}(hj/rhhhNhNubah}(h]h ]h"]h$]h&]uh1j)hjrubh.}(hjrhhhNhNubeh}(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 }(hjHrhhhNhNubj*)}(h **index**h]hindex}(hjPrhhhNhNubah}(h]h ]h"]h$]h&]uh1j)hjHrubh+ per type to separate each allocation, e.g:}(hjHrhhhNhNubeh}(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, ...}hjirsbah}(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}(hjrhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjrhhhhhMRubh)}(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.}(hjrhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMThjrhhubj3)}(hhh]h}(h]h ]h"]h$]h&]entries](j? iommufd_device_bind (C function)c.iommufd_device_bindhNtauh1j2hjrhhhNhNubjD)}(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}(hjrhhhNhNubah}(h]h ]jaah"]h$]h&]uh1jThjrhhhe/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:345: ./drivers/iommu/iommufd/device.chKubjg)}(h h]h }(hjrhhhNhNubah}(h]h ]jsah"]h$]h&]uh1jfhjrhhhjrhKubh)}(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_bindasbuh1hhjrhhhjrhKubjg)}(h h]h }(hjshhhNhNubah}(h]h ]jsah"]h$]h&]uh1jfhjrhhhjrhKubhdesc_sig_punctuation)}(hjh]h*}(hjshhhNhNubah}(h]h ]pah"]h$]h&]uh1jshjrhhhjrhKubjx)}(hiommufd_device_bindh]j~)}(hjrh]hiommufd_device_bind}(hj"shhhNhNubah}(h]h ]jah"]h$]h&]uh1j}hjsubah}(h]h ](jjeh"]h$]h&]hhuh1jwhjrhhhjrhKubhdesc_parameterlist)}(h7(struct iommufd_ctx *ictx, struct device *dev, u32 *id)h](hdesc_parameter)}(hstruct iommufd_ctx *ictxh](jU)}(hjXh]hstruct}(hjAshhhNhNubah}(h]h ]jaah"]h$]h&]uh1jThj=subjg)}(h h]h }(hjNshhhNhNubah}(h]h ]jsah"]h$]h&]uh1jfhj=subh)}(hhh]j~)}(h iommufd_ctxh]h iommufd_ctx}(hj_shhhNhNubah}(h]h ]jah"]h$]h&]uh1j}hj\subah}(h]h ]h"]h$]h&] refdomainjreftypejr reftargetjasmodnameN classnameNjrjr)}jr]jrc.iommufd_device_bindasbuh1hhj=subjg)}(h h]h }(hj}shhhNhNubah}(h]h ]jsah"]h$]h&]uh1jfhj=subjs)}(hjh]h*}(hjshhhNhNubah}(h]h ]jsah"]h$]h&]uh1jshj=subj~)}(hictxh]hictx}(hjshhhNhNubah}(h]h ]jah"]h$]h&]uh1j}hj=subeh}(h]h ]h"]h$]h&]noemphhhuh1j;shj7subjwhhhNhNubah}(h]h ]h"]h$]h&]uh1j)hj:wubah}(h]h ]h"]h$]h&]uh1hhe/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:345: ./drivers/iommu/iommufd/device.chM+hj6wubj )}(hhh](j! )}(h5``struct iommufd_ctx *ictx`` iommufd file descriptor h](j' )}(h``struct iommufd_ctx *ictx``h]j- )}(hj[wh]hstruct iommufd_ctx *ictx}(hj]whhhNhNubah}(h]h ]h"]h$]h&]uh1j, hjYwubah}(h]h ]h"]h$]h&]uh1j& he/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:345: ./drivers/iommu/iommufd/device.chM)hjUwubjC )}(hhh]h)}(hiommufd file descriptorh]hiommufd file descriptor}(hjtwhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjpwhM)hjqwubah}(h]h ]h"]h$]h&]uh1jB hjUwubeh}(h]h ]h"]h$]h&]uh1j hjpwhM)hjRwubj! )}(hG``struct iommu_group *group`` Pointer to a physical iommu_group struct h](j' )}(h``struct iommu_group *group``h]j- )}(hjwh]hstruct iommu_group *group}(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*hjwubjC )}(hhh]h)}(h(Pointer to a physical iommu_group structh]h(Pointer to a physical iommu_group struct}(hjwhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjwhM*hjwubah}(h]h ]h"]h$]h&]uh1jB hjwubeh}(h]h ]h"]h$]h&]uh1j hjwhM*hjRwubeh}(h]h ]h"]h$]h&]uh1j hj6wubh)}(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,hj6wubh)}(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+hj6wubeh}(h]h ] kernelindentah"]h$]h&]uh1jhjrhhhNhNubj3)}(hhh]h}(h]h ]h"]h$]h&]entries](j?"iommufd_device_unbind (C function)c.iommufd_device_unbindhNtauh1j2hjrhhhNhNubjD)}(hhh](jI)}(h8void iommufd_device_unbind (struct iommufd_device *idev)h]jO)}(h7void iommufd_device_unbind(struct iommufd_device *idev)h](ju)}(hvoidh]hvoid}(hjxhhhNhNubah}(h]h ]juah"]h$]h&]uh1juhjxhhhe/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:345: ./drivers/iommu/iommufd/device.chMFubjg)}(h h]h }(hj#xhhhNhNubah}(h]h ]jsah"]h$]h&]uh1jfhjxhhhj"xhMFubjx)}(hiommufd_device_unbindh]j~)}(hiommufd_device_unbindh]hiommufd_device_unbind}(hj5xhhhNhNubah}(h]h ]jah"]h$]h&]uh1j}hj1xubah}(h]h ](jjeh"]h$]h&]hhuh1jwhjxhhhj"xhMFubj6s)}(h(struct iommufd_device *idev)h]jubj )}(hhh](j! )}(h1``struct iommufd_device *idev`` device to detach h](j' )}(h``struct iommufd_device *idev``h]j- )}(hjch]hstruct iommufd_device *idev}(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)}(hdevice to detachh]hdevice to detach}(hj|hhhNhNubah}(h]h ]h"]h$]h&]uh1hhjxhMhjyubah}(h]h ]h"]h$]h&]uh1jB hj]ubeh}(h]h ]h"]h$]h&]uh1j hjxhMhjZubj! )}(h#``ioasid_t pasid`` pasid to detach h](j' )}(h``ioasid_t pasid``h]j- )}(hjh]hioasid_t pasid}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j, hjubah}(h]h ]h"]h$]h&]uh1j& he/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:345: ./drivers/iommu/iommufd/device.chMhjubjC )}(hhh]h)}(hpasid to detachh]hpasid to detach}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhMhjubah}(h]h ]h"]h$]h&]uh1jB hjubeh}(h]h ]h"]h$]h&]uh1j hjhMhjZubeh}(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.chMhj>ubh)}(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.chMhj>ubeh}(h]h ] kernelindentah"]h$]h&]uh1jhjrhhhNhNubj3)}(hhh]h}(h]h ]h"]h$]h&]entries](j?"iommufd_access_create (C function)c.iommufd_access_createhNtauh1j2hjrhhhNhNubjD)}(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}(hj.hhhNhNubah}(h]h ]jaah"]h$]h&]uh1jThj*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;hMubh)}(hhh]j~)}(hiommufd_accessh]hiommufd_access}(hjMhhhNhNubah}(h]h ]jah"]h$]h&]uh1j}hjJubah}(h]h ]h"]h$]h&] refdomainjreftypejr reftargetjOmodnameN classnameNjrjr)}jr]jr)}jriommufd_access_createsbc.iommufd_access_createasbuh1hhj*hhhj;hMubjg)}(h h]h }(hjnhhhNhNubah}(h]h ]jsah"]h$]h&]uh1jfhj*hhhj;hMubjs)}(hjh]h*}(hj|hhhNhNubah}(h]h ]jsah"]h$]h&]uh1jshj*hhhj;hMubjx)}(hiommufd_access_createh]j~)}(hjkh]hiommufd_access_create}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1j}hjubah}(h]h ](jjeh"]h$]h&]hhuh1jwhj*hhhj;hMubj6s)}(hU(struct iommufd_ctx *ictx, const struct iommufd_access_ops *ops, void *data, u32 *id)h](j= 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*)}(hj/h]h Parameters}(hj1hhhNhNubah}(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.chMrhj)ubj )}(hhh](j! )}(h8``struct iommufd_access *access`` IOAS access to act on h](j' )}(h!``struct iommufd_access *access``h]j- )}(hjNh]hstruct iommufd_access *access}(hjPhhhNhNubah}(h]h ]h"]h$]h&]uh1j, hjLubah}(h]h ]h"]h$]h&]uh1j& he/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:345: ./drivers/iommu/iommufd/device.chMohjHubjC )}(hhh]h)}(hIOAS access to act onh]hIOAS access to act on}(hjghhhNhNubah}(h]h ]h"]h$]h&]uh1hhjchMohjdubah}(h]h ]h"]h$]h&]uh1jB hjHubeh}(h]h ]h"]h$]h&]uh1j hjchMohjEubj! )}(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.chMphjubjC )}(hhh]h)}(h Starting IOVAh]h Starting IOVA}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhMphjubah}(h]h ]h"]h$]h&]uh1jB hjubeh}(h]h ]h"]h$]h&]uh1j hjhMphjEubj! )}(h3``unsigned long length`` Number of bytes to access h](j' )}(h``unsigned long length``h]j- )}(hjh]hunsigned long length}(hj‹hhhNhNubah}(h]h ]h"]h$]h&]uh1j, hjubah}(h]h ]h"]h$]h&]uh1j& he/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:345: ./drivers/iommu/iommufd/device.chMqhjubjC )}(hhh]h)}(hNumber of bytes to accessh]hNumber of bytes to access}(hjًhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjՋhMqhj֋ubah}(h]h ]h"]h$]h&]uh1jB hjubeh}(h]h ]h"]h$]h&]uh1j hjՋhMqhjEubj! )}(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.chMrhjubjC )}(hhh]h)}(hOutput page listh]hOutput page list}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhMrhjubah}(h]h ]h"]h$]h&]uh1jB hjubeh}(h]h ]h"]h$]h&]uh1j hjhMrhjEubj! )}(h2``unsigned int flags`` IOPMMUFD_ACCESS_RW_* flags h](j' )}(h``unsigned int flags``h]j- )}(hj2h]hunsigned int flags}(hj4hhhNhNubah}(h]h ]h"]h$]h&]uh1j, hj0ubah}(h]h ]h"]h$]h&]uh1j& he/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:345: ./drivers/iommu/iommufd/device.chMshj,ubjC )}(hhh]h)}(hIOPMMUFD_ACCESS_RW_* flagsh]hIOPMMUFD_ACCESS_RW_* flags}(hjKhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjGhMshjHubah}(h]h ]h"]h$]h&]uh1jB hj,ubeh}(h]h ]h"]h$]h&]uh1j hjGhMshjEubeh}(h]h ]h"]h$]h&]uh1j hj)ubh)}(h**Description**h]j*)}(hjmh]h Description}(hjohhhNhNubah}(h]h ]h"]h$]h&]uh1j)hjkubah}(h]h ]h"]h$]h&]uh1hhe/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:345: ./drivers/iommu/iommufd/device.chMuhj)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 }(hjhhhNhNubj*)}(h **length**h]hlength}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j)hjubhs bytes starting at iova and returns the struct page * pointers. These can be kmap’d by the caller for CPU access.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhe/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:345: ./drivers/iommu/iommufd/device.chMthj)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.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhe/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:345: ./drivers/iommu/iommufd/device.chMwhj)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.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhe/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:345: ./drivers/iommu/iommufd/device.chMzhj)ubeh}(h]h ] kernelindentah"]h$]h&]uh1jhjrhhhNhNubj3)}(hhh]h}(h]h ]h"]h$]h&]entries](j?iommufd_access_rw (C function)c.iommufd_access_rwhNtauh1j2hjrhhhNhNubjD)}(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&]uh1juhjތhhhe/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:345: ./drivers/iommu/iommufd/device.chMubjg)}(h h]h }(hjhhhNhNubah}(h]h ]jsah"]h$]h&]uh1jfhjތhhhjhMubjx)}(hiommufd_access_rwh]j~)}(hiommufd_access_rwh]hiommufd_access_rw}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1j}hjubah}(h]h ](jjeh"]h$]h&]hhuh1jwhjތhhhjhMubj6s)}(hb(struct iommufd_access *access, unsigned long iova, void *data, size_t length, unsigned int flags)h](jstruct iommufd_ctx * iommufd_ctx_from_file (struct file *file)h]jO)}(hKjCKjuNjzNjOjOjQjQjSjSjTjUj@VjEVjXj XjiYjnYjZjZj]j]j`j`jyaj~ajVbj[bjefjjfjgjgjhjhjjjjjZnj_njoojtojԖjrjrjrjujujxj xjyjyjL|jQ|j jj!j&jjj;j@jЈjՈjՌjڌjfjkjjjjj$j)j̖jsjjږu 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.}(hjGhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjDubah}(h]h ]h"]h$]h&]levelKtypeINFOlineMpsourcec/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.huh1jBhjcdubjC)}(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.}(hjdhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjaubah}(h]h ]h"]h$]h&]levelKtypej]lineMxsourcec/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.huh1jBhjeubjC)}(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&]uh1hhj}ubah}(h]h ]h"]h$]h&]levelKtypej]lineMxsourcej|uh1jBhjueubjC)}(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&]levelKtypej]lineMsourcec/var/lib/git/docbuild/linux/Documentation/userspace-api/iommufd:335: ./include/uapi/linux/iommufd.huh1jBhjmubetransform_messages]jC)}(hhh]h)}(hhh]h:Hyperlink target "general-ioctl-format" is not referenced.}hjsbah}(h]h ]h"]h$]h&]uh1hhjubah}(h]h ]h"]h$]h&]levelKtypej]sourcej$lineKuh1jBuba transformerN include_log] decorationNhhub.