KVM: Replace VCPU_RUN with KVM_RUN in comments and docs
Subsystems (6)
Fuad Tabba
reviewercover KVM: Replace VCPU_RUN with KVM_RUN in comments and docs
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
Signature · 1 line
2.39.5
Fuad Tabba
reviewerPATCH 1/3 KVM: Fix comments that refer to the non-existent VCPU_RUN ioctl
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.
--- include/linux/kvm_host.h | 2 +- virt/kvm/kvm_main.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)
include/linux/kvm_host.h +1 -1
@@ -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 );
virt/kvm/kvm_main.c +1 -1
@@ -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. */
Signature · 1 line
2.39.5
Fuad Tabba
reviewerPATCH 2/3 KVM: arm64: Fix references to the non-existent VCPU_RUN ioctl
In reply to Fuad TabbaThere is no VCPU_RUN ioctl. The one that enters the guest is KVM_RUN, so refer to it by that name.
--- Documentation/virt/kvm/arm/pkvm.rst | 2 +- arch/arm64/kvm/arm.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)
Documentation/virt/kvm/arm/pkvm.rst +1 -1
@@ -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 -------------------
arch/arm64/kvm/arm.c +1 -1
@@ -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
Signature · 1 line
2.39.5
Fuad Tabba
reviewerPATCH 3/3 KVM: PPC: Book3S HV: Fix comment naming a non-existent KVM_VCPU_RUN ioctl
In reply to Fuad TabbaThere is no KVM_VCPU_RUN ioctl. The one that enters the guest is KVM_RUN, so refer to it by that name.
--- arch/powerpc/kvm/book3s_hv.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
arch/powerpc/kvm/book3s_hv.c +1 -1
@@ -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
Signature · 1 line
2.39.5
Re: [PATCH 3/3] KVM: PPC: Book3S HV: Fix comment naming a non-existent KVM_VCPU_RUN ioctl
Re: [PATCH 3/3] KVM: PPC: Book3S HV: Fix comment naming a non-existent KVM_VCPU_RUN ioctl
In reply to Fuad TabbaQuoted 13 lines · Fuad Tabba
There is no
KVM_VCPU_RUNioctl. The one that enters the guest isKVM_RUN, so refer to it by that name.Signed-off-by Fuad Tabba <[email protected]>--- arch/powerpc/kvm/book3s_hv.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)arch/powerpc/kvm/book3s_hv.c +0
-0
arch/powerpc/kvm/book3s_hv.c static void kvmppc_fast_vcpu_kick_hv(struct kvm_vcpu *vcpu) · line 272
Quoted 5 lines
arch/powerpc/kvm/book3s_hv.c +1
-1@@ -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.
Thanks,
Amit
Fuad Tabba
reviewerHi,
Gentle ping on this series.
Cheers,
/fuad
Quoted 10 lines · Fuad Tabba
This one has been bugging me for a while. Five comments and doc lines name a
VCPU_RUNioctl (KVM_VCPU_RUNinbook3s_hv.c, VCPU RUN inkvm_host.h). The ioctl that enters the guest isKVM_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.
[...]
Applied to next, thanks!
[1/3] KVM: Fix comments that refer to the non-existent VCPU_RUN ioctl
commit: 8233000034a630432a7da0311d94e8725207a095
[2/3] KVM: arm64: Fix references to the non-existent VCPU_RUN ioctl
commit: 0ab1034969130967bda8e6eab5b8dd6745604f1b
[3/3] KVM: PPC: Book3S HV: Fix comment naming a non-existent KVM_VCPU_RUN ioctl
commit: 6ce8b5c0effb227f5625b35965c0f74c0e953efbCheers,
M.
Signature · 1 line
Without deviation from the norm, progress is not possible.