xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
From: Ian Campbell <ian.campbell@citrix.com>
To: xen-devel@lists.xen.org
Cc: Ian Campbell <ian.campbell@citrix.com>
Subject: [PATCH 12/15] xen: arm: initialise dom_{xen,io,cow}
Date: Tue, 4 Dec 2012 11:56:36 +0000	[thread overview]
Message-ID: <1354622199-27504-12-git-send-email-ian.campbell@citrix.com> (raw)
In-Reply-To: <1354622173.2693.72.camel@zakaz.uk.xensource.com>

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
---
 xen/arch/arm/dummy.S        |    1 -
 xen/arch/arm/mm.c           |   28 +++++++++++++++++++++++++++-
 xen/arch/arm/setup.c        |    2 ++
 xen/include/asm-arm/setup.h |    2 ++
 4 files changed, 31 insertions(+), 2 deletions(-)

diff --git a/xen/arch/arm/dummy.S b/xen/arch/arm/dummy.S
index 7189648..3fe4ba6 100644
--- a/xen/arch/arm/dummy.S
+++ b/xen/arch/arm/dummy.S
@@ -7,6 +7,5 @@ x:	.word 0xe7f000f0 /* Undefined instruction */
 x:	mov pc, lr
 
 /* Other */
-DUMMY(dom_cow);
 DUMMY(send_timer_event);
 DUMMY(share_xen_page_with_privileged_guests);
diff --git a/xen/arch/arm/mm.c b/xen/arch/arm/mm.c
index 718f32d..d9c1ff7 100644
--- a/xen/arch/arm/mm.c
+++ b/xen/arch/arm/mm.c
@@ -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 --git a/xen/arch/arm/setup.c b/xen/arch/arm/setup.c
index 2076724..61bf47c 100644
--- a/xen/arch/arm/setup.c
+++ b/xen/arch/arm/setup.c
@@ -265,6 +265,8 @@ void __init start_xen(unsigned long boot_phys_offset,
 
     rcu_init();
 
+    arch_init_memory();
+
     local_irq_enable();
 
     smp_prepare_cpus(cpus);
diff --git a/xen/include/asm-arm/setup.h b/xen/include/asm-arm/setup.h
index 8769f66..5c84334 100644
--- a/xen/include/asm-arm/setup.h
+++ b/xen/include/asm-arm/setup.h
@@ -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);
-- 
1.7.9.1

  parent reply	other threads:[~2012-12-04 11:56 UTC|newest]

Thread overview: 32+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-12-04 11:56 [PATCH 00/15] xen: arm: remove dummy.S Ian Campbell
2012-12-04 11:56 ` [PATCH 01/15] xen: arm: define node_online_map Ian Campbell
2012-12-04 11:56 ` [PATCH 02/15] xen: arm: make smp_send_state_dump a real function Ian Campbell
2012-12-04 11:56 ` [PATCH 03/15] xen: arm: implement arch_get_info_guest Ian Campbell
2012-12-04 11:56 ` [PATCH 04/15] xen: arm: implement arch_vcpu_reset Ian Campbell
2012-12-04 11:56 ` [PATCH 05/15] xen: remove nr_irqs_gsi from generic code Ian Campbell
2012-12-04 13:43   ` Jan Beulich
2012-12-04 13:49     ` Ian Campbell
2012-12-19 14:43       ` [PATCH] " Ian Campbell
2012-12-19 15:18         ` Keir Fraser
2012-12-19 15:31         ` Jan Beulich
2012-12-19 16:05         ` Ian Campbell
2012-12-04 11:56 ` [PATCH 06/15] xen: arm: stub out pirq related functions Ian Campbell
2012-12-04 11:56 ` [PATCH 07/15] xen: arm: stub out wallclock time Ian Campbell
2012-12-04 11:56 ` [PATCH 08/15] xen: arm: stub out steal_page Ian Campbell
2012-12-04 11:56 ` [PATCH 09/15] xen: arm: stub page_is_ram_type Ian Campbell
2012-12-04 11:56 ` [PATCH 10/15] xen: arm: stub out domain_get_maximum_gpfn Ian Campbell
2012-12-04 11:56 ` [PATCH 11/15] xen: arm: stub domain_relinquish_resources Ian Campbell
2012-12-04 11:56 ` Ian Campbell [this message]
2012-12-04 14:17   ` [PATCH 12/15] xen: arm: initialise dom_{xen, io, cow} David Vrabel
2012-12-04 14:21     ` Ian Campbell
2012-12-04 11:56 ` [PATCH 13/15] xen: arm: implement send_timer_event Ian Campbell
2012-12-04 11:56 ` [PATCH 14/15] xen: arm: implement share_xen_page_with_privileged_guests Ian Campbell
2012-12-04 11:56 ` [PATCH 15/15] xen: arm: remove now empty dummy.S Ian Campbell
2012-12-19 16:05   ` Ian Campbell
2012-12-06 12:09 ` [PATCH 00/15] xen: arm: remove dummy.S Tim Deegan
2012-12-19 13:27   ` Ian Campbell
2012-12-18 17:14 ` Ian Campbell
2012-12-18 18:31   ` Stefano Stabellini
2012-12-18 20:54     ` Ian Campbell
2012-12-19 11:21       ` Stefano Stabellini
2012-12-19 14:03 ` Ian Campbell

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1354622199-27504-12-git-send-email-ian.campbell@citrix.com \
    --to=ian.campbell@citrix.com \
    --cc=xen-devel@lists.xen.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).