From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757766Ab0BXUJ7 (ORCPT ); Wed, 24 Feb 2010 15:09:59 -0500 Received: from mx1.redhat.com ([209.132.183.28]:22150 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754826Ab0BXUJ5 (ORCPT ); Wed, 24 Feb 2010 15:09:57 -0500 Message-ID: <4B85878E.1010500@redhat.com> Date: Wed, 24 Feb 2010 22:09:50 +0200 From: Avi Kivity User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.7) Gecko/20100120 Fedora/3.0.1-1.fc12 Thunderbird/3.0.1 MIME-Version: 1.0 To: Alexander Graf CC: Joerg Roedel , Marcelo Tosatti , kvm@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 11/11] KVM: SVM: Optimize nested svm msrpm merging 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> <20100224193700.GE3168@amd.com> <4B8584D5.8010303@redhat.com> In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 02/24/2010 10:00 PM, Alexander Graf wrote: > On 24.02.2010, at 20:58, Avi Kivity wrote: > > >> On 02/24/2010 09:37 PM, Joerg Roedel wrote: >> >>> >>>> 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. >>> >>> >>> >> Or, have set_msr_interception() create the list of offsets. >> > Or even better yet put the list into BSS because it should be static anyways. From that the real MSRPM and the merging function can be fed. > Yup. In fact, the real MSRPM can be generated by merging the list into an empty bitmap. -- Do not meddle in the internals of kernels, for they are subtle and quick to panic.