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] [linux-2.6.18-xen] xen: add privileged (dom0) kernel fea

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [linux-2.6.18-xen] xen: add privileged (dom0) kernel feature indication
From: Xen patchbot-linux-2.6.18-xen <patchbot@xxxxxxx>
Date: Sat, 23 Jul 2011 09:11:06 +0100
Delivery-date: Sat, 23 Jul 2011 01:11:12 -0700
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/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/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 Jan Beulich <jbeulich@xxxxxxxxxx>
# Date 1311407491 -3600
# Node ID 678eefedc07b94b15774d05b7239201d7038a298
# Parent  ada524c58c95a348e77c3c0aa11bcfcb5c578f70
xen: add privileged (dom0) kernel feature indication

Signed-off-by: Jan Beulich <jbeulich@xxxxxxxxxx>
---


diff -r ada524c58c95 -r 678eefedc07b arch/i386/kernel/head-xen.S
--- a/arch/i386/kernel/head-xen.S       Sat Jul 23 08:51:07 2011 +0100
+++ b/arch/i386/kernel/head-xen.S       Sat Jul 23 08:51:31 2011 +0100
@@ -12,6 +12,7 @@
 #include <asm/dwarf2.h>
 #include <xen/interface/xen.h>
 #include <xen/interface/elfnote.h>
+#include <xen/interface/features.h>
 
 /*
  * References to members of the new_cpu_data structure.
@@ -142,6 +143,18 @@
        .quad 0x0000000000000000        /* 0xf0 - unused */
        .quad 0x0000000000000000        /* 0xf8 - GDT entry 31: double-fault 
TSS */
 
+#ifdef CONFIG_XEN_UNPRIVILEGED_GUEST
+# define XEN_DOM0_CAP          0
+# define XEN_DOM0_CAP_STR      ""
+#else
+# define XEN_DOM0_CAP          (1 << XENFEAT_dom0)
+# if CONFIG_XEN_COMPAT < 0x040200
+#  define XEN_DOM0_CAP_STR     ""
+# else
+#  define XEN_DOM0_CAP_STR     "|dom0"
+# endif
+#endif
+
 #if CONFIG_XEN_COMPAT <= 0x030002
 /*
  * __xen_guest information
@@ -195,7 +208,18 @@
        ELFNOTE(Xen, XEN_ELFNOTE_ENTRY,          .long,  startup_32)
        ELFNOTE(Xen, XEN_ELFNOTE_HYPERCALL_PAGE, .long,  hypercall_page)
        ELFNOTE(Xen, XEN_ELFNOTE_HV_START_LOW,   .long,  HYPERVISOR_VIRT_START)
-       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_FEATURES,       .ascii, "writable_page_tables";
+                                                .ascii  
"|writable_descriptor_tables";
+                                                .ascii  
"|auto_translated_physmap";
+                                                .ascii  "|pae_pgdir_above_4gb";
+                                                .ascii  
"|supervisor_mode_kernel";
+                                                .asciz  XEN_DOM0_CAP_STR)
+       ELFNOTE(Xen, XEN_ELFNOTE_SUPPORTED_FEATURES, .long, XEN_DOM0_CAP |
+                                          (1 << XENFEAT_writable_page_tables) |
+                                          (1 << 
XENFEAT_writable_descriptor_tables) |
+                                          (1 << 
XENFEAT_auto_translated_physmap) |
+                                          (1 << XENFEAT_pae_pgdir_above_4gb) |
+                                          (1 << 
XENFEAT_supervisor_mode_kernel))
 #ifdef CONFIG_X86_PAE
        ELFNOTE(Xen, XEN_ELFNOTE_PAE_MODE,       .asciz, "yes")
        ELFNOTE(Xen, XEN_ELFNOTE_L1_MFN_VALID,   .quad,  
_PAGE_PRESENT,_PAGE_PRESENT)
diff -r ada524c58c95 -r 678eefedc07b arch/x86_64/kernel/head-xen.S
--- a/arch/x86_64/kernel/head-xen.S     Sat Jul 23 08:51:07 2011 +0100
+++ b/arch/x86_64/kernel/head-xen.S     Sat Jul 23 08:51:31 2011 +0100
@@ -24,6 +24,7 @@
 #include <asm/cache.h>
 #include <asm/dwarf2.h>
 #include <xen/interface/elfnote.h>
+#include <xen/interface/features.h>
 
        .section .bootstrap.text, "ax", @progbits
        .code64
@@ -160,6 +161,18 @@
 ENTRY(empty_zero_page)
        .skip PAGE_SIZE
 
+#ifdef CONFIG_XEN_UNPRIVILEGED_GUEST
+# define XEN_DOM0_CAP          0
+# define XEN_DOM0_CAP_STR      ""
+#else
+# define XEN_DOM0_CAP          (1 << XENFEAT_dom0)
+# if CONFIG_XEN_COMPAT < 0x040200
+#  define XEN_DOM0_CAP_STR     ""
+# else
+#  define XEN_DOM0_CAP_STR     "|dom0"
+# endif
+#endif
+
 #if CONFIG_XEN_COMPAT <= 0x030002
 /*
  * __xen_guest information
@@ -206,6 +219,15 @@
        ELFNOTE(Xen, XEN_ELFNOTE_ENTRY,          .quad,  startup_64)
        ELFNOTE(Xen, XEN_ELFNOTE_HYPERCALL_PAGE, .quad,  hypercall_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|supervisor_mode_kernel")
+       ELFNOTE(Xen, XEN_ELFNOTE_FEATURES,       .ascii, "writable_page_tables";
+                                                .ascii  
"|writable_descriptor_tables";
+                                                .ascii  
"|auto_translated_physmap";
+                                                .ascii  
"|supervisor_mode_kernel";
+                                                .asciz  XEN_DOM0_CAP_STR)
+       ELFNOTE(Xen, XEN_ELFNOTE_SUPPORTED_FEATURES, .long, XEN_DOM0_CAP |
+                                          (1 << XENFEAT_writable_page_tables) |
+                                          (1 << 
XENFEAT_writable_descriptor_tables) |
+                                          (1 << 
XENFEAT_auto_translated_physmap) |
+                                          (1 << 
XENFEAT_supervisor_mode_kernel))
        ELFNOTE(Xen, XEN_ELFNOTE_LOADER,         .asciz, "generic")
        ELFNOTE(Xen, XEN_ELFNOTE_SUSPEND_CANCEL, .long,  1)

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

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] [linux-2.6.18-xen] xen: add privileged (dom0) kernel feature indication, Xen patchbot-linux-2 . 6 . 18-xen <=