From mboxrd@z Thu Jan 1 00:00:00 1970 From: Joerg Roedel Subject: Re: [PATCH 11/11] KVM: SVM: Optimize nested svm msrpm merging Date: Wed, 24 Feb 2010 20:37:01 +0100 Message-ID: <20100224193700.GE3168@amd.com> References: <1267034360-5907-1-git-send-email-joerg.roedel@amd.com> <1267034360-5907-12-git-send-email-joerg.roedel@amd.com> <402BABD5-304A-47EA-B35C-D0E3948BB27E@suse.de> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Cc: Avi Kivity , Marcelo Tosatti , kvm@vger.kernel.org, linux-kernel@vger.kernel.org To: Alexander Graf Return-path: Received: from va3ehsobe003.messaging.microsoft.com ([216.32.180.13]:46556 "EHLO VA3EHSOBE003.bigfish.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1757736Ab0BXThL (ORCPT ); Wed, 24 Feb 2010 14:37:11 -0500 Content-Disposition: inline In-Reply-To: <402BABD5-304A-47EA-B35C-D0E3948BB27E@suse.de> Sender: kvm-owner@vger.kernel.org List-ID: On Wed, Feb 24, 2010 at 08:27:50PM +0100, Alexander Graf wrote: > > + static const u32 msrpm_offsets[] = { > > + 0x0000002c, /* SYSENTER_CS */ > > + > > + 0x00000038, /* LASTBRANCHFROMIP > > + LASTBRANCHTOIP > > + LASTINTFROMIP > > + LASTINTTOIP */ > > + > > + 0x00000820, /* STAR > > + LSTAR > > + CSTAR > > + SYSCALL_MASK */ > > + > > + 0x00000840, /* FS_BASE > > + GS_BASE > > + KERNEL_GS_BASE */ > > + > > + 0xffffffff, /* End of List */ > > Isn't there such a list around somewhere already? We really should > only keep this list once throughout the whole code. If necessary, just > create the list on the fly when bits get set in the msrpm. No, the list is hardcoded in 3 functions (as parameter of set_msr_interception). I think about a variant to do this with a single list. Probably I create a list of MSRs and check in set_msr_interceptionm for it. Joerg