KVM: PPC: Fix misleading interrupts comment in kvmppc_prepare_to_enter()
Subsystems (3)
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.
--- arch/powerpc/kvm/powerpc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
arch/powerpc/kvm/powerpc.c +1 -1
@@ -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
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")Signed-off-by Andrew Donnellan <[email protected]>
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.
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")Signed-off-by Andrew Donnellan <[email protected]>--- arch/powerpc/kvm/powerpc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)arch/powerpc/kvm/powerpc.c +1
-1@@ -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
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")Signed-off-by Andrew Donnellan <[email protected]>
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@@ -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
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