From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:53140) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1S0Asg-0007oj-Ux for qemu-devel@nongnu.org; Wed, 22 Feb 2012 07:01:20 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1S0Asc-00069S-M3 for qemu-devel@nongnu.org; Wed, 22 Feb 2012 07:01:10 -0500 Received: from mailout3.w1.samsung.com ([210.118.77.13]:46477) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1S0Asc-00069N-Gc for qemu-devel@nongnu.org; Wed, 22 Feb 2012 07:01:06 -0500 MIME-version: 1.0 Content-transfer-encoding: 7BIT Content-type: text/plain; charset=UTF-8; format=flowed Received: from euspt2 ([210.118.77.13]) by mailout3.w1.samsung.com (Sun Java(tm) System Messaging Server 6.3-8.04 (built Jul 29 2009; 32bit)) with ESMTP id <0LZS00N7DMPR5160@mailout3.w1.samsung.com> for qemu-devel@nongnu.org; Wed, 22 Feb 2012 12:01:03 +0000 (GMT) Received: from [106.109.8.162] by spt2.w1.samsung.com (iPlanet Messaging Server 5.2 Patch 2 (built Jul 14 2004)) with ESMTPA id <0LZS004YYMPQMW@spt2.w1.samsung.com> for qemu-devel@nongnu.org; Wed, 22 Feb 2012 12:01:03 +0000 (GMT) Date: Wed, 22 Feb 2012 16:01:00 +0400 From: Mitsyanko Igor In-reply-to: Message-id: <4F44D8FC.80006@samsung.com> References: <1329905754-11873-1-git-send-email-i.mitsyanko@samsung.com> Subject: Re: [Qemu-devel] [PATCH 0/5] VMState cleanups Reply-To: i.mitsyanko@samsung.com List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Peter Maydell Cc: e.voevodin@samsung.com, quintela@redhat.com, qemu-devel@nongnu.org, kyungmin.park@samsung.com, d.solodkiy@samsung.com, m.kozlov@samsung.com, afaerber@suse.de On 02/22/2012 03:26 PM, Peter Maydell wrote: > On 22 February 2012 10:15, Igor Mitsyanko wrote: >> This patchset cleans up and optimizes vmstate implementation. >> >> Patch 1 is a trivial bug fixing. >> Patches 2 and 3 replaces target_phys_addr_t in pxa implementation >> to uint32_t. >> Patch 4 moves VMSTATE_UINTTL from hw.h to vmstate.h. Explicit dependency >> on NEED_CPU_H is droped, I failed to understand why it was presented at all. > > So if we apply patches 1-3 (which all look plausible) then the only > remaining user of VMSTATE_UINTTL is target-i386/machine.c as far as > I can see. > > This leaves me wondering if we shouldn't just put it actually in > target-i386/machine.c as a convenience macro for that specific CPU > to avoid having to have more #ifdef TARGET_X86_64s. (I note that > the machine.c code is already pretty inconsistent, eg lstar and > cstar are defined as target_ulong and saved with VMSTATE_UINT64.) > > Basically VMSTATE_UINTTL seems like a bit of a dangerous thing to > leave lying around as there aren't really very many use cases > for it... I personally don't really like all these "hack" VMSTATE macros spread all around QEMU code. I would prefer to have all convenient VMSTATE_*s in one place and eventually replace all file-specific hack macro with standard ones. Not sure that it's worth an effort though. If we're going to move UINTTL* to target-i386/machine.c, then they probably should be implemented in the same way as they are implemented in hw.h now. But without NEED_CPU_H. -- Mitsyanko Igor ASWG, Moscow R&D center, Samsung Electronics email: i.mitsyanko@samsung.com