File tree Expand file tree Collapse file tree 1 file changed +7
-0
lines changed Expand file tree Collapse file tree 1 file changed +7
-0
lines changed Original file line number Diff line number Diff line change @@ -2674,6 +2674,9 @@ static int svm_get_msr(struct kvm_vcpu *vcpu, struct msr_data *msr_info)
2674
2674
case MSR_TSC_AUX :
2675
2675
if (!boot_cpu_has (X86_FEATURE_RDTSCP ))
2676
2676
return 1 ;
2677
+ if (!msr_info -> host_initiated &&
2678
+ !guest_cpuid_has (vcpu , X86_FEATURE_RDTSCP ))
2679
+ return 1 ;
2677
2680
msr_info -> data = svm -> tsc_aux ;
2678
2681
break ;
2679
2682
/*
@@ -2892,6 +2895,10 @@ static int svm_set_msr(struct kvm_vcpu *vcpu, struct msr_data *msr)
2892
2895
if (!boot_cpu_has (X86_FEATURE_RDTSCP ))
2893
2896
return 1 ;
2894
2897
2898
+ if (!msr -> host_initiated &&
2899
+ !guest_cpuid_has (vcpu , X86_FEATURE_RDTSCP ))
2900
+ return 1 ;
2901
+
2895
2902
/*
2896
2903
* This is rare, so we update the MSR here instead of using
2897
2904
* direct_access_msrs. Doing that would require a rdmsr in
You can’t perform that action at this time.
0 commit comments