From mboxrd@z Thu Jan 1 00:00:00 1970 From: Avi Kivity Subject: Re: [PATCH 4/9] KVM: VMX: Cache cpl Date: Tue, 08 Mar 2011 16:29:10 +0200 Message-ID: <4D763D36.9050202@redhat.com> References: <1299592665-12325-1-git-send-email-avi@redhat.com> <1299592665-12325-5-git-send-email-avi@redhat.com> <20110308142010.GE2504@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: Marcelo Tosatti , kvm@vger.kernel.org, Jan Kiszka To: Gleb Natapov Return-path: Received: from mx1.redhat.com ([209.132.183.28]:41455 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754904Ab1CHO3Q (ORCPT ); Tue, 8 Mar 2011 09:29:16 -0500 In-Reply-To: <20110308142010.GE2504@redhat.com> Sender: kvm-owner@vger.kernel.org List-ID: On 03/08/2011 04:20 PM, Gleb Natapov wrote: > On Tue, Mar 08, 2011 at 03:57:40PM +0200, Avi Kivity wrote: > > We may read the cpl quite often in the same vmexit (instruction privilege > > check, memory access checks for instruction and operands), so we gain > > a bit if we cache the value. > > > Shouldn't VCPU_EXREG_CPL be cleared in vmx_set_efer too? I anticipated that question (which really means that a comment is needed). Flipping EFER.LMA is done by flipping CR0.PG (and doesn't affect cpl. in any case). -- error compiling committee.c: too many arguments to function