[v2,-next] kvm_host: Remove unused declarations

Message ID 20230814140339.47732-1-yuehaibing@huawei.com
State New
Headers
Series [v2,-next] kvm_host: Remove unused declarations |

Commit Message

Yue Haibing Aug. 14, 2023, 2:03 p.m. UTC
  Commit 07f0a7bdec5c ("kvm: destroy emulated devices on VM exit") removed the
functions but not these declarations.
Commit 7ee30bc132c6 ("KVM: x86: deliver KVM IOAPIC scan request to target vCPUs")
declared but never implemented kvm_make_cpus_request_mask()

Signed-off-by: Yue Haibing <yuehaibing@huawei.com>
---
v2: Also remove kvm_make_cpus_request_mask()
---
 include/linux/kvm_host.h | 4 ----
 1 file changed, 4 deletions(-)
  

Comments

Sean Christopherson Aug. 18, 2023, 12:08 a.m. UTC | #1
On Mon, 14 Aug 2023 22:03:39 +0800, Yue Haibing wrote:
> Commit 07f0a7bdec5c ("kvm: destroy emulated devices on VM exit") removed the
> functions but not these declarations.
> Commit 7ee30bc132c6 ("KVM: x86: deliver KVM IOAPIC scan request to target vCPUs")
> declared but never implemented kvm_make_cpus_request_mask()
> 
> 

Applied to kvm-x86 generic, though I split it into two patches.  The removal
of kvm_make_cpus_request_mask() is surprisingly interesting, and likely related
to the spurious declaration.  The exclusive/all versions use "cpus", whereas
the inclusive mask helper uses "vcpus".  I'm guessing the spurious declaration
came in because the original author tried to match the exclusive/all versions.

IMO, "vcpus" is obviously better terminology, e.g. differentiates from
kvm_kick_many_cpus(), which targets physical CPUs.  I think we should rename
kvm_make_all_cpus_request() and kvm_make_all_cpus_request_except() to use
"vcpus", but that's a much larger patch (trivial, but large).  I'll send that
cleanup for the 6.7 cycle.

Thanks!

[1/2] KVM: Remove unused kvm_device_{get,put}() declarations
      https://github.com/kvm-x86/linux/commit/1f8403953f05
[2/2] KVM: Remove unused kvm_make_cpus_request_mask() declaration
      https://github.com/kvm-x86/linux/commit/458933d33af2

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

Patch

diff --git a/include/linux/kvm_host.h b/include/linux/kvm_host.h
index cb86108c624d..c354874519e8 100644
--- a/include/linux/kvm_host.h
+++ b/include/linux/kvm_host.h
@@ -190,8 +190,6 @@  bool kvm_make_vcpus_request_mask(struct kvm *kvm, unsigned int req,
 bool kvm_make_all_cpus_request(struct kvm *kvm, unsigned int req);
 bool kvm_make_all_cpus_request_except(struct kvm *kvm, unsigned int req,
 				      struct kvm_vcpu *except);
-bool kvm_make_cpus_request_mask(struct kvm *kvm, unsigned int req,
-				unsigned long *vcpu_bitmap);
 
 #define KVM_USERSPACE_IRQ_SOURCE_ID		0
 #define KVM_IRQFD_RESAMPLE_IRQ_SOURCE_ID	1
@@ -2167,8 +2165,6 @@  struct kvm_device_ops {
 	int (*mmap)(struct kvm_device *dev, struct vm_area_struct *vma);
 };
 
-void kvm_device_get(struct kvm_device *dev);
-void kvm_device_put(struct kvm_device *dev);
 struct kvm_device *kvm_device_from_filp(struct file *filp);
 int kvm_register_device_ops(const struct kvm_device_ops *ops, u32 type);
 void kvm_unregister_device_ops(u32 type);