From: Narayana Murty N <nnmlinux@linux.ibm.com>
To: Shrikanth Hegde <sshegde@linux.ibm.com>,
maddy@linux.ibm.com, linuxppc-dev@lists.ozlabs.org,
chzigotzky@xenosoft.de
Cc: mpe@ellerman.id.au, npiggin@gmail.com,
christophe.leroy@csgroup.eu, linux-kernel@vger.kernel.org,
msuchanek@suse.de, ritesh.list@gmail.com, harshpb@linux.ibm.com,
gautam@linux.ibm.com, amachhiw@linux.ibm.com,
venkat88@linux.ibm.com, mkchauras@gmail.com
Subject: Re: [PATCH v3 2/3] KVM: PPC: BookE: Load FP and Altivec before enabling the interrupts
Date: Fri, 13 Nov 2026 13:15:57 +0530 [thread overview]
Message-ID: <8a88f1bc-2ff5-4d6d-8f7c-1182b256d855@linux.ibm.com> (raw)
In-Reply-To: <20261112130913.4124175-3-sshegde@linux.ibm.com>
Hi Shrikanth,
On 12/11/26 6:39 PM, Shrikanth Hegde wrote:
> Christian reported that booting preemptible kernel on FSL Cyrus+ board
> causes boot hang.
>
> The logs pointed that system was busy in printing below warning.
>
> WARNING: at .enable_kernel_fp+0x30/0x78, CPU#3: qemu-system-ppc/4884
> Modules linked in:
> CPU: 3 UID: 1000 PID: 4884 Comm: qemu-system-ppc Not tainted 7.3.0-rc1-powerpc64-smp-preempt #1 PREEMPT
> NIP [c000000000003338] .enable_kernel_fp+0x30/0x78
> LR [c00000000005de84] .kvmppc_load_guest_fp+0x30/0x80
> Call Trace:
> [c000000085ca7700] [c00000000005de84] .kvmppc_load_guest_fp+0x30/0x80
> [c000000085ca7780] [c00000000005f2a0] .kvmppc_handle_exit+0x5bc/0x5cc
> [c000000085ca7830] [c00000000006204c] .kvmppc_resume_host+0xb8/0x10c
>
> Which is...
>
> void enable_kernel_fp(void)
> {
> unsigned long cpumsr;
> WARN_ON(preemptible());
>
> And...
>
> Though irq's are hard disabled after kvmppc_prepare_to_enter, but
> kvmppc_fix_ee_before_entry enables the softmask's IRQ state.
> That causes the irqs_disabled to return false.
> Hence leading to the warnings.
>
> Fix it by re-ordering the code to load the FP and Altivec
> before enabling the softmask IRQ state.
>
> Suggested-by: Narayana Murty N <nnmlinux@linux.ibm.com>
> Fixes: 3efc7da61f6c ("KVM: PPC: Book3E: Increase FPU laziness")
> Reported-by: Christian Zigotzky <chzigotzky@xenosoft.de>
> Closes: https://lore.kernel.org/all/33342fbf-eb7b-bde6-2c8c-254fe8bfb993@xenosoft.de/
> Tested-by: Christian Zigotzky <chzigotzky@xenosoft.de>
> Reviewed-by: Mukesh Kumar Chaurasiya (IBM) <mkchauras@gmail.com>
> Signed-off-by: Shrikanth Hegde <sshegde@linux.ibm.com>
> ---
> arch/powerpc/kvm/booke.c | 3 +--
> 1 file changed, 1 insertion(+), 2 deletions(-)
>
> diff --git a/arch/powerpc/kvm/booke.c b/arch/powerpc/kvm/booke.c
> index 13ad4cf5fa71..aed7b476b7eb 100644
> --- a/arch/powerpc/kvm/booke.c
> +++ b/arch/powerpc/kvm/booke.c
> @@ -1404,10 +1404,9 @@ int kvmppc_handle_exit(struct kvm_vcpu *vcpu, unsigned int exit_nr)
> if (s <= 0)
> r = (s << 2) | RESUME_HOST | (r & RESUME_FLAG_NV);
> else {
> - /* interrupts now hard-disabled */
> - kvmppc_fix_ee_before_entry();
> kvmppc_load_guest_fp(vcpu);
> kvmppc_load_guest_altivec(vcpu);
> + kvmppc_fix_ee_before_entry();
> }
> }
>
This address my previous comment, feel free to add Reviewed-by Narayana
Murty N <nnmlinux@linux.ibm.com>
thanks,
Narayana.
next prev parent reply other threads:[~2026-11-13 7:46 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-12 13:09 [PATCH v3 0/3] KVM: PPC: BookE: Fix boot hang on preemptible kernels Shrikanth Hegde
2026-11-12 13:09 ` [PATCH v3 1/3] powerpc/irq: Add ppc_hard_irq_disable() Shrikanth Hegde
2026-11-12 13:09 ` [PATCH v3 2/3] KVM: PPC: BookE: Load FP and Altivec before enabling the interrupts Shrikanth Hegde
2026-11-13 7:45 ` Narayana Murty N [this message]
2026-11-12 13:09 ` [PATCH v3 3/3] KVM: PPC: Use ppc_hard_irq_disable before guest entry Shrikanth Hegde
2026-11-13 7:48 ` Narayana Murty N
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=8a88f1bc-2ff5-4d6d-8f7c-1182b256d855@linux.ibm.com \
--to=nnmlinux@linux.ibm.com \
--cc=amachhiw@linux.ibm.com \
--cc=christophe.leroy@csgroup.eu \
--cc=chzigotzky@xenosoft.de \
--cc=gautam@linux.ibm.com \
--cc=harshpb@linux.ibm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=maddy@linux.ibm.com \
--cc=mkchauras@gmail.com \
--cc=mpe@ellerman.id.au \
--cc=msuchanek@suse.de \
--cc=npiggin@gmail.com \
--cc=ritesh.list@gmail.com \
--cc=sshegde@linux.ibm.com \
--cc=venkat88@linux.ibm.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox