WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-changelog

[Xen-changelog] [xen-unstable] New domain builder arch_setup hook clean

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] New domain builder arch_setup hook clean up.
From: Xen patchbot-unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Fri, 02 Feb 2007 10:45:09 -0800
Delivery-date: Fri, 02 Feb 2007 10:45:30 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-changelog-request@lists.xensource.com?subject=help>
List-id: BK change log <xen-changelog.lists.xensource.com>
List-post: <mailto:xen-changelog@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: xen-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
# HG changeset patch
# User kfraser@xxxxxxxxxxxxxxxxxxxxx
# Date 1170431427 0
# Node ID 82171212156b9b4133b0e1735a6a2daec078af99
# Parent  ed68ca4368fa043039563d3a2c7e2685d447203c
New domain builder arch_setup hook clean up.
 arch_setup_early  -> arch_setup_meminit
 arch_setup_middle -> arch_setup_bootearly
 arch_setup_late   -> arch_setup_bootlate

Signed-off-by: Isaku Yamahata <yamahata@xxxxxxxxxxxxx>
---
 tools/libxc/xc_dom_boot.c |   99 ++++++++++++++++++++++------------------------
 tools/libxc/xc_dom_ia64.c |    6 --
 2 files changed, 49 insertions(+), 56 deletions(-)

diff -r ed68ca4368fa -r 82171212156b tools/libxc/xc_dom_boot.c
--- a/tools/libxc/xc_dom_boot.c Fri Feb 02 15:41:45 2007 +0000
+++ b/tools/libxc/xc_dom_boot.c Fri Feb 02 15:50:27 2007 +0000
@@ -144,7 +144,7 @@ static int x86_shadow(int xc, domid_t do
     return rc;
 }
 
-static int arch_setup_early(struct xc_dom_image *dom)
+static int arch_setup_meminit(struct xc_dom_image *dom)
 {
     int rc = 0;
 
@@ -157,13 +157,13 @@ static int arch_setup_early(struct xc_do
     return rc;
 }
 
-static int arch_setup_middle(struct xc_dom_image *dom)
-{
-    xc_dom_printf("%s: doing nothing\n", __FUNCTION__);
-    return 0;
-}
-
-static int arch_setup_late(struct xc_dom_image *dom)
+static int arch_setup_bootearly(struct xc_dom_image *dom)
+{
+    xc_dom_printf("%s: doing nothing\n", __FUNCTION__);
+    return 0;
+}
+
+static int arch_setup_bootlate(struct xc_dom_image *dom)
 {
     static const struct {
        char *guest;
@@ -263,13 +263,13 @@ static int arch_setup_late(struct xc_dom
 
 #elif defined(__ia64__)
 
-static int arch_setup_early(struct xc_dom_image *dom)
-{
-    xc_dom_printf("%s: doing nothing\n", __FUNCTION__);
-    return 0;
-}
-
-static int arch_setup_middle(struct xc_dom_image *dom)
+static int arch_setup_meminit(struct xc_dom_image *dom)
+{
+    xc_dom_printf("%s: doing nothing\n", __FUNCTION__);
+    return 0;
+}
+
+static int arch_setup_bootearly(struct xc_dom_image *dom)
 {
     DECLARE_DOMCTL;
     int rc;
@@ -281,10 +281,6 @@ static int arch_setup_middle(struct xc_d
     domctl.domain = dom->guest_domid;
     domctl.u.arch_setup.flags = 0;
 
-    /* dom->start_info_pfn should be initialized by alloc_magic_pages().
-     * However it is called later. So we initialize here.
-     */
-    dom->start_info_pfn = dom->total_pages - 3;
     domctl.u.arch_setup.bp = (dom->start_info_pfn << PAGE_SHIFT)
        + sizeof(start_info_t);
     /* 3 = start info page, xenstore page and console page */
@@ -293,7 +289,7 @@ static int arch_setup_middle(struct xc_d
     return rc;
 }
 
-static int arch_setup_late(struct xc_dom_image *dom)
+static int arch_setup_bootlate(struct xc_dom_image *dom)
 {
     unsigned int page_size = XC_DOM_PAGE_SIZE(dom);
     shared_info_t *shared_info;
@@ -317,19 +313,19 @@ static int arch_setup_late(struct xc_dom
 
 #elif defined(__powerpc64__)
 
-static int arch_setup_early(struct xc_dom_image *dom)
-{
-    xc_dom_printf("%s: doing nothing\n", __FUNCTION__);
-    return 0;
-}
-
-static int arch_setup_middle(struct xc_dom_image *dom)
-{
-    xc_dom_printf("%s: doing nothing\n", __FUNCTION__);
-    return 0;
-}
-
-static int arch_setup_late(struct xc_dom_image *dom)
+static int arch_setup_meminit(struct xc_dom_image *dom)
+{
+    xc_dom_printf("%s: doing nothing\n", __FUNCTION__);
+    return 0;
+}
+
+static int arch_setup_bootearly(struct xc_dom_image *dom)
+{
+    xc_dom_printf("%s: doing nothing\n", __FUNCTION__);
+    return 0;
+}
+
+static int arch_setup_bootlate(struct xc_dom_image *dom)
 {
     start_info_t *si =
        xc_dom_pfn_to_ptr(dom, dom->start_info_pfn, 1);
@@ -355,19 +351,19 @@ static int arch_setup_late(struct xc_dom
 
 #else
 
-static int arch_setup_early(struct xc_dom_image *dom)
-{
-    xc_dom_printf("%s: doing nothing\n", __FUNCTION__);
-    return 0;
-}
-
-static int arch_setup_middle(struct xc_dom_image *dom)
-{
-    xc_dom_printf("%s: doing nothing\n", __FUNCTION__);
-    return 0;
-}
-
-static int arch_setup_late(struct xc_dom_image *dom)
+static int arch_setup_meminit(struct xc_dom_image *dom)
+{
+    xc_dom_printf("%s: doing nothing\n", __FUNCTION__);
+    return 0;
+}
+
+static int arch_setup_bootearly(struct xc_dom_image *dom)
+{
+    xc_dom_printf("%s: doing nothing\n", __FUNCTION__);
+    return 0;
+}
+
+static int arch_setup_bootlate(struct xc_dom_image *dom)
 {
     xc_dom_printf("%s: doing nothing\n", __FUNCTION__);
     return 0;
@@ -423,7 +419,7 @@ int xc_dom_boot_mem_init(struct xc_dom_i
 
     xc_dom_printf("%s: called\n", __FUNCTION__);
 
-    if (0 != (rc = arch_setup_early(dom)))
+    if (0 != (rc = arch_setup_meminit(dom)))
        return rc;
 
     /* allocate guest memory */
@@ -438,9 +434,6 @@ int xc_dom_boot_mem_init(struct xc_dom_i
        return rc;
     }
 
-    if (0 != (rc = arch_setup_middle(dom)))
-        return rc;
-
     return 0;
 }
 
@@ -497,6 +490,10 @@ int xc_dom_boot_image(struct xc_dom_imag
 
     xc_dom_printf("%s: called\n", __FUNCTION__);
 
+    /* misc ia64 stuff*/
+    if (0 != (rc = arch_setup_bootearly(dom)))
+       return rc;
+
     /* collect some info */
     domctl.cmd = XEN_DOMCTL_getdomaininfo;
     domctl.domain = dom->guest_domid;
@@ -542,7 +539,7 @@ int xc_dom_boot_image(struct xc_dom_imag
     xc_dom_log_memory_footprint(dom);
 
     /* misc x86 stuff */
-    if (0 != (rc = arch_setup_late(dom)))
+    if (0 != (rc = arch_setup_bootlate(dom)))
        return rc;
 
     /* let the vm run */
diff -r ed68ca4368fa -r 82171212156b tools/libxc/xc_dom_ia64.c
--- a/tools/libxc/xc_dom_ia64.c Fri Feb 02 15:41:45 2007 +0000
+++ b/tools/libxc/xc_dom_ia64.c Fri Feb 02 15:50:27 2007 +0000
@@ -26,11 +26,7 @@ static int alloc_magic_pages(struct xc_d
     /* allocate special pages */
     dom->console_pfn = dom->total_pages -1;
     dom->xenstore_pfn = dom->total_pages -2;
-
-    /*
-     * this is initialized by arch_setup_middle().
-     * dom->start_info_pfn = dom->total_pages -3;
-     */
+    dom->start_info_pfn = dom->total_pages -3;
     return 0;
 }
 

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] [xen-unstable] New domain builder arch_setup hook clean up., Xen patchbot-unstable <=