From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:45172) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Rg78N-0000nr-9x for qemu-devel@nongnu.org; Wed, 28 Dec 2011 22:58:28 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Rg78M-0003g0-BC for qemu-devel@nongnu.org; Wed, 28 Dec 2011 22:58:27 -0500 Received: from usrksweb02.endace.com ([174.143.168.194]:49442) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Rg78M-0003fw-5N for qemu-devel@nongnu.org; Wed, 28 Dec 2011 22:58:26 -0500 Message-ID: <4EFBE541.9030201@endace.com> Date: Thu, 29 Dec 2011 16:57:53 +1300 From: Alexey Korolev MIME-Version: 1.0 References: <4EFA9DF0.7050902@endace.com> <4EFAA86D.3090103@endace.com> <20111228113024.GA26310@redhat.com> In-Reply-To: <20111228113024.GA26310@redhat.com> 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: "Michael S. Tsirkin" Cc: sfd@endace.com, yamahata@valinux.co.jp, seabios@seabios.org, qemu-devel@nongnu.org On 29/12/11 00:30, Michael S. Tsirkin wrote: > On Wed, Dec 28, 2011 at 06:26:05PM +1300, Alexey Korolev wrote: >> This patch adds PCI_REGION_TYPE_PREFMEM_64 region type and modifies types of >> variables to make it possible to work with 64 bit addresses. >> >> Why I've added just one region type PCI_REGION_TYPE_PREFMEM_64 and haven't >> added PCI_REGION_TYPE_MEM_64? According to PCI architecture >> specification, the >> bridges can describe 64bit ranges for prefetchable type of memory >> only. So it's very >> unlikely that devices exporting 64bit non-prefetchable BARs. > Might happen for system devices I guess. > >> Anyway >> this code will work >> with 64bit non-prefetchable BARs unless the PCI device is not behind >> the secondary bus. > So what happens if such a device is on root bus? If a device is on the root bus and have BAR flags 0x4 (TYPE_MEMORY and 64 bit), memory will be allocated in 64bit range all flags remain the same. I did this just out of curiosity and this appears to work well. > >