€•ñ©Œsphinx.addnodes”Œdocument”“”)”}”(Œ rawsource”Œ”Œchildren”]”(Œ translations”Œ LanguagesNode”“”)”}”(hhh]”(hŒ pending_xref”“”)”}”(hhh]”Œdocutils.nodes”ŒText”“”ŒChinese (Simplified)”…””}”Œparent”hsbaŒ attributes”}”(Œids”]”Œclasses”]”Œnames”]”Œdupnames”]”Œbackrefs”]”Œ refdomain”Œstd”Œreftype”Œdoc”Œ reftarget”Œ /translations/zh_CN/arch/x86/sva”Œmodname”NŒ classname”NŒ refexplicit”ˆuŒtagname”hhh ubh)”}”(hhh]”hŒChinese (Traditional)”…””}”hh2sbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ /translations/zh_TW/arch/x86/sva”Œmodname”NŒ classname”NŒ refexplicit”ˆuh1hhh ubh)”}”(hhh]”hŒItalian”…””}”hhFsbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ /translations/it_IT/arch/x86/sva”Œmodname”NŒ classname”NŒ refexplicit”ˆuh1hhh ubh)”}”(hhh]”hŒJapanese”…””}”hhZsbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ /translations/ja_JP/arch/x86/sva”Œmodname”NŒ classname”NŒ refexplicit”ˆuh1hhh ubh)”}”(hhh]”hŒKorean”…””}”hhnsbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ /translations/ko_KR/arch/x86/sva”Œmodname”NŒ classname”NŒ refexplicit”ˆuh1hhh ubh)”}”(hhh]”hŒPortuguese (Brazilian)”…””}”hh‚sbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ /translations/pt_BR/arch/x86/sva”Œmodname”NŒ classname”NŒ refexplicit”ˆuh1hhh ubh)”}”(hhh]”hŒSpanish”…””}”hh–sbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ /translations/sp_SP/arch/x86/sva”Œmodname”NŒ classname”NŒ refexplicit”ˆuh1hhh ubeh}”(h]”h ]”h"]”h$]”h&]”Œcurrent_language”ŒEnglish”uh1h hhŒ _document”hŒsource”NŒline”NubhŒcomment”“”)”}”(hŒ SPDX-License-Identifier: GPL-2.0”h]”hŒ SPDX-License-Identifier: GPL-2.0”…””}”hh·sbah}”(h]”h ]”h"]”h$]”h&]”Œ xml:space”Œpreserve”uh1hµhhh²hh³Œ:/var/lib/git/docbuild/linux/Documentation/arch/x86/sva.rst”h´KubhŒsection”“”)”}”(hhh]”(hŒtitle”“”)”}”(hŒ+Shared Virtual Addressing (SVA) with ENQCMD”h]”hŒ+Shared Virtual Addressing (SVA) with ENQCMD”…””}”(hhÏh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÍhhÊh²hh³hÇh´KubhÉ)”}”(hhh]”(hÎ)”}”(hŒ Background”h]”hŒ Background”…””}”(hhàh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÍhhÝh²hh³hÇh´KubhŒ paragraph”“”)”}”(hŒêShared Virtual Addressing (SVA) allows the processor and device to use the same virtual addresses avoiding the need for software to translate virtual addresses to physical addresses. SVA is what PCIe calls Shared Virtual Memory (SVM).”h]”hŒêShared Virtual Addressing (SVA) allows the processor and device to use the same virtual addresses avoiding the need for software to translate virtual addresses to physical addresses. SVA is what PCIe calls Shared Virtual Memory (SVM).”…””}”(hhðh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hîh³hÇh´K hhÝh²hubhï)”}”(hX‡In addition to the convenience of using application virtual addresses by the device, it also doesn't require pinning pages for DMA. PCIe Address Translation Services (ATS) along with Page Request Interface (PRI) allow devices to function much the same way as the CPU handling application page-faults. For more information please refer to the PCIe specification Chapter 10: ATS Specification.”h]”hX‰In addition to the convenience of using application virtual addresses by the device, it also doesn’t require pinning pages for DMA. PCIe Address Translation Services (ATS) along with Page Request Interface (PRI) allow devices to function much the same way as the CPU handling application page-faults. For more information please refer to the PCIe specification Chapter 10: ATS Specification.”…””}”(hhþh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hîh³hÇh´KhhÝh²hubhï)”}”(hXUse of SVA requires IOMMU support in the platform. IOMMU is also required to support the PCIe features ATS and PRI. ATS allows devices to cache translations for virtual addresses. The IOMMU driver uses the mmu_notifier() support to keep the device TLB cache and the CPU cache in sync. When an ATS lookup fails for a virtual address, the device should use the PRI in order to request the virtual address to be paged into the CPU page tables. The device must use ATS again in order to fetch the translation before use.”h]”hXUse of SVA requires IOMMU support in the platform. IOMMU is also required to support the PCIe features ATS and PRI. ATS allows devices to cache translations for virtual addresses. The IOMMU driver uses the mmu_notifier() support to keep the device TLB cache and the CPU cache in sync. When an ATS lookup fails for a virtual address, the device should use the PRI in order to request the virtual address to be paged into the CPU page tables. The device must use ATS again in order to fetch the translation before use.”…””}”(hj h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hîh³hÇh´KhhÝh²hubeh}”(h]”Œ background”ah ]”h"]”Œ background”ah$]”h&]”uh1hÈhhÊh²hh³hÇh´KubhÉ)”}”(hhh]”(hÎ)”}”(hŒShared Hardware Workqueues”h]”hŒShared Hardware Workqueues”…””}”(hj%h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÍhj"h²hh³hÇh´K ubhï)”}”(hXìUnlike Single Root I/O Virtualization (SR-IOV), Scalable IOV (SIOV) permits the use of Shared Work Queues (SWQ) by both applications and Virtual Machines (VM's). This allows better hardware utilization vs. hard partitioning resources that could result in under utilization. In order to allow the hardware to distinguish the context for which work is being executed in the hardware by SWQ interface, SIOV uses Process Address Space ID (PASID), which is a 20-bit number defined by the PCIe SIG.”h]”hXîUnlike Single Root I/O Virtualization (SR-IOV), Scalable IOV (SIOV) permits the use of Shared Work Queues (SWQ) by both applications and Virtual Machines (VM’s). This allows better hardware utilization vs. hard partitioning resources that could result in under utilization. In order to allow the hardware to distinguish the context for which work is being executed in the hardware by SWQ interface, SIOV uses Process Address Space ID (PASID), which is a 20-bit number defined by the PCIe SIG.”…””}”(hj3h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hîh³hÇh´K"hj"h²hubhï)”}”(hŒÓPASID value is encoded in all transactions from the device. This allows the IOMMU to track I/O on a per-PASID granularity in addition to using the PCIe Resource Identifier (RID) which is the Bus/Device/Function.”h]”hŒÓPASID value is encoded in all transactions from the device. This allows the IOMMU to track I/O on a per-PASID granularity in addition to using the PCIe Resource Identifier (RID) which is the Bus/Device/Function.”…””}”(hjAh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hîh³hÇh´K*hj"h²hubeh}”(h]”Œshared-hardware-workqueues”ah ]”h"]”Œshared hardware workqueues”ah$]”h&]”uh1hÈhhÊh²hh³hÇh´K ubhÉ)”}”(hhh]”(hÎ)”}”(hŒENQCMD”h]”hŒENQCMD”…””}”(hjZh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÍhjWh²hh³hÇh´K0ubhï)”}”(hX*ENQCMD is a new instruction on Intel platforms that atomically submits a work descriptor to a device. The descriptor includes the operation to be performed, virtual addresses of all parameters, virtual address of a completion record, and the PASID (process address space ID) of the current process.”h]”hX*ENQCMD is a new instruction on Intel platforms that atomically submits a work descriptor to a device. The descriptor includes the operation to be performed, virtual addresses of all parameters, virtual address of a completion record, and the PASID (process address space ID) of the current process.”…””}”(hjhh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hîh³hÇh´K2hjWh²hubhï)”}”(hXENQCMD works with non-posted semantics and carries a status back if the command was accepted by hardware. This allows the submitter to know if the submission needs to be retried or other device specific mechanisms to implement fairness or ensure forward progress should be provided.”h]”hXENQCMD works with non-posted semantics and carries a status back if the command was accepted by hardware. This allows the submitter to know if the submission needs to be retried or other device specific mechanisms to implement fairness or ensure forward progress should be provided.”…””}”(hjvh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hîh³hÇh´K7hjWh²hubhï)”}”(hŒÂENQCMD is the glue that ensures applications can directly submit commands to the hardware and also permits hardware to be aware of application context to perform I/O operations via use of PASID.”h]”hŒÂENQCMD is the glue that ensures applications can directly submit commands to the hardware and also permits hardware to be aware of application context to perform I/O operations via use of PASID.”…””}”(hj„h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hîh³hÇh´Kdevice pair. ”h]”jÈ)”}”(hhh]”(jÍ)”}”(hŒ2Each process has many threads, but only one PASID.”h]”hï)”}”(hjöh]”hŒ2Each process has many threads, but only one PASID.”…””}”(hjøh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hîh³hÇh´K˜hjôubah}”(h]”h ]”h"]”h$]”h&]”uh1jÌhjñubjÍ)”}”(hŒDevices have a limited number (~10's to 1000's) of hardware workqueues. The device driver manages allocating hardware workqueues.”h]”hï)”}”(hŒDevices have a limited number (~10's to 1000's) of hardware workqueues. The device driver manages allocating hardware workqueues.”h]”hŒ…Devices have a limited number (~10’s to 1000’s) of hardware workqueues. The device driver manages allocating hardware workqueues.”…””}”(hjh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hîh³hÇh´K™hj ubah}”(h]”h ]”h"]”h$]”h&]”uh1jÌhjñubjÍ)”}”(hŒoA single mmap() maps a single hardware workqueue as a "portal" and each portal maps down to a single workqueue.”h]”hï)”}”(hŒoA single mmap() maps a single hardware workqueue as a "portal" and each portal maps down to a single workqueue.”h]”hŒsA single mmap() maps a single hardware workqueue as a “portal†and each portal maps down to a single workqueue.”…””}”(hj'h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hîh³hÇh´K›hj#ubah}”(h]”h ]”h"]”h$]”h&]”uh1jÌhjñubjÍ)”}”(hŒ[For each device with which a process interacts, there must be one or more mmap()'d portals.”h]”hï)”}”(hŒ[For each device with which a process interacts, there must be one or more mmap()'d portals.”h]”hŒ]For each device with which a process interacts, there must be one or more mmap()’d portals.”…””}”(hj?h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hîh³hÇh´Khj;ubah}”(h]”h ]”h"]”h$]”h&]”uh1jÌhjñubjÍ)”}”(hŒRMany threads within a process can share a single portal to access a single device.”h]”hï)”}”(hŒRMany threads within a process can share a single portal to access a single device.”h]”hŒRMany threads within a process can share a single portal to access a single device.”…””}”(hjWh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hîh³hÇh´KŸhjSubah}”(h]”h ]”h"]”h$]”h&]”uh1jÌhjñubjÍ)”}”(hŒwMultiple processes can separately mmap() the same portal, in which case they still share one device hardware workqueue.”h]”hï)”}”(hŒwMultiple processes can separately mmap() the same portal, in which case they still share one device hardware workqueue.”h]”hŒwMultiple processes can separately mmap() the same portal, in which case they still share one device hardware workqueue.”…””}”(hjoh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hîh³hÇh´K¡hjkubah}”(h]”h ]”h"]”h$]”h&]”uh1jÌhjñubjÍ)”}”(hŒ¦The single process-wide PASID is used by all threads to interact with all devices. There is not, for instance, a PASID for each thread or each thread<->device pair. ”h]”hï)”}”(hŒ¥The single process-wide PASID is used by all threads to interact with all devices. There is not, for instance, a PASID for each thread or each thread<->device pair.”h]”hŒ¥The single process-wide PASID is used by all threads to interact with all devices. There is not, for instance, a PASID for each thread or each thread<->device pair.”…””}”(hj‡h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hîh³hÇh´K£hjƒubah}”(h]”h ]”h"]”h$]”h&]”uh1jÌhjñubeh}”(h]”h ]”h"]”h$]”h&]”jŒ*”uh1jÇh³hÇh´K˜hjíubah}”(h]”h ]”h"]”h$]”h&]”uh1jëh³hÇh´K˜hjÚh²hubeh}”(h]”Œ relationships”ah ]”h"]”Œ relationships”ah$]”h&]”uh1hÈhhÊh²hh³hÇh´K–ubhÉ)”}”(hhh]”(hÎ)”}”(hŒFAQ”h]”hŒFAQ”…””}”(hj³h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÍhj°h²hh³hÇh´K¨ubjÈ)”}”(hhh]”jÍ)”}”(hŒWhat is SVA/SVM? ”h]”hï)”}”(hŒWhat is SVA/SVM?”h]”hŒWhat is SVA/SVM?”…””}”(hjÈh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hîh³hÇh´KªhjÄubah}”(h]”h ]”h"]”h$]”h&]”uh1jÌhjÁh²hh³hÇh´Nubah}”(h]”h ]”h"]”h$]”h&]”jj¡uh1jÇh³hÇh´Kªhj°h²hubhï)”}”(hX5Shared Virtual Addressing (SVA) permits I/O hardware and the processor to work in the same address space, i.e., to share it. Some call it Shared Virtual Memory (SVM), but Linux community wanted to avoid confusing it with POSIX Shared Memory and Secure Virtual Machines which were terms already in circulation.”h]”hX5Shared Virtual Addressing (SVA) permits I/O hardware and the processor to work in the same address space, i.e., to share it. Some call it Shared Virtual Memory (SVM), but Linux community wanted to avoid confusing it with POSIX Shared Memory and Secure Virtual Machines which were terms already in circulation.”…””}”(hjâh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hîh³hÇh´K¬hj°h²hubjÈ)”}”(hhh]”jÍ)”}”(hŒWhat is a PASID? ”h]”hï)”}”(hŒWhat is a PASID?”h]”hŒWhat is a PASID?”…””}”(hj÷h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hîh³hÇh´K²hjóubah}”(h]”h ]”h"]”h$]”h&]”uh1jÌhjðh²hh³hÇh´Nubah}”(h]”h ]”h"]”h$]”h&]”jj¡uh1jÇh³hÇh´K²hj°h²hubhï)”}”(hŒâA Process Address Space ID (PASID) is a PCIe-defined Transaction Layer Packet (TLP) prefix. A PASID is a 20-bit number allocated and managed by the OS. PASID is included in all transactions between the platform and the device.”h]”hŒâA Process Address Space ID (PASID) is a PCIe-defined Transaction Layer Packet (TLP) prefix. A PASID is a 20-bit number allocated and managed by the OS. PASID is included in all transactions between the platform and the device.”…””}”(hjh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hîh³hÇh´K´hj°h²hubjÈ)”}”(hhh]”jÍ)”}”(hŒ%How are shared workqueues different? ”h]”hï)”}”(hŒ$How are shared workqueues different?”h]”hŒ$How are shared workqueues different?”…””}”(hj&h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hîh³hÇh´K¸hj"ubah}”(h]”h ]”h"]”h$]”h&]”uh1jÌhjh²hh³hÇh´Nubah}”(h]”h ]”h"]”h$]”h&]”jj¡uh1jÇh³hÇh´K¸hj°h²hubhï)”}”(hX–Traditionally, in order for userspace applications to interact with hardware, there is a separate hardware instance required per process. For example, consider doorbells as a mechanism of informing hardware about work to process. Each doorbell is required to be spaced 4k (or page-size) apart for process isolation. This requires hardware to provision that space and reserve it in MMIO. This doesn't scale as the number of threads becomes quite large. The hardware also manages the queue depth for Shared Work Queues (SWQ), and consumers don't need to track queue depth. If there is no space to accept a command, the device will return an error indicating retry.”h]”hXšTraditionally, in order for userspace applications to interact with hardware, there is a separate hardware instance required per process. For example, consider doorbells as a mechanism of informing hardware about work to process. Each doorbell is required to be spaced 4k (or page-size) apart for process isolation. This requires hardware to provision that space and reserve it in MMIO. This doesn’t scale as the number of threads becomes quite large. The hardware also manages the queue depth for Shared Work Queues (SWQ), and consumers don’t need to track queue depth. If there is no space to accept a command, the device will return an error indicating retry.”…””}”(hj@h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hîh³hÇh´Kºhj°h²hubhï)”}”(hXA user should check Deferrable Memory Write (DMWr) capability on the device and only submits ENQCMD when the device supports it. In the new DMWr PCIe terminology, devices need to support DMWr completer capability. In addition, it requires all switch ports to support DMWr routing and must be enabled by the PCIe subsystem, much like how PCIe atomic operations are managed for instance.”h]”hXA user should check Deferrable Memory Write (DMWr) capability on the device and only submits ENQCMD when the device supports it. In the new DMWr PCIe terminology, devices need to support DMWr completer capability. In addition, it requires all switch ports to support DMWr routing and must be enabled by the PCIe subsystem, much like how PCIe atomic operations are managed for instance.”…””}”(hjNh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hîh³hÇh´KÄhj°h²hubhï)”}”(hXSWQ allows hardware to provision just a single address in the device. When used with ENQCMD to submit work, the device can distinguish the process submitting the work since it will include the PASID assigned to that process. This helps the device scale to a large number of processes.”h]”hXSWQ allows hardware to provision just a single address in the device. When used with ENQCMD to submit work, the device can distinguish the process submitting the work since it will include the PASID assigned to that process. This helps the device scale to a large number of processes.”…””}”(hj\h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hîh³hÇh´KËhj°h²hubjÈ)”}”(hhh]”jÍ)”}”(hŒ0Is this the same as a user space device driver? ”h]”hï)”}”(hŒ/Is this the same as a user space device driver?”h]”hŒ/Is this the same as a user space device driver?”…””}”(hjqh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hîh³hÇh´KÐhjmubah}”(h]”h ]”h"]”h$]”h&]”uh1jÌhjjh²hh³hÇh´Nubah}”(h]”h ]”h"]”h$]”h&]”jj¡uh1jÇh³hÇh´KÐhj°h²hubhï)”}”(hŒûCommunicating with the device via the shared workqueue is much simpler than a full blown user space driver. The kernel driver does all the initialization of the hardware. User space only needs to worry about submitting work and processing completions.”h]”hŒûCommunicating with the device via the shared workqueue is much simpler than a full blown user space driver. The kernel driver does all the initialization of the hardware. User space only needs to worry about submitting work and processing completions.”…””}”(hj‹h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hîh³hÇh´KÒhj°h²hubjÈ)”}”(hhh]”jÍ)”}”(hŒIs this the same as SR-IOV? ”h]”hï)”}”(hŒIs this the same as SR-IOV?”h]”hŒIs this the same as SR-IOV?”…””}”(hj h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hîh³hÇh´K×hjœubah}”(h]”h ]”h"]”h$]”h&]”uh1jÌhj™h²hh³hÇh´Nubah}”(h]”h ]”h"]”h$]”h&]”jj¡uh1jÇh³hÇh´K×hj°h²hubhï)”}”(hXhSingle Root I/O Virtualization (SR-IOV) focuses on providing independent hardware interfaces for virtualizing hardware. Hence, it's required to be an almost fully functional interface to software supporting the traditional BARs, space for interrupts via MSI-X, its own register layout. Virtual Functions (VFs) are assisted by the Physical Function (PF) driver.”h]”hXjSingle Root I/O Virtualization (SR-IOV) focuses on providing independent hardware interfaces for virtualizing hardware. Hence, it’s required to be an almost fully functional interface to software supporting the traditional BARs, space for interrupts via MSI-X, its own register layout. Virtual Functions (VFs) are assisted by the Physical Function (PF) driver.”…””}”(hjºh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hîh³hÇh´KÙhj°h²hubhï)”}”(hXÓScalable I/O Virtualization builds on the PASID concept to create device instances for virtualization. SIOV requires host software to assist in creating virtual devices; each virtual device is represented by a PASID along with the bus/device/function of the device. This allows device hardware to optimize device resource creation and can grow dynamically on demand. SR-IOV creation and management is very static in nature. Consult references below for more details.”h]”hXÓScalable I/O Virtualization builds on the PASID concept to create device instances for virtualization. SIOV requires host software to assist in creating virtual devices; each virtual device is represented by a PASID along with the bus/device/function of the device. This allows device hardware to optimize device resource creation and can grow dynamically on demand. SR-IOV creation and management is very static in nature. Consult references below for more details.”…””}”(hjÈh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hîh³hÇh´Kàhj°h²hubjÈ)”}”(hhh]”jÍ)”}”(hŒ5Why not just create a virtual function for each app? ”h]”hï)”}”(hŒ4Why not just create a virtual function for each app?”h]”hŒ4Why not just create a virtual function for each app?”…””}”(hjÝh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hîh³hÇh´KèhjÙubah}”(h]”h ]”h"]”h$]”h&]”uh1jÌhjÖh²hh³hÇh´Nubah}”(h]”h ]”h"]”h$]”h&]”jj¡uh1jÇh³hÇh´Kèhj°h²hubhï)”}”(hXeCreating PCIe SR-IOV type Virtual Functions (VF) is expensive. VFs require duplicated hardware for PCI config space and interrupts such as MSI-X. Resources such as interrupts have to be hard partitioned between VFs at creation time, and cannot scale dynamically on demand. The VFs are not completely independent from the Physical Function (PF). Most VFs require some communication and assistance from the PF driver. SIOV, in contrast, creates a software-defined device where all the configuration and control aspects are mediated via the slow path. The work submission and completion happen without any mediation.”h]”hXeCreating PCIe SR-IOV type Virtual Functions (VF) is expensive. VFs require duplicated hardware for PCI config space and interrupts such as MSI-X. Resources such as interrupts have to be hard partitioned between VFs at creation time, and cannot scale dynamically on demand. The VFs are not completely independent from the Physical Function (PF). Most VFs require some communication and assistance from the PF driver. SIOV, in contrast, creates a software-defined device where all the configuration and control aspects are mediated via the slow path. The work submission and completion happen without any mediation.”…””}”(hj÷h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hîh³hÇh´Kêhj°h²hubjÈ)”}”(hhh]”jÍ)”}”(hŒ"Does this support virtualization? ”h]”hï)”}”(hŒ!Does this support virtualization?”h]”hŒ!Does this support virtualization?”…””}”(hj h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hîh³hÇh´Kôhjubah}”(h]”h ]”h"]”h$]”h&]”uh1jÌhjh²hh³hÇh´Nubah}”(h]”h ]”h"]”h$]”h&]”jj¡uh1jÇh³hÇh´Kôhj°h²hubhï)”}”(hŒßENQCMD can be used from within a guest VM. In these cases, the VMM helps with setting up a translation table to translate from Guest PASID to Host PASID. Please consult the ENQCMD instruction set reference for more details.”h]”hŒßENQCMD can be used from within a guest VM. In these cases, the VMM helps with setting up a translation table to translate from Guest PASID to Host PASID. Please consult the ENQCMD instruction set reference for more details.”…””}”(hj&h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hîh³hÇh´Köhj°h²hubjÈ)”}”(hhh]”jÍ)”}”(hŒDoes memory need to be pinned? ”h]”hï)”}”(hŒDoes memory need to be pinned?”h]”hŒDoes memory need to be pinned?”…””}”(hj;h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hîh³hÇh´Kûhj7ubah}”(h]”h ]”h"]”h$]”h&]”uh1jÌhj4h²hh³hÇh´Nubah}”(h]”h ]”h"]”h$]”h&]”jj¡uh1jÇh³hÇh´Kûhj°h²hubhï)”}”(hŒ÷When devices support SVA along with platform hardware such as IOMMU supporting such devices, there is no need to pin memory for DMA purposes. Devices that support SVA also support other PCIe features that remove the pinning requirement for memory.”h]”hŒ÷When devices support SVA along with platform hardware such as IOMMU supporting such devices, there is no need to pin memory for DMA purposes. Devices that support SVA also support other PCIe features that remove the pinning requirement for memory.”…””}”(hjUh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hîh³hÇh´Kýhj°h²hubhï)”}”(hŒîDevice TLB support - Device requests the IOMMU to lookup an address before use via Address Translation Service (ATS) requests. If the mapping exists but there is no page allocated by the OS, IOMMU hardware returns that no mapping exists.”h]”hŒîDevice TLB support - Device requests the IOMMU to lookup an address before use via Address Translation Service (ATS) requests. If the mapping exists but there is no page allocated by the OS, IOMMU hardware returns that no mapping exists.”…””}”(hjch²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hîh³hÇh´Mhj°h²hubhï)”}”(hŒíDevice requests the virtual address to be mapped via Page Request Interface (PRI). Once the OS has successfully completed the mapping, it returns the response back to the device. The device requests again for a translation and continues.”h]”hŒíDevice requests the virtual address to be mapped via Page Request Interface (PRI). Once the OS has successfully completed the mapping, it returns the response back to the device. The device requests again for a translation and continues.”…””}”(hjqh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hîh³hÇh´Mhj°h²hubhï)”}”(hŒæIOMMU works with the OS in managing consistency of page-tables with the device. When removing pages, it interacts with the device to remove any device TLB entry that might have been cached before removing the mappings from the OS.”h]”hŒæIOMMU works with the OS in managing consistency of page-tables with the device. When removing pages, it interacts with the device to remove any device TLB entry that might have been cached before removing the mappings from the OS.”…””}”(hjh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hîh³hÇh´M hj°h²hubeh}”(h]”Œfaq”ah ]”h"]”Œfaq”ah$]”h&]”uh1hÈhhÊh²hh³hÇh´K¨ubhÉ)”}”(hhh]”(hÎ)”}”(hŒ References”h]”hŒ References”…””}”(hj˜h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÍhj•h²hh³hÇh´Mubhï)”}”(hŒtVT-D: https://01.org/blogs/ashokraj/2018/recent-enhancements-intel-virtualization-technology-directed-i/o-intel-vt-d”h]”(hŒVT-D: ”…””}”(hj¦h²hh³Nh´NubhŒ reference”“”)”}”(hŒnhttps://01.org/blogs/ashokraj/2018/recent-enhancements-intel-virtualization-technology-directed-i/o-intel-vt-d”h]”hŒnhttps://01.org/blogs/ashokraj/2018/recent-enhancements-intel-virtualization-technology-directed-i/o-intel-vt-d”…””}”(hj°h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”Œrefuri”j²uh1j®hj¦ubeh}”(h]”h ]”h"]”h$]”h&]”uh1hîh³hÇh´Mhj•h²hubhï)”}”(hŒ]SIOV: https://01.org/blogs/2019/assignable-interfaces-intel-scalable-i/o-virtualization-linux”h]”(hŒSIOV: ”…””}”(hjÅh²hh³Nh´Nubj¯)”}”(hŒWhttps://01.org/blogs/2019/assignable-interfaces-intel-scalable-i/o-virtualization-linux”h]”hŒWhttps://01.org/blogs/2019/assignable-interfaces-intel-scalable-i/o-virtualization-linux”…””}”(hjÍh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”Œrefuri”jÏuh1j®hjÅubeh}”(h]”h ]”h"]”h$]”h&]”uh1hîh³hÇh´Mhj•h²hubhï)”}”(hŒENQCMD in ISE: https://software.intel.com/sites/default/files/managed/c5/15/architecture-instruction-set-extensions-programming-reference.pdf”h]”(hŒENQCMD in ISE: ”…””}”(hjâh²hh³Nh´Nubj¯)”}”(hŒ~https://software.intel.com/sites/default/files/managed/c5/15/architecture-instruction-set-extensions-programming-reference.pdf”h]”hŒ~https://software.intel.com/sites/default/files/managed/c5/15/architecture-instruction-set-extensions-programming-reference.pdf”…””}”(hjêh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”Œrefuri”jìuh1j®hjâubeh}”(h]”h ]”h"]”h$]”h&]”uh1hîh³hÇh´Mhj•h²hubhï)”}”(hŒiDSA spec: https://software.intel.com/sites/default/files/341204-intel-data-streaming-accelerator-spec.pdf”h]”(hŒ DSA spec: ”…””}”(hjÿh²hh³Nh´Nubj¯)”}”(hŒ_https://software.intel.com/sites/default/files/341204-intel-data-streaming-accelerator-spec.pdf”h]”hŒ_https://software.intel.com/sites/default/files/341204-intel-data-streaming-accelerator-spec.pdf”…””}”(hjh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”Œrefuri”j uh1j®hjÿubeh}”(h]”h ]”h"]”h$]”h&]”uh1hîh³hÇh´Mhj•h²hubeh}”(h]”Œ references”ah ]”h"]”Œ references”ah$]”h&]”uh1hÈhhÊh²hh³hÇh´Mubeh}”(h]”Œ)shared-virtual-addressing-sva-with-enqcmd”ah ]”h"]”Œ+shared virtual addressing (sva) with enqcmd”ah$]”h&]”uh1hÈhhh²hh³hÇh´Kubeh}”(h]”h ]”h"]”h$]”h&]”Œsource”hÇuh1hŒcurrent_source”NŒ current_line”NŒsettings”Œdocutils.frontend”ŒValues”“”)”}”(hÍNŒ generator”NŒ datestamp”NŒ source_link”NŒ source_url”NŒ toc_backlinks”Œentry”Œfootnote_backlinks”KŒ sectnum_xform”KŒstrip_comments”NŒstrip_elements_with_classes”NŒ strip_classes”NŒ report_level”KŒ halt_level”KŒexit_status_level”KŒdebug”NŒwarning_stream”NŒ traceback”ˆŒinput_encoding”Œ utf-8-sig”Œinput_encoding_error_handler”Œstrict”Œoutput_encoding”Œutf-8”Œoutput_encoding_error_handler”jOŒerror_encoding”Œutf-8”Œerror_encoding_error_handler”Œbackslashreplace”Œ language_code”Œen”Œrecord_dependencies”NŒconfig”NŒ id_prefix”hŒauto_id_prefix”Œid”Œ dump_settings”NŒdump_internals”NŒdump_transforms”NŒdump_pseudo_xml”NŒexpose_internals”NŒstrict_visitor”NŒ_disable_config”NŒ_source”hÇŒ _destination”NŒ _config_files”]”Œ7/var/lib/git/docbuild/linux/Documentation/docutils.conf”aŒfile_insertion_enabled”ˆŒ raw_enabled”KŒline_length_limit”M'Œpep_references”NŒ pep_base_url”Œhttps://peps.python.org/”Œpep_file_url_template”Œpep-%04d”Œrfc_references”NŒ rfc_base_url”Œ&https://datatracker.ietf.org/doc/html/”Œ tab_width”KŒtrim_footnote_reference_space”‰Œsyntax_highlight”Œlong”Œ smart_quotes”ˆŒsmartquotes_locales”]”Œcharacter_level_inline_markup”‰Œdoctitle_xform”‰Œ docinfo_xform”KŒsectsubtitle_xform”‰Œ image_loading”Œlink”Œembed_stylesheet”‰Œcloak_email_addresses”ˆŒsection_self_link”‰Œenv”NubŒreporter”NŒindirect_targets”]”Œsubstitution_defs”}”Œsubstitution_names”}”Œrefnames”}”Œrefids”}”Œnameids”}”(j)j&jjjTjQj—j”jjjNjKj×jÔj­jªj’jj!juŒ nametypes”}”(j)‰j‰jT‰j—‰j‰jN‰j׉j­‰j’‰j!‰uh}”(j&hÊjhÝjQj"j”jWjjšjKjjÔjQjªjÚjj°jj•uŒ footnote_refs”}”Œ citation_refs”}”Œ autofootnotes”]”Œautofootnote_refs”]”Œsymbol_footnotes”]”Œsymbol_footnote_refs”]”Œ footnotes”]”Œ citations”]”Œautofootnote_start”KŒsymbol_footnote_start”KŒ id_counter”Œ collections”ŒCounter”“”}”…”R”Œparse_messages”]”Œtransform_messages”]”Œ transformer”NŒ include_log”]”Œ decoration”Nh²hub.