diff options
Diffstat (limited to 'include/xen/xen.h')
| -rw-r--r-- | include/xen/xen.h | 18 | 
1 files changed, 16 insertions, 2 deletions
diff --git a/include/xen/xen.h b/include/xen/xen.h index a16402418d3..0c0e3ef4c45 100644 --- a/include/xen/xen.h +++ b/include/xen/xen.h @@ -23,10 +23,24 @@ extern enum xen_domain_type xen_domain_type;  #include <xen/interface/xen.h>  #include <asm/xen/hypervisor.h> -#define xen_initial_domain()	(xen_pv_domain() && \ -				 xen_start_info->flags & SIF_INITDOMAIN) +#define xen_initial_domain()	(xen_domain() && \ +				 xen_start_info && xen_start_info->flags & SIF_INITDOMAIN)  #else  /* !CONFIG_XEN_DOM0 */  #define xen_initial_domain()	(0)  #endif	/* CONFIG_XEN_DOM0 */ +#ifdef CONFIG_XEN_PVH +/* This functionality exists only for x86. The XEN_PVHVM support exists + * only in x86 world - hence on ARM it will be always disabled. + * N.B. ARM guests are neither PV nor HVM nor PVHVM. + * It's a bit like PVH but is different also (it's further towards the H + * end of the spectrum than even PVH). + */ +#include <xen/features.h> +#define xen_pvh_domain() (xen_pv_domain() && \ +			  xen_feature(XENFEAT_auto_translated_physmap) && \ +			  xen_have_vector_callback) +#else +#define xen_pvh_domain()	(0) +#endif  #endif	/* _XEN_XEN_H */  | 
