From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MtEJE-0001i4-1B for qemu-devel@nongnu.org; Thu, 01 Oct 2009 01:34:32 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MtEJ9-0001Zu-K2 for qemu-devel@nongnu.org; Thu, 01 Oct 2009 01:34:31 -0400 Received: from [199.232.76.173] (port=58512 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MtEJ9-0001ZL-55 for qemu-devel@nongnu.org; Thu, 01 Oct 2009 01:34:27 -0400 Received: from mail.valinux.co.jp ([210.128.90.3]:52958) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1MtEJ8-0002Z0-Cl for qemu-devel@nongnu.org; Thu, 01 Oct 2009 01:34:26 -0400 Date: Thu, 1 Oct 2009 14:34:23 +0900 From: Isaku Yamahata Subject: Re: [Qemu-devel] [PATCH 25/61] pci: use uint64_t for bar addr and size instead of uint32_t. Message-ID: <20091001053423.GQ24813%yamahata@valinux.co.jp> References: <1254305917-14784-1-git-send-email-yamahata@valinux.co.jp> <1254305917-14784-26-git-send-email-yamahata@valinux.co.jp> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: malc Cc: qemu-devel@nongnu.org On Wed, Sep 30, 2009 at 06:55:51PM +0400, malc wrote: > On Wed, 30 Sep 2009, Isaku Yamahata wrote: > > > This patch is preliminary for 64bit bar. > > For 64bit bar support, replace uint32_t with uint64_t for addr/size > > to be able to represent 64bit. > > I'm not sure how this supposed to work with devices that are physically > incapable of working with 64bit addresses, care to explain? Such a device implements only 32bit BAR and never 64bit BAR. So it gets only 32bit addressable value in uint64_t. If you want to make sure it, you can insert assert(address <= UINT32_MAX) into map function of such devices. -- yamahata