#include <xen/xen.h>
#include <xen/interface/xen.h>
#include <xen/interface/memory.h>
+#include <xen/interface/hvm/params.h>
#include <xen/platform_pci.h>
#include <xen/features.h>
+#include <xen/grant_table.h>
+#include <xen/hvm.h>
+#include <xen/xenbus.h>
#include <asm/xen/hypervisor.h>
#include <asm/xen/hypercall.h>
#include <linux/module.h>
struct xen_add_to_physmap xatp;
static struct shared_info *shared_info_page = 0;
struct device_node *node;
+ struct resource res;
node = of_find_compatible_node(NULL, NULL, "arm,xen");
if (!node) {
pr_info("No Xen support\n");
return 0;
}
+ if (of_address_to_resource(node, 0, &res))
+ return -EINVAL;
+ xen_hvm_resume_frames = res.start >> PAGE_SHIFT;
xen_domain_type = XEN_HVM_DOMAIN;
xen_setup_features();
per_cpu(xen_vcpu, cpu) =
&HYPERVISOR_shared_info->vcpu_info[cpu];
}
+
+ gnttab_init();
+ if (!xen_initial_domain())
+ xenbus_probe(NULL);
+
return 0;
}
EXPORT_SYMBOL_GPL(xen_guest_init);
static grant_ref_t **gnttab_list;
static unsigned int nr_grant_frames;
-static unsigned int boot_max_nr_grant_frames;
+static unsigned int boot_max_nr_grant_frames = 1;
static int gnttab_free_count;
static grant_ref_t gnttab_free_head;
static DEFINE_SPINLOCK(gnttab_list_lock);