From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:46670) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XMLZW-00047f-OM for qemu-devel@nongnu.org; Tue, 26 Aug 2014 14:34:31 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XMLZK-0004lr-5q for qemu-devel@nongnu.org; Tue, 26 Aug 2014 14:34:22 -0400 Received: from e37.co.us.ibm.com ([32.97.110.158]:54927) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XMLZJ-0004lf-UV for qemu-devel@nongnu.org; Tue, 26 Aug 2014 14:34:10 -0400 Received: from /spool/local by e37.co.us.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Tue, 26 Aug 2014 12:34:09 -0600 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable From: Michael Roth In-Reply-To: <53FC4FF3.6020906@ozlabs.ru> References: <1408407718-10835-1-git-send-email-mdroth@linux.vnet.ibm.com> <1408407718-10835-9-git-send-email-mdroth@linux.vnet.ibm.com> <53FC4FF3.6020906@ozlabs.ru> Message-ID: <20140826183403.21832.9131@loki> Date: Tue, 26 Aug 2014 13:34:03 -0500 Subject: Re: [Qemu-devel] [PATCH 08/12] pci: allow 0 address for PCI IO regions List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Alexey Kardashevskiy , qemu-devel@nongnu.org Cc: ncmike@ncultra.org, nfont@linux.vnet.ibm.com, qemu-ppc@nongnu.org, agraf@suse.de, tyreld@linux.vnet.ibm.com Quoting Alexey Kardashevskiy (2014-08-26 04:14:27) > On 08/19/2014 10:21 AM, Michael Roth wrote: > > Some kernels program a 0 address for io regions. PCI 3.0 spec > > section 6.2.5.1 doesn't seem to disallow this. > = > = > I remember there was discussion about it but I forgot :) Why does it have > to be a part of this patchset? Worth mentioning in the commit log I belie= ve. Unfortunately with ppc guests the first bar allocation tends to be the 0-address case, so to me it seemed necessary for a testable series. Can simply document this in the series and re-send separately though. > = > = > > = > > Signed-off-by: Michael Roth > > --- > > hw/pci/pci.c | 2 +- > > 1 file changed, 1 insertion(+), 1 deletion(-) > > = > > diff --git a/hw/pci/pci.c b/hw/pci/pci.c > > index 351d320..9578749 100644 > > --- a/hw/pci/pci.c > > +++ b/hw/pci/pci.c > > @@ -1035,7 +1035,7 @@ 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 <=3D new_addr || new_addr =3D=3D 0 || last_addr = >=3D UINT32_MAX) { > > + if (last_addr <=3D new_addr || last_addr >=3D UINT32_MAX) { > > return PCI_BAR_UNMAPPED; > > } > > return new_addr; > > = > = > = > -- = > Alexey