Skip to content

Commit de0dc71

Browse files
jmiao2018sean-jc
authored andcommitted
KVM: x86: align the code with kvm_x86_call()
The use of static_call_cond() is essentially the same as static_call() on x86 (e.g. static_call() now handles a NULL pointer as a NOP), and then the kvm_x86_call() is added to improve code readability and maintainability for keeping consistent code style. Fixes 8d032b6 ("KVM: TDX: create/destroy VM structure") Link: https://lore.kernel.org/all/3916caa1dcd114301a49beafa5030eca396745c1.1679456900.git.jpoimboe@kernel.org/ Link: https://lore.kernel.org/r/20240507133103.15052-3-wei.w.wang@intel.com Signed-off-by: Jun Miao <jun.miao@intel.com> Link: https://patch.msgid.link/20260105065423.1870622-1-jun.miao@intel.com Signed-off-by: Sean Christopherson <seanjc@google.com>
1 parent ead6364 commit de0dc71

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

arch/x86/kvm/x86.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13307,7 +13307,7 @@ void kvm_arch_pre_destroy_vm(struct kvm *kvm)
1330713307
#endif
1330813308

1330913309
kvm_mmu_pre_destroy_vm(kvm);
13310-
static_call_cond(kvm_x86_vm_pre_destroy)(kvm);
13310+
kvm_x86_call(vm_pre_destroy)(kvm);
1331113311
}
1331213312

1331313313
void kvm_arch_destroy_vm(struct kvm *kvm)

0 commit comments

Comments
 (0)