From: Christoph Hellwig <hch@lst.de>
To: Anthony Liguori <anthony@codemonkey.ws>
Cc: Anthony Liguori <aliguori@us.ibm.com>,
Avi Kivity <avi@redhat.com>,
qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH 2/3] Add PCI memory region registration
Date: Sun, 31 May 2009 13:02:53 +0200 [thread overview]
Message-ID: <20090531110253.GA13812@lst.de> (raw)
In-Reply-To: <4A1DBFC1.6060603@codemonkey.ws>
On Wed, May 27, 2009 at 05:33:37PM -0500, Anthony Liguori wrote:
> pci_register_io_region(&d->dev, 0, 0x100,
> PCI_ADDRESS_SPACE_IO, rtl8139_ioport_read,
> rtl8139_ioport_write, s);
>
> pci_register_io_region(&d->dev, 1, 0x100,
> PCI_ADDRESS_SPACE_MEM, rtl8139_mmio_read,
> rtl8139_mmio_write, s);
>
> Moreover, you could probably drop the opaque parameter and and just use
> d->dev. I hope it's possible to get from one to the other.
I also think this is a much more natural API, and would simplify drivers
a lot. As for the naming the PCI spec uses the term bar for these
PIO/MMIO regions, so maybe call it pci_register_bar or pci_setup_bar?
> I think it's worth looking at changing the signatures of the mem
> read/write functions. Introducing a size parameter would greatly
> simplify adding 64-bit IO support, for instance.
Yeah.
next prev parent reply other threads:[~2009-05-31 11:30 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-05-24 9:29 [Qemu-devel] [PATCH 0/3] Object-based physical memory management Avi Kivity
2009-05-24 9:29 ` [Qemu-devel] [PATCH 1/3] Add PhysicalMemoryRegion type Avi Kivity
2009-05-27 14:16 ` Christoph Hellwig
2009-05-27 15:07 ` Avi Kivity
2009-05-24 9:29 ` [Qemu-devel] [PATCH 2/3] Add PCI memory region registration Avi Kivity
2009-05-27 14:08 ` Anthony Liguori
2009-05-27 15:02 ` Avi Kivity
2009-05-27 15:11 ` Anthony Liguori
2009-05-27 15:24 ` Avi Kivity
2009-05-27 22:33 ` Anthony Liguori
2009-05-31 11:02 ` Christoph Hellwig [this message]
2009-05-31 11:50 ` Avi Kivity
2009-05-31 11:47 ` Avi Kivity
2009-05-31 13:52 ` Anthony Liguori
2009-05-31 13:03 ` Avi Kivity
2009-05-24 9:29 ` [Qemu-devel] [PATCH 3/3] Convert RTL8139 to use PCI memory regitration facility Avi Kivity
2009-05-27 14:08 ` [Qemu-devel] [PATCH 0/3] Object-based physical memory management Anthony Liguori
2009-05-27 14:54 ` 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=20090531110253.GA13812@lst.de \
--to=hch@lst.de \
--cc=aliguori@us.ibm.com \
--cc=anthony@codemonkey.ws \
--cc=avi@redhat.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 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.