From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:58657) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Rg8c6-0001QV-Jp for qemu-devel@nongnu.org; Thu, 29 Dec 2011 00:33:15 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Rg8c5-0003ar-7u for qemu-devel@nongnu.org; Thu, 29 Dec 2011 00:33:14 -0500 Received: from usrksweb02.endace.com ([174.143.168.194]:38324) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Rg8c4-0003ad-W7 for qemu-devel@nongnu.org; Thu, 29 Dec 2011 00:33:13 -0500 Message-ID: <4EFBFB75.1060609@endace.com> Date: Thu, 29 Dec 2011 18:32:37 +1300 From: Alexey Korolev MIME-Version: 1.0 References: <4EFA9DF0.7050902@endace.com> <4EFAA86D.3090103@endace.com> <20111229025647.GB29199@morn.localdomain> In-Reply-To: <20111229025647.GB29199@morn.localdomain> Content-Type: text/plain; charset="ISO-8859-1"; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH 2/3] Add a new PCI region type to supports 64 bit ranges List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Kevin O'Connor Cc: sfd@endace.com, yamahata@valinux.co.jp, seabios@seabios.org, qemu-devel@nongnu.org, mst@redhat.com >> @@ -69,6 +72,8 @@ static enum pci_region_type pci_addr_to_type(u32 addr) >> { >> if (addr& PCI_BASE_ADDRESS_SPACE_IO) >> return PCI_REGION_TYPE_IO; >> + if (addr& PCI_BASE_ADDRESS_MEM_TYPE_64) >> + return PCI_REGION_TYPE_PREFMEM_64; > This seems dangerous - a 64bit bar can be non-prefetchable - getting > this wrong could cause random (hard to debug) crashes. > Just out of curiosity - how this could happen? Having 64bit non-prefetchable BAR implies that the device is not behind any bridge (as bridges describe 64bit ranges for prefetchable memory only). Is it possible on nowadays systems?