[Top][All Lists]
[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
- [Qemu-devel] [PATCH 0/4] exec.c refactoring, Blue Swirl, 2012/12/04
- [Qemu-devel] [PATCH 2/4] exec: extract TB watchpoint check, Blue Swirl, 2012/12/04
- [Qemu-devel] [PATCH 3/4] exec: move TB handling to translate-all.c, Blue Swirl, 2012/12/04
- [Qemu-devel] [PATCH 1/4] exec: fix coding style, Blue Swirl, 2012/12/04
- [Qemu-devel] [PATCH 4/4] exec: refactor cpu_restore_state, Blue Swirl, 2012/12/04
- Re: [Qemu-devel] [PATCH 4/4] exec: refactor cpu_restore_state, Andreas Färber, 2012/12/05
- Re: [Qemu-devel] [PATCH 4/4] exec: refactor cpu_restore_state,
Blue Swirl <=
- Re: [Qemu-devel] [PATCH 4/4] exec: refactor cpu_restore_state, Aurelien Jarno, 2012/12/06