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] [IA64] Fix of C/S 10529:4260eb8c08740de00

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] [IA64] Fix of C/S 10529:4260eb8c08740de0000081c61a6237ffcb95b2d5 for IA64.
From: Xen patchbot-unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Thu, 27 Jul 2006 16:10:18 +0000
Delivery-date: Thu, 27 Jul 2006 09:12:51 -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 kfraser@xxxxxxxxxxxxxxxxxxxxx
# Node ID 5fa2cd68d059dd32d6c23f196ec6eae3c1690ad6
# Parent  f42039dcdc814cf3d154cdccd58f930df98901dd
[IA64] Fix of C/S 10529:4260eb8c08740de0000081c61a6237ffcb95b2d5 for IA64.
When page is zapped from a domain, the page referenced counter
is checked. But it results in false positive alert on Xen/IA64
because a page 'in use' has reference count 2 on Xen/IA64.
- a page is assigned to guest domain's psudo physical address space.
  This is decremented by guest_physmap_remove_page()
- a page is allocated for a domain.
  This is decremented by the following put_page()

Signed-off-by: Isaku Yamahata <yamahata@xxxxxxxxxxxxx>
---
 xen/common/memory.c       |    2 +-
 xen/include/asm-ia64/mm.h |    5 +++++
 xen/include/asm-x86/mm.h  |    5 +++++
 3 files changed, 11 insertions(+), 1 deletion(-)

diff -r f42039dcdc81 -r 5fa2cd68d059 xen/common/memory.c
--- a/xen/common/memory.c       Thu Jul 27 13:05:33 2006 +0100
+++ b/xen/common/memory.c       Thu Jul 27 13:17:17 2006 +0100
@@ -170,7 +170,7 @@ guest_remove_page(
     if ( test_and_clear_bit(_PGC_allocated, &page->count_info) )
         put_page(page);
 
-    if ( unlikely((page->count_info & PGC_count_mask) != 1) )
+    if ( unlikely(!page_is_removable(page)) )
     {
         /* We'll make this a guest-visible error in future, so take heed! */
         DPRINTK("Dom%d freeing in-use page %lx (pseudophys %lx):"
diff -r f42039dcdc81 -r 5fa2cd68d059 xen/include/asm-ia64/mm.h
--- a/xen/include/asm-ia64/mm.h Thu Jul 27 13:05:33 2006 +0100
+++ b/xen/include/asm-ia64/mm.h Thu Jul 27 13:17:17 2006 +0100
@@ -211,6 +211,11 @@ static inline int get_page_and_type(stru
     }
 
     return rc;
+}
+
+static inline int page_is_removable(struct page_info *page)
+{
+    return ((page->count_info & PGC_count_mask) == 2);
 }
 
 #define        set_machinetophys(_mfn, _pfn) do { } while(0);
diff -r f42039dcdc81 -r 5fa2cd68d059 xen/include/asm-x86/mm.h
--- a/xen/include/asm-x86/mm.h  Thu Jul 27 13:05:33 2006 +0100
+++ b/xen/include/asm-x86/mm.h  Thu Jul 27 13:17:17 2006 +0100
@@ -241,6 +241,11 @@ static inline int get_page_and_type(stru
     return rc;
 }
 
+static inline int page_is_removable(struct page_info *page)
+{
+    return ((page->count_info & PGC_count_mask) == 1);
+}
+
 #define ASSERT_PAGE_IS_TYPE(_p, _t)                            \
     ASSERT(((_p)->u.inuse.type_info & PGT_type_mask) == (_t)); \
     ASSERT(((_p)->u.inuse.type_info & PGT_count_mask) != 0)

_______________________________________________
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] [IA64] Fix of C/S 10529:4260eb8c08740de0000081c61a6237ffcb95b2d5 for IA64., Xen patchbot-unstable <=