[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-changelog] [xen-unstable] xenpaging: deal with MEM_EVENT_FLAG_EVICT_FAIL request in tools/xenpaging



# HG changeset patch
# User Olaf Hering <olaf@xxxxxxxxx>
# Date 1328813273 0
# Node ID 730f6ed72d70ae59b2ce93e343ebe500a41ee63a
# Parent  e0392842b8a31146d84d7162de55fe275e4e5ea0
xenpaging: deal with MEM_EVENT_FLAG_EVICT_FAIL request in tools/xenpaging

If a page is nominated but not evicted,then dom0 accesses the page,it
will change the page's p2mt to be p2m_ram_paging_in,and the req.flags
is MEM_EVENT_FLAG_EVICT_FAIL;so it will fail in p2m_mem_paging_evict()
because of the p2mt;and paging->num_paged_out will not increase in
this case;After the paging process is terminated, the p2mt
p2m_ram_paging_in still remains in p2m table.Once domU accesses the
nominated page,it will result in BSOD or vm'stuck.

The patch adds the dealing of this request to resume the page before
xenpaging is ended.

[ This can happen if p2m_mem_paging_populate() was called by a foreign
domain. In this case MEM_EVENT_FLAG_VCPU_PAUSED is not set and xenpaging
will not sent a response. And in this case the ring is in an
inconsistent state anyway, new requests cant be added, I think. - Olaf ]

Signed-off-by: hongkaixing <hongkaixing@xxxxxxxxxx>
Signed-off-by: shizhen <bicky.shi@xxxxxxxxxx>
Acked-by: Olaf Hering <olaf@xxxxxxxxx>
Committed-by: Ian Jackson <ian.jackson@xxxxxxxxxxxxx>
---


diff -r e0392842b8a3 -r 730f6ed72d70 tools/xenpaging/xenpaging.c
--- a/tools/xenpaging/xenpaging.c       Thu Feb 09 18:41:03 2012 +0000
+++ b/tools/xenpaging/xenpaging.c       Thu Feb 09 18:47:53 2012 +0000
@@ -911,7 +911,7 @@
                         !!(req.flags & MEM_EVENT_FLAG_EVICT_FAIL) );
 
                 /* Tell Xen to resume the vcpu */
-                if ( req.flags & MEM_EVENT_FLAG_VCPU_PAUSED )
+                if (( req.flags & MEM_EVENT_FLAG_VCPU_PAUSED ) || ( req.flags 
& MEM_EVENT_FLAG_EVICT_FAIL ))
                 {
                     /* Prepare the response */
                     rsp.gfn = req.gfn;

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.