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] [BUILDER] Propagate the native protocol A

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] [BUILDER] Propagate the native protocol ABI for a guest out of the
From: Xen patchbot-unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Thu, 17 May 2007 11:10:08 -0700
Delivery-date: Thu, 17 May 2007 11:08:59 -0700
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 Ian Campbell <ian.campbell@xxxxxxxxxxxxx>
# Date 1179248088 -3600
# Node ID 5c7a1e3abd5433c7b2eff6950bd566ec9d500eba
# Parent  e1f43038f1d803aabbb9b25f1713cfea0123c053
[BUILDER] Propagate the native protocol ABI for a guest out of the
domain builder and in to python code.

This knowledge will be useful to allow us to pre-seed the protocol
field in a VBD entry in xenstore which will allow us to run older
kernels in a 32on64 mixed environment.

Signed-off-by: Ian Campbell <ian.campbell@xxxxxxxxxxxxx>
---
 tools/libxc/xc_dom.h              |    1 +
 tools/libxc/xc_dom_x86.c          |    4 ++++
 tools/python/xen/lowlevel/xc/xc.c |   19 +++++++++++++++----
 3 files changed, 20 insertions(+), 4 deletions(-)

diff -r e1f43038f1d8 -r 5c7a1e3abd54 tools/libxc/xc_dom.h
--- a/tools/libxc/xc_dom.h      Tue May 15 17:01:57 2007 +0100
+++ b/tools/libxc/xc_dom.h      Tue May 15 17:54:48 2007 +0100
@@ -136,6 +136,7 @@ struct xc_dom_arch {
     int (*vcpu) (struct xc_dom_image * dom, void *vcpu_ctxt);
 
     char *guest_type;
+    char *native_protocol;
     int page_shift;
     int sizeof_pfn;
 
diff -r e1f43038f1d8 -r 5c7a1e3abd54 tools/libxc/xc_dom_x86.c
--- a/tools/libxc/xc_dom_x86.c  Tue May 15 17:01:57 2007 +0100
+++ b/tools/libxc/xc_dom_x86.c  Tue May 15 17:54:48 2007 +0100
@@ -19,6 +19,7 @@
 #include <xen/foreign/x86_64.h>
 #include <xen/hvm/hvm_info_table.h>
 #include <xen/hvm/e820.h>
+#include <xen/io/protocols.h>
 
 #include "xg_private.h"
 #include "xc_dom.h"
@@ -589,6 +590,7 @@ static int vcpu_x86_64(struct xc_dom_ima
 
 static struct xc_dom_arch xc_dom_32 = {
     .guest_type = "xen-3.0-x86_32",
+    .native_protocol = XEN_IO_PROTO_ABI_X86_32,
     .page_shift = PAGE_SHIFT_X86,
     .sizeof_pfn = 4,
     .alloc_magic_pages = alloc_magic_pages,
@@ -600,6 +602,7 @@ static struct xc_dom_arch xc_dom_32 = {
 };
 static struct xc_dom_arch xc_dom_32_pae = {
     .guest_type = "xen-3.0-x86_32p",
+    .native_protocol = XEN_IO_PROTO_ABI_X86_32,
     .page_shift = PAGE_SHIFT_X86,
     .sizeof_pfn = 4,
     .alloc_magic_pages = alloc_magic_pages,
@@ -612,6 +615,7 @@ static struct xc_dom_arch xc_dom_32_pae 
 
 static struct xc_dom_arch xc_dom_64 = {
     .guest_type = "xen-3.0-x86_64",
+    .native_protocol = XEN_IO_PROTO_ABI_X86_64,
     .page_shift = PAGE_SHIFT_X86,
     .sizeof_pfn = 8,
     .alloc_magic_pages = alloc_magic_pages,
diff -r e1f43038f1d8 -r 5c7a1e3abd54 tools/python/xen/lowlevel/xc/xc.c
--- a/tools/python/xen/lowlevel/xc/xc.c Tue May 15 17:01:57 2007 +0100
+++ b/tools/python/xen/lowlevel/xc/xc.c Tue May 15 17:54:48 2007 +0100
@@ -407,6 +407,7 @@ static PyObject *pyxc_linux_build(XcObje
     unsigned long console_mfn = 0;
     PyObject* elfnote_dict;
     PyObject* elfnote = NULL;
+    PyObject* ret;
     int i;
 
     static char *kwd_list[] = { "domid", "store_evtchn", "memsize",
@@ -455,12 +456,22 @@ static PyObject *pyxc_linux_build(XcObje
        Py_DECREF(elfnote);
     }
 
+    ret = Py_BuildValue("{s:i,s:i,s:N}",
+                       "store_mfn", store_mfn,
+                       "console_mfn", console_mfn,
+                       "notes", elfnote_dict);
+
+    if ( dom->arch_hooks->native_protocol )
+    {
+       PyObject *native_protocol =
+           Py_BuildValue("s", dom->arch_hooks->native_protocol);
+       PyDict_SetItemString(ret, "native_protocol", native_protocol);
+       Py_DECREF(native_protocol);
+    }
+
     xc_dom_release(dom);
 
-    return Py_BuildValue("{s:i,s:i,s:N}", 
-                         "store_mfn", store_mfn,
-                         "console_mfn", console_mfn,
-                        "notes", elfnote_dict);
+    return ret;
 
   out:
     xc_dom_release(dom);

_______________________________________________
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] [BUILDER] Propagate the native protocol ABI for a guest out of the, Xen patchbot-unstable <=