From: Isaku Yamahata Date: Fri, 9 May 2008 09:40:58 +0000 (+0900) Subject: [IA64] fix gmfn_to_mfn X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=afa643d000b9c7926fed464f1d9227d353da60e8;p=xen.git [IA64] fix gmfn_to_mfn gmfn_to_mfn should return INVALID_MFN when the gpfn is I/O page. Using PV on HVM, I got the following error message. (XEN) /xen/include/asm/mm.h:181:d2 Error pfn 2: rd=f000000007fb4080, od=0000000000000000, caf=0000000000000000, taf=0000000000000000 (XEN) memory.c:165:d2 Bad page free for domain 2 Signed-off-by: Kouya Shimura --- diff --git a/xen/arch/ia64/xen/mm.c b/xen/arch/ia64/xen/mm.c index 7f82eece61..1b3612065e 100644 --- a/xen/arch/ia64/xen/mm.c +++ b/xen/arch/ia64/xen/mm.c @@ -494,6 +494,10 @@ gmfn_to_mfn_foreign(struct domain *d, unsigned long gpfn) if (!pte) { panic("gmfn_to_mfn_foreign: bad gpfn. spinning...\n"); } + + if ((pte & _PAGE_IO) && is_hvm_domain(d)) + return INVALID_MFN; + return ((pte & _PFN_MASK) >> PAGE_SHIFT); }