From: Chris Wright Subject: Re: access shared_info? Date: Wed, 7 Jun 2006 14:55:00 -0700 Message-ID: <20060607215500.GI2724@moss.sous-sol.org> References: <4486D496.1070905@suse.de> <20b4659f13d0ed8c0ee5d23d93579b4c@cl.cam.ac.uk> <4486F676.6080301@suse.de> <7c8cd23f1fb1eafe50db8bf82cadad3a@cl.cam.ac.uk> <4486FE71.9090606@suse.de> <63a099e0b962a2154960cebf413487c2@cl.cam.ac.uk> <44870C65.2030603@suse.de> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Content-Disposition: inline In-Reply-To: <44870C65.2030603@suse.de> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: Gerd Hoffmann Cc: Xen devel list List-Id: xen-devel@lists.xenproject.org * Gerd Hoffmann (kraxel@suse.de) wrote: > Keir Fraser wrote: > > Oh, I see it's moved to a new function. I guess that's okay, although > > couldn't you fake up an e820 map and call legacy_init_iomem_resource on > > the domU path, rather than having to pull code out into a new function? > > Does this patch change behaviour for dom0 at all? I think /proc/iomem > > already looks like native there? Also the patch will need to include > > x86/64 too. > > new version attached. Might want to double check against linux-2.6.tip-xen, as that code has changed a bit since 2.6.16. > diff -r c191c649cdb3 linux-2.6-xen-sparse/arch/i386/kernel/setup-xen.c > --- a/linux-2.6-xen-sparse/arch/i386/kernel/setup-xen.c Tue Jun 6 09:25:59 2006 > +++ b/linux-2.6-xen-sparse/arch/i386/kernel/setup-xen.c Wed Jun 7 19:24:19 2006 > @@ -1378,7 +1378,6 @@ > res->end = res->start + e820[i].size - 1; > res->flags = IORESOURCE_MEM | IORESOURCE_BUSY; > request_resource(&iomem_resource, res); > -#ifndef CONFIG_XEN > if (e820[i].type == E820_RAM) { > /* > * We don't know which RAM region contains kernel data, > @@ -1391,7 +1390,6 @@ > request_resource(res, &crashk_res); > #endif > } > -#endif > } > } > > @@ -1460,8 +1458,16 @@ > int i; > > /* Nothing to do if not running in dom0. */ > - if (!(xen_start_info->flags & SIF_INITDOMAIN)) > + if (!(xen_start_info->flags & SIF_INITDOMAIN)) { > + struct e820entry domU_e820 = { > + .addr = 0, > + .size = max_pfn << PAGE_SHIFT, > + .type = E820_RAM, > + }; Or just do this during normal setup, then it is the base e820 map. I believe it's already done isn't it? memmap.nr_entries = 1; map[0].addr = 0ULL; map[0].size = xen_start_info->nr_pages << PAGE_SHIFT; /* 8MB slack (to balance backend allocations). */ map[0].size += 8 << 20; map[0].type = E820_RAM; ... BUG_ON(copy_e820_map(map, (char)memmap.nr_entries) < 0);