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