]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
KVM: SVM: Switch svm_copy_lbrs() to a macro
authorYosry Ahmed <yosry@kernel.org>
Tue, 3 Mar 2026 00:33:56 +0000 (00:33 +0000)
committerSean Christopherson <seanjc@google.com>
Thu, 5 Mar 2026 00:08:44 +0000 (16:08 -0800)
commit361dbe8173c460a2bf8aee23920f6c2dbdcabb94
tree21658117f3b73ec05f021074ab7d978bef4cc81b
parentb53ab5167a81537777ac780bbd93d32613aa3bda
KVM: SVM: Switch svm_copy_lbrs() to a macro

In preparation for using svm_copy_lbrs() with 'struct vmcb_save_area'
without a containing 'struct vmcb', and later even 'struct
vmcb_save_area_cached', make it a macro.

Macros are generally not preferred compared to functions, mainly due to
type-safety. However, in this case it seems like having a simple macro
copying a few fields is better than copy-pasting the same 5 lines of
code in different places.

Cc: stable@vger.kernel.org
Signed-off-by: Yosry Ahmed <yosry@kernel.org>
Link: https://patch.msgid.link/20260303003421.2185681-3-yosry@kernel.org
Signed-off-by: Sean Christopherson <seanjc@google.com>
arch/x86/kvm/svm/nested.c
arch/x86/kvm/svm/svm.c
arch/x86/kvm/svm/svm.h