From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from [140.186.70.92] (port=51778 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OSHhG-0003iE-PH for qemu-devel@nongnu.org; Fri, 25 Jun 2010 18:48:31 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OSHhE-0006pt-VR for qemu-devel@nongnu.org; Fri, 25 Jun 2010 18:48:30 -0400 Received: from mail-vw0-f45.google.com ([209.85.212.45]:42909) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OSHhE-0006pb-LE for qemu-devel@nongnu.org; Fri, 25 Jun 2010 18:48:28 -0400 Received: by vws10 with SMTP id 10so5204722vws.4 for ; Fri, 25 Jun 2010 15:48:26 -0700 (PDT) Sender: Richard Henderson Message-ID: <4C253219.6060301@twiddle.net> Date: Fri, 25 Jun 2010 15:47:53 -0700 From: Richard Henderson MIME-Version: 1.0 Subject: Re: [Qemu-devel] [PATCH 0/7] poison TARGET_xxx for compile once object and header file cleanups References: <1277470342-5861-1-git-send-email-pbonzini@redhat.com> In-Reply-To: <1277470342-5861-1-git-send-email-pbonzini@redhat.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Paolo Bonzini Cc: Amit Shah , Isaku Yamahata , qemu-devel@nongnu.org On 06/25/2010 05:52 AM, Paolo Bonzini wrote: > This is a different way to achieve the same objective as Isamu's patch. > Basically, his patch becomes the (much simpler) patch 7 of this series, > and everything else is something I had had lying around for a while. :) > > Patch 1 is simply Amit's patch, included here for convenience as it's > not been applied yet. > > Patches 2 and 3 remove some dyngen-exec.h hacks at the price of requiring > qemu-common.h included in more places. I don't see this as a big price; > all of these files were already including qemu-common.h indirectly, > e.g. via cpu-all.h, just not early enough. > > Patches 4 provides a CPUState type, albeit an opaque one, to files that > are not compiled per-target. The advantage of this are apparent in > patches 5 and 6: opaque pointers that are actually CPUState pointers > are now type-safe, and it is even possible to define a cpu property type > for the occasional device that has to be connected to a particular CPU > (the PC APICs in particular). > > Finally, patch 7 "redoes" Isamu's patch just by moving five lines of > code into qemu-common.h. > > > Amit Shah (1): > rtc: Remove TARGET_I386 from qemu-config.c, enables driftfix > > Paolo Bonzini (6): > include qemu-common.h when needed by the next patches > include stdio.h freely, remove dyngen-exec.h hacks > provide opaque CPUState to files that are compiled once > add qdev property type "cpu" > replace void* uses with opaque CPUState* > poison TARGET_xxx for compile once object Reviewed-by: Richard Henderson I like this cleanup. Although I would personally prefer an additional patch that removes the define silliness that patch 4 works around. In other words I think there's no point in having CPUARMState et al; we should use CPUState universally. r~