Commit dc55b3c
KVM: SVM: Mark VMCB_LBR dirty when MSR_IA32_DEBUGCTLMSR is updated
The APM lists the DbgCtlMsr field as being tracked by the VMCB_LBR clean
bit. Always clear the bit when MSR_IA32_DEBUGCTLMSR is updated.
The history is complicated, it was correctly cleared for L1 before
commit 1d5a1b5 ("KVM: x86: nSVM: correctly virtualize LBR msrs when
L2 is running"). At that point svm_set_msr() started to rely on
svm_update_lbrv() to clear the bit, but when nested virtualization
is enabled the latter does not always clear it even if MSR_IA32_DEBUGCTLMSR
changed. Go back to clearing it directly in svm_set_msr().
Fixes: 1d5a1b5 ("KVM: x86: nSVM: correctly virtualize LBR msrs when L2 is running")
Reported-by: Matteo Rizzo <[email protected]>
Reported-by: [email protected]
Co-developed-by: Jim Mattson <[email protected]>
Signed-off-by: Jim Mattson <[email protected]>
Signed-off-by: Yosry Ahmed <[email protected]>
Link: https://patch.msgid.link/[email protected]
Cc: [email protected]
Signed-off-by: Paolo Bonzini <[email protected]>1 parent ca00c3a commit dc55b3c
1 file changed
Lines changed: 4 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3004 | 3004 | | |
3005 | 3005 | | |
3006 | 3006 | | |
| 3007 | + | |
| 3008 | + | |
| 3009 | + | |
3007 | 3010 | | |
| 3011 | + | |
3008 | 3012 | | |
3009 | 3013 | | |
3010 | 3014 | | |
| |||
0 commit comments