Skip to contentSkip to conversation

x86, shadow: confirm the validity of mfn before is_xen_heap_mfn()

PATCH New Kouya Shimura 1 participant 1 message Feb 6, 2009

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 x86, shadow: confirm the validity of mfn before is_xen_heap_mfn()

xen hypervisor may crash with direct access to MMIO on hvm.

xen/arch/x86/mm/shadow/multi.c +1 -1
diff -r 191643d4307c xen/arch/x86/mm/shadow/multi.c
@@ -543,7 +543,7 @@
      * caching attributes in the shadows to match what was asked for.
      */
     if ( (level == 1) && is_hvm_domain(d) && has_arch_pdevs(d) &&
-         !is_xen_heap_mfn(mfn_x(target_mfn)) )
+         !(mfn_valid(target_mfn) && is_xen_heap_mfn(mfn_x(target_mfn))) )
     {
         unsigned int type;
         if ( hvm_get_mem_pinned_cacheattr(d, gfn_x(target_gfn), &type) )

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel