aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/xen/enlighten.c
diff options
context:
space:
mode:
authorStefano Stabellini <stefano.stabellini@eu.citrix.com>2012-08-08 13:20:18 -0400
committerStefano Stabellini <stefano.stabellini@eu.citrix.com>2012-08-08 13:20:18 -0400
commitef61ee0dc7ba0409dc0e8122de90d4e48d4c8669 (patch)
tree69318ec779b0c71fbd8d7763b5ddb018b22b7673 /arch/arm/xen/enlighten.c
parenteff8d6447d5fac2995ffa5c1f0ea2da5bd7074c9 (diff)
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/arm/xen/enlighten.c')
-rw-r--r--arch/arm/xen/enlighten.c7
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 @@
1#include <xen/xen.h> 1#include <xen/xen.h>
2#include <xen/interface/xen.h> 2#include <xen/interface/xen.h>
3#include <xen/interface/memory.h> 3#include <xen/interface/memory.h>
4#include <xen/features.h>
4#include <xen/platform_pci.h> 5#include <xen/platform_pci.h>
5#include <asm/xen/hypervisor.h> 6#include <asm/xen/hypervisor.h>
6#include <asm/xen/hypercall.h> 7#include <asm/xen/hypercall.h>
@@ -66,6 +67,12 @@ static int __init xen_guest_init(void)
66 } 67 }
67 xen_domain_type = XEN_HVM_DOMAIN; 68 xen_domain_type = XEN_HVM_DOMAIN;
68 69
70 xen_setup_features();
71 if (xen_feature(XENFEAT_dom0))
72 xen_start_info->flags |= SIF_INITDOMAIN|SIF_PRIVILEGED;
73 else
74 xen_start_info->flags &= ~(SIF_INITDOMAIN|SIF_PRIVILEGED);
75
69 if (!shared_info_page) 76 if (!shared_info_page)
70 shared_info_page = (struct shared_info *) 77 shared_info_page = (struct shared_info *)
71 get_zeroed_page(GFP_KERNEL); 78 get_zeroed_page(GFP_KERNEL);