Skip to content

Commit e8d93d5

Browse files
committed
KVM: SVM: INTERCEPT_RDTSCP is never intercepted anyway
svm_recalc_instruction_intercepts() is always called at least once before the vCPU is started, so the setting or clearing of the RDTSCP intercept can be dropped from the TSC_AUX virtualization support. Extracted from a patch by Tom Lendacky. Cc: [email protected] Fixes: 296d5a1 ("KVM: SEV-ES: Use V_TSC_AUX if available instead of RDTSC/MSR_TSC_AUX intercepts") Signed-off-by: Paolo Bonzini <[email protected]>
1 parent 0df9dab commit e8d93d5

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

arch/x86/kvm/svm/sev.c

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3027,11 +3027,8 @@ static void sev_es_init_vmcb(struct vcpu_svm *svm)
30273027

30283028
if (boot_cpu_has(X86_FEATURE_V_TSC_AUX) &&
30293029
(guest_cpuid_has(&svm->vcpu, X86_FEATURE_RDTSCP) ||
3030-
guest_cpuid_has(&svm->vcpu, X86_FEATURE_RDPID))) {
3030+
guest_cpuid_has(&svm->vcpu, X86_FEATURE_RDPID)))
30313031
set_msr_interception(vcpu, svm->msrpm, MSR_TSC_AUX, 1, 1);
3032-
if (guest_cpuid_has(&svm->vcpu, X86_FEATURE_RDTSCP))
3033-
svm_clr_intercept(svm, INTERCEPT_RDTSCP);
3034-
}
30353032
}
30363033

30373034
void sev_init_vmcb(struct vcpu_svm *svm)

0 commit comments

Comments
 (0)