1 /* SPDX-License-Identifier: GPL-2.0 */
6 XEN_NATIVE, /* running on bare hardware */
7 XEN_PV_DOMAIN, /* running in a PV domain */
8 XEN_HVM_DOMAIN, /* running in a Xen hvm domain */
12 extern enum xen_domain_type xen_domain_type;
14 #define xen_domain_type XEN_NATIVE
23 #define xen_domain() (xen_domain_type != XEN_NATIVE)
24 #define xen_pv_domain() (xen_domain_type == XEN_PV_DOMAIN)
25 #define xen_hvm_domain() (xen_domain_type == XEN_HVM_DOMAIN)
26 #define xen_pvh_domain() (xen_pvh)
28 #include <linux/types.h>
30 extern uint32_t xen_start_flags;
32 #ifdef CONFIG_XEN_DOM0
33 #include <xen/interface/xen.h>
34 #include <asm/xen/hypervisor.h>
36 #define xen_initial_domain() (xen_domain() && \
37 (xen_start_flags & SIF_INITDOMAIN))
38 #else /* !CONFIG_XEN_DOM0 */
39 #define xen_initial_domain() (0)
40 #endif /* CONFIG_XEN_DOM0 */
42 #endif /* _XEN_XEN_H */