From mboxrd@z Thu Jan 1 00:00:00 1970 From: Avi Kivity Subject: Re: [PATCH] KVM: x86: fixup set_efer() Date: Wed, 08 Sep 2010 13:04:18 +0300 Message-ID: <4C875FA2.40004@redhat.com> References: Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: Ben-Ami Yassour , kvm@vger.kernel.org, Amit Shah , Yaniv Kamay To: Hillf Danton Return-path: Received: from mx1.redhat.com ([209.132.183.28]:32030 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1758358Ab0IHKE0 (ORCPT ); Wed, 8 Sep 2010 06:04:26 -0400 In-Reply-To: Sender: kvm-owner@vger.kernel.org List-ID: On 09/04/2010 04:29 PM, Hillf Danton wrote: > The second call to kvm_mmu_reset_context() seems unnecessary and is > removed. > > > @@ -783,10 +783,6 @@ static int set_efer(struct kvm_vcpu *vcp > vcpu->arch.mmu.base_role.nxe = (efer & EFER_NX) && !tdp_enabled; > kvm_mmu_reset_context(vcpu); > - /* Update reserved bits */ > - if ((efer ^ old_efer) & EFER_NX) > - kvm_mmu_reset_context(vcpu); > - > return 0; > } Hm. As far as I can tell, it's the first call that is unnecessary. I'll look at the history and try to understand why it was introduced. -- I have a truly marvellous patch that fixes the bug which this signature is too narrow to contain.