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/
Home Products Support Community News


[Xen-devel] [PATCH] X86: Fix mce offline page bug

To: Keir Fraser <keir.xen@xxxxxxxxx>, "tim.deegan@xxxxxxxxxx" <tim.deegan@xxxxxxxxxx>, "xen-devel@xxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxx>
Subject: [Xen-devel] [PATCH] X86: Fix mce offline page bug
From: "Liu, Jinsong" <jinsong.liu@xxxxxxxxx>
Date: Wed, 6 Apr 2011 17:25:49 +0800
Accept-language: en-US
Acceptlanguage: en-US
Cc: "Jiang, Yunhong" <yunhong.jiang@xxxxxxxxx>, "Li, Xin" <xin.li@xxxxxxxxx>
Delivery-date: Wed, 06 Apr 2011 02:26:55 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
Thread-index: Acv0PJ4kWiLiM1I6RBiNIoLmEFPBNQ==
Thread-topic: [PATCH] X86: Fix mce offline page bug
X86: Fix mce offline page bug

c/s 19913 break mce offline page logic:
For page_state_is(pg, free), it's impossible to trigger the case;
For page_state_is(pg, offlined), it in fact didn't offline related page;

This patch fix the bug, and remove an ambiguous comment.

Signed-off-by: Liu, Jinsong <jinsong.liu@xxxxxxxxx>

diff -r 808735ebbb59 xen/common/page_alloc.c
--- a/xen/common/page_alloc.c   Tue Mar 29 18:03:15 2011 +0800
+++ b/xen/common/page_alloc.c   Wed Mar 30 14:44:55 2011 +0800
@@ -611,10 +611,6 @@ static void free_heap_pages(
- * Following possible status for a page:
- * free and Online; free and offlined; free and offlined and broken;
- * assigned and online; assigned and offlining; assigned and offling and broken
- *
  * Following rules applied for page offline:
  * Once a page is broken, it can't be assigned anymore
  * A page will be offlined only if it is free
@@ -711,14 +707,9 @@ int offline_page(unsigned long mfn, int 
     old_info = mark_page_offline(pg, broken);
-    if ( page_state_is(pg, free) )
+    if ( page_state_is(pg, offlined) )
-        /* Free pages are reserve directly */
-        *status = PG_OFFLINE_OFFLINED;
-    }
-    else if ( page_state_is(pg, offlined) )
-    {
         *status = PG_OFFLINE_OFFLINED;
     else if ( (owner = page_get_owner_and_reference(pg)) )

Attachment: mce_offline_page_fix.patch
Description: mce_offline_page_fix.patch

Xen-devel mailing list
<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-devel] [PATCH] X86: Fix mce offline page bug, Liu, Jinsong <=