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

[Xen-changelog] [xen-unstable] x86 shadow: fix the check for having killed the guest in the fault handler.



# HG changeset patch
# User Keir Fraser <keir.fraser@xxxxxxxxxx>
# Date 1254927365 -3600
# Node ID e1cac8e4bdeb9c02a6f936e060d625ffa8cb09e3
# Parent  f9cbb5a274d668e54ab6cdf00d88a1b7da665514
x86 shadow: fix the check for having killed the guest in the fault handler.

We care only about when we have called domain_crash() (and therefore
shadow invariants may not hold) and shouldn't spuriously inject
pagefaults into guests that are shutting down for other reasons.

Signed-off-by: Tim Deegan <Tim.Deegan@xxxxxxxxxx>
---
 xen/arch/x86/mm/shadow/multi.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff -r f9cbb5a274d6 -r e1cac8e4bdeb xen/arch/x86/mm/shadow/multi.c
--- a/xen/arch/x86/mm/shadow/multi.c    Wed Oct 07 10:26:39 2009 +0100
+++ b/xen/arch/x86/mm/shadow/multi.c    Wed Oct 07 15:56:05 2009 +0100
@@ -3111,7 +3111,7 @@ static int sh_page_fault(struct vcpu *v,
      * already used for some special purpose (ioreq pages, or granted pages).
      * If that happens we'll have killed the guest already but it's still not 
      * safe to propagate entries out of the guest PT so get out now. */
-    if ( unlikely(d->is_shutting_down) )
+    if ( unlikely(d->is_shutting_down && d->shutdown_code == SHUTDOWN_crash) )
     {
         SHADOW_PRINTK("guest is shutting down\n");
         goto propagate;
@@ -3212,7 +3212,7 @@ static int sh_page_fault(struct vcpu *v,
          && ft == ft_demand_write )
         sh_unsync(v, gmfn);
 
-    if ( unlikely(d->is_shutting_down) )
+    if ( unlikely(d->is_shutting_down && d->shutdown_code == SHUTDOWN_crash) )
     {
         /* We might end up with a crashed domain here if
          * sh_remove_shadows() in a previous sh_resync() call has

_______________________________________________
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®.