From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:53147) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WKmUV-0003s7-Ih for qemu-devel@nongnu.org; Tue, 04 Mar 2014 05:22:33 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WKmUP-00061h-JT for qemu-devel@nongnu.org; Tue, 04 Mar 2014 05:22:27 -0500 Received: from mx1.redhat.com ([209.132.183.28]:36455) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WKmUP-00061a-Ax for qemu-devel@nongnu.org; Tue, 04 Mar 2014 05:22:21 -0500 Message-ID: <5315A957.3070905@redhat.com> Date: Tue, 04 Mar 2014 11:22:15 +0100 From: Paolo Bonzini MIME-Version: 1.0 References: <1393901250-3922-1-git-send-email-xbing6@gmail.com> <1393901250-3922-5-git-send-email-xbing6@gmail.com> In-Reply-To: <1393901250-3922-5-git-send-email-xbing6@gmail.com> Content-Type: text/plain; charset=ISO-8859-15; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [Discussion 04/10] memory_mapping: make this architecture-independent List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Xuebing Wang , qemu-devel@nongnu.org Cc: afaerber@suse.de, stefanha@redhat.com Il 04/03/2014 03:47, Xuebing Wang ha scritto: > Use vaddr (instead of target_ulong) for virtual address. See document HACKING > for more information about vaddr and target_ulong. > > Signed-off-by: Xuebing Wang > --- > include/sysemu/memory_mapping.h | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > > diff --git a/include/sysemu/memory_mapping.h b/include/sysemu/memory_mapping.h > index a75d59a..4a5f7be 100644 > --- a/include/sysemu/memory_mapping.h > +++ b/include/sysemu/memory_mapping.h > @@ -16,6 +16,7 @@ > > #include "qemu/queue.h" > #include "qemu/typedefs.h" > +#include "qom/cpu.h" /* for vaddr */ > > typedef struct GuestPhysBlock { > /* visible to guest, reflects PCI hole, etc */ > @@ -39,7 +40,7 @@ typedef struct GuestPhysBlockList { > /* The physical and virtual address in the memory mapping are contiguous. */ > typedef struct MemoryMapping { > hwaddr phys_addr; > - target_ulong virt_addr; > + vaddr virt_addr; > ram_addr_t length; > QTAILQ_ENTRY(MemoryMapping) next; > } MemoryMapping; > Makes sense. Paolo