]> xenbits.xen.org Git - xenclient/xen-pq.git/commitdiff
Backport Gianluca's mfn validity check patch.
authorKamala Narasimhan <kamala.narasimhan@citrix.com>
Wed, 22 Apr 2009 14:53:27 +0000 (10:53 -0400)
committerKamala Narasimhan <kamala.narasimhan@citrix.com>
Wed, 22 Apr 2009 14:53:27 +0000 (10:53 -0400)
This should fix the system reset upon PVM spawn issue encountered on some systems.

xen-3.4/mfn-validity-check-before-shadow-remove [new file with mode: 0644]
xen-3.4/series

diff --git a/xen-3.4/mfn-validity-check-before-shadow-remove b/xen-3.4/mfn-validity-check-before-shadow-remove
new file mode 100644 (file)
index 0000000..cb75b6e
--- /dev/null
@@ -0,0 +1,18 @@
+diff --git a/xen/arch/x86/mm/shadow/common.c b/xen/arch/x86/mm/shadow/common.c
+index ca4cb13..71bfe27 100644
+--- a/xen/arch/x86/mm/shadow/common.c
++++ b/xen/arch/x86/mm/shadow/common.c
+@@ -2730,6 +2730,13 @@ void sh_remove_shadows(struct vcpu *v, mfn_t gmfn, int fast, int all)
+     ASSERT(!(all && fast));
++    if ( unlikely(!mfn_valid(gmfn)) )
++    {
++        /* Get out now if we're trying to remove shadows of a MMIO
++         * direct page. */
++        return;
++    }
++
+     /* Although this is an externally visible function, we do not know
+      * whether the shadow lock will be held when it is called (since it
+      * can be called via put_page_type when we clear a shadow l1e).
index 7dca55d6cc41705a3007021feeed3821a899cd60..659e1b1f704dc71a800a2cfc33958eab3c7980f8 100644 (file)
@@ -7,3 +7,4 @@ thermal-management
 pt-load-vga-bios
 init-vgabios-and-set-size
 module-reloc
+mfn-validity-check-before-shadow-remove