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] [XEN] Make the compat-mode l4 page table

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] [XEN] Make the compat-mode l4 page table look more like a page table
From: Xen patchbot-unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Wed, 28 Feb 2007 12:20:25 -0800
Delivery-date: Wed, 28 Feb 2007 12:21:31 -0800
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 Tim Deegan <Tim.Deegan@xxxxxxxxxxxxx>
# Date 1172668647 0
# Node ID 5943a8314d699de56ee89bd67c0ecf615e0e4db6
# Parent  9edd8d7c9355c4c7af358322daf68720042f0ec7
[XEN] Make the compat-mode l4 page table look more like a page table
and remove some special-case code in the shadows.
Signed-off-by: Tim Deegan <Tim.Deegan@xxxxxxxxxxxxx>
---
 xen/arch/x86/domain.c           |    4 ++++
 xen/arch/x86/mm/shadow/common.c |    7 ++-----
 xen/arch/x86/mm/shadow/multi.c  |    9 ++-------
 3 files changed, 8 insertions(+), 12 deletions(-)

diff -r 9edd8d7c9355 -r 5943a8314d69 xen/arch/x86/domain.c
--- a/xen/arch/x86/domain.c     Wed Feb 28 10:40:52 2007 +0000
+++ b/xen/arch/x86/domain.c     Wed Feb 28 13:17:27 2007 +0000
@@ -229,6 +229,10 @@ static int setup_compat_l4(struct vcpu *
 
     if ( !pg )
         return -ENOMEM;
+
+    /* This page needs to look like a pagetable so that it can be shadowed */
+    pg->u.inuse.type_info = PGT_l4_page_table|PGT_validated;
+
     l4tab = copy_page(page_to_virt(pg), idle_pg_table);
     l4tab[l4_table_offset(LINEAR_PT_VIRT_START)] =
         l4e_from_page(pg, __PAGE_HYPERVISOR);
diff -r 9edd8d7c9355 -r 5943a8314d69 xen/arch/x86/mm/shadow/common.c
--- a/xen/arch/x86/mm/shadow/common.c   Wed Feb 28 10:40:52 2007 +0000
+++ b/xen/arch/x86/mm/shadow/common.c   Wed Feb 28 13:17:27 2007 +0000
@@ -489,11 +489,7 @@ void shadow_demote(struct vcpu *v, mfn_t
 {
     struct page_info *page = mfn_to_page(gmfn);
 
-#ifdef CONFIG_COMPAT
-    if ( !IS_COMPAT(v->domain) || type != SH_type_l4_64_shadow )
-#endif
-        ASSERT(test_bit(_PGC_page_table, &page->count_info));
-
+    ASSERT(test_bit(_PGC_page_table, &page->count_info));
     ASSERT(test_bit(type, &page->shadow_flags));
 
     clear_bit(type, &page->shadow_flags);
@@ -1625,6 +1621,7 @@ void sh_destroy_shadow(struct vcpu *v, m
         break;
     case SH_type_l2h_64_shadow:
         ASSERT( IS_COMPAT(v->domain) );
+        /* Fall through... */
     case SH_type_l2_64_shadow:
         SHADOW_INTERNAL_NAME(sh_destroy_l2_shadow, 4, 4)(v, smfn);
         break;
diff -r 9edd8d7c9355 -r 5943a8314d69 xen/arch/x86/mm/shadow/multi.c
--- a/xen/arch/x86/mm/shadow/multi.c    Wed Feb 28 10:40:52 2007 +0000
+++ b/xen/arch/x86/mm/shadow/multi.c    Wed Feb 28 13:17:27 2007 +0000
@@ -3368,16 +3368,11 @@ sh_set_toplevel_shadow(struct vcpu *v,
     
 #if SHADOW_OPTIMIZATIONS & SHOPT_EARLY_UNSHADOW
     /* Once again OK to unhook entries from this table if we see fork/exit */
-#if CONFIG_PAGING_LEVELS == 4
-    if ( IS_COMPAT(d) )
-        ASSERT(!sh_mfn_is_a_page_table(gmfn));
-    else
-#endif
-        ASSERT(sh_mfn_is_a_page_table(gmfn));
+    ASSERT(sh_mfn_is_a_page_table(gmfn));
     mfn_to_page(gmfn)->shadow_flags &= ~SHF_unhooked_mappings;
 #endif
 
-    /* Pin the shadow and put it (back) on the list of top-level shadows */
+    /* Pin the shadow and put it (back) on the list of pinned shadows */
     if ( sh_pin(v, smfn) == 0 )
     {
         SHADOW_ERROR("can't pin %#lx as toplevel shadow\n", mfn_x(smfn));

_______________________________________________
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] [XEN] Make the compat-mode l4 page table look more like a page table, Xen patchbot-unstable <=