From mboxrd@z Thu Jan 1 00:00:00 1970 From: Avi Kivity Subject: Re: Cleanup to reuse is_long_mode() Date: Mon, 30 Mar 2009 14:46:23 +0300 Message-ID: <49D0B10F.4000406@redhat.com> References: <9832F13BD22FB94A829F798DA4A8280501A21068EF@pdsmsx503.ccr.corp.intel.com> <9832F13BD22FB94A829F798DA4A8280501A2106E6A@pdsmsx503.ccr.corp.intel.com> <49CC9DAB.8090802@redhat.com> <9832F13BD22FB94A829F798DA4A8280501A2107197@pdsmsx503.ccr.corp.intel.com> <49CCE275.9070608@redhat.com> <9832F13BD22FB94A829F798DA4A8280501A21071B0@pdsmsx503.ccr.corp.intel.com> <49CF4C1B.3010404@redhat.com> <9832F13BD22FB94A829F798DA4A8280501A3C01DDE@pdsmsx503.ccr.corp.intel.com> <9832F13BD22FB94A829F798DA4A8280501A3C01E87@pdsmsx503.ccr.corp.intel.com> <49D07818.8050605@redhat.com> <9832F13BD22FB94A829F798DA4A8280501A3C022CB@pdsmsx503.ccr.corp.intel.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: "Dong, Eddie" Return-path: Received: from mx2.redhat.com ([66.187.237.31]:48882 "EHLO mx2.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750927AbZC3Lq0 (ORCPT ); Mon, 30 Mar 2009 07:46:26 -0400 In-Reply-To: <9832F13BD22FB94A829F798DA4A8280501A3C022CB@pdsmsx503.ccr.corp.intel.com> Sender: kvm-owner@vger.kernel.org List-ID: Dong, Eddie wrote: > Avi Kivity wrote: > >> Dong, Eddie wrote: >> >>> struct vcpu_svm *svm = to_svm(vcpu); >>> >>> #ifdef CONFIG_X86_64 >>> - if (vcpu->arch.shadow_efer & EFER_LME) { >>> + if (is_long_mode(vcpu)) { >>> >>> >> is_long_mode() actually tests EFER_LMA, so this is incorrect. >> > > Something missing? Here is the definition of is_long_mode, the patch is just for equal replacement. > thx, eddie > > > static inline int is_long_mode(struct kvm_vcpu *vcpu) > { > #ifdef CONFIG_X86_64 > return vcpu->arch.shadow_efer & EFER_LME; > #else > return 0; > #endif > } You're looking at an old version. Mine has EFER_LMA. See 9d642b. -- error compiling committee.c: too many arguments to function