qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Kevin O'Connor <kevin@koconnor.net>
To: Gerd Hoffmann <kraxel@redhat.com>
Cc: mst@redhat.com, sfd@endace.com, seabios@seabios.org,
	qemu-devel@nongnu.org, yamahata@valinux.co.jp,
	Alexey Korolev <alexey.korolev@endace.com>
Subject: Re: [Qemu-devel] [PATCH 2/3] Add a new PCI region type to supports 64 bit ranges
Date: Tue, 3 Jan 2012 22:10:42 -0500	[thread overview]
Message-ID: <20120104031042.GB23255@morn.localdomain> (raw)
In-Reply-To: <4F031B72.6020704@redhat.com>

On Tue, Jan 03, 2012 at 04:14:58PM +0100, Gerd Hoffmann wrote:
> On 12/29/11 03:56, Kevin O'Connor wrote:
> > Tracking of 64bit prefmem sections separately from
> > regular prefmem sections doesn't make sense, because both need to be
> > allocated from the same pool when behind a bridge.
> 
> Yea, bridges make the picture a bit more complicated.  A bridge itself
> might not be 64bit capable, which makes it impossible to map devices
> behind it above 4G.  Likewise with multiple devices where one of them
> has a 32bit prefmem bar:  The (single) prefmem memory window must be
> below 4G then too.
> 
> I think we'll have to keep track for each bar whenever we'll go map it
> above or below 4G.  For starters this logic can be simply to only map
> 64bit bars of root bus devices above 4G, which completely sidesteps the
> bridge issues for now.
> 
> Once qemu has full pci-e support we probably want refine this logic,
> which probably requires an extra pass between pci bar discovery and
> placing the bars into the memory regions we have.

I was looking at this last week, along with the coreboot PCI code.  I
think this could be done in four "passes" - first pass to find the
total size, minimum alignment, and maximum address of all resources
for all regular devices.  The second pass propagates this info to
bridges.  The third pass allocates the resources.  The fourth pass
assigns the resources to the devices.

The current code already effectively has these four "passes" - the
thing I think is missing is tracking the "maximum address" of
resources, propagating that to bridges, and assigning allocations
above 4G.

-Kevin

  reply	other threads:[~2012-01-04  3:10 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-12-28  4:41 [Qemu-devel] [Seabios] [PATCH 0/3] 64bit PCI BARs allocations Alexey Korolev
2011-12-28  5:00 ` [Qemu-devel] [PATCH 1/3] Add new range above 4GB in _CRS table Alexey Korolev
2011-12-28  5:26 ` [Qemu-devel] [PATCH 2/3] Add a new PCI region type to supports 64 bit ranges Alexey Korolev
2011-12-28 11:30   ` Michael S. Tsirkin
2011-12-29  3:57     ` Alexey Korolev
2011-12-29  2:56   ` Kevin O'Connor
2011-12-29  5:00     ` Alexey Korolev
2011-12-30  5:57       ` Kevin O'Connor
2011-12-29  5:32     ` Alexey Korolev
2011-12-29 16:16       ` Michael S. Tsirkin
2012-01-03 15:14     ` Gerd Hoffmann
2012-01-04  3:10       ` Kevin O'Connor [this message]
2011-12-28  5:35 ` [Qemu-devel] [PATCH 3/3] Changes related to secondary buses and 64bit regions Alexey Korolev
2011-12-28  6:30   ` [Qemu-devel] [SeaBIOS] " Alexey Korolev
2011-12-28 11:43   ` [Qemu-devel] " Michael S. Tsirkin
2011-12-29  5:40     ` Alexey Korolev
2011-12-29 16:18       ` Michael S. Tsirkin
2011-12-30  4:56         ` Alexey Korolev
2011-12-29  5:41     ` Alexey Korolev
2011-12-29 16:19       ` Michael S. Tsirkin
2011-12-29 16:21       ` Michael S. Tsirkin
2011-12-30  5:10         ` Alexey Korolev
2011-12-30  6:02           ` Kevin O'Connor
2011-12-30  5:10         ` Alexey Korolev
2011-12-30  6:22       ` Kevin O'Connor
2011-12-30  7:05         ` Alexey Korolev
2011-12-30  5:03     ` Kevin O'Connor
2011-12-28 11:43 ` [Qemu-devel] [Seabios] [PATCH 0/3] 64bit PCI BARs allocations Michael S. Tsirkin
2011-12-29  9:20   ` Alexey Korolev
2011-12-29 16:21     ` Michael S. Tsirkin
2011-12-29 22:17       ` Alexey Korolev

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=20120104031042.GB23255@morn.localdomain \
    --to=kevin@koconnor.net \
    --cc=alexey.korolev@endace.com \
    --cc=kraxel@redhat.com \
    --cc=mst@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=seabios@seabios.org \
    --cc=sfd@endace.com \
    --cc=yamahata@valinux.co.jp \
    /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;
as well as URLs for NNTP newsgroup(s).