From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:42294) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VKS0P-0007nc-Ax for qemu-devel@nongnu.org; Fri, 13 Sep 2013 07:57:50 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VKS0J-0003re-OD for qemu-devel@nongnu.org; Fri, 13 Sep 2013 07:57:45 -0400 Received: from smtp2-g21.free.fr ([2a01:e0c:1:1599::11]:55413) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VKS0J-0003pU-63 for qemu-devel@nongnu.org; Fri, 13 Sep 2013 07:57:39 -0400 From: =?UTF-8?q?Herv=C3=A9=20Poussineau?= Date: Fri, 13 Sep 2013 13:58:44 +0200 Message-Id: <1379073525-20995-1-git-send-email-hpoussin@reactos.org> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Subject: [Qemu-devel] [PATCH] pci: remove explicit check to 64K ioport size List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: =?UTF-8?q?Herv=C3=A9=20Poussineau?= , "Michael S. Tsirkin" This check is useless, as bigger addresses will be ignored when added to 'io' MemoryRegion, which has a size of 64K. However, some architectures don't use the 'io' MemoryRegion, like the alpha and versatile platforms. They create a PCI I/O region bigger than 64K, so let them handle PCI I/O BARs in the higher range. Signed-off-by: Herv=C3=A9 Poussineau --- hw/pci/pci.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/hw/pci/pci.c b/hw/pci/pci.c index d00682e..a8e2b29 100644 --- a/hw/pci/pci.c +++ b/hw/pci/pci.c @@ -1028,8 +1028,7 @@ static pcibus_t pci_bar_address(PCIDevice *d, } new_addr =3D pci_get_long(d->config + bar) & ~(size - 1); last_addr =3D new_addr + size - 1; - /* NOTE: we have only 64K ioports on PC */ - if (last_addr <=3D new_addr || new_addr =3D=3D 0 || last_addr > = UINT16_MAX) { + if (last_addr <=3D new_addr || new_addr =3D=3D 0) { return PCI_BAR_UNMAPPED; } return new_addr; --=20 1.7.10.4