public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: "H. Peter Anvin" <hpa@zytor.com>
To: Ingo Molnar <mingo@elte.hu>
Cc: Yinghai Lu <yhlu.kernel@gmail.com>,
	Linus Torvalds <torvalds@linux-foundation.org>,
	David Witbrodt <dawitbro@sbcglobal.net>,
	Thomas Gleixner <tglx@linutronix.de>,
	Andrew Morton <akpm@linux-foundation.org>,
	Jesse Barnes <jbarnes@virtuousgeek.org>,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] x86: split e820 reserved entries record to late v2
Date: Thu, 28 Aug 2008 17:21:09 -0700	[thread overview]
Message-ID: <48B740F5.5060903@zytor.com> (raw)
In-Reply-To: <20080828211647.GA32431@elte.hu>

Ingo Molnar wrote:
> 
> Here we have the problem of overlap i outlined earlier: if there's a 
> partial overlap at this stage (as i think it can happen in the hpet case 
> on David's box), we wont insert the E820_RESERVED resource.
> 
> The hpet hang will be solved, because we dont reprogram the BAR, but we 
> now keep the formerly e820-reserved area as 'free' - which the PCI code 
> could allocate new resources into - which could cause other problems 
> (hangs, non-working devices, etc.) down the line.
> 
> Which most likely wont happen currently in practice (there's enough free 
> space elsewhere), but it's still a not truly 'free' area and it would be 
> nice to have a complete and correct picture, based on all sources of 
> information we have.
> 

This may be a rehash of things previously discussed in this thread; my 
email seems to be a bit flakey to the point that I don't know if I have 
gotten all the messages.

Either way, Ingo mentioned in a private messages four steps, basically 
summarizing the above email:

1 - first we allocate the absolute essentials (e820 RAM and a few low
     RAM specials)
2 - then we register all existing PCI resources - but do not reallocate
     any PCI resources that conflict with existing step #1 resources
3 - then we allocate e820 reserved entries (and whatever special non-PCI
     resources we might know about in general) - these are less trusted
     than any of the existing PCI resources but still it can hurt us
     badly if the PCI code allocates new resources on them.
4 - then the PCI code can run and allocate free resources to all the
     zero, not yet allocated BARs, and can reallocate any resources that
     might conflict with existing [step #1 or step #3] registered
     resources.

I agree that this is almost certainly what we should be doing; there is 
a difference between claiming resources already allocated and allocating 
resources to new address space, in which case we want to be as 
conservative as possible.

The key, of course, is that nothing goes in #1 unless we are bloody 
damned sure that if a BAR points there, that BAR is unconditionally 
broken and pointing into hyperspace.  Something claiming RAM or, say, 
the legacy KBC might fall in this area.

	-hpa

  reply	other threads:[~2008-08-29  0:21 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-08-28 20:34 [PATCH] x86: split e820 reserved entries record to late v2 Yinghai Lu
2008-08-28 20:40 ` Linus Torvalds
2008-08-28 20:52   ` Yinghai Lu
2008-08-28 20:58     ` Ingo Molnar
2008-08-28 21:16     ` Ingo Molnar
2008-08-29  0:21       ` H. Peter Anvin [this message]
  -- strict thread matches above, loose matches on Subject: below --
2008-08-29  3:59 David Witbrodt
2008-08-29  5:06 ` Yinghai Lu
2008-08-29 14:32 David Witbrodt
2008-08-31 17:18 ` Francois Romieu
2008-08-29 14:48 David Witbrodt
2008-08-29 17:46 ` Yinghai Lu
2008-08-29 19:00 David Witbrodt
2008-08-31 19:10 David Witbrodt

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=48B740F5.5060903@zytor.com \
    --to=hpa@zytor.com \
    --cc=akpm@linux-foundation.org \
    --cc=dawitbro@sbcglobal.net \
    --cc=jbarnes@virtuousgeek.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=tglx@linutronix.de \
    --cc=torvalds@linux-foundation.org \
    --cc=yhlu.kernel@gmail.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox