ia64/xen-unstable

changeset 17599:948188bc9fa3

[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 <kouya@jp.fujitsu.com>
author Isaku Yamahata <yamahata@valinux.co.jp>
date Fri May 09 18:40:58 2008 +0900 (2008-05-09)
parents af327038a43f
children debc868e380b
files xen/arch/ia64/xen/mm.c
line diff
     1.1 --- a/xen/arch/ia64/xen/mm.c	Fri Apr 11 17:05:30 2008 +0900
     1.2 +++ b/xen/arch/ia64/xen/mm.c	Fri May 09 18:40:58 2008 +0900
     1.3 @@ -494,6 +494,10 @@ gmfn_to_mfn_foreign(struct domain *d, un
     1.4  	if (!pte) {
     1.5  		panic("gmfn_to_mfn_foreign: bad gpfn. spinning...\n");
     1.6  	}
     1.7 +
     1.8 +	if ((pte & _PAGE_IO) && is_hvm_domain(d))
     1.9 +		return INVALID_MFN;
    1.10 +
    1.11  	return ((pte & _PFN_MASK) >> PAGE_SHIFT);
    1.12  }
    1.13