From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:37207) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TJf5B-0006AW-26 for qemu-devel@nongnu.org; Thu, 04 Oct 2012 02:38:53 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TJf5A-0001Ni-4R for qemu-devel@nongnu.org; Thu, 04 Oct 2012 02:38:52 -0400 Received: from mx1.redhat.com ([209.132.183.28]:33778) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TJf59-0001Ne-SK for qemu-devel@nongnu.org; Thu, 04 Oct 2012 02:38:52 -0400 Message-ID: <506D2EEE.3010904@redhat.com> Date: Thu, 04 Oct 2012 08:38:38 +0200 From: Avi Kivity MIME-Version: 1.0 References: <1349280245-16341-1-git-send-email-avi@redhat.com> <1349280245-16341-20-git-send-email-avi@redhat.com> In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [RFC v1 19/22] memory: per-AddressSpace dispatch List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Blue Swirl Cc: Paolo Bonzini , "Michael S. Tsirkin" , qemu-devel@nongnu.org, Anthony Liguori , liu ping fan On 10/03/2012 10:24 PM, Blue Swirl wrote: > > > > #else > > -void cpu_physical_memory_rw(target_phys_addr_t addr, uint8_t *buf, > > - int len, int is_write) > > + > > +void address_space_rw(AddressSpace *as, target_phys_addr_t addr, uint8_t *buf, > > + int len, bool is_write) > > I'd make address_space_* use uint64_t instead of target_phys_addr_t > for the address. It may actually be buggy for 32 bit > target_phys_addr_t and 64 bit DMA addresses, if such architectures > exist. Maybe memory.c could be made target independent one day. We can make target_phys_addr_t 64 bit unconditionally. The fraction of deployments where both host and guest are 32 bits is dropping, and I doubt the performance drop is noticable. We were also planning to rename target_phys_addt_t to hw_addr. But both of those are for another patch. For now, AddressSpace follows MemoryRegion, it's just a small abstraction on top. -- I have a truly marvellous patch that fixes the bug which this signature is too narrow to contain.