File 22431-p2m-remove-bug-check.patch of Package xen

# HG changeset patch
# User Tim Deegan <Tim.Deegan@citrix.com>
# Date 1290594003 0
# Node ID 79b71c77907b80772ee8cba0c5bbf8e444e61226
# Parent  e5c4e925e1bd15baeadc0817dcceb5fff54b8a74
x86/mm: remove incorrect BUG_ON.
This BUG_ON tests a property of an effectively random PFN in the guest,
and is explicitly _not_ seeing the MFN that's known to be owned.

Signed-off-by: Tim Deegan <Tim.Deegan@citrix.com>

Index: xen-4.0.2-testing/xen/arch/x86/mm/p2m.c
===================================================================
--- xen-4.0.2-testing.orig/xen/arch/x86/mm/p2m.c
+++ xen-4.0.2-testing/xen/arch/x86/mm/p2m.c
@@ -2186,9 +2186,6 @@ guest_physmap_add_entry(struct domain *d
             P2M_DEBUG("aliased! mfn=%#lx, old gfn=%#lx, new gfn=%#lx\n",
                       mfn + i, ogfn, gfn + i);
             omfn = gfn_to_mfn_query(d, ogfn, &ot);
-            /* If we get here, we know the local domain owns the page,
-               so it can't have been grant mapped in. */
-            BUG_ON( p2m_is_grant(ot) );
             if ( p2m_is_ram(ot) )
             {
                 ASSERT(mfn_valid(omfn));
openSUSE Build Service is sponsored by