From: "Michael S. Tsirkin" <mst@redhat.com>
To: Blue Swirl <blauwirbel@gmail.com>
Cc: Avi Kivity <avi@redhat.com>, qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] Re: [PATCH 00/10] pci: pci_register_bar_simple
Date: Wed, 6 Apr 2011 14:11:07 +0300 [thread overview]
Message-ID: <20110406111107.GB30884@redhat.com> (raw)
In-Reply-To: <BANLkTikk55ddD0SdR9SEqiOSMCOH6hP41w@mail.gmail.com>
On Tue, Apr 05, 2011 at 09:02:45PM +0300, Blue Swirl wrote:
> On Tue, Apr 5, 2011 at 12:26 AM, Michael S. Tsirkin <mst@redhat.com> wrote:
> > On Tue, Apr 05, 2011 at 12:05:08AM +0300, Blue Swirl wrote:
> >> On Mon, Apr 4, 2011 at 10:44 PM, Michael S. Tsirkin <mst@redhat.com> wrote:
> >> > On Mon, Apr 04, 2011 at 08:02:23PM +0300, Blue Swirl wrote:
> >> >> On Mon, Apr 4, 2011 at 7:35 PM, Avi Kivity <avi@redhat.com> wrote:
> >> >> > On 04/04/2011 07:22 PM, Anthony Liguori wrote:
> >> >> >>
> >> >> >> On 04/04/2011 10:59 AM, Michael S. Tsirkin wrote:
> >> >> >>>
> >> >> >>> On Mon, Apr 04, 2011 at 06:27:57PM +0300, Avi Kivity wrote:
> >> >> >>>>
> >> >> >>>> Many PCI BARs that use the memory address space map a single MMIO region
> >> >> >>>> into
> >> >> >>>> the entire BAR range. Introduce an API pci_register_bar_simple() for
> >> >> >>>> that use
> >> >> >>>> case, and convert all users where this can be done trivially.
> >> >> >>>>
> >> >> >>>> This will reduce the work required to introduce a PCI memory API; it's
> >> >> >>>> also
> >> >> >>>> a nice code reduction in its own right.
> >> >> >>>
> >> >> >>> This will save some code, so
> >> >> >>> Acked-by: Michael S. Tsirkin<mst@redhat.com>
> >> >> >>>
> >> >> >>> I really hope the rest of devices will follow.
> >> >> >>
> >> >> >> How complete is this?
> >> >> >
> >> >> > I converted all devices which were easy to convert. There may be one or two
> >> >> > more that can be converted with additional work (and perhaps with an
> >> >> > additional pic_bar_get_current_address() API, and a pci_bar_set_coalescing()
> >> >> > API). The rest likely need to stick with the callback-based API.
> >> >>
> >> >> In my version which I sent earlier but didn't commit, also other BARs
> >> >> besides the first one and also tricky devices like VGA were handled.
> >> >
> >> > Yes, I liked that patchset too. What happened to it?
> >>
> >> Nothing, but I thought that there could be a "perfect" solution.
> >>
> >> I like in Avi's version that unnecessary API changes are avoided.
> >
> > Yes, it's nice that it's incremental.
> >
> >> >> But I didn't commit it because I felt it was not going to right
> >> >> direction. I think the BARs should be specified in PCIDeviceInfo
> >> >> instead of adding more function calls. The same applies to this patch
> >> >> set.
> >> >
> >> > Is that really that fundamental? What I do care about is
> >> > making pci.c track and register all device memory
> >> > so that we can finally implement pci bridge features
> >> > such as master abort handling and unmapped memory.
> >>
> >> The structure version can be done later. Right, pci.c should manage
> >> the device mappings.
> >
> > OK, so applying Avi's patchset and building on that is
> > your preferred approach too?
>
> Avi's version is a bit too simple, at least multiple regions in a BAR
> should be handled (for example macio.c needs that). But also that can
> be added later (pci_register_bar_not_so_simple()?), so Avi's version
> could be used as the starting point.
OK I've put it on my branch so people have the chance to
comment, and they can be built upon.
--
MST
next prev parent reply other threads:[~2011-04-06 11:11 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-04-04 15:27 [Qemu-devel] [PATCH 00/10] pci: pci_register_bar_simple Avi Kivity
2011-04-04 15:27 ` [Qemu-devel] [PATCH 01/10] pci: add pci_register_bar_simple() API Avi Kivity
2011-04-04 15:27 ` [Qemu-devel] [PATCH 02/10] rtl8139: convert to pci_register_bar_simple() Avi Kivity
2011-04-04 15:28 ` [Qemu-devel] [PATCH 03/10] cirrus-vga: " Avi Kivity
2011-04-04 15:28 ` [Qemu-devel] [PATCH 04/10] eepro100: " Avi Kivity
2011-04-04 15:28 ` [Qemu-devel] [PATCH 05/10] ich/ahci: " Avi Kivity
2011-05-08 17:54 ` [Qemu-devel] [PATCH] ahci: Unbreak bar registration (was: Re: [PATCH 05/10] ich/ahci: convert to pci_register_bar_simple()) Jan Kiszka
2011-04-04 15:28 ` [Qemu-devel] [PATCH 06/10] hda-intel: convert to pci_register_bar_simple() Avi Kivity
2011-04-04 15:28 ` [Qemu-devel] [PATCH 07/10] hda-intel: convert to pci_register_bar_simple() (partial) Avi Kivity
2011-04-04 15:28 ` [Qemu-devel] [PATCH 08/10] pcnet-pci: convert to pci_register_bar_simple() Avi Kivity
2011-04-04 15:28 ` [Qemu-devel] [PATCH 09/10] usb-ohci: " Avi Kivity
2011-04-04 15:28 ` [Qemu-devel] [PATCH 10/10] wdt_i6300esb: " Avi Kivity
2011-04-04 15:59 ` [Qemu-devel] Re: [PATCH 00/10] pci: pci_register_bar_simple Michael S. Tsirkin
2011-04-04 16:01 ` Avi Kivity
2011-04-04 16:22 ` Anthony Liguori
2011-04-04 16:35 ` Avi Kivity
2011-04-04 17:02 ` Blue Swirl
2011-04-04 19:44 ` Michael S. Tsirkin
2011-04-04 21:05 ` Blue Swirl
2011-04-04 21:26 ` Michael S. Tsirkin
2011-04-05 18:02 ` Blue Swirl
2011-04-06 11:11 ` Michael S. Tsirkin [this message]
2011-04-05 7:39 ` Avi Kivity
2011-04-05 18:06 ` Blue Swirl
2011-04-06 7:39 ` Avi Kivity
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=20110406111107.GB30884@redhat.com \
--to=mst@redhat.com \
--cc=avi@redhat.com \
--cc=blauwirbel@gmail.com \
--cc=qemu-devel@nongnu.org \
/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).