qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [Qemu-ppc] [PATCH v2] pci: allow 0 address for PCI IO/M


From: Michael S. Tsirkin
Subject: Re: [Qemu-devel] [Qemu-ppc] [PATCH v2] pci: allow 0 address for PCI IO/MEM regions
Date: Fri, 24 Jul 2015 00:18:27 +0300

On Fri, Jul 24, 2015 at 06:48:57AM +1000, Benjamin Herrenschmidt wrote:
> On Thu, 2015-07-23 at 21:30 +0300, Michael S. Tsirkin wrote:
> > > @@ -1075,7 +1080,8 @@ static pcibus_t pci_bar_address(PCIDevice *d,
> > >          /* Check if 32 bit BAR wraps around explicitly.
> > >           * TODO: make priorities correct and remove this work
> > around.
> > >           */
> > > -        if (last_addr <= new_addr || new_addr == 0 || last_addr >=
> > UINT32_MAX) {
> > > +        if (last_addr <= new_addr || last_addr >= UINT32_MAX ||
> > > +            (!allow_0_address && new_addr == 0)) {
> > >              return PCI_BAR_UNMAPPED;
> > >          }
> 
> Talking of which, how can a BAR wrap around ? BARs are always power-of
> two aligned and naturally aligned (to their own size), they can't
> wrap...
> 
> Ben.
> 

True.

I seem to have thought it important:
https://lists.nongnu.org/archive/html/qemu-devel/2013-09/msg02594.html
but it makes no sense to me now.


-- 
MST



reply via email to

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