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

Re: [PATCH v2 3/8] xen/arm, doc: Add a DT property to specify IOMMU for Dom0less domUs


  • To: <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • From: Henry Wang <xin.wang2@xxxxxxx>
  • Date: Mon, 20 May 2024 09:38:44 +0800
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 165.204.84.17) smtp.rcpttodomain=lists.xenproject.org smtp.mailfrom=amd.com; dmarc=pass (p=quarantine sp=quarantine pct=100) action=none header.from=amd.com; dkim=none (message not signed); arc=none (0)
  • 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=E0YAPpV586Sp1/JSE7Lx2DUZD0CE4GcSsEhWCW/Pcxk=; b=JwRyhw3F+m48C3nvvnJVIHL9Wxt0y+4KD3GEbqmQ5N3eP7zPPaKbyy8LQ6nDC/Q0QCyR/8KDDn7nBTaL6XWUzm8nOxelBYAd/xNNOa/eaIHmSXU7cp6BLNOrnbeHFjCgLIqzZiFxZuLiycy7vGwLtySOOQEhF9b94b9DeWIuOEngkhsm1PPU1KWKZpXGWsKN6/ylNqxN+UCyzSNm/I6y2+xnT8GFpLndrojDAi6tNH6vwuSBcUucF2qWGQfpJHpQIRyG/STvWV0r7bPfwqST8v6Nf0jOai9UYfSA1Naby+X9m4Sje7B499HVCU5RSeD6gRawmlv85P3HAxh8GJOicQ==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Xq3jdPSv91GKzyaci/FZlBKluSxitY4CZBjdcxUGBqErVLFhCRoL4SD5y9axFNtLLST4cJZaxoEDgHikA7OTNF14DRzxmnvyXpb8hX21qxWR2iIows7LNDfzZMNsZ9ARPYPjBTKW9h/OyjXaLpqx2+drk3fBLPPmPGfBVTVSIMAJ7Jbw3ywgMx/U3ISlsSm9wAGa8Zf9aYF8RZBSh9YET6JxaoAUDew1ELF5HlzYsFYdQ4m+J7lza/xnRdtPjtTOymIg4tCQsZlWQz8EitOflBZKCGduMYGHJQuX32QlWNKThf7jRpFgOqhxMk//DP+w+5PtkW8fRGW8w+8crsI+dw==
  • Delivery-date: Mon, 20 May 2024 01:39:06 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

Hi Julien,

On 5/20/2024 8:41 AM, Henry Wang wrote:
Hi Julien,

Thanks for spending time on the review!

On 5/19/2024 6:17 PM, Julien Grall wrote:
Hi Henry,

On 16/05/2024 11:03, Henry Wang wrote:
diff --git a/docs/misc/arm/device-tree/booting.txt b/docs/misc/arm/device-tree/booting.txt
index bbd955e9c2..61f9082553 100644
--- a/docs/misc/arm/device-tree/booting.txt
+++ b/docs/misc/arm/device-tree/booting.txt
@@ -260,6 +260,19 @@ with the following properties:
      value specified by Xen command line parameter gnttab_max_maptrack_frames
      (or its default value if unspecified, i.e. 1024) is used.
  +- passthrough
+
+    A string property specifying whether IOMMU mappings are enabled for the +    domain and hence whether it will be enabled for passthrough hardware.
+    Possible property values are:
+
+    - "enabled"
+    IOMMU mappings are enabled for the domain.
+
+    - "disabled"
+    IOMMU mappings are disabled for the domain and so hardware may not be +    passed through. This option is the default if this property is missing.

Looking at the code below, it seems like the default will depend on whether the partial device-tree is present. Did I misunderstand?

I am not sure if I understand the "partial device tree" in above comment correctly. The "passthrough" property is supposed to be placed in the dom0less domU domain node exactly the same way as the other dom0less domU properties (such as "direct-map" etc.). This way we can control the XEN_DOMCTL_CDF_iommu is set or not for each dom0less domU separately.

Oh I think I get your points, you meant the XEN_DOMCTL_CDF_iommu will still be set if the passthrough dt property is "disabled", but user provides a partial device tree. Yes you are correct. I will update the doc to explain a bit more details as below. Thanks for pointing it out.

 - "enabled"
    IOMMU mappings are enabled for the domain. Note that this option is the
    default if the user provides the device partial passthrough device tree
    for the domain.

 - "disabled"
    IOMMU mappings are disabled for the domain and so hardware may not be
    passed through. This option is the default if this property is missing
    and the user does not provide the device partial device tree for the domain.

Kind regards,
Henry



 


Rackspace

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