# HG changeset patch # User yamahata@xxxxxxxxxxxxx # Date 1165199493 -32400 # Node ID 6747f2c0583648ced1ffc0b0bd74613d23fb0cb2 # Parent 6fdbf173142d6b4da68d2019f594f9a81fa70d28 Allocate frame table/mpt table at mfn=0 even when memory isn't assigned at mfn=0 as work around of transate_domain_pte(). It returns mfn=0 when the machine page isn't present as a work around for memory mapped I/O where no device is assigned. Xen might access page_info of mfn=0, so it must be gurantted that it exists. Otherwise xen panics with tlb miss fault in xen virtual address area. Once transate_domain_pte() is fixed correctly, this will be removed. PATCHNAME: allocate_table_at_mfn_0 Signed-off-by: Isaku Yamahata diff -r 6fdbf173142d -r 6747f2c05836 xen/arch/ia64/xen/xenmem.c --- a/xen/arch/ia64/xen/xenmem.c Sat Dec 02 15:19:50 2006 -0700 +++ b/xen/arch/ia64/xen/xenmem.c Mon Dec 04 11:31:33 2006 +0900 @@ -181,6 +181,22 @@ void init_virtual_frametable(void) printk("virtual machine to physical table: %p size: %lukB\n" "max_page: 0x%lx\n", mpt_table, ((table_size << PAGE_SHIFT) >> 10), max_page); + + /* + * XXX work around of translate_domain_pte(). + * It returns mfn=0 when the machine page isn't present as + * a work around for memory mapped I/O where no device is assigned. + * Xen might access page_info of mfn=0, so it must be gurantted + * that it exists. Otherwise xen panics with tlb miss fault in xen + * virtual address area. + * Once transate_domain_pte() is fixed correctly, this will + * be removed. + */ + if (!mfn_valid(0)) { + printk("allocating frame table/mpt table at mfn 0.\n"); + create_frametable_page_table(0, PAGE_SIZE, NULL); + create_mpttable_page_table(0, PAGE_SIZE, NULL); + } } int