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

2012-03-15 Thread Paolo Bonzini
Il 14/03/2012 23:30, Andreas Färber ha scritto: >> As usual I don't like "legacy". :) > > Well, it refers to "former CPUState of which some or many fields are > going to be extracted". I wouldn't want to write it into documentation > as such. > " * @env: CPUARMState" is not telling either. > Bette

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

2012-03-14 Thread Andreas Färber
Am 13.03.2012 14:18, schrieb Paolo Bonzini: > 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; >> /*< p

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

2012-03-13 Thread Paolo Bonzini
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 c

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

2012-03-10 Thread Andreas Färber
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