[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] Re: [PATCH 12/23] pci: 64bit bar support.
From: |
Michael S. Tsirkin |
Subject: |
[Qemu-devel] Re: [PATCH 12/23] pci: 64bit bar support. |
Date: |
Tue, 6 Oct 2009 11:47:43 +0200 |
User-agent: |
Mutt/1.5.19 (2009-01-05) |
On Tue, Oct 06, 2009 at 06:42:02PM +0900, Isaku Yamahata wrote:
> On Mon, Oct 05, 2009 at 02:47:11PM +0200, Michael S. Tsirkin wrote:
> > > @@ -462,7 +474,11 @@ static void pci_update_mappings(PCIDevice *d)
> > > }
> > > } else {
> > > if (cmd & PCI_COMMAND_MEMORY) {
> > > - new_addr = pci_get_long(d->config + config_ofs);
> > > + if (pci_bar_is_mem64(r)) {
> > > + new_addr = pci_get_quad(d->config + config_ofs);
> >
> > From previous patch, config_ofs is region_num * 4
> > This is incorrect for 64 bit regions.
>
> I don't see any problems. In the following example,
> 0, 2 ... will be used for region_number and 1 is left unused.
>
> BAR0 64bit memory
> BAR1 used by BAR0 64bit
> BAR2 ...
Oh, I see. It's up to the user of pci_register_bar to allocate sane
region numbers. Fine. Maybe add a comment before pci_register_bar about
legal values for region_num: not everyone knows about PCI internals.
> --
> yamahata
- [Qemu-devel] Re: [PATCH 20/23] pci: make bar update function aware of pci bridge., (continued)
[Qemu-devel] [PATCH 12/23] pci: 64bit bar support., Isaku Yamahata, 2009/10/05
[Qemu-devel] Re: [PATCH 12/23] pci: 64bit bar support., Michael S. Tsirkin, 2009/10/05
[Qemu-devel] [PATCH 11/23] pci: typedef pcibus_t as uint64_t instead of uint32_t., Isaku Yamahata, 2009/10/05
[Qemu-devel] [PATCH 02/23] pci: use appropriate PRIs in PCI_DPRINTF() for portability., Isaku Yamahata, 2009/10/05
[Qemu-devel] [PATCH 05/23] pci: use PCI_SLOT() and PCI_FUNC()., Isaku Yamahata, 2009/10/05
[Qemu-devel] [PATCH 03/23] pci: introduce constant PCI_NUM_PINS for the number of interrupt pins, 4., Isaku Yamahata, 2009/10/05
[Qemu-devel] [PATCH 01/23] pci: fix PCI_DPRINTF() wrt variadic macro., Isaku Yamahata, 2009/10/05
[Qemu-devel] [PATCH 10/23] pci: introduce FMT_PCIBUS for printf format for pcibus_t., Isaku Yamahata, 2009/10/05
[Qemu-devel] [PATCH 17/23] pci: fix pci_default_write_config(), Isaku Yamahata, 2009/10/05
[Qemu-devel] [PATCH 13/23] pci: make pci configuration transaction more accurate., Isaku Yamahata, 2009/10/05