|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-changelog] [xen-unstable] xen: arm: initialise dom_{xen, io, cow}
# HG changeset patch
# User Ian Campbell <ian.campbell@xxxxxxxxxx>
# Date 1355926585 0
# Node ID c5f7a894c6695ce6bb45a889b489ae6b84184ae6
# Parent 8dad184a8e2a9c539c4c359f4cab165f5eac29e0
xen: arm: initialise dom_{xen,io,cow}
Signed-off-by: Ian Campbell <ian.campbell@xxxxxxxxxx>
Acked-by: Tim Deegan <tim@xxxxxxx>
Acked-by: Stefano Stabellini <stefano.stabellini@xxxxxxxxxxxxx>
Committed-by: Ian Campbell <ian.campbell@xxxxxxxxxx>
---
diff -r 8dad184a8e2a -r c5f7a894c669 xen/arch/arm/dummy.S
--- a/xen/arch/arm/dummy.S Wed Dec 19 14:16:25 2012 +0000
+++ b/xen/arch/arm/dummy.S Wed Dec 19 14:16:25 2012 +0000
@@ -10,6 +10,5 @@ x: mov pc, lr
DUMMY(nr_irqs_gsi);
/* Other */
-DUMMY(dom_cow);
DUMMY(send_timer_event);
DUMMY(share_xen_page_with_privileged_guests);
diff -r 8dad184a8e2a -r c5f7a894c669 xen/arch/arm/mm.c
--- a/xen/arch/arm/mm.c Wed Dec 19 14:16:25 2012 +0000
+++ b/xen/arch/arm/mm.c Wed Dec 19 14:16:25 2012 +0000
@@ -30,12 +30,13 @@
#include <xen/event.h>
#include <xen/guest_access.h>
#include <xen/domain_page.h>
+#include <xen/err.h>
#include <asm/page.h>
#include <asm/current.h>
#include <public/memory.h>
#include <xen/sched.h>
-struct domain *dom_xen, *dom_io;
+struct domain *dom_xen, *dom_io, *dom_cow;
/* Static start-of-day pagetables that we use before the allocators are up */
lpae_t xen_pgtable[LPAE_ENTRIES] __attribute__((__aligned__(4096)));
@@ -206,6 +207,31 @@ void unmap_domain_page(const void *va)
local_irq_restore(flags);
}
+void __init arch_init_memory(void)
+{
+ /*
+ * Initialise our DOMID_XEN domain.
+ * Any Xen-heap pages that we will allow to be mapped will have
+ * their domain field set to dom_xen.
+ */
+ dom_xen = domain_create(DOMID_XEN, DOMCRF_dummy, 0);
+ BUG_ON(IS_ERR(dom_xen));
+
+ /*
+ * Initialise our DOMID_IO domain.
+ * This domain owns I/O pages that are within the range of the page_info
+ * array. Mappings occur at the priv of the caller.
+ */
+ dom_io = domain_create(DOMID_IO, DOMCRF_dummy, 0);
+ BUG_ON(IS_ERR(dom_io));
+
+ /*
+ * Initialise our COW domain.
+ * This domain owns sharable pages.
+ */
+ dom_cow = domain_create(DOMID_COW, DOMCRF_dummy, 0);
+ BUG_ON(IS_ERR(dom_cow));
+}
/* Boot-time pagetable setup.
* Changes here may need matching changes in head.S */
diff -r 8dad184a8e2a -r c5f7a894c669 xen/arch/arm/setup.c
--- a/xen/arch/arm/setup.c Wed Dec 19 14:16:25 2012 +0000
+++ b/xen/arch/arm/setup.c Wed Dec 19 14:16:25 2012 +0000
@@ -265,6 +265,8 @@ void __init start_xen(unsigned long boot
rcu_init();
+ arch_init_memory();
+
local_irq_enable();
smp_prepare_cpus(cpus);
diff -r 8dad184a8e2a -r c5f7a894c669 xen/include/asm-arm/setup.h
--- a/xen/include/asm-arm/setup.h Wed Dec 19 14:16:25 2012 +0000
+++ b/xen/include/asm-arm/setup.h Wed Dec 19 14:16:25 2012 +0000
@@ -3,6 +3,8 @@
#include <public/version.h>
+void arch_init_memory(void);
+
void copy_from_paddr(void *dst, paddr_t paddr, unsigned long len, int
attrindx);
void arch_get_xen_caps(xen_capabilities_info_t *info);
_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |