xen: add macro to detect if running as Dom0
Approved by: gibbs Sponsored by: Citrix Systems R&D xen/xen-os.h: - Add macro to detect if running as Dom0.
This commit is contained in:
parent
5dd05db7ff
commit
57a42c7563
@ -82,6 +82,13 @@ xen_hvm_domain(void)
|
||||
return (xen_domain_type == XEN_HVM_DOMAIN);
|
||||
}
|
||||
|
||||
static inline bool
|
||||
xen_initial_domain(void)
|
||||
{
|
||||
return (xen_domain() && HYPERVISOR_start_info != NULL &&
|
||||
(HYPERVISOR_start_info->flags & SIF_INITDOMAIN) != 0);
|
||||
}
|
||||
|
||||
#ifndef xen_mb
|
||||
#define xen_mb() mb()
|
||||
#endif
|
||||
|
Loading…
x
Reference in New Issue
Block a user