qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH v2] cpu: Drop unnecessary dynamic casts in *_env


From: Andreas Färber
Subject: Re: [Qemu-devel] [PATCH v2] cpu: Drop unnecessary dynamic casts in *_env_get_cpu()
Date: Sat, 29 Jun 2013 15:03:29 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130510 Thunderbird/17.0.6

Am 28.06.2013 19:32, schrieb Richard Henderson:
> On 06/28/2013 06:23 AM, Andreas Färber wrote:
>> A transition from CPUFooState to FooCPU can be considered safe,
>> just like FooCPU::env access in the opposite direction.
>> The only benefit of the FOO_CPU() casts would be protection against
>> bogus CPUFooState pointers, but then surrounding code would likely
>> break, too.
>>
>> This should slightly improve interrupt etc. performance.
>>
>> Reported-by: Anthony Liguori <address@hidden>
>> Signed-off-by: Andreas Färber <address@hidden>
> 
> Acked-by: Richard Henderson <address@hidden>

Thanks, applied to qom-cpu (with extended commit message):
https://github.com/afaerber/qemu-cpu/commits/qom-cpu

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]