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

[Xen-devel] [PATCH v3 13/16] xen: connect guest creation with CONFIG_{HVM, PV}



Signed-off-by: Wei Liu <wei.liu2@xxxxxxxxxx>
Acked-by: Jan Beulich <jbeulich@xxxxxxxx>
---
 xen/common/domain.c | 15 +++++++++++++++
 1 file changed, 15 insertions(+)

diff --git a/xen/common/domain.c b/xen/common/domain.c
index 78c450e4b4..1f95bd169c 100644
--- a/xen/common/domain.c
+++ b/xen/common/domain.c
@@ -318,9 +318,24 @@ struct domain *domain_create(domid_t domid,
 
     /* Sort out our idea of is_{pv,hvm}_domain(). */
     if ( config && (config->flags & XEN_DOMCTL_CDF_hvm_guest) )
+    {
+#ifdef CONFIG_HVM
         d->guest_type = guest_type_hvm;
+#else
+        err = -EINVAL;
+        goto fail;
+#endif
+    }
     else
+    {
+#ifdef CONFIG_PV
         d->guest_type = guest_type_pv;
+#else
+        err = -EINVAL;
+        goto fail;
+#endif
+    }
+
 
     TRACE_1D(TRC_DOM0_DOM_ADD, d->domain_id);
 
-- 
2.11.0


_______________________________________________
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®.