From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:47973) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VohUM-0004N0-O7 for qemu-devel@nongnu.org; Thu, 05 Dec 2013 17:33:56 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VohU6-0004AB-RG for qemu-devel@nongnu.org; Thu, 05 Dec 2013 17:33:42 -0500 Received: from e9.ny.us.ibm.com ([32.97.182.139]:47772) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VohU6-00049j-MN for qemu-devel@nongnu.org; Thu, 05 Dec 2013 17:33:26 -0500 Received: from /spool/local by e9.ny.us.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Thu, 5 Dec 2013 17:33:26 -0500 From: Michael Roth Date: Thu, 5 Dec 2013 16:33:01 -0600 Message-Id: <1386282785-466-11-git-send-email-mdroth@linux.vnet.ibm.com> In-Reply-To: <1386282785-466-1-git-send-email-mdroth@linux.vnet.ibm.com> References: <1386282785-466-1-git-send-email-mdroth@linux.vnet.ibm.com> Subject: [Qemu-devel] [PATCH v2 10/14] pci: allow 0 address for PCI IO regions List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: aik@ozlabs.ru, agraf@suse.de, ncmike@ncultra.org, paulus@samba.org, tyreld@linux.vnet.ibm.com, nfont@linux.vnet.ibm.com, qemu-ppc@nongnu.org Some kernels program a 0 address for io regions. PCI 3.0 spec sectio 6.2.5.1 doesn't seem to disallow this. 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 f15bbb0..fe5729c 100644 --- a/hw/pci/pci.c +++ b/hw/pci/pci.c @@ -1030,7 +1030,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 <= new_addr || new_addr == 0 || last_addr >= UINT32_MAX) { + if (last_addr <= new_addr || last_addr >= UINT32_MAX) { return PCI_BAR_UNMAPPED; } return new_addr; -- 1.7.9.5