Skip to contentSkip to conversation

KVM: x86: align the code with kvm_x86_call()

PATCH Applied Jun Miao 2 participants 2 messages Jan 5 – Jan 15

Subsystems (3)
lore
Share & tools
lore

Jun Miao

author
#0 lore raw

PATCH 1/1 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 8d032b683c29 ("KVM: TDX: create/destroy VM structure")

---
 arch/x86/kvm/x86.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/x86/kvm/x86.c +1 -1
index ff8812f3a129..b66c441187ee 100644
@@ -13307,7 +13307,7 @@ void kvm_arch_pre_destroy_vm(struct kvm *kvm)
 #endif
 
 	kvm_mmu_pre_destroy_vm(kvm);
-	static_call_cond(kvm_x86_vm_pre_destroy)(kvm);
+	kvm_x86_call(vm_pre_destroy)(kvm);
 }
 
 void kvm_arch_destroy_vm(struct kvm *kvm)
Signature · 1 line
2.32.0
maintainer Applied
#1 lore raw
Quoted 8 lines · Jun Miao

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 8d032b683c29 ("KVM: TDX: create/destroy VM structure")

[...]

Applied to kvm-x86 misc, thanks!

[1/1] KVM: x86: align the code with kvm_x86_call()

      https://github.com/kvm-x86/linux/commit/de0dc71188ca

--
https://github.com/kvm-x86/linux/tree/next