From mboxrd@z Thu Jan 1 00:00:00 1970 From: Avi Kivity Subject: Re: [PATCH 1/1] KVM: VMX: Update necessary state when guest enters long mode Date: Tue, 24 Feb 2009 12:26:32 +0200 Message-ID: <49A3CB58.7060406@redhat.com> References: <1235150617-15927-1-git-send-email-amit.shah@redhat.com> <1235150617-15927-2-git-send-email-amit.shah@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: kvm@vger.kernel.org To: Amit Shah Return-path: Received: from mx2.redhat.com ([66.187.237.31]:46044 "EHLO mx2.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751307AbZBXK0g (ORCPT ); Tue, 24 Feb 2009 05:26:36 -0500 Received: from int-mx2.corp.redhat.com (int-mx2.corp.redhat.com [172.16.27.26]) by mx2.redhat.com (8.13.8/8.13.8) with ESMTP id n1OAQYil001834 for ; Tue, 24 Feb 2009 05:26:34 -0500 In-Reply-To: <1235150617-15927-2-git-send-email-amit.shah@redhat.com> Sender: kvm-owner@vger.kernel.org List-ID: Amit Shah wrote: > setup_msrs() should be called when entering long mode to save the > shadow state for the 64-bit guest state. > > Using vmx_set_efer() in enter_lmode() removes some duplicated code > and also ensures we call setup_msrs(). We can safely pass the value > of shadow_efer to vmx_set_efer() as no other bits in the efer change > while enabling long mode (guest first sets EFER.LME, then sets CR0.PG > which causes a vmexit where we activate long mode). > > With this fix, is_long_mode() can check for EFER.LMA set instead of > EFER.LME and 5e23049e86dd298b72e206b420513dbc3a240cd9 can be reverted. > Applied, thanks. Good catch. -- error compiling committee.c: too many arguments to function