|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-devel] [PATCH 12/17] x86: connect guest creation with CONFIG_PV
This is a bit more complicated than the HVM case because system
domains have PV guest type.
Instead of inventing a new guest type, we still set system domains'
type to PV. This shouldn't really matter in practice.
Signed-off-by: Wei Liu <wei.liu2@xxxxxxxxxx>
---
xen/common/domain.c | 21 +++++++++++++++++++--
1 file changed, 19 insertions(+), 2 deletions(-)
diff --git a/xen/common/domain.c b/xen/common/domain.c
index 65151e2..8a4698f 100644
--- a/xen/common/domain.c
+++ b/xen/common/domain.c
@@ -322,17 +322,34 @@ 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) )
+ if ( config )
{
+ ASSERT(!is_system_domain(d));
+ if ( config->flags & XEN_DOMCTL_CDF_hvm_guest)
+ {
#ifdef CONFIG_HVM
- d->guest_type = guest_type_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
+ }
}
else
+ {
+ /* The type of system domain shouldn't matter. */
+ ASSERT(is_system_domain(d));
d->guest_type = guest_type_pv;
+ }
TRACE_1D(TRC_DOM0_DOM_ADD, d->domain_id);
--
git-series 0.9.1
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/xen-devel
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |