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-devel

[Xen-devel] [PATCH 4 of 4] Add suspend_cancel flag to linux elf notes

To: xen-devel@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-devel] [PATCH 4 of 4] Add suspend_cancel flag to linux elf notes
From: Brendan Cully <brendan@xxxxxxxxx>
Date: Tue, 27 Feb 2007 22:38:23 -0800
Delivery-date: Tue, 27 Feb 2007 22:40:58 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
In-reply-to: <patchbomb.1172644699@xxxxxxxxxxxxxxxxx>
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
# HG changeset patch
# User Brendan Cully <brendan@xxxxxxxxx>
# Date 1172644689 28800
# Node ID c80136cd1ecfd5f351f48bb4d18b80f1a6fbfb5b
# Parent  c61bfd68ca422003ea6c0ed6e13e26dc881b98a8
Add suspend_cancel flag to linux elf notes.

Signed-off-by: Brendan Cully <brendan@xxxxxxxxx>

diff -r c61bfd68ca42 -r c80136cd1ecf 
linux-2.6-xen-sparse/arch/i386/kernel/head-xen.S
--- a/linux-2.6-xen-sparse/arch/i386/kernel/head-xen.S  Tue Feb 27 22:38:08 
2007 -0800
+++ b/linux-2.6-xen-sparse/arch/i386/kernel/head-xen.S  Tue Feb 27 22:38:09 
2007 -0800
@@ -206,3 +206,4 @@ ENTRY(cpu_gdt_table)
        ELFNOTE(Xen, XEN_ELFNOTE_L1_MFN_VALID,   .long,  
_PAGE_PRESENT,_PAGE_PRESENT)
 #endif
        ELFNOTE(Xen, XEN_ELFNOTE_LOADER,         .asciz, "generic")
+       ELFNOTE(Xen, XEN_ELFNOTE_SUSPEND_CANCEL, .long,  1)
diff -r c61bfd68ca42 -r c80136cd1ecf 
linux-2.6-xen-sparse/arch/x86_64/kernel/head-xen.S
--- a/linux-2.6-xen-sparse/arch/x86_64/kernel/head-xen.S        Tue Feb 27 
22:38:08 2007 -0800
+++ b/linux-2.6-xen-sparse/arch/x86_64/kernel/head-xen.S        Tue Feb 27 
22:38:09 2007 -0800
@@ -186,3 +186,4 @@ ENTRY(empty_zero_page)
        ELFNOTE(Xen, XEN_ELFNOTE_L1_MFN_VALID,   .quad,  
_PAGE_PRESENT,_PAGE_PRESENT)
        ELFNOTE(Xen, XEN_ELFNOTE_FEATURES,       .asciz, 
"writable_page_tables|writable_descriptor_tables|auto_translated_physmap|pae_pgdir_above_4gb|supervisor_mode_kernel")
        ELFNOTE(Xen, XEN_ELFNOTE_LOADER,         .asciz, "generic")
+       ELFNOTE(Xen, XEN_ELFNOTE_SUSPEND_CANCEL, .long,  1)
diff -r c61bfd68ca42 -r c80136cd1ecf tools/xcutils/readnotes.c
--- a/tools/xcutils/readnotes.c Tue Feb 27 22:38:08 2007 -0800
+++ b/tools/xcutils/readnotes.c Tue Feb 27 22:38:09 2007 -0800
@@ -80,6 +80,9 @@ static int print_notes(struct elf_binary
                        break;
                case XEN_ELFNOTE_HV_START_LOW:
                        print_numeric_note("HV_START_LOW", elf, note);
+                       break;
+               case XEN_ELFNOTE_SUSPEND_CANCEL:
+                       print_numeric_note("SUSPEND_CANCEL", elf, note);
                        break;
                default:
                        printf("unknown note type %#x\n",
diff -r c61bfd68ca42 -r c80136cd1ecf xen/common/libelf/libelf-dominfo.c
--- a/xen/common/libelf/libelf-dominfo.c        Tue Feb 27 22:38:08 2007 -0800
+++ b/xen/common/libelf/libelf-dominfo.c        Tue Feb 27 22:38:09 2007 -0800
@@ -99,6 +99,7 @@ int elf_xen_parse_note(struct elf_binary
         [XEN_ELFNOTE_PAE_MODE] = { "PAE_MODE", 1},
         [XEN_ELFNOTE_FEATURES] = { "FEATURES", 1},
         [XEN_ELFNOTE_BSD_SYMTAB] = { "BSD_SYMTAB", 1},
+        [XEN_ELFNOTE_SUSPEND_CANCEL] = { "SUSPEND_CANCEL", 0 },
     };
 /* *INDENT-ON* */
 
diff -r c61bfd68ca42 -r c80136cd1ecf xen/include/public/elfnote.h
--- a/xen/include/public/elfnote.h      Tue Feb 27 22:38:08 2007 -0800
+++ b/xen/include/public/elfnote.h      Tue Feb 27 22:38:09 2007 -0800
@@ -157,9 +157,14 @@
 #define XEN_ELFNOTE_L1_MFN_VALID  13
 
 /*
+ * Whether or not the guest supports cooperative suspend cancellation.
+ */
+#define XEN_ELFNOTE_SUSPEND_CANCEL 14
+
+/*
  * The number of the highest elfnote defined.
  */
-#define XEN_ELFNOTE_MAX XEN_ELFNOTE_L1_MFN_VALID
+#define XEN_ELFNOTE_MAX XEN_ELFNOTE_SUSPEND_CANCEL
 
 /*
  * System information exported through crash notes.

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