On 5/12/25 2:45 AM, Sairaj Kodilkar wrote:


On 5/2/2025 7:45 AM, Alejandro Jimenez wrote:

@@ -1035,13 +1070,13 @@ static void amdvi_do_translate(AMDVIAddressSpace *as, hwaddr addr,
          return;
      }
-    if (!amdvi_get_dte(s, devid, entry)) {
-        return;
-    }
+    dte_ret = amdvi_as_to_dte(as, entry);
-    /* devices with V = 0 are not translated */
-    if (!(entry[0] & AMDVI_DEV_VALID)) {
+    if (dte_ret == -AMDVI_FR_DTE_V) {
+        /* DTE[V]=0, address is passed untranslated */
          goto out;
+    } else if (dte_ret == -AMDVI_FR_DTE_TV) {
+        return;
      }


Hi Alejandro,

You missed to handle -AMDVI_FR_DTE_RTR_ERR.

Good catch. I'll replace that block with:

+    dte_ret = amdvi_as_to_dte(as, entry);

-    /* devices with V = 0 are not translated */
-    if (!(entry[0] & AMDVI_DEV_VALID)) {
-        goto out;
+    if (dte_ret < 0) {
+        if (dte_ret == -AMDVI_FR_DTE_V) {
+            /* DTE[V]=0, address is passed untranslated */
+            goto out;
+        }
+        return;
     }

Alejandro


Regards
Sairaj Kodilkar

      amdvi_page_walk(as, entry, ret,



Reply via email to