Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1759957Ab2EVR0p (ORCPT ); Tue, 22 May 2012 13:26:45 -0400 Received: from www.linutronix.de ([62.245.132.108]:39493 "EHLO Galois.linutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751747Ab2EVR0n (ORCPT ); Tue, 22 May 2012 13:26:43 -0400 Date: Tue, 22 May 2012 19:26:40 +0200 (CEST) From: Thomas Gleixner To: Avi Kivity cc: "Michael S. Tsirkin" , kvm@vger.kernel.org, Marcelo Tosatti , Ingo Molnar , "H. Peter Anvin" , x86@kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] kvm: optimize ISR lookups In-Reply-To: <4FBB7185.6040105@redhat.com> Message-ID: References: <20120521163727.GA13337@redhat.com> <4FBB7185.6040105@redhat.com> User-Agent: Alpine 2.02 (LFD 1266 2009-07-14) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Linutronix-Spam-Score: -1.0 X-Linutronix-Spam-Level: - X-Linutronix-Spam-Status: No , -1.0 points, 5.0 required, ALL_TRUSTED=-1,SHORTCIRCUIT=-0.0001 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1168 Lines: 26 On Tue, 22 May 2012, Avi Kivity wrote: > On 05/22/2012 12:04 AM, Thomas Gleixner wrote: > > The only justification for having the same layout as the actual > > hardware is when you are going to map the memory into the guest space, > > which is not the case here. > > The APIC page is in fact mapped to the hardware (not the guest, but vmx > microcode does access it). Only one register, the TPR, is ever used. > It's possible to re-layout the data structure so that the TPR stays in > the same place while everything else becomes contiguous, but we'll have > to do it again if the hardware starts mapping more registers. I would avoid that by having a compressed version which reflects the SW state and the mapped one which allows the vmx microcode to fiddle with the TPR. If you need more registers in the HW page then you don't have to worry about the layout and just have a proper accessor for that. Thanks, tglx -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/