From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:42305) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UscXb-0005co-3Z for qemu-devel@nongnu.org; Fri, 28 Jun 2013 13:33:02 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UscXY-0005Jt-7V for qemu-devel@nongnu.org; Fri, 28 Jun 2013 13:32:59 -0400 Sender: Richard Henderson Message-ID: <51CDC8C1.5070106@twiddle.net> Date: Fri, 28 Jun 2013 10:32:49 -0700 From: Richard Henderson MIME-Version: 1.0 References: <1372425837-30635-1-git-send-email-afaerber@suse.de> In-Reply-To: <1372425837-30635-1-git-send-email-afaerber@suse.de> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Subject: Re: [Qemu-devel] [PATCH v2] cpu: Drop unnecessary dynamic casts in *_env_get_cpu() List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: =?UTF-8?B?QW5kcmVhcyBGw6RyYmVy?= Cc: Peter Maydell , Anthony Green , qemu-devel@nongnu.org, Alexander Graf , Blue Swirl , Max Filippov , Michael Walle , PowerPC , Paul Brook , anthony@codemonkey.ws, "Edgar E. Iglesias" , pbonzini@redhat.com, Guan Xuetao , Aurelien Jarno 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 > Signed-off-by: Andreas Färber Acked-by: Richard Henderson r~