diff options
Diffstat (limited to 'include/asm-x86/xen/hypervisor.h')
-rw-r--r-- | include/asm-x86/xen/hypervisor.h | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/include/asm-x86/xen/hypervisor.h b/include/asm-x86/xen/hypervisor.h index 8e15dd28c91..d9dd28caa50 100644 --- a/include/asm-x86/xen/hypervisor.h +++ b/include/asm-x86/xen/hypervisor.h | |||
@@ -55,7 +55,6 @@ | |||
55 | /* arch/i386/kernel/setup.c */ | 55 | /* arch/i386/kernel/setup.c */ |
56 | extern struct shared_info *HYPERVISOR_shared_info; | 56 | extern struct shared_info *HYPERVISOR_shared_info; |
57 | extern struct start_info *xen_start_info; | 57 | extern struct start_info *xen_start_info; |
58 | #define is_initial_xendomain() (xen_start_info->flags & SIF_INITDOMAIN) | ||
59 | 58 | ||
60 | /* arch/i386/mach-xen/evtchn.c */ | 59 | /* arch/i386/mach-xen/evtchn.c */ |
61 | /* Force a proper event-channel callback from Xen. */ | 60 | /* Force a proper event-channel callback from Xen. */ |
@@ -68,6 +67,17 @@ u64 jiffies_to_st(unsigned long jiffies); | |||
68 | #define MULTI_UVMFLAGS_INDEX 3 | 67 | #define MULTI_UVMFLAGS_INDEX 3 |
69 | #define MULTI_UVMDOMID_INDEX 4 | 68 | #define MULTI_UVMDOMID_INDEX 4 |
70 | 69 | ||
71 | #define is_running_on_xen() (xen_start_info ? 1 : 0) | 70 | enum xen_domain_type { |
71 | XEN_NATIVE, | ||
72 | XEN_PV_DOMAIN, | ||
73 | XEN_HVM_DOMAIN, | ||
74 | }; | ||
75 | |||
76 | extern enum xen_domain_type xen_domain_type; | ||
77 | |||
78 | #define xen_domain() (xen_domain_type != XEN_NATIVE) | ||
79 | #define xen_pv_domain() (xen_domain_type == XEN_PV_DOMAIN) | ||
80 | #define xen_initial_domain() (xen_pv_domain() && xen_start_info->flags & SIF_INITDOMAIN) | ||
81 | #define xen_hvm_domain() (xen_domain_type == XEN_HVM_DOMAIN) | ||
72 | 82 | ||
73 | #endif /* __HYPERVISOR_H__ */ | 83 | #endif /* __HYPERVISOR_H__ */ |