qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH 0/5] VMState cleanups


From: Mitsyanko Igor
Subject: Re: [Qemu-devel] [PATCH 0/5] VMState cleanups
Date: Wed, 22 Feb 2012 16:01:00 +0400
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.27) Gecko/20120216 Thunderbird/3.1.19

On 02/22/2012 03:26 PM, Peter Maydell wrote:
On 22 February 2012 10:15, Igor Mitsyanko<address@hidden>  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: address@hidden



reply via email to

[Prev in Thread] Current Thread [Next in Thread]