]> xenbits.xensource.com Git - people/iwj/xen.git/commitdiff
xen: connect guest creation with CONFIG_HVM
authorWei Liu <wei.liu2@citrix.com>
Thu, 13 Sep 2018 16:38:08 +0000 (17:38 +0100)
committerWei Liu <wei.liu2@citrix.com>
Fri, 14 Sep 2018 15:42:58 +0000 (16:42 +0100)
Signed-off-by: Wei Liu <wei.liu2@citrix.com>
Acked-by: Jan Beulich <jbeulich@suse.com>
xen/common/domain.c

index a043812687a32e4cd56d02e52c476ff3d548fba1..6dfcea494adfe9cb83da632ad7fcedf757f6be53 100644 (file)
@@ -315,7 +315,14 @@ 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
         d->guest_type = guest_type_pv;