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