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

Re: [Xen-devel] [PATCH v8 2/6] domain: introduce XEN_DOMCTL_CDF_iommu flag



Hi,

On 9/2/19 3:50 PM, Paul Durrant wrote:
diff --git a/xen/common/domain.c b/xen/common/domain.c
index e9d2c613e0..7dfb257c50 100644
--- a/xen/common/domain.c
+++ b/xen/common/domain.c
@@ -301,7 +301,8 @@ static int sanitise_domain_config(struct 
xen_domctl_createdomain *config)
                             XEN_DOMCTL_CDF_hap |
                             XEN_DOMCTL_CDF_s3_integrity |
                             XEN_DOMCTL_CDF_oos_off |
-                           XEN_DOMCTL_CDF_xs_domain) )
+                           XEN_DOMCTL_CDF_xs_domain |
+                           XEN_DOMCTL_CDF_iommu) )
      {
          dprintk(XENLOG_INFO, "Unknown CDF flags %#x\n", config->flags);
          return -EINVAL;
@@ -320,6 +321,12 @@ static int sanitise_domain_config(struct 
xen_domctl_createdomain *config)
          return -EINVAL;
      }
+ if ( (config->flags & XEN_DOMCTL_CDF_iommu) && !iommu_enabled )
+    {
+        dprintk(XENLOG_INFO, "IOMMU is not enabled\n");
+        return -EINVAL;
+    }
+

Looking at this patch again, the implementation of arch_sanitise_domain_config() for Arm will only accepts config->flags to be equal to CDF_hvm_guest | CDF_hap.

So after this patch, it will not be possible to create any domain when CDF_iommu is set.

Cheers,

--
Julien Grall

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/xen-devel

 


Rackspace

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