acpi: Abort VT-d initialization when no HW units found.
authorSimon Gerber <simon.gerber@inf.ethz.ch>
Mon, 17 Aug 2015 16:07:33 +0000 (18:07 +0200)
committerSimon Gerber <simon.gerber@inf.ethz.ch>
Mon, 17 Aug 2015 16:07:33 +0000 (18:07 +0200)
Signed-off-by: Simon Gerber <simon.gerber@inf.ethz.ch>

usr/acpi/intel_vtd.c

index 8a90abc..57ba736 100644 (file)
@@ -796,7 +796,12 @@ int vtd_init(void)
     if (ACPI_FAILURE(as)) {
         return 1;
     }
-   
+
+    if (vtd_units == NULL) {
+        VTD_DEBUG("DMA remapping: no HW units, not enabling\n");
+        return 0;
+    }
+
     // When we have finished parsing the DMAR table, we create the identity 
     // domain and determine the domain-id bounds that can be used on all 
     // hardware units.