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 0ef3a88b869d..445a24759560 100644 --- a/include/asm-x86/xen/hypervisor.h +++ b/include/asm-x86/xen/hypervisor.h | |||
@@ -54,7 +54,6 @@ | |||
54 | /* arch/i386/kernel/setup.c */ | 54 | /* arch/i386/kernel/setup.c */ |
55 | extern struct shared_info *HYPERVISOR_shared_info; | 55 | extern struct shared_info *HYPERVISOR_shared_info; |
56 | extern struct start_info *xen_start_info; | 56 | extern struct start_info *xen_start_info; |
57 | #define is_initial_xendomain() (xen_start_info->flags & SIF_INITDOMAIN) | ||
58 | 57 | ||
59 | /* arch/i386/mach-xen/evtchn.c */ | 58 | /* arch/i386/mach-xen/evtchn.c */ |
60 | /* Force a proper event-channel callback from Xen. */ | 59 | /* Force a proper event-channel callback from Xen. */ |
@@ -67,6 +66,17 @@ u64 jiffies_to_st(unsigned long jiffies); | |||
67 | #define MULTI_UVMFLAGS_INDEX 3 | 66 | #define MULTI_UVMFLAGS_INDEX 3 |
68 | #define MULTI_UVMDOMID_INDEX 4 | 67 | #define MULTI_UVMDOMID_INDEX 4 |
69 | 68 | ||
70 | #define is_running_on_xen() (xen_start_info ? 1 : 0) | 69 | enum xen_domain_type { |
70 | XEN_NATIVE, | ||
71 | XEN_PV_DOMAIN, | ||
72 | XEN_HVM_DOMAIN, | ||
73 | }; | ||
74 | |||
75 | extern enum xen_domain_type xen_domain_type; | ||
76 | |||
77 | #define xen_domain() (xen_domain_type != XEN_NATIVE) | ||
78 | #define xen_pv_domain() (xen_domain_type == XEN_PV_DOMAIN) | ||
79 | #define xen_initial_domain() (xen_pv_domain() && xen_start_info->flags & SIF_INITDOMAIN) | ||
80 | #define xen_hvm_domain() (xen_domain_type == XEN_HVM_DOMAIN) | ||
71 | 81 | ||
72 | #endif /* ASM_X86__XEN__HYPERVISOR_H */ | 82 | #endif /* ASM_X86__XEN__HYPERVISOR_H */ |