mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] KVM: x86: align the code with kvm_x86_call()
@ 2026-01-05  6:54 Jun Miao
  2026-01-15 18:03 ` Sean Christopherson
  0 siblings, 1 reply; 2+ messages in thread
From: Jun Miao @ 2026-01-05  6:54 UTC (permalink / raw)
  To: seanjc, pbonzini; +Cc: tglx, dave.hansen, kvm, linux-kernel, 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.

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
Fixes 8d032b683c29 ("KVM: TDX: create/destroy VM structure")
Signed-off-by: Jun Miao <jun.miao@intel.com>
---
 arch/x86/kvm/x86.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c
index ff8812f3a129..b66c441187ee 100644
--- a/arch/x86/kvm/x86.c
+++ b/arch/x86/kvm/x86.c
@@ -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)
-- 
2.32.0


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] KVM: x86: align the code with kvm_x86_call()
  2026-01-05  6:54 [PATCH] KVM: x86: align the code with kvm_x86_call() Jun Miao
@ 2026-01-15 18:03 ` Sean Christopherson
  0 siblings, 0 replies; 2+ messages in thread
From: Sean Christopherson @ 2026-01-15 18:03 UTC (permalink / raw)
  To: Sean Christopherson, pbonzini, Jun Miao
  Cc: tglx, dave.hansen, kvm, linux-kernel

On Mon, 05 Jan 2026 14:54:23 +0800, Jun Miao wrote:
> 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

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2026-01-15 18:06 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-01-05  6:54 [PATCH] KVM: x86: align the code with kvm_x86_call() Jun Miao
2026-01-15 18:03 ` Sean Christopherson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®