From: Feng Wu Subject: [PATCH] Rename variable smep to cr4_smep Date: Tue, 1 Apr 2014 17:56:48 +0800 Message-ID: <1396346208-26078-2-git-send-email-feng.wu@intel.com> References: <1396346208-26078-1-git-send-email-feng.wu@intel.com> Cc: Feng Wu To: pbonzini@redhat.com, gleb@redhat.com, hpa@zytor.com, kvm@vger.kernel.org Return-path: Received: from mga01.intel.com ([192.55.52.88]:10513 "EHLO mga01.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750996AbaDAB6Y (ORCPT ); Mon, 31 Mar 2014 21:58:24 -0400 In-Reply-To: <1396346208-26078-1-git-send-email-feng.wu@intel.com> Sender: kvm-owner@vger.kernel.org List-ID: Rename variable smep to cr4_smep, which can better reflect the meaning of the variable. Signed-off-by: Feng Wu --- arch/x86/kvm/mmu.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/arch/x86/kvm/mmu.c b/arch/x86/kvm/mmu.c index a183783..6000557 100644 --- a/arch/x86/kvm/mmu.c +++ b/arch/x86/kvm/mmu.c @@ -3606,9 +3606,9 @@ void update_permission_bitmask(struct kvm_vcpu *vcpu, { unsigned bit, byte, pfec; u8 map; - bool fault, x, w, u, wf, uf, ff, smapf, cr4_smap, smep, smap = 0; + bool fault, x, w, u, wf, uf, ff, smapf, cr4_smap, cr4_smep, smap = 0; - smep = kvm_read_cr4_bits(vcpu, X86_CR4_SMEP); + cr4_smep = kvm_read_cr4_bits(vcpu, X86_CR4_SMEP); cr4_smap = kvm_read_cr4_bits(vcpu, X86_CR4_SMAP); for (byte = 0; byte < ARRAY_SIZE(mmu->permissions); ++byte) { pfec = byte << 1; @@ -3633,7 +3633,7 @@ void update_permission_bitmask(struct kvm_vcpu *vcpu, /* Allow supervisor writes if !cr0.wp */ w |= !is_write_protection(vcpu) && !uf; /* Disallow supervisor fetches of user code if cr4.smep */ - x &= !(smep && u && !uf); + x &= !(cr4_smep && u && !uf); /* * SMAP:kernel-mode data accesses from user-mode -- 1.8.3.1