Skip to contentSkip to conversation

KVM: x86: Remove unnecessary export of kvm_cpu_has_pending_timer()

PATCH In review Sean Christopherson 2 participants 2 messages Nov 10, 2022 – Nov 14, 2022

Subsystems (3)
lore
Share & tools
lore

Sean Christopherson

author maintainer
#0 lore raw

PATCH 1/1 KVM: x86: Remove unnecessary export of kvm_cpu_has_pending_timer()

Don't export x86's kvm_cpu_has_pending_timer(), the helper isn't used by KVM x86's vendor modules.

No functional change intended.

---
 arch/x86/kvm/irq.c | 1 -
 1 file changed, 1 deletion(-)
arch/x86/kvm/irq.c +0 -1
index d8d50558f165..04a009fbdf8a 100644
@@ -31,7 +31,6 @@ int kvm_cpu_has_pending_timer(struct kvm_vcpu *vcpu)
 
 	return r;
 }
-EXPORT_SYMBOL(kvm_cpu_has_pending_timer);
 
 /*
  * check if there is a pending userspace external interrupt

base-commit: d663b8a285986072428a6a145e5994bc275df994

Signature · 1 line
2.38.1.431.g37b22c650d-goog
#1 lore raw
Quoted 4 lines · Sean Christopherson

Don't export x86's kvm_cpu_has_pending_timer(), the helper isn't used by KVM x86's vendor modules.

No functional change intended.

The callers of EXPORT_SYMBOL (considering that this line of code has been around for a long time) will not be public like the callers of EXPORT_SYMBOL_GPL.

Whether we close this door in the future or not, this description is inappropriate.

Quoted 11 lines
---
  arch/x86/kvm/irq.c | 1 -
  1 file changed, 1 deletion(-)
arch/x86/kvm/irq.c +0 -0
index d8d50558f165..04a009fbdf8a 100644

arch/x86/kvm/irq.c int kvm_cpu_has_pending_timer(struct kvm_vcpu *vcpu) · line 34

Quoted 4 lines
arch/x86/kvm/irq.c +0 -1
@@ -31,7 +31,6 @@ int kvm_cpu_has_pending_timer(struct kvm_vcpu *vcpu)
 
  	return r;
  }
-EXPORT_SYMBOL(kvm_cpu_has_pending_timer);

Not sure if the kernel's symbol or kbuild sub-system has tools to automatically warn or turn off similar interface exposures.

Quoted 5 lines
arch/x86/kvm/irq.c +0 -0
  /*
   * check if there is a pending userspace external interrupt
 

base-commit: d663b8a285986072428a6a145e5994bc275df994