From mboxrd@z Thu Jan 1 00:00:00 1970 From: Anthony Liguori Subject: Re: [PATCH 2 of 5] add can_dma/post_dma for direct IO Date: Sat, 13 Dec 2008 10:46:49 -0600 Message-ID: <4943E6F9.1050001@codemonkey.ws> References: <4942B841.6010900@codemonkey.ws> <20081213143944.GD30537@random.random> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: Gerd Hoffmann , qemu-devel@nongnu.org, kvm@vger.kernel.org, avi@redhat.com, chrisw@redhat.com To: Andrea Arcangeli Return-path: Received: from an-out-0708.google.com ([209.85.132.240]:47261 "EHLO an-out-0708.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750789AbYLMQqz (ORCPT ); Sat, 13 Dec 2008 11:46:55 -0500 Received: by an-out-0708.google.com with SMTP id d40so865541and.1 for ; Sat, 13 Dec 2008 08:46:53 -0800 (PST) In-Reply-To: <20081213143944.GD30537@random.random> Sender: kvm-owner@vger.kernel.org List-ID: Andrea Arcangeli wrote: > On Fri, Dec 12, 2008 at 01:15:13PM -0600, Anthony Liguori wrote: > >> void *cpu_physical_memory_map(target_phys_addr_t addr, ram_addr_t size, int >> is_write); >> > > Just a side note (doesn't mean I agree with the above), it doesn't > make sense to use an ram_addr_t size when you return a 32bit address > on 32bit qemu build. > size_t is completely wrong for 64-bit targets on 32-bit hosts. ram_addr_t is the type we use for guest ram size. It's 64-bit all of the time simply because it's easier to do that and we decided that the little bit of wasted space/computations were not a problem. Regards, Anthony Liguori