* Any Xen-heap pages that we will allow to be mapped will have
* their domain field set to dom_xen.
*/
- dom_xen = domain_create(DOMID_XEN, DOMCRF_dummy, 0, NULL);
+ dom_xen = domain_create(DOMID_XEN, 0, 0, NULL);
BUG_ON(IS_ERR(dom_xen));
/*
* This domain owns I/O pages that are within the range of the page_info
* array. Mappings occur at the priv of the caller.
*/
- dom_io = domain_create(DOMID_IO, DOMCRF_dummy, 0, NULL);
+ dom_io = domain_create(DOMID_IO, 0, 0, NULL);
BUG_ON(IS_ERR(dom_io));
/*
* Initialise our COW domain.
* This domain owns sharable pages.
*/
- dom_cow = domain_create(DOMID_COW, DOMCRF_dummy, 0, NULL);
+ dom_cow = domain_create(DOMID_COW, 0, 0, NULL);
BUG_ON(IS_ERR(dom_cow));
}
* Hidden PCI devices will also be associated with this domain
* (but be [partly] controlled by Dom0 nevertheless).
*/
- dom_xen = domain_create(DOMID_XEN, DOMCRF_dummy, 0, NULL);
+ dom_xen = domain_create(DOMID_XEN, 0, 0, NULL);
BUG_ON(IS_ERR(dom_xen));
INIT_LIST_HEAD(&dom_xen->arch.pdev_list);
* This domain owns I/O pages that are within the range of the page_info
* array. Mappings occur at the priv of the caller.
*/
- dom_io = domain_create(DOMID_IO, DOMCRF_dummy, 0, NULL);
+ dom_io = domain_create(DOMID_IO, 0, 0, NULL);
BUG_ON(IS_ERR(dom_io));
/*
* Initialise our COW domain.
* This domain owns sharable pages.
*/
- dom_cow = domain_create(DOMID_COW, DOMCRF_dummy, 0, NULL);
+ dom_cow = domain_create(DOMID_COW, 0, 0, NULL);
BUG_ON(IS_ERR(dom_cow));
/*
rangeset_domain_initialise(d);
init_status |= INIT_rangeset;
- if ( domcr_flags & DOMCRF_dummy )
+ /* DOMID_{XEN,IO,etc} (other than IDLE) are sufficiently constructed. */
+ if ( is_system_domain(d) && !is_idle_domain(d) )
return d;
if ( !is_idle_domain(d) )
#define is_idle_domain(d) ((d)->domain_id == DOMID_IDLE)
#define is_idle_vcpu(v) (is_idle_domain((v)->domain))
+static inline bool is_system_domain(const struct domain *d)
+{
+ return d->domain_id >= DOMID_FIRST_RESERVED;
+}
+
#define DOMAIN_DESTROYED (1u << 31) /* assumes atomic_t is >= 32 bits */
#define put_domain(_d) \
if ( atomic_dec_and_test(&(_d)->refcnt) ) domain_destroy(_d)
/*
* Create a domain: the configuration is only necessary for real domain
- * (i.e !DOMCRF_dummy, excluded idle domain).
+ * (domid < DOMID_FIRST_RESERVED).
*/
struct domain *domain_create(domid_t domid, unsigned int domcr_flags,
uint32_t ssidref,
by tboot */
#define _DOMCRF_s3_integrity 2
#define DOMCRF_s3_integrity (1U<<_DOMCRF_s3_integrity)
- /* DOMCRF_dummy: Create a dummy domain (not scheduled; not on domain list) */
-#define _DOMCRF_dummy 3
-#define DOMCRF_dummy (1U<<_DOMCRF_dummy)
/* DOMCRF_oos_off: dont use out-of-sync optimization for shadow page tables */
#define _DOMCRF_oos_off 4
#define DOMCRF_oos_off (1U<<_DOMCRF_oos_off)