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

[Xen-changelog] [IA64] take start_info page from dom0 page not from xen heap.



# HG changeset patch
# User awilliam@xxxxxxxxxxx
# Node ID 6526a91d55553b712cb210cbefb363e71b380679
# Parent  ecc8595f2c0b49684e40b4601f1a27f1df152528
[IA64] take start_info page from dom0 page not from xen heap.

start_info page is used for xen to pass start up information
to domain0 and the page is used only by dom0 so that it should
belong to dom0.

Signed-off-by: Isaku Yamahata <yamahata@xxxxxxxxxxxxx>

diff -r ecc8595f2c0b -r 6526a91d5555 
linux-2.6-xen-sparse/arch/ia64/kernel/setup.c
--- a/linux-2.6-xen-sparse/arch/ia64/kernel/setup.c     Thu Feb  9 20:48:05 2006
+++ b/linux-2.6-xen-sparse/arch/ia64/kernel/setup.c     Thu Feb  9 20:55:03 2006
@@ -61,6 +61,9 @@
 #include <asm/system.h>
 #include <asm/unistd.h>
 #include <asm/system.h>
+#ifdef CONFIG_XEN
+#include <asm/hypervisor.h>
+#endif
 
 #if defined(CONFIG_SMP) && (IA64_CPU_SIZE > PAGE_SIZE)
 # error "struct cpuinfo_ia64 too big!"
@@ -240,6 +243,12 @@
        rsvd_region[n].start = (unsigned long) ia64_imva((void *)KERNEL_START);
        rsvd_region[n].end   = (unsigned long) ia64_imva(_end);
        n++;
+
+#ifdef CONFIG_XEN
+       rsvd_region[n].start = (unsigned long) 
(HYPERVISOR_shared_info->arch.start_info_pfn << PAGE_SHIFT);
+       rsvd_region[n].end   = rsvd_region[n].start + PAGE_SIZE;
+       n++;
+#endif
 
 #ifdef CONFIG_BLK_DEV_INITRD
        if (ia64_boot_param->initrd_start) {
diff -r ecc8595f2c0b -r 6526a91d5555 xen/arch/ia64/xen/domain.c
--- a/xen/arch/ia64/xen/domain.c        Thu Feb  9 20:48:05 2006
+++ b/xen/arch/ia64/xen/domain.c        Thu Feb  9 20:55:03 2006
@@ -782,6 +782,7 @@
        unsigned long pkern_entry;
        unsigned long pkern_end;
        unsigned long pinitrd_start = 0;
+       unsigned long pstart_info;
        unsigned long ret, progress = 0;
 
 //printf("construct_dom0: starting\n");
@@ -839,13 +840,18 @@
                           (PAGE_ALIGN(initrd_len) + 4*1024*1024);
 
              memcpy(__va(pinitrd_start),initrd_start,initrd_len);
+             pstart_info = PAGE_ALIGN(pinitrd_start + initrd_len);
+        } else {
+             pstart_info = PAGE_ALIGN(pkern_end);
         }
 
        printk("METAPHYSICAL MEMORY ARRANGEMENT:\n"
               " Kernel image:  %lx->%lx\n"
               " Entry address: %lx\n"
-               " Init. ramdisk: %lx len %lx\n",
-               pkern_start, pkern_end, pkern_entry, pinitrd_start, initrd_len);
+              " Init. ramdisk: %lx len %lx\n"
+              " Start info.:   %lx->%lx\n",
+              pkern_start, pkern_end, pkern_entry, pinitrd_start, initrd_len,
+              pstart_info, pstart_info + PAGE_SIZE);
 
        if ( (pkern_end - pkern_start) > (d->max_pages * PAGE_SIZE) )
        {
@@ -900,9 +906,9 @@
 
 
        /* Set up start info area. */
-       si = (start_info_t *)alloc_xenheap_page();
+       d->shared_info->arch.start_info_pfn = pstart_info >> PAGE_SHIFT;
+       si = __va(pstart_info);
        memset(si, 0, PAGE_SIZE);
-       d->shared_info->arch.start_info_pfn = __pa(si) >> PAGE_SHIFT;
        sprintf(si->magic, "xen-%i.%i-ia64", XEN_VERSION, XEN_SUBVERSION);
        si->nr_pages     = d->tot_pages;
 

_______________________________________________
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®.