[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH v6 11/11] xen/docs: Document how to do passthrough without IOMMU


  • To: <xen-devel@xxxxxxxxxxxxxxxxxxxx>, <sstabellini@xxxxxxxxxx>, <julien@xxxxxxx>
  • From: Penny Zheng <penny.zheng@xxxxxxx>
  • Date: Mon, 14 Feb 2022 03:19:56 +0000
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 40.67.248.234) smtp.rcpttodomain=lists.xenproject.org smtp.mailfrom=arm.com; dmarc=pass (p=none sp=none pct=100) action=none header.from=arm.com; dkim=none (message not signed); arc=none
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=2d4IKv3T5/Hx+dqQ3Y2Ud1C+n1KbiL2IC5h2n3T2Clw=; b=hGxWDzkQHr6e3/xqOQKa97PhE1jnejsPhubxmRXryL4FUlOTfehpT93jRJl+wpjKip73JenCfdHAAynPMzlBe1UdxaL1mmOkjsoLgyDDW1D1vzdkxN9C9UHCGwKY0axieYh3wrGmhk6QxQI8cNWltbnOROJdHXgi+4eBgXCFcvoZwfV2XF6izg0rbaHgqqrws5liWTOPO3WfZAVG4VeYK/ue29/Sy4ReE2GV9hp6I0CsyBDsC1Kb50NlxtOFumNlMQgBzo1CNBZvx8boSTlxakkqWKLLbAyFYjzJxb4ZGAiBIPS+DQYt/v4NNnGT/K7VCbY9gwQZSn5quqkuuMxumQ==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=e/6Hi8rKArxLn20nBH1w4wA/pmdRyOCbk4QbSuEmQR4NKTqiedXz2Lf3QDxDz3PJQft7bdf5BW10bSu5jswvqqZQOte//bggJUbRoxbiLJpEACoe95uXK6Hao8qZzvjAyykJ+qQENGWeDvyGnQieockVzA3QbRUNnYK/h81ENXvFIS4U+uZtXzDFhW4DGexSTm+sfetpH780spKdWTtRf2a1iaCnDO0ZynNOHV2Zw2sg3nCHLXH9B0hwa87ZvgM7OrfjhTYfnHUqRqt/9uDL3itqQLVubnL19d37k1G3Fhz7AO5ycv26Ip6tmhbj5TJKEYLIWDEqzN88uYBnGOmRIw==
  • Cc: <Bertrand.Marquis@xxxxxxx>, <Wei.Chen@xxxxxxx>
  • Delivery-date: Mon, 14 Feb 2022 03:21:34 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
  • Nodisclaimer: true

From: Stefano Stabellini <sstabellini@xxxxxxxxxx>

This commit creates a new doc to document how to do passthrough without IOMMU.

Signed-off-by: Stefano Stabellini <sstabellini@xxxxxxxxxx>
Signed-off-by: Penny Zheng <penny.zheng@xxxxxxx>
Acked-by: Julien Grall <jgrall@xxxxxxxxxx>
Tested-by: Stefano Stabellini <sstabellini@xxxxxxxxxx>
---
v2 changes:
- nothing changed
---
v3 changes:
- nothing changed
---
v4 changes:
- nothing changed
---
v5 changes:
- nothing changed
---
v6 changes:
- nothing changed
---
 docs/misc/arm/passthrough-noiommu.txt | 52 +++++++++++++++++++++++++++
 1 file changed, 52 insertions(+)
 create mode 100644 docs/misc/arm/passthrough-noiommu.txt

diff --git a/docs/misc/arm/passthrough-noiommu.txt 
b/docs/misc/arm/passthrough-noiommu.txt
new file mode 100644
index 0000000000..3e2ef21ad7
--- /dev/null
+++ b/docs/misc/arm/passthrough-noiommu.txt
@@ -0,0 +1,52 @@
+Request Device Assignment without IOMMU support
+===============================================
+
+*WARNING:
+Users should be aware that it is not always secure to assign a device without
+IOMMU protection.
+When the device is not protected by the IOMMU, the administrator should make
+sure that:
+ 1. The device is assigned to a trusted guest.
+ 2. Users have additional security mechanism on the platform.
+
+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 domain on static allocation
+==============================================================
+
+Add a direct-map property under the appropriate /chosen/domU node which
+is also statically allocated with physical memory ranges through
+xen,static-mem property as its guest RAM.
+
+Below is an example on how to specify the 1:1 memory mapping for the domain
+on static allocation in the device-tree:
+
+/ {
+       chosen {
+               domU1 {
+                       compatible = "xen,domain";
+                       #address-cells = <0x2>;
+                       #size-cells = <0x2>;
+                       cpus = <2>;
+                       memory = <0x0 0x80000>;
+                       #xen,static-mem-address-cells = <0x1>;
+                       #xen,static-mem-size-cells = <0x1>;
+                       xen,static-mem = <0x30000000 0x20000000>;
+                       direct-map;
+                       ...
+               };
+       };
+};
+
+Besides reserving a 512MB region starting at the host physical address
+0x30000000 to DomU1, it also requests 1:1 memory mapping.
-- 
2.25.1




 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.