|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [PATCH v3 07/23] xen/arm: vIOMMU: Add cmdline boot option "viommu = <string>"
Hi Milan, On 31/03/2026 10:52, Milan Djokic wrote: From: Rahul Singh <rahul.singh@xxxxxxx> Add cmdline boot option "viommu = <string>" to enable or disable the virtual iommu support for guests on ARM (only viommu="smmuv3" supported for now). In Xen terminology, 'guests' refers to domUs. IOW, this doesn't include dom0. Is this what you meant? If so, how would you enable it for dom0? That said, is there any particular reason why this can't be automatically enabled based on the SMMUv3 discovered? Signed-off-by: Rahul Singh <rahul.singh@xxxxxxx> Signed-off-by: Milan Djokic <milan_djokic@xxxxxxxx> --- docs/misc/xen-command-line.pandoc | 9 +++++++++ xen/arch/arm/include/asm/viommu.h | 12 ++++++++++++ xen/drivers/passthrough/arm/viommu.c | 11 +++++++++++ xen/drivers/passthrough/arm/vsmmu-v3.c | 3 +++ 4 files changed, 35 insertions(+) diff --git a/docs/misc/xen-command-line.pandoc b/docs/misc/xen-command-line.pandoc index 6c77129732..6531c2355c 100644 --- a/docs/misc/xen-command-line.pandoc +++ b/docs/misc/xen-command-line.pandoc @@ -2850,6 +2850,15 @@ The optional `keep` parameter causes Xen to continue using the vga console even after dom0 has been started. The default behaviour is to relinquish control to dom0.+### viommu (arm)+> `= <string>` + +> Default: `` + +Flag to enable or disable support for the virtual IOMMU for guests. Disabled by +default. Enable by specifying target IOMMU type (if supported). Only "smmuv3" +IOMMU emulation supported at this point. + ### viridian-spinlock-retry-count (x86) > `= <integer>`diff --git a/xen/arch/arm/include/asm/viommu.h b/xen/arch/arm/include/asm/viommu.hindex 2a6742de73..ed338fe0ec 100644 --- a/xen/arch/arm/include/asm/viommu.h +++ b/xen/arch/arm/include/asm/viommu.h @@ -10,6 +10,7 @@ #include <public/xen.h>extern struct list_head host_iommu_list;+extern char viommu[];/* data structure for each hardware IOMMU */ Regardless what Luca wrote, why do we need to force "always_inline"?
> + return 0;> +
This is likely going to go wrong in the future if we add support for other vIOMMU in the future. If we decide to continue using the command line option (see above), you would want want an helper to return the selected emulation and check against SMMUv3 here. Cheers, -- Julien Grall
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |