diff --git a/arch/arm/xen/enlighten.c b/arch/arm/xen/enlighten.c index 6a0217d4e662..c2a47a724870 100644 --- a/arch/arm/xen/enlighten.c +++ b/arch/arm/xen/enlighten.c @@ -1,6 +1,7 @@ #include #include #include +#include #include #include #include @@ -66,6 +67,12 @@ static int __init xen_guest_init(void) } xen_domain_type = XEN_HVM_DOMAIN; + xen_setup_features(); + if (xen_feature(XENFEAT_dom0)) + xen_start_info->flags |= SIF_INITDOMAIN|SIF_PRIVILEGED; + else + xen_start_info->flags &= ~(SIF_INITDOMAIN|SIF_PRIVILEGED); + if (!shared_info_page) shared_info_page = (struct shared_info *) get_zeroed_page(GFP_KERNEL); diff --git a/include/xen/interface/features.h b/include/xen/interface/features.h index b6ca39a069d8..131a6ccdba25 100644 --- a/include/xen/interface/features.h +++ b/include/xen/interface/features.h @@ -50,6 +50,9 @@ /* x86: pirq can be used by HVM guests */ #define XENFEAT_hvm_pirqs 10 +/* operation as Dom0 is supported */ +#define XENFEAT_dom0 11 + #define XENFEAT_NR_SUBMAPS 1 #endif /* __XEN_PUBLIC_FEATURES_H__ */