qemu-ppc
[Top][All Lists]
Advanced

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

Re: [Qemu-ppc] [PATCH qom-cpu-next] e500: Replace open-coded loop with q


From: Andreas Färber
Subject: Re: [Qemu-ppc] [PATCH qom-cpu-next] e500: Replace open-coded loop with qemu_get_cpu()
Date: Fri, 15 Feb 2013 15:35:27 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130105 Thunderbird/17.0.2

Am 15.02.2013 15:29, schrieb Alexander Graf:
> 
> On 15.02.2013, at 15:25, Andreas Färber wrote:
> 
>> Since we still need env for ppc-specific fields, obtain it via the new
>> env_ptr fields to avoid "cpu" name conflicts between CPUState and
>> PowerPCCPU for now.
>>
>> This fixes a potential issue with env being NULL at the end of the loop
>> but cpu still being a valid pointer corresponding to a previous env.
>>
>> Signed-off-by: Andreas Färber <address@hidden>
>> ---
>> Alex, this is a rebased and slimmed-down version of yesterday's paste.
>> Can you ack please? Thanks, /-F
> 
> In your QOM conversion you also converted other places like this. Have you 
> verified that these don't suffer from the same problem?

Not yet. Not all callers are using this pattern though, so solutions
would differ and be per-case patches.

At some point I obviously intend to change first_cpu and ->next_cpu to
CPUState and have been wondering whether we can use QTAILQ macros or
anything else more "standardized", with better iteration support.

Andreas

-- 
SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany
GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer; HRB 16746 AG Nürnberg



reply via email to

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