Hi Anthony,

On 5/1/2024 9:47 PM, Anthony PERARD wrote:
On Wed, Apr 24, 2024 at 11:34:38AM +0800, Henry Wang wrote:
For overlay with iommu functionality to work with running VMs, we need
to enable IOMMU when iomem presents for the domains.

Signed-off-by: Vikram Garhwal <fnu.vik...@xilinx.com>
Signed-off-by: Henry Wang <xin.wa...@amd.com>
---
  tools/libs/light/libxl_arm.c | 6 ++++++
  1 file changed, 6 insertions(+)

diff --git a/tools/libs/light/libxl_arm.c b/tools/libs/light/libxl_arm.c
index 1cb89fa584..dd5c9f4917 100644
--- a/tools/libs/light/libxl_arm.c
+++ b/tools/libs/light/libxl_arm.c
@@ -222,6 +222,12 @@ int libxl__arch_domain_prepare_config(libxl__gc *gc,
          config->arch.sve_vl = d_config->b_info.arch_arm.sve_vl / 128U;
      }
+#ifdef LIBXL_HAVE_DT_OVERLAY
libxl_arm.c is only build on Arm, so this should be defined, so no need
to check.

Ah sure, I was just thought in the future RISC-V/PPC may have the same, but you are correct. I will remove the check.

+    if (d_config->b_info.num_iomem) {
+        config->flags |= XEN_DOMCTL_CDF_iommu;
Is this doing the same thing as the previous patch?

I think so, yes, we need the IOMMU flag to be set if we want to assign a device from a DT node protected by IOMMU.

Kind regards,
Henry


Thanks,



Reply via email to