All of lore.kernel.org
 help / color / mirror / Atom feed
From: Fuad Tabba <fuad.tabba@linux.dev>
To: Paolo Bonzini <pbonzini@redhat.com>,
	Sean Christopherson <seanjc@google.com>
Cc: kvm@vger.kernel.org, linux-doc@vger.kernel.org,
	linux-kernel@vger.kernel.org, Jonathan Corbet <corbet@lwn.net>,
	Christian Borntraeger <borntraeger@linux.ibm.com>,
	Janosch Frank <frankja@linux.ibm.com>,
	Claudio Imbrenda <imbrenda@linux.ibm.com>,
	Huacai Chen <chenhuacai@kernel.org>,
	linux-mips@vger.kernel.org, Will Deacon <will@kernel.org>,
	Fuad Tabba <tabba@google.com>
Subject: [PATCH 5/7] KVM: Fix comments that refer to non-existent identifiers
Date: Wed, 11 Nov 2026 08:54:46 +0000	[thread overview]
Message-ID: <20261111085448.1130701-6-fuad.tabba@linux.dev> (raw)
In-Reply-To: <20261111085448.1130701-1-fuad.tabba@linux.dev>

Comments in the generic KVM code and its headers refer to functions,
structures, fields, capabilities and Kconfig symbols that have been
misspelled or renamed. Use the current names.

Signed-off-by: Fuad Tabba <fuad.tabba@linux.dev>
---
 include/linux/kvm_dirty_ring.h | 2 +-
 include/linux/kvm_host.h       | 4 ++--
 include/linux/kvm_irqfd.h      | 4 ++--
 include/uapi/linux/kvm.h       | 2 +-
 virt/kvm/binary_stats.c        | 2 +-
 virt/kvm/eventfd.c             | 2 +-
 virt/kvm/kvm_main.c            | 2 +-
 7 files changed, 9 insertions(+), 9 deletions(-)

diff --git a/include/linux/kvm_dirty_ring.h b/include/linux/kvm_dirty_ring.h
index eb10d87adf7d5..8679ba17bd1ff 100644
--- a/include/linux/kvm_dirty_ring.h
+++ b/include/linux/kvm_dirty_ring.h
@@ -29,7 +29,7 @@ struct kvm_dirty_ring {
 
 #ifndef CONFIG_HAVE_KVM_DIRTY_RING
 /*
- * If CONFIG_HAVE_HVM_DIRTY_RING not defined, kvm_dirty_ring.o should
+ * If CONFIG_HAVE_KVM_DIRTY_RING not defined, kvm_dirty_ring.o should
  * not be included as well, so define these nop functions for the arch.
  */
 static inline u32 kvm_dirty_ring_get_rsvd_entries(struct kvm *kvm)
diff --git a/include/linux/kvm_host.h b/include/linux/kvm_host.h
index e7fc94e2910a8..4b91ef9667703 100644
--- a/include/linux/kvm_host.h
+++ b/include/linux/kvm_host.h
@@ -764,7 +764,7 @@ struct kvm {
 	struct mutex slots_lock;
 
 	/*
-	 * Protects the arch-specific fields of struct kvm_memory_slots in
+	 * Protects the arch-specific fields of struct kvm_memory_slot in
 	 * use by the VM. To be used under the slots_lock (above) or in a
 	 * kvm->srcu critical section where acquiring the slots_lock would
 	 * lead to deadlock with the synchronize_srcu in
@@ -802,7 +802,7 @@ struct kvm {
 	/*
 	 * created_vcpus is protected by kvm->lock, and is incremented
 	 * at the beginning of KVM_CREATE_VCPU.  online_vcpus is only
-	 * incremented after storing the kvm_vcpu pointer in vcpus,
+	 * incremented after storing the kvm_vcpu pointer in vcpu_array,
 	 * and is accessed atomically.
 	 */
 	atomic_t online_vcpus;
diff --git a/include/linux/kvm_irqfd.h b/include/linux/kvm_irqfd.h
index ef8c134ded8a3..bca430a4ae3a8 100644
--- a/include/linux/kvm_irqfd.h
+++ b/include/linux/kvm_irqfd.h
@@ -23,13 +23,13 @@
 struct kvm_kernel_irqfd_resampler {
 	struct kvm *kvm;
 	/*
-	 * List of resampling struct _irqfd objects sharing this gsi.
+	 * List of resampling struct kvm_kernel_irqfd objects sharing this gsi.
 	 * RCU list modified under kvm->irqfds.resampler_lock
 	 */
 	struct list_head list;
 	struct kvm_irq_ack_notifier notifier;
 	/*
-	 * Entry in list of kvm->irqfd.resampler_list.  Use for sharing
+	 * Entry in list of kvm->irqfds.resampler_list.  Use for sharing
 	 * resamplers among irqfds on the same gsi.
 	 * RCU list modified under kvm->irqfds.resampler_lock
 	 */
diff --git a/include/uapi/linux/kvm.h b/include/uapi/linux/kvm.h
index 8dff2fc1972e9..951b891b8ae60 100644
--- a/include/uapi/linux/kvm.h
+++ b/include/uapi/linux/kvm.h
@@ -1459,7 +1459,7 @@ struct kvm_enc_region {
 #define KVM_GET_NESTED_STATE         _IOWR(KVMIO, 0xbe, struct kvm_nested_state)
 #define KVM_SET_NESTED_STATE         _IOW(KVMIO,  0xbf, struct kvm_nested_state)
 
-/* Available with KVM_CAP_MANUAL_DIRTY_LOG_PROTECT_2 */
+/* Available with KVM_CAP_MANUAL_DIRTY_LOG_PROTECT2 */
 #define KVM_CLEAR_DIRTY_LOG          _IOWR(KVMIO, 0xc0, struct kvm_clear_dirty_log)
 
 /* Available with KVM_CAP_HYPERV_CPUID (vcpu) / KVM_CAP_SYS_HYPERV_CPUID (system) */
diff --git a/virt/kvm/binary_stats.c b/virt/kvm/binary_stats.c
index 76ce697c773bf..c772fe7be5dd7 100644
--- a/virt/kvm/binary_stats.c
+++ b/virt/kvm/binary_stats.c
@@ -116,7 +116,7 @@ ssize_t kvm_stats_read(char *id, const struct kvm_stats_header *header,
 	 * The descriptors copy would be skipped in the typical case that
 	 * userspace periodically read stats data, since the pos would be
 	 * greater than the end address of descriptors
-	 * (header->header.desc_offset + size_desc) causing copylen <= 0.
+	 * (header->desc_offset + size_desc) causing copylen <= 0.
 	 */
 	copylen = header->desc_offset + size_desc - pos;
 	copylen = min(copylen, remain);
diff --git a/virt/kvm/eventfd.c b/virt/kvm/eventfd.c
index f43b8b25bc854..81ed20ec0d4a1 100644
--- a/virt/kvm/eventfd.c
+++ b/virt/kvm/eventfd.c
@@ -248,7 +248,7 @@ irqfd_wakeup(wait_queue_entry_t *wait, unsigned mode, int sync, void *key)
 		/*
 		 * Taking irqfds.lock is safe here, as KVM holds a reference to
 		 * the eventfd when registering the irqfd, i.e. this path can't
-		 * be reached while kvm_irqfd_add() is running.
+		 * be reached while kvm_irqfd_register() is running.
 		 */
 		spin_lock_irqsave(&kvm->irqfds.lock, iflags);
 
diff --git a/virt/kvm/kvm_main.c b/virt/kvm/kvm_main.c
index cf4cb586f1407..ba8f53ec3d718 100644
--- a/virt/kvm/kvm_main.c
+++ b/virt/kvm/kvm_main.c
@@ -4338,7 +4338,7 @@ static int kvm_vm_ioctl_create_vcpu(struct kvm *kvm, unsigned long id)
 
 	/*
 	 * Pairs with smp_rmb() in kvm_get_vcpu.  Store the vcpu
-	 * pointer before kvm->online_vcpu's incremented value.
+	 * pointer before incrementing kvm->online_vcpus.
 	 */
 	smp_wmb();
 	atomic_inc(&kvm->online_vcpus);
-- 
2.47.3


  parent reply	other threads:[~2026-11-11  8:55 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-11  8:54 [PATCH 0/7] KVM: Documentation and comment fixes Fuad Tabba
2026-11-11  8:54 ` [PATCH 1/7] Documentation: KVM: Fix references to non-existent identifiers Fuad Tabba
2026-11-11  8:54 ` [PATCH 2/7] Documentation: KVM: Fix lock names and a lock type in locking.rst Fuad Tabba
2026-11-11  8:54 ` [PATCH 3/7] Documentation: KVM: Fix the function that implements halt polling Fuad Tabba
2026-11-11  8:54 ` [PATCH 4/7] Documentation: KVM: Drop the stale number of vCPU request flags Fuad Tabba
2026-11-11  8:54 ` Fuad Tabba [this message]
2026-11-11 21:31   ` [PATCH 5/7] KVM: Fix comments that refer to non-existent identifiers Randy Dunlap
2026-11-11  8:54 ` [PATCH 6/7] KVM: Fix the range of reserved arch-independent request bits Fuad Tabba
2026-11-11  8:54 ` [PATCH 7/7] KVM: Fix typos in comments Fuad Tabba
2026-11-11 17:05   ` Randy Dunlap

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20261111085448.1130701-6-fuad.tabba@linux.dev \
    --to=fuad.tabba@linux.dev \
    --cc=borntraeger@linux.ibm.com \
    --cc=chenhuacai@kernel.org \
    --cc=corbet@lwn.net \
    --cc=frankja@linux.ibm.com \
    --cc=imbrenda@linux.ibm.com \
    --cc=kvm@vger.kernel.org \
    --cc=linux-doc@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mips@vger.kernel.org \
    --cc=pbonzini@redhat.com \
    --cc=seanjc@google.com \
    --cc=tabba@google.com \
    --cc=will@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.