[PATCH] KVM: VMX: Make loaded_vmcs_clear() static in vmx.c

Sean Christopherson posted 1 patch 1 month, 1 week ago
arch/x86/kvm/vmx/vmx.c | 2 +-
arch/x86/kvm/vmx/vmx.h | 1 -
2 files changed, 1 insertion(+), 2 deletions(-)
[PATCH] KVM: VMX: Make loaded_vmcs_clear() static in vmx.c
Posted by Sean Christopherson 1 month, 1 week ago
Make loaded_vmcs_clear() local to vmx.c as there are no longer any
external callers.

No functional change intended.

Signed-off-by: Sean Christopherson <seanjc@google.com>
---
 arch/x86/kvm/vmx/vmx.c | 2 +-
 arch/x86/kvm/vmx/vmx.h | 1 -
 2 files changed, 1 insertion(+), 2 deletions(-)

diff --git a/arch/x86/kvm/vmx/vmx.c b/arch/x86/kvm/vmx/vmx.c
index 52cbc51dec28..6f374c815ce2 100644
--- a/arch/x86/kvm/vmx/vmx.c
+++ b/arch/x86/kvm/vmx/vmx.c
@@ -752,7 +752,7 @@ static void __loaded_vmcs_clear(void *arg)
 	loaded_vmcs->launched = 0;
 }
 
-void loaded_vmcs_clear(struct loaded_vmcs *loaded_vmcs)
+static void loaded_vmcs_clear(struct loaded_vmcs *loaded_vmcs)
 {
 	int cpu = loaded_vmcs->cpu;
 
diff --git a/arch/x86/kvm/vmx/vmx.h b/arch/x86/kvm/vmx/vmx.h
index 6cb04a6afeef..bc3ed3145d7e 100644
--- a/arch/x86/kvm/vmx/vmx.h
+++ b/arch/x86/kvm/vmx/vmx.h
@@ -680,7 +680,6 @@ struct vmcs *alloc_vmcs_cpu(bool shadow, int cpu, gfp_t flags);
 void free_vmcs(struct vmcs *vmcs);
 int alloc_loaded_vmcs(struct loaded_vmcs *loaded_vmcs);
 void free_loaded_vmcs(struct loaded_vmcs *loaded_vmcs);
-void loaded_vmcs_clear(struct loaded_vmcs *loaded_vmcs);
 
 static inline struct vmcs *alloc_vmcs(bool shadow)
 {

base-commit: 31cb6bb71b1a1d92f8de6f396a9d12db6742e504
-- 
2.51.2.1041.gc1ab5b90ca-goog
Re: [PATCH] KVM: VMX: Make loaded_vmcs_clear() static in vmx.c
Posted by Sean Christopherson 1 month ago
On Thu, 06 Nov 2025 12:51:14 -0800, Sean Christopherson wrote:
> Make loaded_vmcs_clear() local to vmx.c as there are no longer any
> external callers.
> 
> No functional change intended.

Applied to kvm-x86 vmx, thanks!

[1/1] KVM: VMX: Make loaded_vmcs_clear() static in vmx.c
      https://github.com/kvm-x86/linux/commit/dfd1572a64c9

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