]> xenbits.xensource.com Git - people/iwj/xen.git/commitdiff
x86/paging: don't unconditionally BUG() on finding SHARED_M2P_ENTRY
authorJan Beulich <jbeulich@suse.com>
Fri, 8 Dec 2017 15:27:14 +0000 (15:27 +0000)
committerIan Jackson <Ian.Jackson@eu.citrix.com>
Fri, 8 Dec 2017 15:27:14 +0000 (15:27 +0000)
PV guests can fully control the values written into the P2M.

This is XSA-251.

Signed-off-by: Jan Beulich <jbeulich@suse.com>
Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>
xen/arch/x86/mm/paging.c

index 1e2c9ba4cc5a060341976157231c2bdae17ed707..755a8f83ca3c1641fa9d9ce4828417a3557296bc 100644 (file)
@@ -274,7 +274,7 @@ void paging_mark_pfn_dirty(struct domain *d, pfn_t pfn)
         return;
 
     /* Shared MFNs should NEVER be marked dirty */
-    BUG_ON(SHARED_M2P(pfn_x(pfn)));
+    BUG_ON(paging_mode_translate(d) && SHARED_M2P(pfn_x(pfn)));
 
     /*
      * Values with the MSB set denote MFNs that aren't really part of the