Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753334AbbFICnG (ORCPT ); Mon, 8 Jun 2015 22:43:06 -0400 Received: from mga02.intel.com ([134.134.136.20]:7009 "EHLO mga02.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750814AbbFICnB (ORCPT ); Mon, 8 Jun 2015 22:43:01 -0400 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.13,577,1427785200"; d="scan'208";a="707650901" Message-ID: <557651BF.5060900@linux.intel.com> Date: Tue, 09 Jun 2015 10:38:55 +0800 From: Xiao Guangrong User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.7.0 MIME-Version: 1.0 To: David Matlack CC: Paolo Bonzini , Gleb Natapov , Marcelo Tosatti , kvm list , "linux-kernel@vger.kernel.org" Subject: Re: [PATCH 09/15] KVM: MTRR: introduce var_mtrr_range References: <1432983566-15773-1-git-send-email-guangrong.xiao@linux.intel.com> <1432983566-15773-10-git-send-email-guangrong.xiao@linux.intel.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 Content-Length: 1146 Lines: 31 Thanks for your review, David! On 06/09/2015 08:36 AM, David Matlack wrote: >> static void update_mtrr(struct kvm_vcpu *vcpu, u32 msr) >> { >> struct kvm_mtrr *mtrr_state = &vcpu->arch.mtrr_state; >> - gfn_t start, end, mask; >> + gfn_t start, end; >> int index; >> >> if (msr == MSR_IA32_CR_PAT || !tdp_enabled || >> @@ -244,11 +255,7 @@ static void update_mtrr(struct kvm_vcpu *vcpu, u32 msr) >> default: >> /* variable range MTRRs. */ >> index = (msr - 0x200) / 2; >> - start = mtrr_state->var_ranges[index].base & PAGE_MASK; >> - mask = mtrr_state->var_ranges[index].mask & PAGE_MASK; >> - mask |= ~0ULL << cpuid_maxphyaddr(vcpu); > > Why did you drop this in favor of boot_cpu_data.x86_phys_bits? > It can make the code more generic, @vcpu is not needed anymore. -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/