Default Application Scenario: Supporting SVA
By default, this document assumes that the user operating environment supports shared virtual addressing (SVA). Hardware can directly access the virtual address (VA) of user-mode programs without converting the VA to a DMA visible to hardware. You can determine whether the operating environment supports SVA based on the following conditions:
- The Linux kernel of the operating environment supports SVA. In the shell of the user environment, check whether the kernel supports SVA by running the zcat /proc/config.gz | grep -i CONFIG_IOMMU_SVA | echo $? command. If the command output is 0, the kernel supports SVA. Otherwise, the kernel does not support SVA.
- In the shell of the user environment, check whether the input/output memory management unit (IOMMU) is enabled by running the dmesg | grep -i iommu | echo $? command. If the command output is 0, IOMMU is enabled.
- All devices registered with the UACCE in the user environment support process address space ID (PASID) and IOMMU. In the shell of the user environment, run the cat /sys/class/uacce/device_name/attrs/flags command. Perform an AND operation between the command output and 3. If the result is 2, the device supports PASID and IOMMU.
Parent topic: Introduction