From: Keir Fraser Date: Thu, 13 May 2010 09:09:02 +0000 (+0100) Subject: Even 'dummy' domains (e.g., dom_xen a.k.a. DOMID_XEN) must have valid I/O caps. X-Git-Tag: archive/raspbian/4.8.0-1+rpi1~1^2~12169 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=117f6cf56467f894f85cc5f984dd62c1d290043c;p=xen.git Even 'dummy' domains (e.g., dom_xen a.k.a. DOMID_XEN) must have valid I/O caps. Ensure the rangesets are always initialised. Certain (privileged) invocations of hypercalls such as mmu_update can end up interrogating these special domains for possible I/O capabilities. Signed-off-by: Keir Fraser --- diff --git a/xen/common/domain.c b/xen/common/domain.c index 2759972b76..a85f51eb7b 100644 --- a/xen/common/domain.c +++ b/xen/common/domain.c @@ -248,12 +248,17 @@ struct domain *domain_create( d->disable_migrate = 1; } - if ( domcr_flags & DOMCRF_dummy ) - return d; - rangeset_domain_initialise(d); init_status |= INIT_rangeset; + d->iomem_caps = rangeset_new(d, "I/O Memory", RANGESETF_prettyprint_hex); + d->irq_caps = rangeset_new(d, "Interrupts", 0); + if ( (d->iomem_caps == NULL) || (d->irq_caps == NULL) ) + goto fail; + + if ( domcr_flags & DOMCRF_dummy ) + return d; + if ( !is_idle_domain(d) ) { if ( xsm_domain_create(d, ssidref) != 0 ) @@ -290,11 +295,6 @@ struct domain *domain_create( goto fail; init_status |= INIT_arch; - d->iomem_caps = rangeset_new(d, "I/O Memory", RANGESETF_prettyprint_hex); - d->irq_caps = rangeset_new(d, "Interrupts", 0); - if ( (d->iomem_caps == NULL) || (d->irq_caps == NULL) ) - goto fail; - if ( cpupool_add_domain(d, poolid) != 0 ) goto fail;