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: Thu, 15 Mar 2012 10:43:53 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:10.0.1) Gecko/20120216 Thunderbird/10.0.1

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.
> Better wordings anyone?
> 
>>  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.
> 
> Actually I was planning on keeping CPU*State only for TCG fields.

@env: CPUARMState structure (only TCG fields should remain there)

> Whether a field is reset or not should be determined by the reset
> callback, not by a semi-magic memset() up to a certain field name.
> That's especially problematic for cp15.

True.  My idea was to leave all resettable fields in CPUARMState, and
move the others in ARMCPU.  This is consistent with "machine state" in
CPUARMState and "machine settings + main-loop state" in ARMCPU.
However, it may make little sense to you.  If so, ignore me. :)

>> 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.
> 
> Hm, this patch has been around since v1 and so far nobody requested a
> particular split... it would be possible to move init and reset code in
> separate patches if deemed necessary? Peter?

No problem, now that you posted conversion of everything.

Paolo



reply via email to

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