All of lore.kernel.org
 help / color / mirror / Atom feed
From: Penny Zheng <penny.zheng@arm.com>
To: <xen-devel@lists.xenproject.org>, <sstabellini@kernel.org>,
	<julien@xen.org>
Cc: <Bertrand.Marquis@arm.com>, <Wei.Chen@arm.com>
Subject: [PATCH v4 11/11] xen/docs: Document how to do passthrough without IOMMU
Date: Mon, 20 Dec 2021 05:21:23 +0000	[thread overview]
Message-ID: <20211220052123.969876-12-penny.zheng@arm.com> (raw)
In-Reply-To: <20211220052123.969876-1-penny.zheng@arm.com>

From: Stefano Stabellini <stefano.stabellini@xilinx.com>

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

Signed-off-by: Stefano Stabellini <stefano.stabellini@xilinx.com>
Signed-off-by: Penny Zheng <penny.zheng@arm.com>
---
 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



  parent reply	other threads:[~2021-12-20  5:29 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-12-20  5:21 [PATCH v4 00/11] direct-map memory map Penny Zheng
2021-12-20  5:21 ` [PATCH v4 01/11] xen: introduce internal CDF_xxx flags for domain creation Penny Zheng
2022-01-07 14:14   ` Jan Beulich
2021-12-20  5:21 ` [PATCH v4 02/11] xen: introduce CDF_directmap Penny Zheng
2022-01-07 14:22   ` Jan Beulich
2022-01-21  9:15     ` Penny Zheng
2021-12-20  5:21 ` [PATCH v4 03/11] xen/arm: avoid setting XEN_DOMCTL_CDF_iommu when IOMMU off Penny Zheng
2021-12-20  5:21 ` [PATCH v4 04/11] xen/arm: introduce new helper parse_static_mem_prop and acquire_static_memory_bank Penny Zheng
2022-01-13 22:45   ` Stefano Stabellini
2021-12-20  5:21 ` [PATCH v4 05/11] xen/arm: introduce direct-map for domUs Penny Zheng
2022-01-13 22:53   ` Stefano Stabellini
2022-01-24 17:48     ` Julien Grall
2021-12-20  5:21 ` [PATCH v4 06/11] xen/arm: add ASSERT_UNREACHABLE in allocate_static_memory Penny Zheng
2021-12-20  5:21 ` [PATCH v4 07/11] xen/arm: if direct-map domain use native addresses for GICv2 Penny Zheng
2021-12-20  5:21 ` [PATCH v4 08/11] xen/arm: gate make_gicv3_domU_node with CONFIG_GICV3 Penny Zheng
2022-01-13 22:54   ` Stefano Stabellini
2021-12-20  5:21 ` [PATCH v4 09/11] xen/arm: if direct-map domain use native addresses for GICv3 Penny Zheng
2021-12-20  5:21 ` [PATCH v4 10/11] xen/arm: if direct-map domain use native UART address and IRQ number for vPL011 Penny Zheng
2021-12-20  5:21 ` Penny Zheng [this message]
2022-01-13 22:55 ` [PATCH v4 00/11] direct-map memory map Stefano Stabellini

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20211220052123.969876-12-penny.zheng@arm.com \
    --to=penny.zheng@arm.com \
    --cc=Bertrand.Marquis@arm.com \
    --cc=Wei.Chen@arm.com \
    --cc=julien@xen.org \
    --cc=sstabellini@kernel.org \
    --cc=xen-devel@lists.xenproject.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.