x86, shadow: confirm the validity of mfn before is_xen_heap_mfn()
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.
Signed-off-by Kouya Shimura <[email protected]>
xen/arch/x86/mm/shadow/multi.c +1 -1
@@ -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