]> xenbits.xensource.com Git - people/sstabellini/xen-unstable.git/.git/commitdiff
xen/docs: add a document to explain how to do passthrough without IOMMU direct-map-2
authorStefano Stabellini <sstabellini@kernel.org>
Mon, 11 May 2020 22:58:59 +0000 (15:58 -0700)
committerStefano Stabellini <sstabellini@kernel.org>
Mon, 11 May 2020 22:58:59 +0000 (15:58 -0700)
Make sure to start with a WARNING about security.

Signed-off-by: Stefano Stabellini <stefano.stabellini@xilinx.com>
docs/misc/arm/passthrough-noiommu.txt [new file with mode: 0644]

diff --git a/docs/misc/arm/passthrough-noiommu.txt b/docs/misc/arm/passthrough-noiommu.txt
new file mode 100644 (file)
index 0000000..f3be973
--- /dev/null
@@ -0,0 +1,37 @@
+Request Device Assignment without IOMMU support
+===============================================
+
+WARNING: it is not secure to assign a device without IOMMU protection. A
+domU can program the device to do DMA on its behalf, gaining access to
+the whole system. Another security measure should be employed, such as
+programming a MPU.
+
+
+This document assumes that the IOMMU is absent from the system or it is
+disabled (status = "disabled" in device tree).
+
+
+Add xen,force-assign-without-iommu; to the device tree snippet
+
+    ethernet: ethernet@ff0e0000 {
+        compatible = "cdns,zynqmp-gem";
+        xen,path = "/amba/ethernet@ff0e0000";
+        xen,reg = <0x0 0xff0e0000 0x1000 0x0 0xff0e0000>;
+        xen,force-assign-without-iommu;
+
+
+Request 1:1 memory mapping for the dom0-less domain
+===================================================
+
+Add a direct-map property under the appropriate /chosen/domU node with
+the memory ranges you want to assign to your domain. If you are using
+imagebuilder, you can add to boot.source something like the following:
+
+    fdt set /chosen/domU0 direct-map <0x0 0x10000000 0x0 0x10000000 0x0 0x60000000 0x0 0x10000000>
+
+Which will assign the ranges:
+
+    0x10000000 - 0x20000000
+    0x60000000 - 0x70000000
+
+to the first dom0less domU.