All of lore.kernel.org
 help / color / mirror / Atom feed
From: Chris Wright <chrisw@sous-sol.org>
To: Gerd Hoffmann <kraxel@suse.de>
Cc: Xen devel list <xen-devel@lists.xensource.com>
Subject: Re: access shared_info?
Date: Wed, 7 Jun 2006 14:55:00 -0700	[thread overview]
Message-ID: <20060607215500.GI2724@moss.sous-sol.org> (raw)
In-Reply-To: <44870C65.2030603@suse.de>

* 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);

  reply	other threads:[~2006-06-07 21:55 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-06-07 13:28 access shared_info? Gerd Hoffmann
2006-06-07 13:48 ` Keir Fraser
2006-06-07 15:53   ` Gerd Hoffmann
2006-06-07 16:04     ` Keir Fraser
2006-06-07 16:27       ` Gerd Hoffmann
2006-06-07 16:47         ` Keir Fraser
2006-06-07 16:59           ` Gerd Hoffmann
2006-06-07 17:27           ` Gerd Hoffmann
2006-06-07 21:55             ` Chris Wright [this message]
2006-06-08  7:32               ` Keir Fraser
2006-06-09 13:44               ` Gerd Hoffmann
2006-06-09 13:59                 ` Ian Campbell
2006-06-09 14:16                   ` Gerd Hoffmann
2006-06-09 14:35                     ` Keir Fraser
2006-06-09 17:34                       ` Chris Wright
2006-06-09 17:23                     ` Chris Wright

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20060607215500.GI2724@moss.sous-sol.org \
    --to=chrisw@sous-sol.org \
    --cc=kraxel@suse.de \
    --cc=xen-devel@lists.xensource.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.