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: Reduce page->shadow_flags to 32 bits

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] x86: Reduce page->shadow_flags to 32 bits so we can steal space for a
From: Xen patchbot-unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Fri, 13 Jun 2008 14:10:28 -0700
Delivery-date: Fri, 13 Jun 2008 14:11:11 -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 1213289823 -3600
# Node ID 98ed32885ec029f7d5dd1646b1469e6c15296421
# Parent  8182f5158dc25a670e3b6695af245c3f6331e38a
x86: Reduce page->shadow_flags to 32 bits so we can steal space for a
spinlock_t (on 64-bit Xen) without expanding the page_info struct.

Signed-off-by: Keir Fraser <keir.fraser@xxxxxxxxxx>
---
 xen/arch/x86/mm/shadow/common.c |    6 +-----
 xen/include/asm-x86/mm.h        |   14 ++++++++++----
 2 files changed, 11 insertions(+), 9 deletions(-)

diff -r 8182f5158dc2 -r 98ed32885ec0 xen/arch/x86/mm/shadow/common.c
--- a/xen/arch/x86/mm/shadow/common.c   Thu Jun 12 17:17:44 2008 +0100
+++ b/xen/arch/x86/mm/shadow/common.c   Thu Jun 12 17:57:03 2008 +0100
@@ -463,11 +463,7 @@ void shadow_demote(struct vcpu *v, mfn_t
     clear_bit(type, &page->shadow_flags);
 
     if ( (page->shadow_flags & SHF_page_type_mask) == 0 )
-    {
-        /* tlbflush timestamp field is valid again */
-        page->tlbflush_timestamp = tlbflush_current_time();
         clear_bit(_PGC_page_table, &page->count_info);
-    }
 }
 
 /**************************************************************************/
@@ -2076,7 +2072,7 @@ void sh_remove_shadows(struct vcpu *v, m
     if ( !fast && all && (pg->count_info & PGC_page_table) )
     {
         SHADOW_ERROR("can't find all shadows of mfn %05lx "
-                     "(shadow_flags=%08lx)\n",
+                     "(shadow_flags=%08x)\n",
                       mfn_x(gmfn), pg->shadow_flags);
         domain_crash(v->domain);
     }
diff -r 8182f5158dc2 -r 98ed32885ec0 xen/include/asm-x86/mm.h
--- a/xen/include/asm-x86/mm.h  Thu Jun 12 17:17:44 2008 +0100
+++ b/xen/include/asm-x86/mm.h  Thu Jun 12 17:57:03 2008 +0100
@@ -59,8 +59,12 @@ struct page_info
          * tlbflush_timestamp since page table pages are explicitly not
          * tracked for TLB-flush avoidance when a guest runs in shadow mode.
          */
-        unsigned long shadow_flags;
+        u32 shadow_flags;
     };
+
+#if defined(__x86_64__)
+    spinlock_t lock;
+#endif
 };
 
  /* The following page types are MUTUALLY EXCLUSIVE. */
@@ -89,9 +93,11 @@ struct page_info
  /* Cleared when the owning guest 'frees' this page. */
 #define _PGC_allocated      31
 #define PGC_allocated       (1U<<_PGC_allocated)
- /* Set on a *guest* page to mark it out-of-sync with its shadow */
-#define _PGC_out_of_sync    30
-#define PGC_out_of_sync     (1U<<_PGC_out_of_sync)
+#if defined(__i386__)
+ /* Page is locked? */
+# define _PGC_locked        30
+# define PGC_locked         (1U<<_PGC_out_of_sync)
+#endif
  /* Set when is using a page as a page table */
 #define _PGC_page_table     29
 #define PGC_page_table      (1U<<_PGC_page_table)

_______________________________________________
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: Reduce page->shadow_flags to 32 bits so we can steal space for a, Xen patchbot-unstable <=