mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH 0/3] KVM: Replace VCPU_RUN with KVM_RUN in comments and docs
@ 2026-09-15  8:44 Fuad Tabba
  2026-09-15  8:44 ` [PATCH 1/3] KVM: Fix comments that refer to the non-existent VCPU_RUN ioctl Fuad Tabba
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Fuad Tabba @ 2026-09-15  8:44 UTC (permalink / raw)
  To: Paolo Bonzini, Marc Zyngier, Oliver Upton, Madhavan Srinivasan
  Cc: Sean Christopherson, Joey Gouly, Suzuki K Poulose, Zenghui Yu,
	Steffen Eiden, Nicholas Piggin, Will Deacon, Fuad Tabba, kvm,
	kvmarm, linux-arm-kernel, linux-doc, linuxppc-dev, linux-kernel

Hi folks,

This one has been bugging me for a while. Five comments and doc lines
name a VCPU_RUN ioctl (KVM_VCPU_RUN in book3s_hv.c, VCPU RUN in
kvm_host.h). The ioctl that enters the guest is KVM_RUN.

The patches are independent and split by tree, one each for generic
KVM, KVM/arm64 and Book3S HV, so each can go through its own
maintainer. Nothing else in the tree refers to the ioctl by a wrong
name.

Based on Linux 7.3-rc3 (fd73f4a665989).

Cheers,
/fuad

Fuad Tabba (3):
  KVM: Fix comments that refer to the non-existent VCPU_RUN ioctl
  KVM: arm64: Fix references to the non-existent VCPU_RUN ioctl
  KVM: PPC: Book3S HV: Fix comment naming a non-existent KVM_VCPU_RUN
    ioctl

 Documentation/virt/kvm/arm/pkvm.rst | 2 +-
 arch/arm64/kvm/arm.c                | 2 +-
 arch/powerpc/kvm/book3s_hv.c        | 2 +-
 include/linux/kvm_host.h            | 2 +-
 virt/kvm/kvm_main.c                 | 2 +-
 5 files changed, 5 insertions(+), 5 deletions(-)


base-commit: fd73f4a6659897191fa0d40695fe370925dd3780
-- 
2.39.5


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

* [PATCH 1/3] KVM: Fix comments that refer to the non-existent VCPU_RUN ioctl
  2026-09-15  8:44 [PATCH 0/3] KVM: Replace VCPU_RUN with KVM_RUN in comments and docs Fuad Tabba
@ 2026-09-15  8:44 ` Fuad Tabba
  2026-09-15  8:44 ` [PATCH 2/3] KVM: arm64: Fix references " Fuad Tabba
  2026-09-15  8:44 ` [PATCH 3/3] KVM: PPC: Book3S HV: Fix comment naming a non-existent KVM_VCPU_RUN ioctl Fuad Tabba
  2 siblings, 0 replies; 6+ messages in thread
From: Fuad Tabba @ 2026-09-15  8:44 UTC (permalink / raw)
  To: Paolo Bonzini, Marc Zyngier, Oliver Upton, Madhavan Srinivasan
  Cc: Sean Christopherson, Joey Gouly, Suzuki K Poulose, Zenghui Yu,
	Steffen Eiden, Nicholas Piggin, Will Deacon, Fuad Tabba, kvm,
	kvmarm, linux-arm-kernel, linux-doc, linuxppc-dev, linux-kernel

Neither the VCPU_RUN in kvm_main.c nor the VCPU RUN in kvm_host.h names
an ioctl that exists. The one that enters the guest is KVM_RUN, so refer
to it by that name.

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

diff --git a/include/linux/kvm_host.h b/include/linux/kvm_host.h
index 03bfc92864b6e..acae5a61e7f8f 100644
--- a/include/linux/kvm_host.h
+++ b/include/linux/kvm_host.h
@@ -562,7 +562,7 @@ static inline int kvm_vcpu_exiting_guest_mode(struct kvm_vcpu *vcpu)
 	/*
 	 * The memory barrier ensures a previous write to vcpu->requests cannot
 	 * be reordered with the read of vcpu->mode.  It pairs with the general
-	 * memory barrier following the write of vcpu->mode in VCPU RUN.
+	 * memory barrier following the write of vcpu->mode in KVM_RUN.
 	 */
 	smp_mb__before_atomic();
 	return cmpxchg(&vcpu->mode, IN_GUEST_MODE, EXITING_GUEST_MODE);
diff --git a/virt/kvm/kvm_main.c b/virt/kvm/kvm_main.c
index 65eb26a0520d8..cc391b0666a6d 100644
--- a/virt/kvm/kvm_main.c
+++ b/virt/kvm/kvm_main.c
@@ -470,7 +470,7 @@ static void kvm_vcpu_destroy(struct kvm_vcpu *vcpu)
 	kvm_dirty_ring_free(&vcpu->dirty_ring);
 
 	/*
-	 * No need for rcu_read_lock as VCPU_RUN is the only place that changes
+	 * No need for rcu_read_lock as KVM_RUN is the only place that changes
 	 * the vcpu->pid pointer, and at destruction time all file descriptors
 	 * are already gone.
 	 */
-- 
2.39.5


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

* [PATCH 2/3] KVM: arm64: Fix references to the non-existent VCPU_RUN ioctl
  2026-09-15  8:44 [PATCH 0/3] KVM: Replace VCPU_RUN with KVM_RUN in comments and docs Fuad Tabba
  2026-09-15  8:44 ` [PATCH 1/3] KVM: Fix comments that refer to the non-existent VCPU_RUN ioctl Fuad Tabba
@ 2026-09-15  8:44 ` Fuad Tabba
  2026-09-15  8:44 ` [PATCH 3/3] KVM: PPC: Book3S HV: Fix comment naming a non-existent KVM_VCPU_RUN ioctl Fuad Tabba
  2 siblings, 0 replies; 6+ messages in thread
From: Fuad Tabba @ 2026-09-15  8:44 UTC (permalink / raw)
  To: Paolo Bonzini, Marc Zyngier, Oliver Upton, Madhavan Srinivasan
  Cc: Sean Christopherson, Joey Gouly, Suzuki K Poulose, Zenghui Yu,
	Steffen Eiden, Nicholas Piggin, Will Deacon, Fuad Tabba, kvm,
	kvmarm, linux-arm-kernel, linux-doc, linuxppc-dev, linux-kernel

There is no VCPU_RUN ioctl. The one that enters the guest is KVM_RUN,
so refer to it by that name.

Signed-off-by: Fuad Tabba <fuad.tabba@linux.dev>
---
 Documentation/virt/kvm/arm/pkvm.rst | 2 +-
 arch/arm64/kvm/arm.c                | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/Documentation/virt/kvm/arm/pkvm.rst b/Documentation/virt/kvm/arm/pkvm.rst
index 514992a79a833..18d8afe36ebce 100644
--- a/Documentation/virt/kvm/arm/pkvm.rst
+++ b/Documentation/virt/kvm/arm/pkvm.rst
@@ -67,7 +67,7 @@ largely due to the lack of MMU notifiers:
   then it will either return ``-EFAULT`` or forcefully reclaim the
   memory pages. Reclaimed memory is zeroed by the hypervisor and a
   subsequent attempt to access it in the pVM will return ``-EFAULT``
-  from the ``VCPU_RUN`` ioctl().
+  from the ``KVM_RUN`` ioctl().
 
 CPU state isolation
 -------------------
diff --git a/arch/arm64/kvm/arm.c b/arch/arm64/kvm/arm.c
index 8b080804bc90b..a18ec13bd6677 100644
--- a/arch/arm64/kvm/arm.c
+++ b/arch/arm64/kvm/arm.c
@@ -1263,7 +1263,7 @@ static int noinstr kvm_arm_vcpu_enter_exit(struct kvm_vcpu *vcpu)
  * kvm_arch_vcpu_ioctl_run - the main VCPU run function to execute guest code
  * @vcpu:	The VCPU pointer
  *
- * This function is called through the VCPU_RUN ioctl called from user space. It
+ * This function is called through the KVM_RUN ioctl called from user space. It
  * will execute VM code in a loop until the time slice for the process is used
  * or some emulation is needed from user space in which case the function will
  * return with return value 0 and with the kvm_run structure filled in with the
-- 
2.39.5


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

* [PATCH 3/3] KVM: PPC: Book3S HV: Fix comment naming a non-existent KVM_VCPU_RUN ioctl
  2026-09-15  8:44 [PATCH 0/3] KVM: Replace VCPU_RUN with KVM_RUN in comments and docs Fuad Tabba
  2026-09-15  8:44 ` [PATCH 1/3] KVM: Fix comments that refer to the non-existent VCPU_RUN ioctl Fuad Tabba
  2026-09-15  8:44 ` [PATCH 2/3] KVM: arm64: Fix references " Fuad Tabba
@ 2026-09-15  8:44 ` Fuad Tabba
  2026-09-15 13:27   ` Gautam Menghani
  2026-09-15 16:03   ` Amit Machhiwal
  2 siblings, 2 replies; 6+ messages in thread
From: Fuad Tabba @ 2026-09-15  8:44 UTC (permalink / raw)
  To: Paolo Bonzini, Marc Zyngier, Oliver Upton, Madhavan Srinivasan
  Cc: Sean Christopherson, Joey Gouly, Suzuki K Poulose, Zenghui Yu,
	Steffen Eiden, Nicholas Piggin, Will Deacon, Fuad Tabba, kvm,
	kvmarm, linux-arm-kernel, linux-doc, linuxppc-dev, linux-kernel

There is no KVM_VCPU_RUN ioctl. The one that enters the guest is
KVM_RUN, so refer to it by that name.

Signed-off-by: Fuad Tabba <fuad.tabba@linux.dev>
---
 arch/powerpc/kvm/book3s_hv.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/powerpc/kvm/book3s_hv.c b/arch/powerpc/kvm/book3s_hv.c
index dbac3573b2c89..db090f4c5e95b 100644
--- a/arch/powerpc/kvm/book3s_hv.c
+++ b/arch/powerpc/kvm/book3s_hv.c
@@ -269,7 +269,7 @@ static void kvmppc_fast_vcpu_kick_hv(struct kvm_vcpu *vcpu)
  * stolen time for a vcore when it is inactive, or for a vcpu
  * when it is in state RUNNING or NOTREADY.  NOTREADY is a bit of
  * a misnomer; it means that the vcpu task is not executing in
- * the KVM_VCPU_RUN ioctl, i.e. it is in userspace or elsewhere in
+ * the KVM_RUN ioctl, i.e. it is in userspace or elsewhere in
  * the kernel.  We don't have any way of dividing up that time
  * between time that the vcpu is genuinely stopped, time that
  * the task is actively working on behalf of the vcpu, and time
-- 
2.39.5


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

* Re: [PATCH 3/3] KVM: PPC: Book3S HV: Fix comment naming a non-existent KVM_VCPU_RUN ioctl
  2026-09-15  8:44 ` [PATCH 3/3] KVM: PPC: Book3S HV: Fix comment naming a non-existent KVM_VCPU_RUN ioctl Fuad Tabba
@ 2026-09-15 13:27   ` Gautam Menghani
  2026-09-15 16:03   ` Amit Machhiwal
  1 sibling, 0 replies; 6+ messages in thread
From: Gautam Menghani @ 2026-09-15 13:27 UTC (permalink / raw)
  To: Fuad Tabba
  Cc: Paolo Bonzini, Marc Zyngier, Oliver Upton, Madhavan Srinivasan,
	Sean Christopherson, Joey Gouly, Suzuki K Poulose, Zenghui Yu,
	Steffen Eiden, Nicholas Piggin, Will Deacon, Fuad Tabba, kvm,
	kvmarm, linux-arm-kernel, linux-doc, linuxppc-dev, linux-kernel

Reviewed-by: Gautam Menghani <gautam@linux.ibm.com>

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

* Re: [PATCH 3/3] KVM: PPC: Book3S HV: Fix comment naming a non-existent KVM_VCPU_RUN ioctl
  2026-09-15  8:44 ` [PATCH 3/3] KVM: PPC: Book3S HV: Fix comment naming a non-existent KVM_VCPU_RUN ioctl Fuad Tabba
  2026-09-15 13:27   ` Gautam Menghani
@ 2026-09-15 16:03   ` Amit Machhiwal
  1 sibling, 0 replies; 6+ messages in thread
From: Amit Machhiwal @ 2026-09-15 16:03 UTC (permalink / raw)
  To: Fuad Tabba
  Cc: Paolo Bonzini, Marc Zyngier, Oliver Upton, Madhavan Srinivasan,
	Sean Christopherson, Joey Gouly, Suzuki K Poulose, Zenghui Yu,
	Steffen Eiden, Nicholas Piggin, Will Deacon, Fuad Tabba, kvm,
	kvmarm, linux-arm-kernel, linux-doc, linuxppc-dev, linux-kernel

On 2026/09/15 09:44 AM, Fuad Tabba wrote:
> There is no KVM_VCPU_RUN ioctl. The one that enters the guest is
> KVM_RUN, so refer to it by that name.
> 
> Signed-off-by: Fuad Tabba <fuad.tabba@linux.dev>
> ---
>  arch/powerpc/kvm/book3s_hv.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/arch/powerpc/kvm/book3s_hv.c b/arch/powerpc/kvm/book3s_hv.c
> index dbac3573b2c89..db090f4c5e95b 100644
> --- a/arch/powerpc/kvm/book3s_hv.c
> +++ b/arch/powerpc/kvm/book3s_hv.c
> @@ -269,7 +269,7 @@ static void kvmppc_fast_vcpu_kick_hv(struct kvm_vcpu *vcpu)
>   * stolen time for a vcore when it is inactive, or for a vcpu
>   * when it is in state RUNNING or NOTREADY.  NOTREADY is a bit of
>   * a misnomer; it means that the vcpu task is not executing in
> - * the KVM_VCPU_RUN ioctl, i.e. it is in userspace or elsewhere in
> + * the KVM_RUN ioctl, i.e. it is in userspace or elsewhere in

The erroneous name was introduced by commit c7b676709c16 ("KVM: PPC: Book3S HV:
Fix accounting of stolen time") and has sat untouched since.  KVM_VCPU_RUN was
never a real ioctl; KVM_RUN is correct.

Reviewed-by: Amit Machhiwal <amachhiw@linux.ibm.com>

Thanks,
Amit

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

end of thread, other threads:[~2026-09-15 15:56 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-09-15  8:44 [PATCH 0/3] KVM: Replace VCPU_RUN with KVM_RUN in comments and docs Fuad Tabba
2026-09-15  8:44 ` [PATCH 1/3] KVM: Fix comments that refer to the non-existent VCPU_RUN ioctl Fuad Tabba
2026-09-15  8:44 ` [PATCH 2/3] KVM: arm64: Fix references " Fuad Tabba
2026-09-15  8:44 ` [PATCH 3/3] KVM: PPC: Book3S HV: Fix comment naming a non-existent KVM_VCPU_RUN ioctl Fuad Tabba
2026-09-15 13:27   ` Gautam Menghani
2026-09-15 16:03   ` Amit Machhiwal

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®