Special Scenarios
In addition to the default SVA scenario, the WD accelerator user-mode library also supports the following two special scenarios. Note that the interfaces that support these scenarios are not the trend. In addition, because the solution that does not support IOMMU has security problems, these interfaces may be removed when SVA becomes the mainstream.
- Special scenario 1: SVA is not supported but IOMMU is enabled. All devices registered with the UACCE support PASID and IOMMU.
- Special scenario 2: SVA is not supported. All devices registered with the UACCE do not support IOMMU.
Special Scenario 1
In this scenario, hardware cannot directly access the user-mode VA. You can determine whether the scenario is special scenario 1 based on the outputs of the three commands in Default Application Scenario: Supporting SVA.
- If the SVA command output is 1, SVA is not supported.
- If the IOMMU command output is 0, IOMMU is supported.
- 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, all devices registered with the UACCE support PASID and IOMMU.
Special Scenario 2
In this scenario, hardware cannot directly access the user-mode VA, and the user-mode driver of the hardware accelerator must transfer the address visible to the hardware accelerator to the hardware. You can determine whether the scenario is special scenario 2 based on the outputs of the two commands in Default Application Scenario: Supporting SVA.
- If the SVA command output is 1, SVA is not supported.
- Run the cat /sys/class/uacce/device_name/attrs/flags command. Perform an AND operation between the command output and 1. If the result is 0, all devices registered with the UACCE do not support IOMMU.