Skip to contentSkip to conversation

KVM: PPC: Fix misleading interrupts comment in kvmppc_prepare_to_enter()

PATCH Applied Andrew Donnellan 5 participants 5 messages Aug 6, 2025 – Aug 28, 2025

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 KVM: PPC: Fix misleading interrupts comment in kvmppc_prepare_to_enter()

Until commit 6c85f52b10fd ("kvm/ppc: IRQ disabling cleanup"), kvmppc_prepare_to_enter() was called with interrupts already disabled by the caller, which was documented in the comment above the function.

Post-cleanup, the function is now called with interrupts enabled, and disables interrupts itself.

Fix the comment to reflect the current behaviour.

Fixes 6c85f52b10fd ("kvm/ppc: IRQ disabling cleanup")
---
 arch/powerpc/kvm/powerpc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/powerpc/kvm/powerpc.c +1 -1
index 153587741864..2ba057171ebe 100644
@@ -69,7 +69,7 @@ int kvm_arch_vcpu_should_kick(struct kvm_vcpu *vcpu)
 
 /*
  * Common checks before entering the guest world.  Call with interrupts
- * disabled.
+ * enabled.
  *
  * returns:
  *
Signature · 1 line
2.50.1
reviewer Reviewed-by on v1 1/1
#1 lore raw
Quoted 11 lines · Andrew Donnellan

Until commit 6c85f52b10fd ("kvm/ppc: IRQ disabling cleanup"), kvmppc_prepare_to_enter() was called with interrupts already disabled by the caller, which was documented in the comment above the function.

Post-cleanup, the function is now called with interrupts enabled, and disables interrupts itself.

Fix the comment to reflect the current behaviour.

Fixes 6c85f52b10fd ("kvm/ppc: IRQ disabling cleanup")

Given that there is WARN_ON which would trigger if IRQ were disabled
and further we flip irq before calling schedule, indicates that IRQ must be enabled while calling it.

Reviewed-by on v1 1/1
#2 lore raw
In reply to Andrew Donnellan
Quoted 32 lines · Andrew Donnellan

Until commit 6c85f52b10fd ("kvm/ppc: IRQ disabling cleanup"), kvmppc_prepare_to_enter() was called with interrupts already disabled by the caller, which was documented in the comment above the function.

Post-cleanup, the function is now called with interrupts enabled, and disables interrupts itself.

Fix the comment to reflect the current behaviour.

Fixes 6c85f52b10fd ("kvm/ppc: IRQ disabling cleanup")
---
 arch/powerpc/kvm/powerpc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/powerpc/kvm/powerpc.c +1 -1
index 153587741864..2ba057171ebe 100644
@@ -69,7 +69,7 @@ int kvm_arch_vcpu_should_kick(struct kvm_vcpu *vcpu)
 
 /*
  * Common checks before entering the guest world.  Call with interrupts
- * disabled.
+ * enabled.
  *
  * returns:
  *
Signature · 1 line
2.50.1

Good catch

Thanks,
Gautam

Reviewed-by on v1 1/1
#3 lore raw
In reply to Andrew Donnellan
Quoted 11 lines · Andrew Donnellan

Until commit 6c85f52b10fd ("kvm/ppc: IRQ disabling cleanup"), kvmppc_prepare_to_enter() was called with interrupts already disabled by the caller, which was documented in the comment above the function.

Post-cleanup, the function is now called with interrupts enabled, and disables interrupts itself.

Fix the comment to reflect the current behaviour.

Fixes 6c85f52b10fd ("kvm/ppc: IRQ disabling cleanup")

Thanks for catching and fixing this. Please feel free to add:

Quoted 20 lines
---
 arch/powerpc/kvm/powerpc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/powerpc/kvm/powerpc.c +1 -1
index 153587741864..2ba057171ebe 100644
@@ -69,7 +69,7 @@ int kvm_arch_vcpu_should_kick(struct kvm_vcpu *vcpu)
 
 /*
  * Common checks before entering the guest world.  Call with interrupts
- * disabled.
+ * enabled.
  *
  * returns:
  *
Signature · 1 line
2.50.1
maintainer Applied
#4 lore raw
In reply to Andrew Donnellan
Quoted 8 lines · Andrew Donnellan

Until commit 6c85f52b10fd ("kvm/ppc: IRQ disabling cleanup"), kvmppc_prepare_to_enter() was called with interrupts already disabled by the caller, which was documented in the comment above the function.

Post-cleanup, the function is now called with interrupts enabled, and disables interrupts itself.

[...]

Applied to powerpc/fixes.

[1/1] KVM: PPC: Fix misleading interrupts comment in kvmppc_prepare_to_enter()

      https://git.kernel.org/powerpc/c/02c1b0824eb1873b15676257cf1dc80070927e1e

Thanks