summaryrefslogtreecommitdiffstats
path: root/arch/arm/xen
diff options
context:
space:
mode:
authorStefano Stabellini <stefano.stabellini@eu.citrix.com>2012-08-08 17:20:18 +0000
committerStefano Stabellini <stefano.stabellini@eu.citrix.com>2012-08-08 17:20:18 +0000
commitef61ee0dc7ba0409dc0e8122de90d4e48d4c8669 (patch)
tree69318ec779b0c71fbd8d7763b5ddb018b22b7673 /arch/arm/xen
parenteff8d6447d5fac2995ffa5c1f0ea2da5bd7074c9 (diff)
downloadop-kernel-dev-ef61ee0dc7ba0409dc0e8122de90d4e48d4c8669.zip
op-kernel-dev-ef61ee0dc7ba0409dc0e8122de90d4e48d4c8669.tar.gz
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')
-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 6a0217d..c2a47a7 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);
OpenPOWER on IntegriCloud