aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKeir Fraser <keir.fraser@citrix.com>2010-05-13 10:25:45 +0100
committerKeir Fraser <keir.fraser@citrix.com>2010-05-13 10:25:45 +0100
commit03807d42eeb84505d25b10c3daeadd3cf29a8636 (patch)
tree7cd0a6b2fbbe8719c9dc93a5c4c847abc53c0cab
parent86941a0773310656fa575be7abc042c94cf8b72b (diff)
downloadxen-03807d42eeb84505d25b10c3daeadd3cf29a8636.tar.gz
xen-03807d42eeb84505d25b10c3daeadd3cf29a8636.tar.bz2
xen-03807d42eeb84505d25b10c3daeadd3cf29a8636.zip
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 <keir.fraser@citrix.com> xen-unstable changeset: 21373:1ec412805622 xen-unstable date: Thu May 13 10:09:02 2010 +0100
-rw-r--r--xen/common/domain.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/xen/common/domain.c b/xen/common/domain.c
index e4a29f8842..2cd3b59ca7 100644
--- a/xen/common/domain.c
+++ b/xen/common/domain.c
@@ -245,12 +245,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 )
@@ -285,11 +290,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 ( sched_init_domain(d) != 0 )
goto fail;