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] To allow kernel to handle radically different hypervisor

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] To allow kernel to handle radically different hypervisors in the future,
From: Xen patchbot -unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Fri, 28 Oct 2005 16:44:10 +0000
Delivery-date: Fri, 28 Oct 2005 16:42:16 +0000
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
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 kaf24@xxxxxxxxxxxxxxxxxxxx
# Node ID c5cd971aa96c166d2780cb3e284267c07e36fb47
# Parent  f8087c9297aa38260feb6757daaef6dabb296d29
To allow kernel to handle radically different hypervisors in the future,
I thought a magic field in the start_info might be useful.  I just chose
"Xen-<major>.<minor>", but feel free to change it.

Signed-off-by: Rusty Russell <rusty@xxxxxxxxxxxxxxx> (authored)

diff -r f8087c9297aa -r c5cd971aa96c tools/libxc/xc_linux_build.c
--- a/tools/libxc/xc_linux_build.c      Thu Oct 27 16:43:29 2005
+++ b/tools/libxc/xc_linux_build.c      Thu Oct 27 16:47:53 2005
@@ -350,6 +350,8 @@
     start_info = xc_map_foreign_range(
         xc_handle, dom, PAGE_SIZE, PROT_READ|PROT_WRITE, page_array[0]);
     memset(start_info, 0, sizeof(*start_info));
+    rc = xc_version(xc_handle, XENVER_version, NULL);
+    sprintf(start_info->magic, "Xen-%i.%i", rc >> 16, rc & (0xFFFF));
     start_info->flags        = flags;
     start_info->store_mfn    = nr_pages - 2;
     start_info->store_evtchn = store_evtchn;
@@ -624,6 +626,8 @@
         xc_handle, dom, PAGE_SIZE, PROT_READ|PROT_WRITE,
         page_array[(vstartinfo_start-dsi.v_start)>>PAGE_SHIFT]);
     memset(start_info, 0, sizeof(*start_info));
+    rc = xc_version(xc_handle, XENVER_version, NULL);
+    sprintf(start_info->magic, "Xen-%i.%i", rc >> 16, rc & (0xFFFF));
     start_info->nr_pages     = nr_pages;
     start_info->shared_info  = shared_info_frame << PAGE_SHIFT;
     start_info->flags        = flags;
diff -r f8087c9297aa -r c5cd971aa96c xen/arch/ia64/xen/domain.c
--- a/xen/arch/ia64/xen/domain.c        Thu Oct 27 16:43:29 2005
+++ b/xen/arch/ia64/xen/domain.c        Thu Oct 27 16:47:53 2005
@@ -28,6 +28,7 @@
 #include <xen/event.h>
 //#include <xen/shadow.h>
 #include <xen/console.h>
+#include <xen/compile.h>
 
 #include <xen/elf.h>
 //#include <asm/page.h>
@@ -930,6 +931,7 @@
        si = (start_info_t *)alloc_xenheap_page();
        memset(si, 0, PAGE_SIZE);
        d->shared_info->arch.start_info_pfn = __pa(si) >> PAGE_SHIFT;
+       sprintf(si->magic, "Xen-%i.%i", XEN_VERSION, XEN_SUBVERSION);
 
 #if 0
        si->nr_pages     = d->tot_pages;
diff -r f8087c9297aa -r c5cd971aa96c xen/arch/x86/domain_build.c
--- a/xen/arch/x86/domain_build.c       Thu Oct 27 16:43:29 2005
+++ b/xen/arch/x86/domain_build.c       Thu Oct 27 16:47:53 2005
@@ -15,6 +15,7 @@
 #include <xen/elf.h>
 #include <xen/kernel.h>
 #include <xen/domain.h>
+#include <xen/compile.h>
 #include <asm/regs.h>
 #include <asm/system.h>
 #include <asm/io.h>
@@ -602,6 +603,7 @@
     si->pt_base      = vpt_start;
     si->nr_pt_frames = nr_pt_pages;
     si->mfn_list     = vphysmap_start;
+    sprintf(si->magic, "Xen-%i.%i", XEN_VERSION, XEN_SUBVERSION);
 
     /* Write the phys->machine and machine->phys table entries. */
     for ( pfn = 0; pfn < d->tot_pages; pfn++ )
diff -r f8087c9297aa -r c5cd971aa96c xen/include/public/xen.h
--- a/xen/include/public/xen.h  Thu Oct 27 16:43:29 2005
+++ b/xen/include/public/xen.h  Thu Oct 27 16:47:53 2005
@@ -410,6 +410,7 @@
 #define MAX_GUEST_CMDLINE 1024
 typedef struct start_info {
     /* THE FOLLOWING ARE FILLED IN BOTH ON INITIAL BOOT AND ON RESUME.    */
+    char magic[32];             /* "Xen-<version>.<subversion>". */
     unsigned long nr_pages;     /* Total pages allocated to this domain.  */
     unsigned long shared_info;  /* MACHINE address of shared info struct. */
     uint32_t flags;             /* SIF_xxx flags.                         */

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

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] To allow kernel to handle radically different hypervisors in the future,, Xen patchbot -unstable <=