Skip to contentSkip to conversation

KVM: do not de-cache cr4 bits needlessly

PATCH Applied Gleb Natapov 2 participants 2 messages Oct 15, 2012 – Oct 18, 2012

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 KVM: do not de-cache cr4 bits needlessly

arch/x86/kvm/x86.c +1 -1
index e9c83b1..3df12c8 100644
@@ -635,7 +635,7 @@ int kvm_set_cr3(struct kvm_vcpu *vcpu, unsigned long cr3)
 	}
 
 	if (is_long_mode(vcpu)) {
-		if (kvm_read_cr4(vcpu) & X86_CR4_PCIDE) {
+		if (kvm_read_cr4_bits(vcpu, X86_CR4_PCIDE)) {
 			if (cr3 & CR3_PCID_ENABLED_RESERVED_BITS)
 				return 1;
 		} else

--
Gleb.

Applied
#1 lore raw
Quoted 7 lines · Gleb Natapov
arch/x86/kvm/x86.c +0 -0
index e9c83b1..3df12c8 100644

arch/x86/kvm/x86.c int kvm_set_cr3(struct kvm_vcpu *vcpu, unsigned long cr3) · line 641

Quoted 8 lines
arch/x86/kvm/x86.c +1 -1
@@ -635,7 +635,7 @@ int kvm_set_cr3(struct kvm_vcpu *vcpu, unsigned long cr3)
 	}
 
 	if (is_long_mode(vcpu)) {
-		if (kvm_read_cr4(vcpu) & X86_CR4_PCIDE) {
+		if (kvm_read_cr4_bits(vcpu, X86_CR4_PCIDE)) {
 			if (cr3 & CR3_PCID_ENABLED_RESERVED_BITS)
 				return 1;
 		} else

Applied, thanks.

Signature · 1 line
error compiling committee.c: too many arguments to function