KVM: Rename variable smep to cr4_smep
authorFeng Wu <feng.wu@intel.com>
Tue, 1 Apr 2014 09:56:48 +0000 (17:56 +0800)
committerMarcelo Tosatti <mtosatti@redhat.com>
Mon, 14 Apr 2014 20:50:40 +0000 (17:50 -0300)
Rename variable smep to cr4_smep, which can better reflect the
meaning of the variable.

Signed-off-by: Feng Wu <feng.wu@intel.com>
Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
arch/x86/kvm/mmu.c

index 084caf3efaf5abbd46525ee0c3c8385bca0527c8..813d31038b93bf8d7232db9435e2ee0e59996118 100644 (file)
@@ -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