diff options
author | Stefano Stabellini <stefano.stabellini@eu.citrix.com> | 2012-08-08 17:20:18 +0000 |
---|---|---|
committer | Stefano Stabellini <stefano.stabellini@eu.citrix.com> | 2012-08-08 17:20:18 +0000 |
commit | ef61ee0dc7ba0409dc0e8122de90d4e48d4c8669 (patch) | |
tree | 69318ec779b0c71fbd8d7763b5ddb018b22b7673 /arch | |
parent | eff8d6447d5fac2995ffa5c1f0ea2da5bd7074c9 (diff) | |
download | linux-ef61ee0dc7ba0409dc0e8122de90d4e48d4c8669.tar.bz2 |
xen/arm: get privilege status
Use Xen features to figure out if we are privileged.
XENFEAT_dom0 was introduced by 23735 in xen-unstable.hg.
Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
Acked-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/arm/xen/enlighten.c | 7 |
1 files changed, 7 insertions, 0 deletions
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 <xen/xen.h> #include <xen/interface/xen.h> #include <xen/interface/memory.h> +#include <xen/features.h> #include <xen/platform_pci.h> #include <asm/xen/hypervisor.h> #include <asm/xen/hypercall.h> @@ -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); |