mirror of
https://git.FreeBSD.org/src.git
synced 2025-01-01 12:19:28 +00:00
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
1a9cdd373a
commit
6f4246bce1
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=263003
@ -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…
Reference in New Issue
Block a user