diff options
author | Liu, Jinsong <jinsong.liu@intel.com> | 2011-04-07 12:12:01 +0100 |
---|---|---|
committer | Liu, Jinsong <jinsong.liu@intel.com> | 2011-04-07 12:12:01 +0100 |
commit | 51402ed6092b02882f6483f94137c420bdd0e234 (patch) | |
tree | ce86e0c2a9631a837db406101703400181bd6906 /xen/common/page_alloc.c | |
parent | fd6ee4bb06ec232346892cc805730e939d710e62 (diff) | |
download | xen-51402ed6092b02882f6483f94137c420bdd0e234.tar.gz xen-51402ed6092b02882f6483f94137c420bdd0e234.tar.bz2 xen-51402ed6092b02882f6483f94137c420bdd0e234.zip |
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@intel.com>
Diffstat (limited to 'xen/common/page_alloc.c')
-rw-r--r-- | xen/common/page_alloc.c | 11 |
1 files changed, 1 insertions, 10 deletions
diff --git a/xen/common/page_alloc.c b/xen/common/page_alloc.c index a3f890f733..46b4b5c557 100644 --- a/xen/common/page_alloc.c +++ b/xen/common/page_alloc.c @@ -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,16 +707,11 @@ int offline_page(unsigned long mfn, int broken, uint32_t *status) old_info = mark_page_offline(pg, broken); - if ( page_state_is(pg, free) ) + if ( page_state_is(pg, offlined) ) { - /* Free pages are reserve directly */ reserve_heap_page(pg); *status = PG_OFFLINE_OFFLINED; } - else if ( page_state_is(pg, offlined) ) - { - *status = PG_OFFLINE_OFFLINED; - } else if ( (owner = page_get_owner_and_reference(pg)) ) { *status = PG_OFFLINE_OWNED | PG_OFFLINE_PENDING | |