Move to using a check for the Xenstore Domain role for the is_xenstore_domain check.
Signed-off-by: Daniel P. Smith <[email protected]> --- xen/common/domain.c | 3 +++ xen/include/xen/sched.h | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/xen/common/domain.c b/xen/common/domain.c index 26bba8666d..1f2c569e5d 100644 --- a/xen/common/domain.c +++ b/xen/common/domain.c @@ -551,6 +551,9 @@ struct domain *domain_create(domid_t domid, { d->options = config->flags; d->vmtrace_size = config->vmtrace_size; + + if (config->flags & XEN_DOMCTL_CDF_xs_domain) + d->xsm_roles = XSM_XENSTORE; } /* Sort out our idea of is_control_domain(). */ diff --git a/xen/include/xen/sched.h b/xen/include/xen/sched.h index 66b79d9c9f..9a88e5b00f 100644 --- a/xen/include/xen/sched.h +++ b/xen/include/xen/sched.h @@ -1129,7 +1129,7 @@ static inline bool is_vcpu_online(const struct vcpu *v) static inline bool is_xenstore_domain(const struct domain *d) { - return d->options & XEN_DOMCTL_CDF_xs_domain; + return d->xsm_roles & XSM_XENSTORE; } static always_inline bool is_iommu_enabled(const struct domain *d) -- 2.20.1
