Commit 4365a45
committed
KVM: nSVM: Use KVM-governed feature framework to track "TSC scaling enabled"
Track "TSC scaling exposed to L1" via a governed feature flag instead of
using a dedicated bit/flag in vcpu_svm.
Note, this fixes a benign bug where KVM would mark TSC scaling as exposed
to L1 even if overall nested SVM supported is disabled, i.e. KVM would let
L1 write MSR_AMD64_TSC_RATIO even when KVM didn't advertise TSCRATEMSR
support to userspace.
Reviewed-by: Yuan Yao <yuan.yao@intel.com>
Link: https://lore.kernel.org/r/20230815203653.519297-10-seanjc@google.com
Signed-off-by: Sean Christopherson <seanjc@google.com>1 parent 7a6a6a3 commit 4365a45
4 files changed
Lines changed: 8 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
| 12 | + | |
12 | 13 | | |
13 | 14 | | |
14 | 15 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
695 | 695 | | |
696 | 696 | | |
697 | 697 | | |
698 | | - | |
| 698 | + | |
699 | 699 | | |
700 | 700 | | |
701 | 701 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2795 | 2795 | | |
2796 | 2796 | | |
2797 | 2797 | | |
2798 | | - | |
| 2798 | + | |
| 2799 | + | |
2799 | 2800 | | |
2800 | 2801 | | |
2801 | 2802 | | |
| |||
2937 | 2938 | | |
2938 | 2939 | | |
2939 | 2940 | | |
2940 | | - | |
| 2941 | + | |
2941 | 2942 | | |
2942 | 2943 | | |
2943 | 2944 | | |
| |||
2959 | 2960 | | |
2960 | 2961 | | |
2961 | 2962 | | |
2962 | | - | |
| 2963 | + | |
| 2964 | + | |
2963 | 2965 | | |
2964 | 2966 | | |
2965 | 2967 | | |
| |||
4260 | 4262 | | |
4261 | 4263 | | |
4262 | 4264 | | |
| 4265 | + | |
4263 | 4266 | | |
4264 | | - | |
4265 | 4267 | | |
4266 | 4268 | | |
4267 | 4269 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
259 | 259 | | |
260 | 260 | | |
261 | 261 | | |
262 | | - | |
263 | 262 | | |
264 | 263 | | |
265 | 264 | | |
| |||
0 commit comments