qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH 4/4] exec: refactor cpu_restore_state


From: Blue Swirl
Subject: Re: [Qemu-devel] [PATCH 4/4] exec: refactor cpu_restore_state
Date: Wed, 5 Dec 2012 19:40:38 +0000

On Wed, Dec 5, 2012 at 11:10 AM, Andreas Färber <address@hidden> wrote:
> Am 04.12.2012 22:20, schrieb Blue Swirl:
>> Refactor common code around calls to cpu_restore_state().
>>
>> tb_find_pc() has now no external users, make it static.
>>
>> Signed-off-by: Blue Swirl <address@hidden>
>
> Would've been nice to get CC'ed on the refactoring of a cpu_* function...
>
> I've reviewed mostly the non-target parts and they look okay,
> CPUArchState is unfortunately still needed.

Yes, it's inevitable because CPU fields need to be updated.

One idea I had during the refactoring was to create a new structure
for pc, cs_base and flags in TranslationBlock. Only this struct could
be passed to save/restore functions. The struct could be actually a
union with CPU specific fields, like 'npc' for Sparc instead of x86
specific 'cs_base'. But the benefit would be small since other fields
are also used by for example icount, so whole TranslationBlock is
needed in many cases.

>
> Andreas
>
> --
> SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany
> GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer; HRB 16746 AG Nürnberg



reply via email to

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