From: Kouya Shimura Subject: [PATCH] x86, shadow: confirm the validity of mfn before is_xen_heap_mfn() Date: Fri, 6 Feb 2009 17:34:22 +0900 Message-ID: <7kocxg9d69.fsf@pingu.sky.yk.fujitsu.co.jp> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="G3np1GrlGr" Content-Transfer-Encoding: 7bit Return-path: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: xen-devel@lists.xensource.com List-Id: xen-devel@lists.xenproject.org --G3np1GrlGr Content-Type: text/plain; charset=us-ascii Content-Description: message body text Content-Transfer-Encoding: 7bit xen hypervisor may crash with direct access to MMIO on hvm. Signed-off-by: Kouya Shimura --G3np1GrlGr Content-Type: text/x-patch Content-Disposition: inline; filename="shadow_multi.patch" Content-Transfer-Encoding: 7bit diff -r 191643d4307c xen/arch/x86/mm/shadow/multi.c --- a/xen/arch/x86/mm/shadow/multi.c Thu Feb 05 15:28:09 2009 +0000 +++ b/xen/arch/x86/mm/shadow/multi.c Fri Feb 06 16:49:09 2009 +0900 @@ -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) ) --G3np1GrlGr Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel --G3np1GrlGr--