From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:36424) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1S7Rcr-0006Ih-NY for qemu-devel@nongnu.org; Tue, 13 Mar 2012 09:18:59 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1S7Rck-0007yO-C4 for qemu-devel@nongnu.org; Tue, 13 Mar 2012 09:18:53 -0400 Received: from mail-gx0-f173.google.com ([209.85.161.173]:43692) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1S7Rck-0007y6-59 for qemu-devel@nongnu.org; Tue, 13 Mar 2012 09:18:46 -0400 Received: by ggnj2 with SMTP id j2so595132ggn.4 for ; Tue, 13 Mar 2012 06:18:44 -0700 (PDT) Sender: Paolo Bonzini Message-ID: <4F5F4927.4090801@redhat.com> Date: Tue, 13 Mar 2012 14:18:31 +0100 From: Paolo Bonzini MIME-Version: 1.0 References: <1330893156-26569-1-git-send-email-afaerber@suse.de> <1331398436-20761-1-git-send-email-afaerber@suse.de> <1331398436-20761-4-git-send-email-afaerber@suse.de> In-Reply-To: <1331398436-20761-4-git-send-email-afaerber@suse.de> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Subject: Re: [Qemu-devel] [PATCH RFC v4 03/20] target-arm: Embed CPUARMState in QOM ARMCPU List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: =?UTF-8?B?QW5kcmVhcyBGw6RyYmVy?= Cc: Peter Maydell , Richard Henderson , qemu-devel@nongnu.org, Anthony Liguori , Paul Brook Il 10/03/2012 17:53, Andreas Färber ha scritto: > /** > * ARMCPU: > + * @env: Legacy CPU state. > * > * An ARM CPU core. > */ > @@ -58,7 +60,17 @@ typedef struct ARMCPU { > /*< private >*/ > CPUState parent_obj; > /*< public >*/ > + > + /* TODO Inline this and split off common state */ > + CPUARMState env; > } ARMCPU; > As usual I don't like "legacy". :) A more interesting distinction is between state that is relevant to the emulation, and state that is relevant to the main loop or the machine. The former is reinitialized after reset and can remain in CPUFooState. The latter is not reinitialized after reset, can move to QOM, and in most cases that's what we access when we use CPUArchState. Also, I understand that the conversion is not fully mechanical, but perhaps it can be made "more" mechanical than this? Splitting this patch in two would be nice, but I can't say I read it fully. Paolo