Am 07.02.2012 00:00, schrieb Anthony Liguori:
> On 02/02/2012 08:59 PM, Andreas Färber wrote:
>> +static inline Object *arm_env_get_object(CPUARMState *env)
>> +{
>> +return OBJECT((void *)(env) - offsetof(ARMCPU, env));
>> +}
>> +
>> +#define ENV_GET_OBJECT(e) arm_env_get_object(e)
>
> I'd pr
On 02/02/2012 08:59 PM, Andreas Färber wrote:
We g_malloc0()'ed CPUARMState ourself, and exec.c's cpu_copy() runs
through cpu_init() as well, so we are at liberty to supply the CPUState
any way we see fit. Having CPUARMState as field in the QOM CPU allows
both to access env from an ARMCPU object
We g_malloc0()'ed CPUARMState ourself, and exec.c's cpu_copy() runs
through cpu_init() as well, so we are at liberty to supply the CPUState
any way we see fit. Having CPUARMState as field in the QOM CPU allows
both to access env from an ARMCPU object and to access the QOM Object
and its ObjectClass