From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:41037) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1V1HPW-0001hH-KT for qemu-devel@nongnu.org; Mon, 22 Jul 2013 10:48:31 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1V1HPR-0000xC-OA for qemu-devel@nongnu.org; Mon, 22 Jul 2013 10:48:26 -0400 Received: from cantor2.suse.de ([195.135.220.15]:56032 helo=mx2.suse.de) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1V1HPR-0000wv-HE for qemu-devel@nongnu.org; Mon, 22 Jul 2013 10:48:21 -0400 Message-ID: <51ED4632.9060209@suse.de> Date: Mon, 22 Jul 2013 16:48:18 +0200 From: =?UTF-8?B?QW5kcmVhcyBGw6RyYmVy?= MIME-Version: 1.0 References: <1373221591-17091-1-git-send-email-afaerber@suse.de> <1373221591-17091-2-git-send-email-afaerber@suse.de> In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [PATCH qom-cpu v2 01/42] cpu: Introduce vaddr type List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Peter Maydell Cc: qemu-devel@nongnu.org Am 15.07.2013 16:46, schrieb Peter Maydell: > On 7 July 2013 19:25, Andreas F=C3=A4rber wrote: >> vaddr is to target_ulong what uintmax_t is to unsigned int. >> >> Its purpose is to allow turning per-target functions with target_ulong >> arguments into CPUClass hooks. >> >> Suggested-by: Peter Maydell >> Signed-off-by: Andreas F=C3=A4rber >> --- >> include/qom/cpu.h | 8 ++++++++ >> 1 file changed, 8 insertions(+) >> >> diff --git a/include/qom/cpu.h b/include/qom/cpu.h >> index 147c256..4fd12a0 100644 >> --- a/include/qom/cpu.h >> +++ b/include/qom/cpu.h >> @@ -29,6 +29,14 @@ >> >> typedef int (*WriteCoreDumpFunction)(void *buf, size_t size, void *op= aque); >> >> +typedef uint64_t vaddr; >> +#define VADDR_PRId PRId64 >> +#define VADDR_PRIu PRIu64 >> +#define VADDR_PRIo PRIo64 >> +#define VADDR_PRIx PRIx64 >> +#define VADDR_PRIX PRIX64 >> +#define VADDR_MAX UINT64_MAX >> + >=20 > This looks OK, but I think it could use a brief comment above > the typedef explaining its purpose, and an update to HACKING > to say when to use vaddr and when target_ulong. I've added a gtk-doc comment. Not sure about HACKING, that can still be done as fully reviewed follow-up. (Note that v3 was identical to the above.) Andreas --=20 SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 N=C3=BCrnberg, Germany GF: Jeff Hawn, Jennifer Guild, Felix Imend=C3=B6rffer; HRB 16746 AG N=C3=BC= rnberg