[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH 2/3] Add PCI memory region registration
From: |
Christoph Hellwig |
Subject: |
Re: [Qemu-devel] [PATCH 2/3] Add PCI memory region registration |
Date: |
Sun, 31 May 2009 13:02:53 +0200 |
User-agent: |
Mutt/1.3.28i |
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.
- [Qemu-devel] [PATCH 0/3] Object-based physical memory management, Avi Kivity, 2009/05/24
- [Qemu-devel] [PATCH 1/3] Add PhysicalMemoryRegion type, Avi Kivity, 2009/05/24
- [Qemu-devel] [PATCH 2/3] Add PCI memory region registration, Avi Kivity, 2009/05/24
- Re: [Qemu-devel] [PATCH 2/3] Add PCI memory region registration, Anthony Liguori, 2009/05/27
- Re: [Qemu-devel] [PATCH 2/3] Add PCI memory region registration, Avi Kivity, 2009/05/27
- Re: [Qemu-devel] [PATCH 2/3] Add PCI memory region registration, Anthony Liguori, 2009/05/27
- Re: [Qemu-devel] [PATCH 2/3] Add PCI memory region registration, Avi Kivity, 2009/05/27
- Re: [Qemu-devel] [PATCH 2/3] Add PCI memory region registration, Anthony Liguori, 2009/05/27
- Re: [Qemu-devel] [PATCH 2/3] Add PCI memory region registration,
Christoph Hellwig <=
- Re: [Qemu-devel] [PATCH 2/3] Add PCI memory region registration, Avi Kivity, 2009/05/31
- Re: [Qemu-devel] [PATCH 2/3] Add PCI memory region registration, Avi Kivity, 2009/05/31
- Re: [Qemu-devel] [PATCH 2/3] Add PCI memory region registration, Anthony Liguori, 2009/05/31
- Re: [Qemu-devel] [PATCH 2/3] Add PCI memory region registration, Avi Kivity, 2009/05/31
[Qemu-devel] [PATCH 3/3] Convert RTL8139 to use PCI memory regitration facility, Avi Kivity, 2009/05/24
Re: [Qemu-devel] [PATCH 0/3] Object-based physical memory management, Anthony Liguori, 2009/05/27