]> git.ipfire.org Git - thirdparty/linux.git/commit
KVM: nSVM: Avoid clearing VMCB_LBR in vmcb12
authorYosry Ahmed <yosry@kernel.org>
Tue, 3 Mar 2026 00:33:55 +0000 (00:33 +0000)
committerSean Christopherson <seanjc@google.com>
Thu, 5 Mar 2026 00:08:43 +0000 (16:08 -0800)
commitb53ab5167a81537777ac780bbd93d32613aa3bda
tree7cc4b2a56a655b0e741f8cb0c19b6cd3f6cd5ac0
parentd99df02ff427f461102230f9c5b90a6c64ee8e23
KVM: nSVM: Avoid clearing VMCB_LBR in vmcb12

svm_copy_lbrs() always marks VMCB_LBR dirty in the destination VMCB.
However, nested_svm_vmexit() uses it to copy LBRs to vmcb12, and
clearing clean bits in vmcb12 is not architecturally defined.

Move vmcb_mark_dirty() to callers and drop it for vmcb12.

This also facilitates incoming refactoring that does not pass the entire
VMCB to svm_copy_lbrs().

Fixes: d20c796ca370 ("KVM: x86: nSVM: implement nested LBR virtualization")
Cc: stable@vger.kernel.org
Signed-off-by: Yosry Ahmed <yosry@kernel.org>
Link: https://patch.msgid.link/20260303003421.2185681-2-yosry@kernel.org
Signed-off-by: Sean Christopherson <seanjc@google.com>
arch/x86/kvm/svm/nested.c
arch/x86/kvm/svm/svm.c