Commit 51ca274
committed
KVM: nVMX: Switch to vmcs01 to update TPR threshold on-demand if L2 is active
If KVM updates L1's TPR Threshold while L2 is active, temporarily load
vmcs01 and immediately update TPR_THRESHOLD instead of deferring the
update until the next nested VM-Exit. Deferring the TPR Threshold update
is relatively straightforward, but for several APICv related updates,
deferring updates creates ordering and state consistency problems, e.g.
KVM at-large thinks APICv is enabled, but vmcs01 is still running with
stale (and effectively unknown) state.
Reviewed-by: Chao Gao <chao.gao@intel.com>
Link: https://patch.msgid.link/20260109034532.1012993-4-seanjc@google.com
Signed-off-by: Sean Christopherson <seanjc@google.com>1 parent 3e013d0 commit 51ca274
3 files changed
Lines changed: 3 additions & 11 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2402 | 2402 | | |
2403 | 2403 | | |
2404 | 2404 | | |
2405 | | - | |
2406 | 2405 | | |
2407 | 2406 | | |
2408 | 2407 | | |
| |||
5123 | 5122 | | |
5124 | 5123 | | |
5125 | 5124 | | |
5126 | | - | |
5127 | | - | |
5128 | | - | |
5129 | 5125 | | |
5130 | 5126 | | |
5131 | 5127 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6836 | 6836 | | |
6837 | 6837 | | |
6838 | 6838 | | |
| 6839 | + | |
| 6840 | + | |
6839 | 6841 | | |
6840 | | - | |
6841 | | - | |
6842 | | - | |
6843 | | - | |
| 6842 | + | |
6844 | 6843 | | |
6845 | 6844 | | |
6846 | 6845 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
184 | 184 | | |
185 | 185 | | |
186 | 186 | | |
187 | | - | |
188 | | - | |
189 | | - | |
190 | 187 | | |
191 | 188 | | |
192 | 189 | | |
| |||
0 commit comments