qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH RFC v4 03/20] target-arm: Embed CPUARMState in Q


From: Paolo Bonzini
Subject: Re: [Qemu-devel] [PATCH RFC v4 03/20] target-arm: Embed CPUARMState in QOM ARMCPU
Date: Tue, 13 Mar 2012 14:18:31 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:10.0.1) Gecko/20120216 Thunderbird/10.0.1

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



reply via email to

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