From 060643b513b814346fa728ac25d48b3ff748e727 Mon Sep 17 00:00:00 2001 From: Stefano Stabellini Date: Thu, 13 Sep 2012 12:06:52 +0000 Subject: [PATCH] --- yaml --- r: 330397 b: refs/heads/master c: b3b52fd87e8f7544fde75a471108bd5bd4492c90 h: refs/heads/master i: 330395: ead8ad49af60b6a17f9f4476d54751ef2c5485aa v: v3 --- [refs] | 2 +- trunk/arch/arm/xen/enlighten.c | 14 ++++++++++++++ 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/[refs] b/[refs] index d5a7fbfa815a..cd36f597d09f 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: ef61ee0dc7ba0409dc0e8122de90d4e48d4c8669 +refs/heads/master: b3b52fd87e8f7544fde75a471108bd5bd4492c90 diff --git a/trunk/arch/arm/xen/enlighten.c b/trunk/arch/arm/xen/enlighten.c index c2a47a724870..036a4d84e861 100644 --- a/trunk/arch/arm/xen/enlighten.c +++ b/trunk/arch/arm/xen/enlighten.c @@ -1,8 +1,12 @@ #include +#include +#include #include #include +#include #include #include +#include #include #include #include @@ -42,6 +46,7 @@ EXPORT_SYMBOL_GPL(xen_remap_domain_mfn_range); * see Documentation/devicetree/bindings/arm/xen.txt for the * documentation of the Xen Device Tree format. */ +#define GRANT_TABLE_PHYSADDR 0 static int __init xen_guest_init(void) { struct xen_add_to_physmap xatp; @@ -51,6 +56,7 @@ static int __init xen_guest_init(void) const char *s = NULL; const char *version = NULL; const char *xen_prefix = "xen,xen-"; + struct resource res; node = of_find_compatible_node(NULL, NULL, "xen,xen"); if (!node) { @@ -65,6 +71,9 @@ static int __init xen_guest_init(void) pr_debug("Xen version not found\n"); return 0; } + if (of_address_to_resource(node, GRANT_TABLE_PHYSADDR, &res)) + return 0; + xen_hvm_resume_frames = res.start >> PAGE_SHIFT; xen_domain_type = XEN_HVM_DOMAIN; xen_setup_features(); @@ -98,6 +107,11 @@ static int __init xen_guest_init(void) * is required to use VCPUOP_register_vcpu_info to place vcpu info * for secondary CPUs as they are brought up. */ per_cpu(xen_vcpu, 0) = &HYPERVISOR_shared_info->vcpu_info[0]; + + gnttab_init(); + if (!xen_initial_domain()) + xenbus_probe(NULL); + return 0; } core_initcall(xen_guest_init);