[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-changelog] [xen-unstable] [IA64] Allocate frame table/mpt table at mfn=0



# HG changeset patch
# User awilliam@xxxxxxxxxxx
# Node ID 85b9711cb8955d67d65f67dfadf3e3d5eacfb2d8
# Parent  9787cb7262e89178ed77af75084c328d75d210cc
[IA64] Allocate frame table/mpt table at mfn=0

Allocate frame table/mpt table at mfn=0 even when memory isn't assigned at
mfn=0 as work around for transate_domain_pte().

transate_domain_pte() 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 guaranteed that it
exists. Otherwise xen panics with a tlb miss fault in xen's virtual
address area.

Once transate_domain_pte() is fixed correctly, this will be removed.

Signed-off-by: Isaku Yamahata <yamahata@xxxxxxxxxxxxx>
---
 xen/arch/ia64/xen/xenmem.c |   17 +++++++++++++++++
 1 files changed, 17 insertions(+)

diff -r 9787cb7262e8 -r 85b9711cb895 xen/arch/ia64/xen/xenmem.c
--- a/xen/arch/ia64/xen/xenmem.c        Tue Dec 05 10:59:32 2006 -0700
+++ b/xen/arch/ia64/xen/xenmem.c        Tue Dec 05 13:42:37 2006 -0700
@@ -181,6 +181,23 @@ 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 for translate_domain_pte().
+        * It returns mfn=0 when the machine page isn't present.  This
+        * behavior is 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 guaranteed that it exists.  Otherwise xen panics with tlb miss
+        * fault in xen's virtual address area.
+        *
+        * Once translate_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

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.