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

Re: [PATCH v3 10/10] xen/docs: Document how to do passthrough without IOMMU


  • To: Penny Zheng <Penny.Zheng@xxxxxxx>
  • From: Bertrand Marquis <Bertrand.Marquis@xxxxxxx>
  • Date: Mon, 22 Nov 2021 15:24:53 +0000
  • Accept-language: en-GB, en-US
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=arm.com; dmarc=pass action=none header.from=arm.com; dkim=pass header.d=arm.com; 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=I/jeV2nVYiJlFJ2o4bq2JF21N2qE9VVCkWudOQCYdJQ=; b=Il4M1tFYZtY+0wxqNLx9WlXlV1kPOhCerZ+RD6zfnNGcpotOCXv3xFFizhU/suTCn77itT6Z+IOwQ78t5J4oks2TzQI+EknQDWhQwlIYRLHfaTGd2fGgvOLjhAlmal8XkB361ywn33gx5SYgUtJp/uotov9DhMNa9r4qw2FCoWcSRyv0WmKdxljf1jft+TUnTsec80N1cXdiTXD8iIiGNQ+6IycM+Eb0V67TSVjbDCXPuaFjqk7YMG/TNl8Et9MqWvYmm0AiixM422/7oZdNhEzb2v2CqR/OGopTexiOvy0XNNaTT+i0wL8XZjzt4wOrsoVgcjtqk5ArcuMUUltpRA==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=ca3BYX8MzsTwmpOnWsOinFvKUHdR9fCvu/UkusytfI1DIbzNwvcIxCJoOljEU+Rc0x9EvXtf4+Mu9MFiVNR0qTxr1KUXiuM/4gYLnudO2E+7+GNu5GMJ+4dFqaq1/yGrhOVglfy+/S5afqaQdvKQM6yN5BDUShjqyMhx/YS1LXK0z+LVka1pfriYsztPNCVoXHfkb02P1i+Jinzr6pssB3xM0NKRLTe+dDFqk3bGrRdAkkQAc+GoSiBYgGJ2w8sWgAjOHGovxosRjQbFY5ykV0v2DioN4x+aVdQowc9PKuc7wNmPeaU/gpwzBdekjFozqEEGFtzBTy1vBaJ7vce+rQ==
  • Authentication-results-original: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=arm.com;
  • Cc: xen-devel <xen-devel@xxxxxxxxxxxxxxxxxxxx>, "sstabellini@xxxxxxxxxx" <sstabellini@xxxxxxxxxx>, "julien@xxxxxxx" <julien@xxxxxxx>, Wei Chen <Wei.Chen@xxxxxxx>
  • Delivery-date: Mon, 22 Nov 2021 15:25:32 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
  • Nodisclaimer: true
  • Original-authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=arm.com;
  • Thread-index: AQHX2rPE6jU0b09b40CkiSaHEA3wwKwPtMqA
  • Thread-topic: [PATCH v3 10/10] xen/docs: Document how to do passthrough without IOMMU

Hi Penny,

> On 16 Nov 2021, at 06:31, Penny Zheng <penny.zheng@xxxxxxx> wrote:
> 
> From: Stefano Stabellini <stefano.stabellini@xxxxxxxxxx>
> 
> This commit creates a new doc to document how to do passthrough without IOMMU.
> 
> Signed-off-by: Stefano Stabellini <stefano.stabellini@xxxxxxxxxx>
> Signed-off-by: Penny Zheng <penny.zheng@xxxxxxx>
> ---
> 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.

If the guest has some reserved-memory in the device tree, those will not be 
handle by Xen for DomUs.
I think it could be a good idea in the documentation to mention that any 
reserved-memory required must be assigned using static-mem to the DomU.

This could take the form of a comment or a warning in this document.

Regards
Bertrand

> -- 
> 2.25.1
> 




 


Rackspace

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