* [PATCH] KVM: PPC: Fix misleading interrupts comment in kvmppc_prepare_to_enter()
@ 2025-08-06 5:56 Andrew Donnellan
2025-08-07 4:45 ` Shrikanth Hegde
` (3 more replies)
0 siblings, 4 replies; 5+ messages in thread
From: Andrew Donnellan @ 2025-08-06 5:56 UTC (permalink / raw)
To: linuxppc-dev, kvm
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")
Signed-off-by: Andrew Donnellan <ajd@linux.ibm.com>
---
arch/powerpc/kvm/powerpc.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/powerpc/kvm/powerpc.c b/arch/powerpc/kvm/powerpc.c
index 153587741864..2ba057171ebe 100644
--- a/arch/powerpc/kvm/powerpc.c
+++ b/arch/powerpc/kvm/powerpc.c
@@ -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:
*
--
2.50.1
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH] KVM: PPC: Fix misleading interrupts comment in kvmppc_prepare_to_enter()
2025-08-06 5:56 [PATCH] KVM: PPC: Fix misleading interrupts comment in kvmppc_prepare_to_enter() Andrew Donnellan
@ 2025-08-07 4:45 ` Shrikanth Hegde
2025-08-07 12:23 ` Gautam Menghani
` (2 subsequent siblings)
3 siblings, 0 replies; 5+ messages in thread
From: Shrikanth Hegde @ 2025-08-07 4:45 UTC (permalink / raw)
To: Andrew Donnellan; +Cc: linuxppc-dev, kvm
On 8/6/25 11:26, Andrew Donnellan wrote:
> 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")
> Signed-off-by: Andrew Donnellan <ajd@linux.ibm.com>
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:: Shrikanth Hegde <sshegde@linux.ibm.com>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] KVM: PPC: Fix misleading interrupts comment in kvmppc_prepare_to_enter()
2025-08-06 5:56 [PATCH] KVM: PPC: Fix misleading interrupts comment in kvmppc_prepare_to_enter() Andrew Donnellan
2025-08-07 4:45 ` Shrikanth Hegde
@ 2025-08-07 12:23 ` Gautam Menghani
2025-08-08 6:52 ` Amit Machhiwal
2025-08-28 6:32 ` Madhavan Srinivasan
3 siblings, 0 replies; 5+ messages in thread
From: Gautam Menghani @ 2025-08-07 12:23 UTC (permalink / raw)
To: Andrew Donnellan; +Cc: linuxppc-dev, kvm
On Wed, Aug 06, 2025 at 03:56:07PM +1000, Andrew Donnellan wrote:
> 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")
> Signed-off-by: Andrew Donnellan <ajd@linux.ibm.com>
> ---
> arch/powerpc/kvm/powerpc.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/arch/powerpc/kvm/powerpc.c b/arch/powerpc/kvm/powerpc.c
> index 153587741864..2ba057171ebe 100644
> --- a/arch/powerpc/kvm/powerpc.c
> +++ b/arch/powerpc/kvm/powerpc.c
> @@ -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:
> *
> --
> 2.50.1
>
>
Good catch
Reviewed-by: Gautam Menghani <gautam@linux.ibm.com>
Thanks,
Gautam
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] KVM: PPC: Fix misleading interrupts comment in kvmppc_prepare_to_enter()
2025-08-06 5:56 [PATCH] KVM: PPC: Fix misleading interrupts comment in kvmppc_prepare_to_enter() Andrew Donnellan
2025-08-07 4:45 ` Shrikanth Hegde
2025-08-07 12:23 ` Gautam Menghani
@ 2025-08-08 6:52 ` Amit Machhiwal
2025-08-28 6:32 ` Madhavan Srinivasan
3 siblings, 0 replies; 5+ messages in thread
From: Amit Machhiwal @ 2025-08-08 6:52 UTC (permalink / raw)
To: Andrew Donnellan; +Cc: linuxppc-dev, kvm
On 2025/08/06 03:56 PM, Andrew Donnellan wrote:
> 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")
> Signed-off-by: Andrew Donnellan <ajd@linux.ibm.com>
Thanks for catching and fixing this. Please feel free to add:
Reviewed-by: Amit Machhiwal <amachhiw@linux.ibm.com>
> ---
> arch/powerpc/kvm/powerpc.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/arch/powerpc/kvm/powerpc.c b/arch/powerpc/kvm/powerpc.c
> index 153587741864..2ba057171ebe 100644
> --- a/arch/powerpc/kvm/powerpc.c
> +++ b/arch/powerpc/kvm/powerpc.c
> @@ -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:
> *
> --
> 2.50.1
>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] KVM: PPC: Fix misleading interrupts comment in kvmppc_prepare_to_enter()
2025-08-06 5:56 [PATCH] KVM: PPC: Fix misleading interrupts comment in kvmppc_prepare_to_enter() Andrew Donnellan
` (2 preceding siblings ...)
2025-08-08 6:52 ` Amit Machhiwal
@ 2025-08-28 6:32 ` Madhavan Srinivasan
3 siblings, 0 replies; 5+ messages in thread
From: Madhavan Srinivasan @ 2025-08-28 6:32 UTC (permalink / raw)
To: linuxppc-dev, kvm, Andrew Donnellan
On Wed, 06 Aug 2025 15:56:07 +1000, Andrew Donnellan wrote:
> 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
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2025-08-28 6:33 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-08-06 5:56 [PATCH] KVM: PPC: Fix misleading interrupts comment in kvmppc_prepare_to_enter() Andrew Donnellan
2025-08-07 4:45 ` Shrikanth Hegde
2025-08-07 12:23 ` Gautam Menghani
2025-08-08 6:52 ` Amit Machhiwal
2025-08-28 6:32 ` Madhavan Srinivasan
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).