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] x86: fold GDT and LDT page types

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] x86: fold GDT and LDT page types
From: Xen patchbot-unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Tue, 08 Apr 2008 02:01:35 -0700
Delivery-date: Tue, 08 Apr 2008 02:05:10 -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 Keir Fraser <keir.fraser@xxxxxxxxxx>
# Date 1207311034 -3600
# Node ID 7d617282f18e41afd83b5ce9d40133f12ed75e77
# Parent  b2a63fc4fac9ee08f78279adb7cfd1f9fb8783a9
x86: fold GDT and LDT page types

...it's an unecessary distinction

Signed-off-by: Jan Beulich <jbeulich@xxxxxxxxxx>
---
 xen/arch/x86/mm.c        |   19 +++++++------------
 xen/include/asm-x86/mm.h |    3 +--
 2 files changed, 8 insertions(+), 14 deletions(-)

diff -r b2a63fc4fac9 -r 7d617282f18e xen/arch/x86/mm.c
--- a/xen/arch/x86/mm.c Fri Apr 04 13:03:57 2008 +0100
+++ b/xen/arch/x86/mm.c Fri Apr 04 13:10:34 2008 +0100
@@ -476,7 +476,7 @@ static void invalidate_shadow_ldt(struct
         if ( pfn == 0 ) continue;
         l1e_write(&v->arch.perdomain_ptes[i], l1e_empty());
         page = mfn_to_page(pfn);
-        ASSERT_PAGE_IS_TYPE(page, PGT_ldt_page);
+        ASSERT_PAGE_IS_TYPE(page, PGT_seg_desc_page);
         ASSERT_PAGE_IS_DOMAIN(page, v->domain);
         put_page_and_type(page);
     }
@@ -530,7 +530,7 @@ int map_ldt_shadow_page(unsigned int off
     if ( unlikely(!mfn_valid(mfn)) )
         return 0;
 
-    okay = get_page_and_type(mfn_to_page(mfn), d, PGT_ldt_page);
+    okay = get_page_and_type(mfn_to_page(mfn), d, PGT_seg_desc_page);
     if ( unlikely(!okay) )
         return 0;
 
@@ -924,7 +924,7 @@ void put_page_from_l1e(l1_pgentry_t l1e,
     {
         /* We expect this is rare so we blow the entire shadow LDT. */
         if ( unlikely(((page->u.inuse.type_info & PGT_type_mask) == 
-                       PGT_ldt_page)) &&
+                       PGT_seg_desc_page)) &&
              unlikely(((page->u.inuse.type_info & PGT_count_mask) != 0)) &&
              (d == e) )
         {
@@ -1748,8 +1748,7 @@ static int alloc_page_type(struct page_i
         return alloc_l3_table(page);
     case PGT_l4_page_table:
         return alloc_l4_table(page);
-    case PGT_gdt_page:
-    case PGT_ldt_page:
+    case PGT_seg_desc_page:
         return alloc_segdesc_page(page);
     default:
         printk("Bad type in alloc_page_type %lx t=%" PRtype_info " c=%x\n", 
@@ -3134,7 +3133,7 @@ long set_gdt(struct vcpu *v,
     {
         mfn = frames[i] = gmfn_to_mfn(d, frames[i]);
         if ( !mfn_valid(mfn) ||
-             !get_page_and_type(mfn_to_page(mfn), d, PGT_gdt_page) )
+             !get_page_and_type(mfn_to_page(mfn), d, PGT_seg_desc_page) )
             goto fail;
     }
 
@@ -3211,12 +3210,8 @@ long do_update_descriptor(u64 pa, u64 de
     /* Check if the given frame is in use in an unsafe context. */
     switch ( page->u.inuse.type_info & PGT_type_mask )
     {
-    case PGT_gdt_page:
-        if ( unlikely(!get_page_type(page, PGT_gdt_page)) )
-            goto out;
-        break;
-    case PGT_ldt_page:
-        if ( unlikely(!get_page_type(page, PGT_ldt_page)) )
+    case PGT_seg_desc_page:
+        if ( unlikely(!get_page_type(page, PGT_seg_desc_page)) )
             goto out;
         break;
     default:
diff -r b2a63fc4fac9 -r 7d617282f18e xen/include/asm-x86/mm.h
--- a/xen/include/asm-x86/mm.h  Fri Apr 04 13:03:57 2008 +0100
+++ b/xen/include/asm-x86/mm.h  Fri Apr 04 13:10:34 2008 +0100
@@ -69,8 +69,7 @@ struct page_info
 #define PGT_l2_page_table   (2U<<29) /* using this page as an L2 page table? */
 #define PGT_l3_page_table   (3U<<29) /* using this page as an L3 page table? */
 #define PGT_l4_page_table   (4U<<29) /* using this page as an L4 page table? */
-#define PGT_gdt_page        (5U<<29) /* using this page in a GDT? */
-#define PGT_ldt_page        (6U<<29) /* using this page in an LDT? */
+#define PGT_seg_desc_page   (5U<<29) /* using this page in a GDT/LDT? */
 #define PGT_writable_page   (7U<<29) /* has writable mappings of this page? */
 #define PGT_type_mask       (7U<<29) /* Bits 29-31. */
 

_______________________________________________
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] x86: fold GDT and LDT page types, Xen patchbot-unstable <=