[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-changelog] Rename XENFEAT_ring0_kernel to slightly more generic XENFEAT_supervisor_mode_kernel.



# HG changeset patch
# User kaf24@xxxxxxxxxxxxxxxxxxxx
# Node ID 4f4625f805288891106421ea185a02f95dd9c530
# Parent  ef31d088adeb7b7f203fba70ef91542019064706
Rename XENFEAT_ring0_kernel to slightly more generic 
XENFEAT_supervisor_mode_kernel.
Add comments in public header version.h to explain what all the different
feature flags mean. Add a new flag XENFEAT_pae_pgdir_above_4gb to inform the 
guest
that its PAE page directories do not need to conform to the usual hardware
restriction.

Signed-off-by: Keir Fraser <keir@xxxxxxxxxxxxx>

diff -r ef31d088adeb -r 4f4625f80528 
linux-2.6-xen-sparse/arch/i386/kernel/head-xen.S
--- a/linux-2.6-xen-sparse/arch/i386/kernel/head-xen.S  Thu Feb 23 10:42:19 2006
+++ b/linux-2.6-xen-sparse/arch/i386/kernel/head-xen.S  Thu Feb 23 10:59:27 2006
@@ -182,7 +182,7 @@
        .ascii  ",FEATURES=writable_page_tables"
        .ascii           "|writable_descriptor_tables"
        .ascii           "|auto_translated_physmap"
-       .ascii           "|ring0_kernel"
+       .ascii           "|supervisor_mode_kernel"
 #ifdef CONFIG_X86_PAE
        .ascii  ",PAE=yes"
 #else
diff -r ef31d088adeb -r 4f4625f80528 
linux-2.6-xen-sparse/arch/i386/mm/pgtable-xen.c
--- a/linux-2.6-xen-sparse/arch/i386/mm/pgtable-xen.c   Thu Feb 23 10:42:19 2006
+++ b/linux-2.6-xen-sparse/arch/i386/mm/pgtable-xen.c   Thu Feb 23 10:59:27 2006
@@ -289,10 +289,11 @@
        unsigned long flags;
 
        if (PTRS_PER_PMD > 1) {
-               /* Ensure pgd resides below 4GB. */
-               int rc = xen_create_contiguous_region(
-                       (unsigned long)pgd, 0, 32);
-               BUG_ON(rc);
+               if (!xen_feature(XENFEAT_pae_pgdir_above_4gb)) {
+                       int rc = xen_create_contiguous_region(
+                               (unsigned long)pgd, 0, 32);
+                       BUG_ON(rc);
+               }
                if (HAVE_SHARED_KERNEL_PMD)
                        memcpy((pgd_t *)pgd + USER_PTRS_PER_PGD,
                               swapper_pg_dir + USER_PTRS_PER_PGD,
diff -r ef31d088adeb -r 4f4625f80528 
linux-2.6-xen-sparse/include/asm-i386/mach-xen/asm/segment.h
--- a/linux-2.6-xen-sparse/include/asm-i386/mach-xen/asm/segment.h      Thu Feb 
23 10:42:19 2006
+++ b/linux-2.6-xen-sparse/include/asm-i386/mach-xen/asm/segment.h      Thu Feb 
23 10:59:27 2006
@@ -61,11 +61,11 @@
 
 #define GDT_ENTRY_KERNEL_CS            (GDT_ENTRY_KERNEL_BASE + 0)
 #define __KERNEL_CS (GDT_ENTRY_KERNEL_CS * 8)
-#define GET_KERNEL_CS() (__KERNEL_CS | (xen_feature(XENFEAT_ring0_kernel)?0:1) 
)
+#define GET_KERNEL_CS() (__KERNEL_CS | 
(xen_feature(XENFEAT_supervisor_mode_kernel)?0:1) )
 
 #define GDT_ENTRY_KERNEL_DS            (GDT_ENTRY_KERNEL_BASE + 1)
 #define __KERNEL_DS (GDT_ENTRY_KERNEL_DS * 8)
-#define GET_KERNEL_DS() (__KERNEL_DS | (xen_feature(XENFEAT_ring0_kernel)?0:1) 
)
+#define GET_KERNEL_DS() (__KERNEL_DS | 
(xen_feature(XENFEAT_supervisor_mode_kernel)?0:1) )
 
 #define GDT_ENTRY_TSS                  (GDT_ENTRY_KERNEL_BASE + 4)
 #define GDT_ENTRY_LDT                  (GDT_ENTRY_KERNEL_BASE + 5)
diff -r ef31d088adeb -r 4f4625f80528 xen/common/kernel.c
--- a/xen/common/kernel.c       Thu Feb 23 10:42:19 2006
+++ b/xen/common/kernel.c       Thu Feb 23 10:59:27 2006
@@ -193,7 +193,8 @@
             if ( shadow_mode_translate(current->domain) )
                 fi.submap |= 
                     (1U << XENFEAT_writable_page_tables) |
-                    (1U << XENFEAT_auto_translated_physmap);
+                    (1U << XENFEAT_auto_translated_physmap) |
+                    (1U << XENFEAT_pae_pgdir_above_4gb);
             break;
         default:
             return -EINVAL;
diff -r ef31d088adeb -r 4f4625f80528 xen/include/public/version.h
--- a/xen/include/public/version.h      Thu Feb 23 10:42:19 2006
+++ b/xen/include/public/version.h      Thu Feb 23 10:59:27 2006
@@ -48,10 +48,34 @@
     uint32_t     submap;        /* OUT: 32-bit submap */
 } xen_feature_info_t;
 
+/*
+ * If set, the guest does not need to write-protect its pagetables, and can
+ * update them via direct writes.
+ */
 #define XENFEAT_writable_page_tables       0
+
+/*
+ * If set, the guest does not need to write-protect its segment descriptor
+ * tables, and can update them via direct writes.
+ */
 #define XENFEAT_writable_descriptor_tables 1
+
+/*
+ * If set, translation between the guest's 'pseudo-physical' address space
+ * and the host's machine address space are handled by the hypervisor. In this
+ * mode the guest does not need to perform phys-to/from-machine translations
+ * when performing page table operations.
+ */
 #define XENFEAT_auto_translated_physmap    2
-#define XENFEAT_ring0_kernel               3
+
+/* If set, the guest is running in supervisor mode (e.g., x86 ring 0). */
+#define XENFEAT_supervisor_mode_kernel     3
+
+/*
+ * If set, the guest does not need to allocate x86 PAE page directories
+ * below 4GB. This flag is usually implied by auto_translated_physmap.
+ */
+#define XENFEAT_pae_pgdir_above_4gb        4
 
 #define XENFEAT_NR_SUBMAPS 1
 

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


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.