qemu-devel
[Top][All Lists]
Advanced

[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




reply via email to

[Prev in Thread] Current Thread [Next in Thread]