KVM PR and KVM HV do not work if the kernel was compiled with PREEMPT
Subsystems (3)
Hello,
KVM PR and KVM HV do not work if the kernel was compiled with PREEMPT.
The entire FSL Cyrus+ board freezes when using KVM HV with PREEMPT.
The guest kernel doesn't boot if we use KVM PR with a PREEMPT kernel on the PA Semi Nemo board.
We were previously able to disable PREEMPT in the kernel configuration, but the latest git kernels now enable it by default and it is no longer possible to disable it.
I created a patch for disabling PREEMPT today. [1]
Is it possible to let us decide whether to activate PREEMPT or not?
Thanks in advance,
Christian
[1] https://raw.githubusercontent.com/chzigotzky/kernels/a74fa6179eaeafcea7ad89f0e61c30ace038daf2/patches/X1000/Kconfig.preempt.patch
[2] Bug report: https://github.com/chzigotzky/kernels/issues/19
Shrikanth Hegde
reviewerQuoted 12 lines · Christian Zigotzky
Hello,
KVM PR and KVM HV do not work if the kernel was compiled with PREEMPT.
The entire FSL Cyrus+ board freezes when using KVM HV with PREEMPT.
The guest kernel doesn't boot if we use KVM PR with a PREEMPT kernel on the PA Semi Nemo board.
We were previously able to disable PREEMPT in the kernel configuration, but the latest git kernels now enable it by default and it is no longer possible to disable it.
I created a patch for disabling PREEMPT today. [1]
Quoted 8 lines
Is it possible to let us decide whether to activate PREEMPT or not?
Thanks in advance,
Christian
[1] https://raw.githubusercontent.com/chzigotzky/kernels/ a74fa6179eaeafcea7ad89f0e61c30ace038daf2/patches/X1000/
Kconfig.preempt.patch
[2] Bug report: https://github.com/chzigotzky/kernels/issues/19
Hi.
Do you have any trace why it is stuck? That would be useful.
My initial take is cond_resched is a nop. So we might be stuck there. Eventually it should have come out though.
Could you please give the below patch a try and let me know?
Note: This likely still needs lazy bit handling. So keep in preempt=full. (Not tested)
arch/powerpc/kvm/book3s_hv.c +1 -1
@@ -4901,7 +4901,7 @@ int kvmhv_run_single_vcpu(struct kvm_vcpu *vcpu, u64 time_limit, }if (need_resched ()) -cond_resched (); +schedule ();kvmppc_update_vpas (vcpu);
arch/powerpc/kvm/powerpc.c +1 -1
@@ -86,7 +86,7 @@ int kvmppc_prepare_to_enter(struct kvm_vcpu *vcpu)while (true) {if (need_resched ()) {local_irq_enable (); -cond_resched (); +schedule ();hard_irq_disable ();continue ; }
Hi,
Thank you for your patch. I tested the latest git kernel with your patch today. Unfortunately the system freezes while booting the VM with KVM HV.
Cheers,
Christian
Quoted 66 lines · Shrikanth Hegde
Quoted 12 lines · Christian Zigotzky
Hello,
KVM PR and KVM HV do not work if the kernel was compiled with PREEMPT.
The entire FSL Cyrus+ board freezes when using KVM HV with PREEMPT.
The guest kernel doesn't boot if we use KVM PR with a PREEMPT kernel on the PA Semi Nemo board.
We were previously able to disable PREEMPT in the kernel configuration, but the latest git kernels now enable it by default and it is no longer possible to disable it.
I created a patch for disabling PREEMPT today. [1]
Quoted 8 lines
Is it possible to let us decide whether to activate PREEMPT or not?
Thanks in advance,
Christian
[1] https://raw.githubusercontent.com/chzigotzky/kernels/ a74fa6179eaeafcea7ad89f0e61c30ace038daf2/patches/X1000/
Kconfig.preempt.patch
[2] Bug report: https://github.com/chzigotzky/kernels/issues/19Hi.
Do you have any trace why it is stuck? That would be useful.
My initial take is
cond_reschedis a nop. So we might be stuck there. Eventually it should have come out though.Could you please give the below patch a try and let me know?
Note: This likely still needs lazy bit handling. So keep in preempt=full. (Not tested)arch/powerpc/kvm/book3s_hv.c +1
-1@@ -4901,7 +4901,7 @@ int kvmhv_run_single_vcpu(struct kvm_vcpu *vcpu,u64 time_limit, } if (need_resched()) - cond_resched(); + schedule(); kvmppc_update_vpas(vcpu);arch/powerpc/kvm/powerpc.c +1
-1@@ -86,7 +86,7 @@ int kvmppc_prepare_to_enter(struct kvm_vcpu *vcpu) while (true) { if (need_resched()) { local_irq_enable(); - cond_resched(); + schedule(); hard_irq_disable(); continue; }
Signature · 1 line
Sent with BrassMonkey 33.9.1 (https://github.com/chzigotzky/Web-Browsers-and-Suites-for-Linux-PPC/releases/tag/BrassMonkey_33.9.1)
Shrikanth Hegde
reviewerQuoted 8 lines · Christian Zigotzky
Hi,
Thank you for your patch. I tested the latest git kernel with your patch today. Unfortunately the system freezes while booting the VM with KVM HV.
Cheers,
Christian
Would it be possible to share the console log or boot log of KVM to the point it freezes?
Quoted 5 lines · Shrikanth Hegde
Quoted 2 lines · Christian Zigotzky
Hi,
Quoted 8 lines
Quoted 6 lines
Thank you for your patch. I tested the latest git kernel with your patch today. Unfortunately the system freezes while booting the VM with KVM HV.
Cheers,
ChristianWould it be possible to share the console log or boot log of KVM to the point it freezes?
Unfortunately there aren't any error messages.
I also tried it with:
gdb --args qemu-system-ppc64 -M ppce500 -cpu e5500 -m 1024 -kernel uImage-7.0-preempt -drive format=raw,file=void-live-powerpc-20230317-updated2.img,index=0,if=virtio -netdev user,id=mynet0 -device virtio-net,netdev=mynet0 -append "rw root=/dev/vda" -device virtio-gpu-pci -device virtio-mouse-pci -device virtio-keyboard-pci -enable-kvm -smp 4
and with gdb in the guest:
qemu-system-ppc64 -s -S -M ppce500 -cpu e5500 -m 1024 -kernel uImage-7.0-preempt -drive format=raw,file=void-live-powerpc-20230317-updated2.img,index=0,if=virtio -netdev user,id=mynet0 -device virtio-net,netdev=mynet0 -append "rw root=/dev/vda" -device virtio-gpu-pci -device virtio-mouse-pci -device virtio-keyboard-pci -enable-kvm -smp 4
The system freezed without any error messages.
Signature · 1 line
Sent with BrassMonkey 33.9.1 (https://github.com/chzigotzky/Web-Browsers-and-Suites-for-Linux-PPC/releases/tag/BrassMonkey_33.9.1)
Madhavan Srinivasan
maintainerQuoted 23 lines · Christian Zigotzky
Quoted 5 lines · Shrikanth Hegde
Quoted 2 lines · Christian Zigotzky
Hi,
Quoted 8 lines
Quoted 6 lines
Thank you for your patch. I tested the latest git kernel with your patch today. Unfortunately the system freezes while booting the VM with KVM HV.
Cheers,
ChristianWould it be possible to share the console log or boot log of KVM to the point it freezes?
Unfortunately there aren't any error messages.
I also tried it with:
gdb --args qemu-system-ppc64 -M ppce500 -cpu e5500 -m 1024 -kernel uImage-7.0-preempt -drive format=raw,file=void-live-powerpc-20230317-updated2.img,index=0,if=virtio -netdev user,id=mynet0 -device virtio-net,netdev=mynet0 -append "rw
root=/dev/vda" -device virtio-gpu-pci -device virtio-mouse-pci -device virtio-keyboard-pci -enable-kvm -smp 4
Quoted 7 lines
and with gdb in the guest:
qemu-system-ppc64 -s -S -M ppce500 -cpu e5500 -m 1024 -kernel uImage-7.0-preempt -drive format=raw,file=void-live-powerpc-20230317-updated2.img,index=0,if=virtio -netdev user,id=mynet0 -device virtio-net,netdev=mynet0 -append "rw
root=/dev/vda" -device virtio-gpu-pci -device virtio-mouse-pci -device virtio-keyboard-pci -enable-kvm -smp 4The system freezed without any error messages.
can you please share the config.
I tried kvm-hv in my power8/power9 and seems to boot fine without any issues with today's upstream Maddy
Quoted 33 lines · On 17/02/26 11:17 Madhavan Srinivasan wrote:
Quoted 31 lines · Christian Zigotzky
Quoted 5 lines · Shrikanth Hegde
Quoted 2 lines · Christian Zigotzky
Hi,
Quoted 8 lines
Quoted 6 lines
Thank you for your patch. I tested the latest git kernel with your patch today. Unfortunately the system freezes while booting the VM with KVM HV.
Cheers,
ChristianWould it be possible to share the console log or boot log of KVM to the point it freezes?
Unfortunately there aren't any error messages.
I also tried it with:
gdb --args qemu-system-ppc64 -M ppce500 -cpu e5500 -m 1024 -kernel uImage-7.0-preempt -drive format=raw,file=void-live-powerpc-20230317-updated2.img,index=0,if=virtio -netdev user,id=mynet0 -device virtio-net,netdev=mynet0 -append "rw
root=/dev/vda" -device virtio-gpu-pci -device virtio-mouse-pci
-device virtio-keyboard-pci -enable-kvm -smp 4and with gdb in the guest:
qemu-system-ppc64 -s -S -M ppce500 -cpu e5500 -m 1024 -kernel uImage-7.0-preempt -drive format=raw,file=void-live-powerpc-20230317-updated2.img,index=0,if=virtio -netdev user,id=mynet0 -device virtio-net,netdev=mynet0 -append "rw
root=/dev/vda" -device virtio-gpu-pci -device virtio-mouse-pci
-device virtio-keyboard-pci -enable-kvm -smp 4
Quoted 4 lines
Quoted 1 line
The system freezed without any error messages.
can you please share the config.
I tried kvm-hv in my power8/power9 and seems to boot fine without any issues with today's upstream Maddy
Here are the configs.
With PREEMPT: https://github.com/chzigotzky/kernels/blob/d50d259ca63dd2b3b9a9eaabc82e5cc69c8cc9f0/configs/e5500_defconfig
Without PREEMPT: https://github.com/chzigotzky/kernels/blob/main/configs/e5500_defconfig
- Christian
Shrikanth Hegde
reviewerQuoted 22 lines · Christian Zigotzky
Quoted 21 lines · On 17/02/26 11:17 Madhavan Srinivasan wrote:
Quoted 19 lines · Christian Zigotzky
Quoted 5 lines · Shrikanth Hegde
Quoted 2 lines · Christian Zigotzky
Hi,
Quoted 8 lines
Quoted 6 lines
Thank you for your patch. I tested the latest git kernel with your patch today. Unfortunately the system freezes while booting the VM with KVM HV.
Cheers,
ChristianWould it be possible to share the console log or boot log of KVM to the point it freezes?
Unfortunately there aren't any error messages.
I also tried it with:
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
gdb --args qemu-system-ppc64 -M ppce500 -cpu e5500 -m 1024 -kernel uImage-7.0-preempt -drive format=raw,file=void-live-powerpc-20230317- updated2.img,index=0,if=virtio -netdev user,id=mynet0 -device virtio- net,netdev=mynet0 -append "rw root=/dev/vda" -device virtio-gpu-pci - device virtio-mouse-pci -device virtio-keyboard-pci -enable-kvm -smp 4
and with gdb in the guest:
qemu-system-ppc64 -s -S -M ppce500 -cpu e5500 -m 1024 -kernel uImage-7.0-preempt -drive format=raw,file=void-live-powerpc-20230317- updated2.img,index=0,if=virtio -netdev user,id=mynet0 -device virtio- net,netdev=mynet0 -append "rw root=/dev/vda" -device virtio-gpu-pci - device virtio-mouse-pci -device virtio-keyboard-pci -enable-kvm -smp 4
The system freezed without any error messages.
Anything on host console?
Quoted 10 lines
Quoted 3 lines
can you please share the config.
I tried kvm-hv in my power8/power9 and seems to boot fine without any issues with today's upstream MaddyHere are the configs.
With PREEMPT: https://github.com/chzigotzky/kernels/blob/ d50d259ca63dd2b3b9a9eaabc82e5cc69c8cc9f0/configs/e5500_defconfig
Without PREEMPT: https://github.com/chzigotzky/kernels/blob/main/ configs/e5500_defconfig
- Christian
I looked at the code. there was one more place where cond_resched was there.
If possible give the below try.
(Note: Didn;t replicate your issue)
---
arch/powerpc/kvm/book3s_hv.c +6 -3
@@ -4825,10 +4825,13 @@ static int kvmppc_run_vcpu(struct kvm_vcpu *vcpu) vc->runner = vcpu;if (n_ceded == vc->n_runnable) {kvmppc_vcore_blocked (vc); - }else if (need_resched ()) { + }else if (need_resched () ||spin_needbreak (&vc->lock)) {kvmppc_vcore_preempt (vc);/* Let something else run */ -cond_resched_lock (&vc->lock); +spin_unlock (&vc->lock); +schedule (); +//cond_resched_lock(&vc->lock); +spin_lock (&vc->lock);if (vc->vcore_state ==VCORE_PREEMPT )kvmppc_vcore_end_preempt (vc); }else {
@@ -4901,7 +4904,7 @@ int kvmhv_run_single_vcpu(struct kvm_vcpu *vcpu, u64 time_limit, }if (need_resched ()) -cond_resched (); +schedule ();kvmppc_update_vpas (vcpu);
arch/powerpc/kvm/powerpc.c +1 -1
@@ -86,7 +86,7 @@ int kvmppc_prepare_to_enter(struct kvm_vcpu *vcpu)while (true) {if (need_resched ()) {local_irq_enable (); -cond_resched (); +schedule ();hard_irq_disable ();continue ; }
Quoted 89 lines · Shrikanth Hegde
Quoted 22 lines · Christian Zigotzky
Quoted 21 lines · On 17/02/26 11:17 Madhavan Srinivasan wrote:
Quoted 19 lines · Christian Zigotzky
Quoted 5 lines · Shrikanth Hegde
Quoted 2 lines · Christian Zigotzky
Hi,
Quoted 8 lines
Quoted 6 lines
Thank you for your patch. I tested the latest git kernel with your patch today. Unfortunately the system freezes while booting the VM with KVM HV.
Cheers,
ChristianWould it be possible to share the console log or boot log of KVM to the point it freezes?
Unfortunately there aren't any error messages.
I also tried it with:
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
gdb --args qemu-system-ppc64 -M ppce500 -cpu e5500 -m 1024 -kernel uImage-7.0-preempt -drive format=raw,file=void-live-powerpc-20230317- updated2.img,index=0,if=virtio -netdev user,id=mynet0 -device virtio- net,netdev=mynet0 -append "rw root=/dev/vda" -device virtio-gpu-pci - device virtio-mouse-pci -device virtio-keyboard-pci -enable-kvm -smp 4
and with gdb in the guest:
qemu-system-ppc64 -s -S -M ppce500 -cpu e5500 -m 1024 -kernel uImage-7.0-preempt -drive format=raw,file=void-live-powerpc-20230317- updated2.img,index=0,if=virtio -netdev user,id=mynet0 -device virtio- net,netdev=mynet0 -append "rw root=/dev/vda" -device virtio-gpu-pci - device virtio-mouse-pci -device virtio-keyboard-pci -enable-kvm -smp 4
The system freezed without any error messages.
Anything on host console?
Quoted 10 lines
Quoted 3 lines
can you please share the config.
I tried kvm-hv in my power8/power9 and seems to boot fine without any issues with today's upstream MaddyHere are the configs.
With PREEMPT: https://github.com/chzigotzky/kernels/blob/ d50d259ca63dd2b3b9a9eaabc82e5cc69c8cc9f0/configs/e5500_defconfig
Without PREEMPT: https://github.com/chzigotzky/kernels/blob/main/ configs/e5500_defconfig
- Christian
I looked at the code. there was one more place where
cond_reschedwas there.If possible give the below try.
(Note: Didn;t replicate your issue)---
arch/powerpc/kvm/book3s_hv.c +6
-3@@ -4825,10 +4825,13 @@ static int kvmppc_run_vcpu(struct kvm_vcpu *vcpu) vc->runner = vcpu; if (n_ceded == vc->n_runnable) { kvmppc_vcore_blocked(vc); - } else if (need_resched()) { + } else if (need_resched() || spin_needbreak(&vc->lock)) { kvmppc_vcore_preempt(vc); /* Let something else run */ - cond_resched_lock(&vc->lock); + spin_unlock(&vc->lock); + schedule(); + //cond_resched_lock(&vc->lock); + spin_lock(&vc->lock); if (vc->vcore_state == VCORE_PREEMPT) kvmppc_vcore_end_preempt(vc); } else {@@ -4901,7 +4904,7 @@ int kvmhv_run_single_vcpu(struct kvm_vcpu *vcpu,u64 time_limit, } if (need_resched()) - cond_resched(); + schedule(); kvmppc_update_vpas(vcpu);arch/powerpc/kvm/powerpc.c +0
-0
arch/powerpc/kvm/powerpc.c int kvmppc_prepare_to_enter(struct kvm_vcpu *vcpu) · line 92
Quoted 8 lines
arch/powerpc/kvm/powerpc.c +1
-1@@ -86,7 +86,7 @@ int kvmppc_prepare_to_enter(struct kvm_vcpu *vcpu) while (true) { if (need_resched()) { local_irq_enable(); - cond_resched(); + schedule(); hard_irq_disable(); continue; }
Hello Shrikanth,
I tested your patch today. The patched preempt kernel boots on my e5500 host and in an e5500 VM. Unfortunately my guest and host freeze after loading the VirtIO-GPU.
Thanks for your help,
Christian
Signature · 1 line
Sent with BrassMonkey 33.9.1 (https://github.com/chzigotzky/Web-Browsers-and-Suites-for-Linux-PPC/releases/tag/BrassMonkey_33.9.1)
Shrikanth Hegde
reviewerHi Christian.
Quoted 53 lines
Quoted 41 lines
If possible give the below try.
(Note: Didn;t replicate your issue)---
arch/powerpc/kvm/book3s_hv.c +6
-3@@ -4825,10 +4825,13 @@ static int kvmppc_run_vcpu(struct kvm_vcpu *vcpu) vc->runner = vcpu; if (n_ceded == vc->n_runnable) { kvmppc_vcore_blocked(vc); - } else if (need_resched()) { + } else if (need_resched() || spin_needbreak(&vc->lock)) { kvmppc_vcore_preempt(vc); /* Let something else run */ - cond_resched_lock(&vc->lock); + spin_unlock(&vc->lock); + schedule(); + //cond_resched_lock(&vc->lock); + spin_lock(&vc->lock); if (vc->vcore_state == VCORE_PREEMPT) kvmppc_vcore_end_preempt(vc); } else {@@ -4901,7 +4904,7 @@ int kvmhv_run_single_vcpu(struct kvm_vcpu *vcpu,u64 time_limit, } if (need_resched()) - cond_resched(); + schedule(); kvmppc_update_vpas(vcpu);arch/powerpc/kvm/powerpc.c +0
-0arch/powerpc/kvm/powerpc.c int kvmppc_prepare_to_enter(struct kvm_vcpu *vcpu) · line 92
Quoted 8 lines
arch/powerpc/kvm/powerpc.c +1
-1@@ -86,7 +86,7 @@ int kvmppc_prepare_to_enter(struct kvm_vcpu *vcpu) while (true) { if (need_resched()) { local_irq_enable(); - cond_resched(); + schedule(); hard_irq_disable(); continue; }Hello Shrikanth,
t
I tested your patch today. The patched preempt kernel boots on my e5500 host and in an e5500 VM. Unfortunately my guest and host freeze after loading the VirtIO-GPU.
Quoted 3 lines
Thanks for your help,
Christian
Glad it helps you to boot into.
Since you said even host freezes, host maybe crashing. Do you have the console log when you load the VirtIO-GPU?
[Linux PPC] 7.0-rc1: e500_mmu.c:923:26: error: assignment to 'struct tlbe_priv *' from incompatible pointer type 'struct tlbe_ref *'
Hello,
Compiling issue for e5500 machines for the RC1 of kernel 7.0:
arch/powerpc/kvm/e500_mmu.c: In function 'kvmppc_e500_tlb_init':arch/powerpc/kvm/e500_mmu.c:923:26: error: assignment to 'struct tlbe_priv *' from incompatible pointer type 'struct tlbe_ref *' [-Werror=incompatible-pointer-types] 923 | vcpu_e500->gtlb_priv[0] = kzalloc_objs(struct tlbe_ref,
| ^arch/powerpc/kvm/e500_mmu.c:928:26: error: assignment to 'struct tlbe_priv *' from incompatible pointer type 'struct tlbe_ref *' [-Werror=incompatible-pointer-types] 928 | vcpu_e500->gtlb_priv[1] = kzalloc_objs(struct tlbe_ref,
Temporary solution: # CONFIG_VIRTUALIZATION is not set
Please solve this issue.
Thanks,
Christian
Christophe Leroy (CS GROUP)
reviewerRe: [Linux PPC] 7.0-rc1: e500_mmu.c:923:26: error: assignment to 'struct tlbe_priv *' from incompatible pointer type 'struct tlbe_ref *'
+Kees
Hello,
Le 23/02/2026 à 17:48, Christian Zigotzky a écrit :
Quoted 11 lines
Hello,
Compiling issue for e5500 machines for the RC1 of kernel 7.0:
arch/powerpc/kvm/e500_mmu.c: In function 'kvmppc_e500_tlb_init':arch/powerpc/kvm/e500_mmu.c:923:26: error: assignment to 'structtlbe_priv*' from incompatible pointer type 'structtlbe_ref*' [- Werror=incompatible-pointer-types]
923 | vcpu_e500->gtlb_priv[0] = kzalloc_objs(structtlbe_ref,
| ^arch/powerpc/kvm/e500_mmu.c:928:26: error: assignment to 'structtlbe_priv*' from incompatible pointer type 'structtlbe_ref*' [- Werror=incompatible-pointer-types]
928 | vcpu_e500->gtlb_priv[1] = kzalloc_objs(structtlbe_ref,
Quoted 4 lines
Temporary solution: #
CONFIG_VIRTUALIZATIONis not setPlease solve this issue.
Must be one of:
189f164e573e Convert remaining multi-line kmalloc_obj/flex GFP_KERNEL uses bf4afc53b77a Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 69050f8d6d07 treewide: Replace kmalloc with kmalloc_obj for non-scalar types
Christophe
Christophe Leroy (CS GROUP)
reviewerRe: [Linux PPC] 7.0-rc1: e500_mmu.c:923:26: error: assignment to 'struct tlbe_priv *' from incompatible pointer type 'struct tlbe_ref *'
Le 23/02/2026 à 19:07, Christophe Leroy (CS GROUP) a écrit :
Quoted 18 lines
+Kees
Hello,
Le 23/02/2026 à 17:48, Christian Zigotzky a écrit :
Quoted 13 lines
Hello,
Compiling issue for e5500 machines for the RC1 of kernel 7.0:
arch/powerpc/kvm/e500_mmu.c: In function 'kvmppc_e500_tlb_init':arch/powerpc/kvm/e500_mmu.c:923:26: error: assignment to 'structtlbe_priv*' from incompatible pointer type 'structtlbe_ref*' [- Werror=incompatible-pointer-types] 923 | vcpu_e500->gtlb_priv[0] = kzalloc_objs(structtlbe_ref,
| ^arch/powerpc/kvm/e500_mmu.c:928:26: error: assignment to 'structtlbe_priv*' from incompatible pointer type 'structtlbe_ref*' [- Werror=incompatible-pointer-types] 928 | vcpu_e500->gtlb_priv[1] = kzalloc_objs(structtlbe_ref,Temporary solution: #
CONFIG_VIRTUALIZATIONis not set
Quoted 9 lines
Quoted 2 lines
Please solve this issue.
Must be one of:
189f164e573eConvert remaining multi-line kmalloc_obj/flexGFP_KERNELusesbf4afc53b77aConvert 'alloc_obj' family to use the new defaultGFP_KERNELargument69050f8d6d07treewide: Replace kmalloc withkmalloc_objfor non-scalar types
Can you try following change:
arch/powerpc/kvm/e500_mmu.c +2 -2
@@ -920,12 +920,12 @@ int kvmppc_e500_tlb_init(struct kvmppc_vcpu_e500 *vcpu_e500) vcpu_e500->gtlb_offset[0 ] =0 ; vcpu_e500->gtlb_offset[1 ] =KVM_E500_TLB0_SIZE ; - vcpu_e500->gtlb_priv[0] = kzalloc_objs(struct tlbe_ref, + vcpu_e500->gtlb_priv[0] = kzalloc_objs(struct tlbe_priv, vcpu_e500->gtlb_params[0 ].entries);if (!vcpu_e500->gtlb_priv[0 ]) goto free_vcpu; - vcpu_e500->gtlb_priv[1] = kzalloc_objs(struct tlbe_ref, + vcpu_e500->gtlb_priv[1] = kzalloc_objs(struct tlbe_priv, vcpu_e500->gtlb_params[1 ].entries);if (!vcpu_e500->gtlb_priv[1 ]) goto free_vcpu;
---
Christophe
Kees Cook
Reviewed-byRe: [Linux PPC] 7.0-rc1: e500_mmu.c:923:26: error: assignment to 'struct tlbe_priv *' from incompatible pointer type 'struct tlbe_ref *'
Quoted 58 lines · Christophe Leroy (CS GROUP)
Le 23/02/2026 à 19:07, Christophe Leroy (CS GROUP) a écrit :
Quoted 25 lines
+Kees
Hello,
Le 23/02/2026 à 17:48, Christian Zigotzky a écrit :
Quoted 15 lines
Hello,
Compiling issue for e5500 machines for the RC1 of kernel 7.0:
arch/powerpc/kvm/e500_mmu.c: In function 'kvmppc_e500_tlb_init':arch/powerpc/kvm/e500_mmu.c:923:26: error: assignment to 'structtlbe_priv*' from incompatible pointer type 'structtlbe_ref*' [- Werror=incompatible-pointer-types]
923 | vcpu_e500->gtlb_priv[0] = kzalloc_objs(structtlbe_ref, | ^arch/powerpc/kvm/e500_mmu.c:928:26: error: assignment to 'structtlbe_priv*' from incompatible pointer type 'structtlbe_ref*' [- Werror=incompatible-pointer-types]
928 | vcpu_e500->gtlb_priv[1] = kzalloc_objs(structtlbe_ref,Quoted 4 lines
Temporary solution: #
CONFIG_VIRTUALIZATIONis not setPlease solve this issue.
Quoted 8 lines
Must be one of:
189f164e573eConvert remaining multi-line kmalloc_obj/flexGFP_KERNELusesbf4afc53b77aConvert 'alloc_obj' family to use the new defaultGFP_KERNELargument69050f8d6d07treewide: Replace kmalloc withkmalloc_objfor non-scalar typesCan you try following change:
arch/powerpc/kvm/e500_mmu.c +2
-2@@ -920,12 +920,12 @@ int kvmppc_e500_tlb_init(struct kvmppc_vcpu_e500 *vcpu_e500) vcpu_e500->gtlb_offset[0 ] =0 ; vcpu_e500->gtlb_offset[1 ] =KVM_E500_TLB0_SIZE ; - vcpu_e500->gtlb_priv[0] = kzalloc_objs(struct tlbe_ref, + vcpu_e500->gtlb_priv[0] = kzalloc_objs(struct tlbe_priv, vcpu_e500->gtlb_params[0 ].entries);if (!vcpu_e500->gtlb_priv[0 ]) goto free_vcpu; - vcpu_e500->gtlb_priv[1] = kzalloc_objs(struct tlbe_ref, + vcpu_e500->gtlb_priv[1] = kzalloc_objs(struct tlbe_priv, vcpu_e500->gtlb_params[1 ].entries);if (!vcpu_e500->gtlb_priv[1 ])
Quoted 1 line
goto
free_vcpu;
That looks like the correct fix to me. The old type was the correct size, but was just the wrong type. Sorry I missed it when doing my tree-wide multi-arch builds! What build target (or Kconfig) was needed to reach this code?
Thanks!
Signature · 1 line
Kees Cook
Re: [Linux PPC] 7.0-rc1: e500_mmu.c:923:26: error: assignment to 'struct tlbe_priv *' from incompatible pointer type 'struct tlbe_ref *'
Quoted 62 lines · Kees Cook
Quoted 55 lines · Christophe Leroy (CS GROUP)
Le 23/02/2026 à 19:07, Christophe Leroy (CS GROUP) a écrit :
Quoted 24 lines
+Kees
Hello,
Le 23/02/2026 à 17:48, Christian Zigotzky a écrit :
Quoted 15 lines
Hello,
Compiling issue for e5500 machines for the RC1 of kernel 7.0:
arch/powerpc/kvm/e500_mmu.c: In function 'kvmppc_e500_tlb_init':arch/powerpc/kvm/e500_mmu.c:923:26: error: assignment to 'structtlbe_priv*' from incompatible pointer type 'structtlbe_ref*' [- Werror=incompatible-pointer-types]
923 | vcpu_e500->gtlb_priv[0] = kzalloc_objs(structtlbe_ref, | ^arch/powerpc/kvm/e500_mmu.c:928:26: error: assignment to 'structtlbe_priv*' from incompatible pointer type 'structtlbe_ref*' [- Werror=incompatible-pointer-types]
928 | vcpu_e500->gtlb_priv[1] = kzalloc_objs(structtlbe_ref,Quoted 4 lines
Temporary solution: #
CONFIG_VIRTUALIZATIONis not setPlease solve this issue.
Quoted 8 lines
Must be one of:
189f164e573eConvert remaining multi-line kmalloc_obj/flexGFP_KERNELusesbf4afc53b77aConvert 'alloc_obj' family to use the new defaultGFP_KERNELargument69050f8d6d07treewide: Replace kmalloc withkmalloc_objfor non-scalar typesCan you try following change:
arch/powerpc/kvm/e500_mmu.c +2
-2@@ -920,12 +920,12 @@ int kvmppc_e500_tlb_init(struct kvmppc_vcpu_e500 *vcpu_e500) vcpu_e500->gtlb_offset[0 ] =0 ; vcpu_e500->gtlb_offset[1 ] =KVM_E500_TLB0_SIZE ; - vcpu_e500->gtlb_priv[0] = kzalloc_objs(struct tlbe_ref, + vcpu_e500->gtlb_priv[0] = kzalloc_objs(struct tlbe_priv, vcpu_e500->gtlb_params[0 ].entries);if (!vcpu_e500->gtlb_priv[0 ]) goto free_vcpu; - vcpu_e500->gtlb_priv[1] = kzalloc_objs(struct tlbe_ref, + vcpu_e500->gtlb_priv[1] = kzalloc_objs(struct tlbe_priv, vcpu_e500->gtlb_params[1 ].entries);if (!vcpu_e500->gtlb_priv[1 ])Quoted 1 line
goto
free_vcpu;That looks like the correct fix to me. The old type was the correct size, but was just the wrong type. Sorry I missed it when doing my tree-wide multi-arch builds! What build target (or
Kconfig) was needed to reach this code?
Quoted 5 lines
Fixes 69050f8d6d07 ("treewide: Replace kmalloc with kmalloc_obj for non-scalar types")Reviewed-by Kees Cook <[email protected]>Thanks!
It works. Thank you. Tested-by: Christian Zigotzky <[email protected]>
Signature · 1 line
Sent with BrassMonkey 33.9.1 (https://github.com/chzigotzky/Web-Browsers-and-Suites-for-Linux-PPC/releases/tag/BrassMonkey_33.9.1)
Christophe Leroy (CS GROUP)
reviewerRe: [Linux PPC] 7.0-rc1: e500_mmu.c:923:26: error: assignment to 'struct tlbe_priv *' from incompatible pointer type 'struct tlbe_ref *'
In reply to Kees CookLe 23/02/2026 à 23:40, Kees Cook a écrit :
Quoted 55 lines · Christophe Leroy (CS GROUP)
Quoted 54 lines
Le 23/02/2026 à 19:07, Christophe Leroy (CS GROUP) a écrit :
Quoted 25 lines
+Kees
Hello,
Le 23/02/2026 à 17:48, Christian Zigotzky a écrit :
Quoted 15 lines
Hello,
Compiling issue for e5500 machines for the RC1 of kernel 7.0:
arch/powerpc/kvm/e500_mmu.c: In function 'kvmppc_e500_tlb_init':arch/powerpc/kvm/e500_mmu.c:923:26: error: assignment to 'structtlbe_priv*' from incompatible pointer type 'structtlbe_ref*' [- Werror=incompatible-pointer-types]
923 | vcpu_e500->gtlb_priv[0] = kzalloc_objs(structtlbe_ref, | ^arch/powerpc/kvm/e500_mmu.c:928:26: error: assignment to 'structtlbe_priv*' from incompatible pointer type 'structtlbe_ref*' [- Werror=incompatible-pointer-types]
928 | vcpu_e500->gtlb_priv[1] = kzalloc_objs(structtlbe_ref,Quoted 4 lines
Temporary solution: #
CONFIG_VIRTUALIZATIONis not setPlease solve this issue.
Quoted 8 lines
Must be one of:
189f164e573eConvert remaining multi-line kmalloc_obj/flexGFP_KERNELusesbf4afc53b77aConvert 'alloc_obj' family to use the new defaultGFP_KERNELargument69050f8d6d07treewide: Replace kmalloc withkmalloc_objfor non-scalar typesCan you try following change:
arch/powerpc/kvm/e500_mmu.c +1
-1@@ -920,12 +920,12 @@ int kvmppc_e500_tlb_init(struct kvmppc_vcpu_e500 *vcpu_e500) vcpu_e500->gtlb_offset[0 ] =0 ; vcpu_e500->gtlb_offset[1 ] =KVM_E500_TLB0_SIZE ; - vcpu_e500->gtlb_priv[0] = kzalloc_objs(struct tlbe_ref, + vcpu_e500->gtlb_priv[0] = kzalloc_objs(struct tlbe_priv, vcpu_e500->gtlb_params[0 ].entries);if (!vcpu_e500->gtlb_priv[0 ]) goto free_vcpu;
Quoted 10 lines
Quoted 5 lines
arch/powerpc/kvm/e500_mmu.c +1
-1- vcpu_e500->gtlb_priv[1] = kzalloc_objs(struct tlbe_ref, + vcpu_e500->gtlb_priv[1] = kzalloc_objs(struct tlbe_priv, vcpu_e500->gtlb_params[1 ].entries);if (!vcpu_e500->gtlb_priv[1 ])goto
free_vcpu;That looks like the correct fix to me. The old type was the correct size, but was just the wrong type. Sorry I missed it when doing my tree-wide multi-arch builds! What build target (or
Kconfig) was needed to reach this code?
I used ppc64e_defconfig + CONFIG_VIRTUALIZATION=y
+ CONFIG_KVM_E500MC=y
Quoted 6 lines
Fixes 69050f8d6d07 ("treewide: Replace kmalloc with kmalloc_obj for non-scalar types")Reviewed-by Kees Cook <[email protected]>Thanks!
[Linux PPC] Disable PREEMPT
In reply to Shrikanth HegdeHello,
We were previously able to disable PREEMPT in the kernel configuration, but the latest kernels now enable it by default and it is no longer possible to disable it.
Is it possible to let us decide whether to activate PREEMPT or not?
Currently we use the following revert patch for our non-preempt kernels.
kernel/Kconfig.preempt 2026-02-08 21:03:27.000000000 +0000 renamed from kernel/Kconfig.preempt 2026-02-14 10:06:32.000000000 +0000 +0 -0
@@ -16,13 +16,11 @@ config ARCH_HAS_PREEMPT_LAZY
choice
prompt "Preemption Model"
- default PREEMPT_LAZY if ARCH_HAS_PREEMPT_LAZY default PREEMPT_NONE
config PREEMPT_NONE
bool "No Forced Preemption (Server)"
depends on !PREEMPT_RT
- depends on ARCH_NO_PREEMPT
select PREEMPT_NONE_BUILD if !PREEMPT_DYNAMIC
help
This is the traditional Linux preemption model, geared towards @@ -37,7 +35,6 @@ config PREEMPT_NONE
config PREEMPT_VOLUNTARY
bool "Voluntary Kernel Preemption (Desktop)" - depends on !ARCH_HAS_PREEMPT_LAZY
depends on !ARCH_NO_PREEMPT
depends on !PREEMPT_RT
select PREEMPT_VOLUNTARY_BUILD if !PREEMPT_DYNAMIC
---
Thanks in advance,
Christian
Shrikanth Hegde
reviewerRe: [Linux PPC] Disable PREEMPT
Hi Christian.
Is this sent as a patch or just a reply to the thread?
If it is sent as patch, Please follow these guidelines.
https://docs.kernel.org/process/submitting-patches.html
Quoted 26 lines · Christian Zigotzky
Hello,
We were previously able to disable PREEMPT in the kernel configuration, but the latest kernels now enable it by default and it is no longer possible to disable it.
Is it possible to let us decide whether to activate PREEMPT or not?
Currently we use the following revert patch for our non-preempt kernels.
kernel/Kconfig.preempt 2026-02-08 21:03:27.000000000 +0000 renamed from kernel/Kconfig.preempt 2026-02-14 10:06:32.000000000 +0000 +0
-2@@ -16,13 +16,11 @@ config ARCH_HAS_PREEMPT_LAZY choice prompt "Preemption Model" - default PREEMPT_LAZY if ARCH_HAS_PREEMPT_LAZY default PREEMPT_NONE config PREEMPT_NONE bool "No Forced Preemption (Server)" depends on !PREEMPT_RT - depends on ARCH_NO_PREEMPT select PREEMPT_NONE_BUILD if !PREEMPT_DYNAMIC help This is the traditional Linux preemption model, geared towards
kernel/Kconfig.preempt 2026-02-08 21:03:27.000000000 +0000 config PREEMPT_NONE · line 40
Quoted 7 lines
kernel/Kconfig.preempt 2026-02-08 21:03:27.000000000 +0000 renamed from kernel/Kconfig.preempt 2026-02-14 10:06:32.000000000 +0000 +0
-1@@ -37,7 +35,6 @@ config PREEMPT_NONE config PREEMPT_VOLUNTARY bool "Voluntary Kernel Preemption (Desktop)" - depends on !ARCH_HAS_PREEMPT_LAZY depends on !ARCH_NO_PREEMPT depends on !PREEMPT_RT select PREEMPT_VOLUNTARY_BUILD if !PREEMPT_DYNAMIC
I would instead fix any issue we have in PREEMPT FULL/LAZY rather than falling back to old methods.
btw, did the previous patch sent, which you said helps you to boot, can you confirm it did help you? If yes, i can send it as patch, since cond_resched if called from boot cpu might be stuck in the loop forever.
IIRC, after boot, you had some driver causing crash. If so, share backtrace of the crash? If you don't use that driver, is the guest stable?
Christophe Leroy (CS GROUP)
reviewerRe: [Linux PPC] Disable PREEMPT
In reply to Christian Zigotzky+Peter
Hi Christian,
Le 25/02/2026 à 06:54, Christian Zigotzky a écrit :
Quoted 5 lines
Hello,
We were previously able to disable PREEMPT in the kernel configuration, but the latest kernels now enable it by default and it is no longer possible to disable it.
Is it possible to let us decide whether to activate PREEMPT or not?
Can you give more details on why you want to be able to deactivate PREEMPT ?
Read https://github.com/torvalds/linux/commit/7dadeaa6e851e
Quoted 34 lines
Currently we use the following revert patch for our non-preempt kernels.
kernel/Kconfig.preempt 2026-02-08 21:03:27.000000000 +0000 renamed from kernel/Kconfig.preempt 2026-02-14 10:06:32.000000000 +0000 +0
-4@@ -16,13 +16,11 @@ config ARCH_HAS_PREEMPT_LAZY choice prompt "Preemption Model" - default PREEMPT_LAZY if ARCH_HAS_PREEMPT_LAZY default PREEMPT_NONE config PREEMPT_NONE bool "No Forced Preemption (Server)" depends on !PREEMPT_RT - depends on ARCH_NO_PREEMPT select PREEMPT_NONE_BUILD if !PREEMPT_DYNAMIC help This is the traditional Linux preemption model, geared towards@@ -37,7 +35,6 @@ config PREEMPT_NONE config PREEMPT_VOLUNTARY bool "Voluntary Kernel Preemption (Desktop)" - depends on !ARCH_HAS_PREEMPT_LAZY depends on !ARCH_NO_PREEMPT depends on !PREEMPT_RT select PREEMPT_VOLUNTARY_BUILD if !PREEMPT_DYNAMIC ---Thanks in advance,
Christian
Re: [Linux PPC] Disable PREEMPT
Quoted 11 lines · Christophe Leroy (CS GROUP)
+Peter
Hi Christian,
Le 25/02/2026 à 06:54, Christian Zigotzky a écrit :
Quoted 6 lines
Hello,
We were previously able to disable PREEMPT in the kernel configuration, but the latest kernels now enable it by default and it is no longer possible to disable it.
Quoted 5 lines
Quoted 1 line
Is it possible to let us decide whether to activate PREEMPT or not?
Can you give more details on why you want to be able to deactivate PREEMPT ?
Right. So to recap, there are and will be more cases where relying on preemption is mandatory.
The typical example is huge page memset/memcpy. Currently that is done in single page chunks with cond_resched() in between, but it is much better (and faster) to do a full huge page in one go.
Combine this with the endless stream of mostly random cond_resched() placements due to $reason, and it is all a bit of a maintenance nightmare.
I suppose the question is; why do you think you require non-preempt kernels?
[Linux PPC] Disable PREEMPT
In reply to Christophe Leroy (CS GROUP)Quoted 7 lines · Christophe Leroy (CS GROUP)
+Peter
Hi Christian,
Le 25/02/2026 à 06:54, Christian Zigotzky a écrit :
Quoted 2 lines
Hello,
Quoted 7 lines
Quoted 3 lines
We were previously able to disable PREEMPT in the kernel configuration, but the latest kernels now enable it by default and it is no longer possible to disable it.
Is it possible to let us decide whether to activate PREEMPT or not?
Can you give more details on why you want to be able to deactivate PREEMPT ?
I use PREEMPT_NONE kernels on my Linux PPC servers. (Without desktop)
Quoted 37 lines
Quoted 36 lines
Currently we use the following revert patch for our non-preempt kernels.
kernel/Kconfig.preempt 2026-02-08 21:03:27.000000000 +0000 renamed from kernel/Kconfig.preempt 2026-02-14 10:06:32.000000000 +0000 +0
-0@@ -16,13 +16,11 @@ config ARCH_HAS_PREEMPT_LAZYchoice
prompt "Preemption Model"
- defaultPREEMPT_LAZYifARCH_HAS_PREEMPT_LAZYdefaultPREEMPT_NONEconfig
PREEMPT_NONE
bool "No Forced Preemption (Server)"
depends on !PREEMPT_RT
- depends onARCH_NO_PREEMPT
selectPREEMPT_NONE_BUILDif !PREEMPT_DYNAMIC
help
This is the traditional Linux preemption model, geared towardskernel/Kconfig.preempt 2026-02-08 21:03:27.000000000 +0000 renamed from kernel/Kconfig.preempt 2026-02-14 10:06:32.000000000 +0000 +0
-0@@ -37,7 +35,6 @@ config PREEMPT_NONEconfig
PREEMPT_VOLUNTARY
bool "Voluntary Kernel Preemption (Desktop)" - depends on !ARCH_HAS_PREEMPT_LAZY
depends on !ARCH_NO_PREEMPT
depends on !PREEMPT_RT
selectPREEMPT_VOLUNTARY_BUILDif !PREEMPT_DYNAMIC---
Thanks in advance,
Christian
Signature · 1 line
Sent with BrassMonkey 33.9.1 (https://github.com/chzigotzky/Web-Browsers-and-Suites-for-Linux-PPC/releases/tag/BrassMonkey_33.9.1)
Christophe Leroy (CS GROUP)
reviewerRe: [Linux PPC] Disable PREEMPT
Hi Christian,
Le 26/02/2026 à 06:37, Christian Zigotzky a écrit :
Quoted 8 lines · Christophe Leroy (CS GROUP)
Quoted 7 lines
+Peter
Hi Christian,
Le 25/02/2026 à 06:54, Christian Zigotzky a écrit :
Quoted 2 lines
Hello,
Quoted 8 lines
Quoted 7 lines
Quoted 3 lines
We were previously able to disable PREEMPT in the kernel configuration, but the latest kernels now enable it by default and it is no longer possible to disable it.
Is it possible to let us decide whether to activate PREEMPT or not?
Can you give more details on why you want to be able to deactivate PREEMPT ?
Read https://eur01.safelinks.protection.outlook.com/? url=https%3A%2F%2Fgithub.com%2Ftorvalds%2Flinux%2Fcommit%2F7dadeaa6e851e&data=05%7C02%7Cchristophe.leroy2%40cs-soprasteria.com%7C7006c8b4b98c4315a7e508de74f9388a%7C8b87af7d86474dc78df45f69a2011bb5%7C0%7C0%7C639076810956939768%7CUnknown%7CTWFpbGZsb3d8eyJFbXB0eU1hcGkiOnRydWUsIlYiOiIwLjAuMDAwMCIsIlAiOiJXaW4zMiIsIkFOIjoiTWFpbCIsIldUIjoyfQ%3D%3D%7C0%7C%7C%7C&sdata=6xLB%2FOVSkmgZRamaBM9zaxm%2FUTk9ssf4409QJdiXkDg%3D&reserved=0
I use
PREEMPT_NONEkernels on my Linux PPC servers. (Without desktop)
You are doing that today because it is possible. Tomorrow it will not be possible anymore, for the reasons explained by Peter.
My question was not to know what you are doing but why, and why you think you still need PREEMPT_NONE and why the modern PREEMPT_LAZY is not good enough for you.
Christophe
Quoted 39 lines
Quoted 37 lines
Quoted 36 lines
Currently we use the following revert patch for our non-preempt kernels.
kernel/Kconfig.preempt 2026-02-08 21:03:27.000000000 +0000 renamed from kernel/Kconfig.preempt 2026-02-14 10:06:32.000000000 +0000 +0
-0@@ -16,13 +16,11 @@ config ARCH_HAS_PREEMPT_LAZYchoice
prompt "Preemption Model"
- defaultPREEMPT_LAZYifARCH_HAS_PREEMPT_LAZYdefaultPREEMPT_NONEconfig
PREEMPT_NONE
bool "No Forced Preemption (Server)"
depends on !PREEMPT_RT
- depends onARCH_NO_PREEMPT
selectPREEMPT_NONE_BUILDif !PREEMPT_DYNAMIC
help
This is the traditional Linux preemption model, geared towardskernel/Kconfig.preempt 2026-02-08 21:03:27.000000000 +0000 renamed from kernel/Kconfig.preempt 2026-02-14 10:06:32.000000000 +0000 +0
-0@@ -37,7 +35,6 @@ config PREEMPT_NONEconfig
PREEMPT_VOLUNTARY
bool "Voluntary Kernel Preemption (Desktop)" - depends on !ARCH_HAS_PREEMPT_LAZY
depends on !ARCH_NO_PREEMPT
depends on !PREEMPT_RT
selectPREEMPT_VOLUNTARY_BUILDif !PREEMPT_DYNAMIC---
Thanks in advance,
Christian
Re: [Linux PPC] Disable PREEMPT
Quoted 21 lines · Christophe Leroy (CS GROUP)
Hi Christian,
Le 26/02/2026 à 06:37, Christian Zigotzky a écrit :
Quoted 18 lines · Christophe Leroy (CS GROUP)
Quoted 17 lines
+Peter
Hi Christian,
Le 25/02/2026 à 06:54, Christian Zigotzky a écrit :
Quoted 7 lines
Hello,
We were previously able to disable PREEMPT in the kernel configuration, but the latest kernels now enable it by default and it is no longer possible to disable it.
Is it possible to let us decide whether to activate PREEMPT or not?
Can you give more details on why you want to be able to deactivate PREEMPT ?
Read https://eur01.safelinks.protection.outlook.com/? url=https%3A%2F%2Fgithub.com%2Ftorvalds%2Flinux%2Fcommit%2F7dadeaa6e851e&data=05%7C02%7Cchristophe.leroy2%40cs-soprasteria.com%7C7006c8b4b98c4315a7e508de74f9388a%7C8b87af7d86474dc78df45f69a2011bb5%7C0%7C0%7C639076810956939768%7CUnknown%7CTWFpbGZsb3d8eyJFbXB0eU1hcGkiOnRydWUsIlYiOiIwLjAuMDAwMCIsIlAiOiJXaW4zMiIsIkFOIjoiTWFpbCIsIldUIjoyfQ%3D%3D%7C0%7C%7C%7C&sdata=6xLB%2FOVSkmgZRamaBM9zaxm%2FUTk9ssf4409QJdiXkDg%3D&reserved=0
Quoted 8 lines
Quoted 1 line
I use
PREEMPT_NONEkernels on my Linux PPC servers. (Without desktop)You are doing that today because it is possible. Tomorrow it will not be possible anymore, for the reasons explained by Peter.
My question was not to know what you are doing but why, and why you think you still need
PREEMPT_NONEand why the modernPREEMPT_LAZYis not good enough for you.
Hello,
I tried to compile a kernel with preemption for pSeries, and while PREEMPT_VOLUNTARY works for me PREEMPT_LAZY crashes.
The kernel crashing is certainly a reason why a preemtion model would not be good enough for me.
This is not the latest kernel so it might have been fixed in the meantime for the platform in question. Will need to check that.
Nonethless, there are quite a few platforms. Originally no preemption was the only option, and that's the reason why many people run that. It's the conservative, known working option. And that's the reason a lot of platfrom code does not get tested with more aggressive preemtion models, and never gets fixed to work with them.
Simply disabling the no preemtion option does not make the platform code ready.
Thanks
Michal
Quoted 43 lines
Christophe
Quoted 39 lines
Quoted 37 lines
Quoted 36 lines
Currently we use the following revert patch for our non-preempt kernels.
kernel/Kconfig.preempt 2026-02-08 21:03:27.000000000 +0000 renamed from kernel/Kconfig.preempt 2026-02-14 10:06:32.000000000 +0000 +0
-0@@ -16,13 +16,11 @@ config ARCH_HAS_PREEMPT_LAZYchoice
prompt "Preemption Model"
- defaultPREEMPT_LAZYifARCH_HAS_PREEMPT_LAZYdefaultPREEMPT_NONEconfig
PREEMPT_NONE
bool "No Forced Preemption (Server)"
depends on !PREEMPT_RT
- depends onARCH_NO_PREEMPT
selectPREEMPT_NONE_BUILDif !PREEMPT_DYNAMIC
help
This is the traditional Linux preemption model, geared towardskernel/Kconfig.preempt 2026-02-08 21:03:27.000000000 +0000 renamed from kernel/Kconfig.preempt 2026-02-14 10:06:32.000000000 +0000 +0
-0@@ -37,7 +35,6 @@ config PREEMPT_NONEconfig
PREEMPT_VOLUNTARY
bool "Voluntary Kernel Preemption (Desktop)" - depends on !ARCH_HAS_PREEMPT_LAZY
depends on !ARCH_NO_PREEMPT
depends on !PREEMPT_RT
selectPREEMPT_VOLUNTARY_BUILDif !PREEMPT_DYNAMIC---
Thanks in advance,
Christian
Shrikanth Hegde
reviewerRe: [Linux PPC] Disable PREEMPT
Hi Michal.
Quoted 31 lines · Michal Suchánek
Quoted 21 lines · Christophe Leroy (CS GROUP)
Hi Christian,
Le 26/02/2026 à 06:37, Christian Zigotzky a écrit :
Quoted 18 lines · Christophe Leroy (CS GROUP)
Quoted 17 lines
+Peter
Hi Christian,
Le 25/02/2026 à 06:54, Christian Zigotzky a écrit :
Quoted 7 lines
Hello,
We were previously able to disable PREEMPT in the kernel configuration, but the latest kernels now enable it by default and it is no longer possible to disable it.
Is it possible to let us decide whether to activate PREEMPT or not?
Can you give more details on why you want to be able to deactivate PREEMPT ?
Read https://eur01.safelinks.protection.outlook.com/? url=https%3A%2F%2Fgithub.com%2Ftorvalds%2Flinux%2Fcommit%2F7dadeaa6e851e&data=05%7C02%7Cchristophe.leroy2%40cs-soprasteria.com%7C7006c8b4b98c4315a7e508de74f9388a%7C8b87af7d86474dc78df45f69a2011bb5%7C0%7C0%7C639076810956939768%7CUnknown%7CTWFpbGZsb3d8eyJFbXB0eU1hcGkiOnRydWUsIlYiOiIwLjAuMDAwMCIsIlAiOiJXaW4zMiIsIkFOIjoiTWFpbCIsIldUIjoyfQ%3D%3D%7C0%7C%7C%7C&sdata=6xLB%2FOVSkmgZRamaBM9zaxm%2FUTk9ssf4409QJdiXkDg%3D&reserved=0
Quoted 8 lines
Quoted 1 line
I use
PREEMPT_NONEkernels on my Linux PPC servers. (Without desktop)You are doing that today because it is possible. Tomorrow it will not be possible anymore, for the reasons explained by Peter.
My question was not to know what you are doing but why, and why you think you still need
PREEMPT_NONEand why the modernPREEMPT_LAZYis not good enough for you.
Quoted 8 lines
Hello,
I tried to compile a kernel with preemption for pSeries, and while
PREEMPT_VOLUNTARYworks for mePREEMPT_LAZYcrashes.The kernel crashing is certainly a reason why a preemtion model would not be good enough for me.
Is it the same issue that you said the bug which was discussed internally? i.e around kvmhv_run_single_vcpu ? or is it different one?
Quoted 3 lines
This is not the latest kernel so it might have been fixed in the meantime for the platform in question. Will need to check that.
If possible run against current upstream and share the results.
Quoted 6 lines
Nonethless, there are quite a few platforms. Originally no preemption was the only option, and that's the reason why many people run that. It's the conservative, known working option. And that's the reason a lot of platfrom code does not get tested with more aggressive preemtion models, and never gets fixed to work with them.
Full preemption has been there for many years!.
Lazy is not that aggressive compared to that.
Quoted 3 lines
Simply disabling the no preemtion option does not make the platform code ready.
Let's understand your crash case. Let's see where it is going wrong. I am suspecting it is some wrong usage of preemption api rather than arch can't support preemption.
Quoted 47 lines
Thanks
Michal
Quoted 43 lines
Christophe
Quoted 39 lines
Quoted 37 lines
Quoted 36 lines
Currently we use the following revert patch for our non-preempt kernels.
kernel/Kconfig.preempt 2026-02-08 21:03:27.000000000 +0000 renamed from kernel/Kconfig.preempt 2026-02-14 10:06:32.000000000 +0000 +0
-4@@ -16,13 +16,11 @@ config ARCH_HAS_PREEMPT_LAZY choice prompt "Preemption Model" - default PREEMPT_LAZY if ARCH_HAS_PREEMPT_LAZY default PREEMPT_NONE config PREEMPT_NONE bool "No Forced Preemption (Server)" depends on !PREEMPT_RT - depends on ARCH_NO_PREEMPT select PREEMPT_NONE_BUILD if !PREEMPT_DYNAMIC help This is the traditional Linux preemption model, geared towards@@ -37,7 +35,6 @@ config PREEMPT_NONE config PREEMPT_VOLUNTARY bool "Voluntary Kernel Preemption (Desktop)" - depends on !ARCH_HAS_PREEMPT_LAZY depends on !ARCH_NO_PREEMPT depends on !PREEMPT_RT select PREEMPT_VOLUNTARY_BUILD if !PREEMPT_DYNAMIC ---Thanks in advance,
Christian
Re: [Linux PPC] Disable PREEMPT
Quoted 39 lines · Shrikanth Hegde
Hi Michal.
Quoted 36 lines · Michal Suchánek
Quoted 21 lines · Christophe Leroy (CS GROUP)
Hi Christian,
Le 26/02/2026 à 06:37, Christian Zigotzky a écrit :
Quoted 18 lines · Christophe Leroy (CS GROUP)
Quoted 17 lines
+Peter
Hi Christian,
Le 25/02/2026 à 06:54, Christian Zigotzky a écrit :
Quoted 7 lines
Hello,
We were previously able to disable PREEMPT in the kernel configuration, but the latest kernels now enable it by default and it is no longer possible to disable it.
Is it possible to let us decide whether to activate PREEMPT or not?
Can you give more details on why you want to be able to deactivate PREEMPT ?
Read https://eur01.safelinks.protection.outlook.com/? url=https%3A%2F%2Fgithub.com%2Ftorvalds%2Flinux%2Fcommit%2F7dadeaa6e851e&data=05%7C02%7Cchristophe.leroy2%40cs-soprasteria.com%7C7006c8b4b98c4315a7e508de74f9388a%7C8b87af7d86474dc78df45f69a2011bb5%7C0%7C0%7C639076810956939768%7CUnknown%7CTWFpbGZsb3d8eyJFbXB0eU1hcGkiOnRydWUsIlYiOiIwLjAuMDAwMCIsIlAiOiJXaW4zMiIsIkFOIjoiTWFpbCIsIldUIjoyfQ%3D%3D%7C0%7C%7C%7C&sdata=6xLB%2FOVSkmgZRamaBM9zaxm%2FUTk9ssf4409QJdiXkDg%3D&reserved=0
Quoted 8 lines
Quoted 1 line
I use
PREEMPT_NONEkernels on my Linux PPC servers. (Without desktop)You are doing that today because it is possible. Tomorrow it will not be possible anymore, for the reasons explained by Peter.
My question was not to know what you are doing but why, and why you think you still need
PREEMPT_NONEand why the modernPREEMPT_LAZYis not good enough for you.Hello,
I tried to compile a kernel with preemption for pSeries, and while
PREEMPT_VOLUNTARYworks for mePREEMPT_LAZYcrashes.
Quoted 6 lines
Quoted 3 lines
The kernel crashing is certainly a reason why a preemtion model would not be good enough for me.
Is it the same issue that you said the bug which was discussed internally? i.e around
kvmhv_run_single_vcpu? or is it different one?
Right, the very same
Quoted 6 lines
Quoted 4 lines
This is not the latest kernel so it might have been fixed in the meantime for the platform in question. Will need to check that.
If possible run against current upstream and share the results.
[ 472.091531][ T6181] Kernel panic - not syncing: stack-protector: Kernel stack is corrupted in: kvmhv_run_single_vcpu+0x19d4/0x1b50 [kvm_hv] [ 472.091598][ T6181] CPU: 29 UID: 107 PID: 6181 Comm: CPU 112/KVM Not tainted 7.2.2-5.g6824496-default #1 PREEMPT(full) openSUSE Tumbleweed (unreleased) 61871a5f06863b4006f5ef27cd9f18e8a7a2edad [ 472.091612][ T6181] Hardware name: IBM,9824-42A Power11 (architected) 0x820200 0xf000007 of:IBM,FW1110.20 (OB1110_130) hv:phyp pSeries [ 472.091624][ T6181] Call Trace: [ 472.091630][ T6181] [c00000000fdfb680] [c00000000134ce90] dump_stack_lvl+0x84/0xc0 (unreliable) [ 472.091653][ T6181] [c00000000fdfb6b0] [c00000000022e7c8] vpanic+0x324/0x5e4 [ 472.091666][ T6181] [c00000000fdfb760] [c00000000022eac4] do_panic_on_target_cpu+0x0/0x2c [ 472.091677][ T6181] [c00000000fdfb780] [c0000000013c1ff8] __stack_chk_fail+0x48/0x60 [ 472.091689][ T6181] [c00000000fdfb7f0] [c00800001aae219c] kvmhv_run_single_vcpu+0x19d4/0x1b50 [kvm_hv] [ 472.091712][ T6181] [c00000000fdfb940] [c00800001aae24b4] kvmppc_vcpu_run_hv+0x19c/0x12f0 [kvm_hv] [ 472.091732][ T6181] [c00000000fdfba10] [c00800001aeeed18] kvmppc_vcpu_run+0x30/0x48 [kvm] [ 472.091779][ T6181] [c00000000fdfba30] [c00800001aee9ef4] kvm_arch_vcpu_ioctl_run+0x35c/0x4a0 [kvm] [ 472.091813][ T6181] [c00000000fdfbac0] [c00800001aedaac4] kvm_vcpu_ioctl+0x1ac/0xad8 [kvm] [ 472.091844][ T6181] [c00000000fdfbca0] [c0000000007f1244] sys_ioctl+0x374/0x1060 [ 472.091857][ T6181] [c00000000fdfbdb0] [c00000000002f7f8] system_call_exception+0x188/0x430 [ 472.091871][ T6181] [c00000000fdfbe50] [c00000000000cfdc] system_call_vectored_common+0x15c/0x2ec [ 472.091886][ T6181] ---- interrupt: 3000 at 0x7fffb5565fac [ 472.091896][ T6181] NIP: 00007fffb5565fac LR: 00007fffb5565fac CTR: 0000000000000000 [ 472.091904][ T6181] REGS: c00000000fdfbe80 TRAP: 3000 Not tainted (7.2.2-5.g6824496-default) [ 472.091911][ T6181] MSR: 800000000280f033 <SF,VEC,VSX,EE,PR,FP,ME,IR,DR,RI,LE> CR: 42044402 XER: 00000000 [ 472.091938][ T6181] IRQMASK: 0 [ 472.091938][ T6181] GPR00: 0000000000000036 00007fbfa77ed7a0 00007fffb5677100 00000000000000fa [ 472.091938][ T6181] GPR04: 000000002000ae80 0000000000000000 0000000000000000 0000000000000000 [ 472.091938][ T6181] GPR08: 00000000000000fa 0000000000000000 0000000000000000 0000000000000000 [ 472.091938][ T6181] GPR12: 0000000000000000 00007fbfa77f5ec0 000000014676f000 00007fbfa77ee7c0 [ 472.091938][ T6181] GPR16: 000000014674e8d0 00007fbfa77eeec0 00007fbfa77eeec0 fffffffffffffff7 [ 472.091938][ T6181] GPR20: 00007fffb71210d0 0000000000000001 00007fbfa77eeec0 0000000000000000 [ 472.091938][ T6181] GPR24: 00007fbfa77ed8e8 0000000105971428 000000002000ae80 0000000105f77a70 [ 472.091938][ T6181] GPR28: 0000000000000000 0000000000000000 000000002000ae80 000000014674f000 [ 472.092020][ T6181] NIP [00007fffb5565fac] 0x7fffb5565fac [ 472.092027][ T6181] LR [00007fffb5565fac] 0x7fffb5565fac [ 472.092033][ T6181] ---- interrupt: 3000 [ 472.098256][ T6181] pstore: backend (nvram) writing error (-1)
This is the host, cannot run the kernel as guest because it fails to boot most of the time inside KVM.
Quoted 9 lines
Quoted 7 lines
Nonethless, there are quite a few platforms. Originally no preemption was the only option, and that's the reason why many people run that. It's the conservative, known working option. And that's the reason a lot of platfrom code does not get tested with more aggressive preemtion models, and never gets fixed to work with them.
Full preemption has been there for many years!.
Possible for years, forced only recently.
Quoted 8 lines
Lazy is not that aggressive compared to that.
Quoted 3 lines
Simply disabling the no preemtion option does not make the platform code ready.
Let's understand your crash case. Let's see where it is going wrong. I am suspecting it is some wrong usage of preemption api rather than arch can't support preemption.
Very likely some wrong use of the preemption API by the arch code, or no use where it should have been used. It did not matter so long as people could run their no preempt configs and ignore the problem.
Thanks
Michal
Shrikanth Hegde
reviewerRe: [Linux PPC] Disable PREEMPT
Hi Michal.
Quoted 5 lines
Quoted 2 lines
Is it the same issue that you said the bug which was discussed internally? i.e around
kvmhv_run_single_vcpu? or is it different one?Right, the very same
Thanks.
Quoted 43 lines
Quoted 6 lines
Quoted 4 lines
This is not the latest kernel so it might have been fixed in the meantime for the platform in question. Will need to check that.
If possible run against current upstream and share the results.
[ 472.091531][ T6181] Kernel panic - not syncing: stack-protector: Kernel stack is corrupted in: kvmhv_run_single_vcpu+0x19d4/0x1b50 [kvm_hv] [ 472.091598][ T6181] CPU: 29 UID: 107 PID: 6181 Comm: CPU 112/KVM Not tainted 7.2.2-5.g6824496-default #1 PREEMPT(full) openSUSE Tumbleweed (unreleased) 61871a5f06863b4006f5ef27cd9f18e8a7a2edad [ 472.091612][ T6181] Hardware name: IBM,9824-42A Power11 (architected) 0x820200 0xf000007 of:IBM,FW1110.20 (OB1110_130) hv:phyp pSeries [ 472.091624][ T6181] Call Trace: [ 472.091630][ T6181] [c00000000fdfb680] [c00000000134ce90] dump_stack_lvl+0x84/0xc0 (unreliable) [ 472.091653][ T6181] [c00000000fdfb6b0] [c00000000022e7c8] vpanic+0x324/0x5e4 [ 472.091666][ T6181] [c00000000fdfb760] [c00000000022eac4] do_panic_on_target_cpu+0x0/0x2c [ 472.091677][ T6181] [c00000000fdfb780] [c0000000013c1ff8] __stack_chk_fail+0x48/0x60 [ 472.091689][ T6181] [c00000000fdfb7f0] [c00800001aae219c] kvmhv_run_single_vcpu+0x19d4/0x1b50 [kvm_hv] [ 472.091712][ T6181] [c00000000fdfb940] [c00800001aae24b4] kvmppc_vcpu_run_hv+0x19c/0x12f0 [kvm_hv] [ 472.091732][ T6181] [c00000000fdfba10] [c00800001aeeed18] kvmppc_vcpu_run+0x30/0x48 [kvm] [ 472.091779][ T6181] [c00000000fdfba30] [c00800001aee9ef4] kvm_arch_vcpu_ioctl_run+0x35c/0x4a0 [kvm] [ 472.091813][ T6181] [c00000000fdfbac0] [c00800001aedaac4] kvm_vcpu_ioctl+0x1ac/0xad8 [kvm] [ 472.091844][ T6181] [c00000000fdfbca0] [c0000000007f1244] sys_ioctl+0x374/0x1060 [ 472.091857][ T6181] [c00000000fdfbdb0] [c00000000002f7f8] system_call_exception+0x188/0x430 [ 472.091871][ T6181] [c00000000fdfbe50] [c00000000000cfdc] system_call_vectored_common+0x15c/0x2ec [ 472.091886][ T6181] ---- interrupt: 3000 at 0x7fffb5565fac [ 472.091896][ T6181] NIP: 00007fffb5565fac LR: 00007fffb5565fac CTR: 0000000000000000 [ 472.091904][ T6181] REGS: c00000000fdfbe80 TRAP: 3000 Not tainted (7.2.2-5.g6824496-default) [ 472.091911][ T6181] MSR: 800000000280f033 <SF,VEC,VSX,EE,PR,FP,ME,IR,DR,RI,LE> CR: 42044402 XER: 00000000 [ 472.091938][ T6181] IRQMASK: 0 [ 472.091938][ T6181] GPR00: 0000000000000036 00007fbfa77ed7a0 00007fffb5677100 00000000000000fa [ 472.091938][ T6181] GPR04: 000000002000ae80 0000000000000000 0000000000000000 0000000000000000 [ 472.091938][ T6181] GPR08: 00000000000000fa 0000000000000000 0000000000000000 0000000000000000 [ 472.091938][ T6181] GPR12: 0000000000000000 00007fbfa77f5ec0 000000014676f000 00007fbfa77ee7c0 [ 472.091938][ T6181] GPR16: 000000014674e8d0 00007fbfa77eeec0 00007fbfa77eeec0 fffffffffffffff7 [ 472.091938][ T6181] GPR20: 00007fffb71210d0 0000000000000001 00007fbfa77eeec0 0000000000000000 [ 472.091938][ T6181] GPR24: 00007fbfa77ed8e8 0000000105971428 000000002000ae80 0000000105f77a70 [ 472.091938][ T6181] GPR28: 0000000000000000 0000000000000000 000000002000ae80 000000014674f000 [ 472.092020][ T6181] NIP [00007fffb5565fac] 0x7fffb5565fac [ 472.092027][ T6181] LR [00007fffb5565fac] 0x7fffb5565fac [ 472.092033][ T6181] ---- interrupt: 3000 [ 472.098256][ T6181] pstore: backend (nvram) writing error (-1)
Quoted 3 lines
This is the host, cannot run the kernel as guest because it fails to boot most of the time inside KVM.
Will look into. btw the patch shared i.e below patch fixes the boot hanf issue?
https://lore.kernel.org/all/[email protected]/
Quoted 28 lines
Quoted 9 lines
Quoted 7 lines
Nonethless, there are quite a few platforms. Originally no preemption was the only option, and that's the reason why many people run that. It's the conservative, known working option. And that's the reason a lot of platfrom code does not get tested with more aggressive preemtion models, and never gets fixed to work with them.
Full preemption has been there for many years!.
Possible for years, forced only recently.
Quoted 8 lines
Lazy is not that aggressive compared to that.
Quoted 3 lines
Simply disabling the no preemtion option does not make the platform code ready.
Let's understand your crash case. Let's see where it is going wrong. I am suspecting it is some wrong usage of preemption api rather than arch can't support preemption.
Very likely some wrong use of the preemption API by the arch code, or no use where it should have been used. It did not matter so long as people could run their no preempt configs and ignore the problem.
Thanks
Michal
Re: [Linux PPC] Disable PREEMPT
Quoted 44 lines · Shrikanth Hegde
Quoted 44 lines
Quoted 7 lines
Quoted 5 lines
This is not the latest kernel so it might have been fixed in the meantime for the platform in question. Will need to check that.
If possible run against current upstream and share the results.
[ 472.091531][ T6181] Kernel panic - not syncing: stack-protector: Kernel stack is corrupted in: kvmhv_run_single_vcpu+0x19d4/0x1b50 [kvm_hv] [ 472.091598][ T6181] CPU: 29 UID: 107 PID: 6181 Comm: CPU 112/KVM Not tainted 7.2.2-5.g6824496-default #1 PREEMPT(full) openSUSE Tumbleweed (unreleased) 61871a5f06863b4006f5ef27cd9f18e8a7a2edad [ 472.091612][ T6181] Hardware name: IBM,9824-42A Power11 (architected) 0x820200 0xf000007 of:IBM,FW1110.20 (OB1110_130) hv:phyp pSeries [ 472.091624][ T6181] Call Trace: [ 472.091630][ T6181] [c00000000fdfb680] [c00000000134ce90] dump_stack_lvl+0x84/0xc0 (unreliable) [ 472.091653][ T6181] [c00000000fdfb6b0] [c00000000022e7c8] vpanic+0x324/0x5e4 [ 472.091666][ T6181] [c00000000fdfb760] [c00000000022eac4] do_panic_on_target_cpu+0x0/0x2c [ 472.091677][ T6181] [c00000000fdfb780] [c0000000013c1ff8] __stack_chk_fail+0x48/0x60 [ 472.091689][ T6181] [c00000000fdfb7f0] [c00800001aae219c] kvmhv_run_single_vcpu+0x19d4/0x1b50 [kvm_hv] [ 472.091712][ T6181] [c00000000fdfb940] [c00800001aae24b4] kvmppc_vcpu_run_hv+0x19c/0x12f0 [kvm_hv] [ 472.091732][ T6181] [c00000000fdfba10] [c00800001aeeed18] kvmppc_vcpu_run+0x30/0x48 [kvm] [ 472.091779][ T6181] [c00000000fdfba30] [c00800001aee9ef4] kvm_arch_vcpu_ioctl_run+0x35c/0x4a0 [kvm] [ 472.091813][ T6181] [c00000000fdfbac0] [c00800001aedaac4] kvm_vcpu_ioctl+0x1ac/0xad8 [kvm] [ 472.091844][ T6181] [c00000000fdfbca0] [c0000000007f1244] sys_ioctl+0x374/0x1060 [ 472.091857][ T6181] [c00000000fdfbdb0] [c00000000002f7f8] system_call_exception+0x188/0x430 [ 472.091871][ T6181] [c00000000fdfbe50] [c00000000000cfdc] system_call_vectored_common+0x15c/0x2ec [ 472.091886][ T6181] ---- interrupt: 3000 at 0x7fffb5565fac [ 472.091896][ T6181] NIP: 00007fffb5565fac LR: 00007fffb5565fac CTR: 0000000000000000 [ 472.091904][ T6181] REGS: c00000000fdfbe80 TRAP: 3000 Not tainted (7.2.2-5.g6824496-default) [ 472.091911][ T6181] MSR: 800000000280f033 <SF,VEC,VSX,EE,PR,FP,ME,IR,DR,RI,LE> CR: 42044402 XER: 00000000 [ 472.091938][ T6181] IRQMASK: 0 [ 472.091938][ T6181] GPR00: 0000000000000036 00007fbfa77ed7a0 00007fffb5677100 00000000000000fa [ 472.091938][ T6181] GPR04: 000000002000ae80 0000000000000000 0000000000000000 0000000000000000 [ 472.091938][ T6181] GPR08: 00000000000000fa 0000000000000000 0000000000000000 0000000000000000 [ 472.091938][ T6181] GPR12: 0000000000000000 00007fbfa77f5ec0 000000014676f000 00007fbfa77ee7c0 [ 472.091938][ T6181] GPR16: 000000014674e8d0 00007fbfa77eeec0 00007fbfa77eeec0 fffffffffffffff7 [ 472.091938][ T6181] GPR20: 00007fffb71210d0 0000000000000001 00007fbfa77eeec0 0000000000000000 [ 472.091938][ T6181] GPR24: 00007fbfa77ed8e8 0000000105971428 000000002000ae80 0000000105f77a70 [ 472.091938][ T6181] GPR28: 0000000000000000 0000000000000000 000000002000ae80 000000014674f000 [ 472.092020][ T6181] NIP [00007fffb5565fac] 0x7fffb5565fac [ 472.092027][ T6181] LR [00007fffb5565fac] 0x7fffb5565fac [ 472.092033][ T6181] ---- interrupt: 3000 [ 472.098256][ T6181] pstore: backend (nvram) writing error (-1)
Quoted 7 lines
Quoted 3 lines
This is the host, cannot run the kernel as guest because it fails to boot most of the time inside KVM.
Will look into. btw the patch shared i.e below patch fixes the boot hanf issue?
I would not bet on that. It looks like host side patch, and the problem is with booting 7.2.2 as guest. Some 6.12 frankenkernel can be booted on the same host, and used to produce the crash above by running a kernel build inside the guest.
Thanks
Michal
Shrikanth Hegde
reviewerRe: [Linux PPC] Disable PREEMPT
Hi Michal.
Quoted 46 lines · Michal Suchánek
Quoted 44 lines · Shrikanth Hegde
Quoted 44 lines
Quoted 7 lines
Quoted 5 lines
This is not the latest kernel so it might have been fixed in the meantime for the platform in question. Will need to check that.
If possible run against current upstream and share the results.
[ 472.091531][ T6181] Kernel panic - not syncing: stack-protector: Kernel stack is corrupted in: kvmhv_run_single_vcpu+0x19d4/0x1b50 [kvm_hv] [ 472.091598][ T6181] CPU: 29 UID: 107 PID: 6181 Comm: CPU 112/KVM Not tainted 7.2.2-5.g6824496-default #1 PREEMPT(full) openSUSE Tumbleweed (unreleased) 61871a5f06863b4006f5ef27cd9f18e8a7a2edad [ 472.091612][ T6181] Hardware name: IBM,9824-42A Power11 (architected) 0x820200 0xf000007 of:IBM,FW1110.20 (OB1110_130) hv:phyp pSeries [ 472.091624][ T6181] Call Trace: [ 472.091630][ T6181] [c00000000fdfb680] [c00000000134ce90] dump_stack_lvl+0x84/0xc0 (unreliable) [ 472.091653][ T6181] [c00000000fdfb6b0] [c00000000022e7c8] vpanic+0x324/0x5e4 [ 472.091666][ T6181] [c00000000fdfb760] [c00000000022eac4] do_panic_on_target_cpu+0x0/0x2c [ 472.091677][ T6181] [c00000000fdfb780] [c0000000013c1ff8] __stack_chk_fail+0x48/0x60 [ 472.091689][ T6181] [c00000000fdfb7f0] [c00800001aae219c] kvmhv_run_single_vcpu+0x19d4/0x1b50 [kvm_hv] [ 472.091712][ T6181] [c00000000fdfb940] [c00800001aae24b4] kvmppc_vcpu_run_hv+0x19c/0x12f0 [kvm_hv] [ 472.091732][ T6181] [c00000000fdfba10] [c00800001aeeed18] kvmppc_vcpu_run+0x30/0x48 [kvm] [ 472.091779][ T6181] [c00000000fdfba30] [c00800001aee9ef4] kvm_arch_vcpu_ioctl_run+0x35c/0x4a0 [kvm] [ 472.091813][ T6181] [c00000000fdfbac0] [c00800001aedaac4] kvm_vcpu_ioctl+0x1ac/0xad8 [kvm] [ 472.091844][ T6181] [c00000000fdfbca0] [c0000000007f1244] sys_ioctl+0x374/0x1060 [ 472.091857][ T6181] [c00000000fdfbdb0] [c00000000002f7f8] system_call_exception+0x188/0x430 [ 472.091871][ T6181] [c00000000fdfbe50] [c00000000000cfdc] system_call_vectored_common+0x15c/0x2ec [ 472.091886][ T6181] ---- interrupt: 3000 at 0x7fffb5565fac [ 472.091896][ T6181] NIP: 00007fffb5565fac LR: 00007fffb5565fac CTR: 0000000000000000 [ 472.091904][ T6181] REGS: c00000000fdfbe80 TRAP: 3000 Not tainted (7.2.2-5.g6824496-default) [ 472.091911][ T6181] MSR: 800000000280f033 <SF,VEC,VSX,EE,PR,FP,ME,IR,DR,RI,LE> CR: 42044402 XER: 00000000 [ 472.091938][ T6181] IRQMASK: 0 [ 472.091938][ T6181] GPR00: 0000000000000036 00007fbfa77ed7a0 00007fffb5677100 00000000000000fa [ 472.091938][ T6181] GPR04: 000000002000ae80 0000000000000000 0000000000000000 0000000000000000 [ 472.091938][ T6181] GPR08: 00000000000000fa 0000000000000000 0000000000000000 0000000000000000 [ 472.091938][ T6181] GPR12: 0000000000000000 00007fbfa77f5ec0 000000014676f000 00007fbfa77ee7c0 [ 472.091938][ T6181] GPR16: 000000014674e8d0 00007fbfa77eeec0 00007fbfa77eeec0 fffffffffffffff7 [ 472.091938][ T6181] GPR20: 00007fffb71210d0 0000000000000001 00007fbfa77eeec0 0000000000000000 [ 472.091938][ T6181] GPR24: 00007fbfa77ed8e8 0000000105971428 000000002000ae80 0000000105f77a70 [ 472.091938][ T6181] GPR28: 0000000000000000 0000000000000000 000000002000ae80 000000014674f000 [ 472.092020][ T6181] NIP [00007fffb5565fac] 0x7fffb5565fac [ 472.092027][ T6181] LR [00007fffb5565fac] 0x7fffb5565fac [ 472.092033][ T6181] ---- interrupt: 3000 [ 472.098256][ T6181] pstore: backend (nvram) writing error (-1)
Quoted 8 lines
Quoted 7 lines
Quoted 3 lines
This is the host, cannot run the kernel as guest because it fails to boot most of the time inside KVM.
Will look into. btw the patch shared i.e below patch fixes the boot hanf issue?
I see code has changed a bit. So this patch is not correct anymore. Sorry, i should have checked.
Quoted 5 lines
I would not bet on that. It looks like host side patch, and the problem is with booting 7.2.2 as guest. Some 6.12 frankenkernel can be booted on the same host, and used to produce the crash above by running a kernel build inside the guest.
I didn't get what you are saying. Could you see if it regression only in 7.2? Does 7.1 works fine? If it is regression could you see if it is bisectable? Also, could you share the repro steps?
Let me add harsh. He would know more on this.
Quoted 3 lines
Thanks
Michal
Re: [Linux PPC] Disable PREEMPT
Quoted 67 lines · Shrikanth Hegde
Hi Michal.
Quoted 46 lines · Michal Suchánek
Quoted 44 lines · Shrikanth Hegde
Quoted 44 lines
Quoted 7 lines
Quoted 5 lines
This is not the latest kernel so it might have been fixed in the meantime for the platform in question. Will need to check that.
If possible run against current upstream and share the results.
[ 472.091531][ T6181] Kernel panic - not syncing: stack-protector: Kernel stack is corrupted in: kvmhv_run_single_vcpu+0x19d4/0x1b50 [kvm_hv] [ 472.091598][ T6181] CPU: 29 UID: 107 PID: 6181 Comm: CPU 112/KVM Not tainted 7.2.2-5.g6824496-default #1 PREEMPT(full) openSUSE Tumbleweed (unreleased) 61871a5f06863b4006f5ef27cd9f18e8a7a2edad [ 472.091612][ T6181] Hardware name: IBM,9824-42A Power11 (architected) 0x820200 0xf000007 of:IBM,FW1110.20 (OB1110_130) hv:phyp pSeries [ 472.091624][ T6181] Call Trace: [ 472.091630][ T6181] [c00000000fdfb680] [c00000000134ce90] dump_stack_lvl+0x84/0xc0 (unreliable) [ 472.091653][ T6181] [c00000000fdfb6b0] [c00000000022e7c8] vpanic+0x324/0x5e4 [ 472.091666][ T6181] [c00000000fdfb760] [c00000000022eac4] do_panic_on_target_cpu+0x0/0x2c [ 472.091677][ T6181] [c00000000fdfb780] [c0000000013c1ff8] __stack_chk_fail+0x48/0x60 [ 472.091689][ T6181] [c00000000fdfb7f0] [c00800001aae219c] kvmhv_run_single_vcpu+0x19d4/0x1b50 [kvm_hv] [ 472.091712][ T6181] [c00000000fdfb940] [c00800001aae24b4] kvmppc_vcpu_run_hv+0x19c/0x12f0 [kvm_hv] [ 472.091732][ T6181] [c00000000fdfba10] [c00800001aeeed18] kvmppc_vcpu_run+0x30/0x48 [kvm] [ 472.091779][ T6181] [c00000000fdfba30] [c00800001aee9ef4] kvm_arch_vcpu_ioctl_run+0x35c/0x4a0 [kvm] [ 472.091813][ T6181] [c00000000fdfbac0] [c00800001aedaac4] kvm_vcpu_ioctl+0x1ac/0xad8 [kvm] [ 472.091844][ T6181] [c00000000fdfbca0] [c0000000007f1244] sys_ioctl+0x374/0x1060 [ 472.091857][ T6181] [c00000000fdfbdb0] [c00000000002f7f8] system_call_exception+0x188/0x430 [ 472.091871][ T6181] [c00000000fdfbe50] [c00000000000cfdc] system_call_vectored_common+0x15c/0x2ec [ 472.091886][ T6181] ---- interrupt: 3000 at 0x7fffb5565fac [ 472.091896][ T6181] NIP: 00007fffb5565fac LR: 00007fffb5565fac CTR: 0000000000000000 [ 472.091904][ T6181] REGS: c00000000fdfbe80 TRAP: 3000 Not tainted (7.2.2-5.g6824496-default) [ 472.091911][ T6181] MSR: 800000000280f033 <SF,VEC,VSX,EE,PR,FP,ME,IR,DR,RI,LE> CR: 42044402 XER: 00000000 [ 472.091938][ T6181] IRQMASK: 0 [ 472.091938][ T6181] GPR00: 0000000000000036 00007fbfa77ed7a0 00007fffb5677100 00000000000000fa [ 472.091938][ T6181] GPR04: 000000002000ae80 0000000000000000 0000000000000000 0000000000000000 [ 472.091938][ T6181] GPR08: 00000000000000fa 0000000000000000 0000000000000000 0000000000000000 [ 472.091938][ T6181] GPR12: 0000000000000000 00007fbfa77f5ec0 000000014676f000 00007fbfa77ee7c0 [ 472.091938][ T6181] GPR16: 000000014674e8d0 00007fbfa77eeec0 00007fbfa77eeec0 fffffffffffffff7 [ 472.091938][ T6181] GPR20: 00007fffb71210d0 0000000000000001 00007fbfa77eeec0 0000000000000000 [ 472.091938][ T6181] GPR24: 00007fbfa77ed8e8 0000000105971428 000000002000ae80 0000000105f77a70 [ 472.091938][ T6181] GPR28: 0000000000000000 0000000000000000 000000002000ae80 000000014674f000 [ 472.092020][ T6181] NIP [00007fffb5565fac] 0x7fffb5565fac [ 472.092027][ T6181] LR [00007fffb5565fac] 0x7fffb5565fac [ 472.092033][ T6181] ---- interrupt: 3000 [ 472.098256][ T6181] pstore: backend (nvram) writing error (-1)Quoted 8 lines
Quoted 7 lines
Quoted 3 lines
This is the host, cannot run the kernel as guest because it fails to boot most of the time inside KVM.
Will look into. btw the patch shared i.e below patch fixes the boot hanf issue?
I see code has changed a bit. So this patch is not correct anymore. Sorry, i should have checked.
Quoted 5 lines
I would not bet on that. It looks like host side patch, and the problem is with booting 7.2.2 as guest. Some 6.12 frankenkernel can be booted on the same host, and used to produce the crash above by running a kernel build inside the guest.
Quoted 3 lines
I didn't get what you are saying. Could you see if it regression only in 7.2? Does 7.1 works fine? If it is regression could you see if it is bisectable? Also, could you share the repro steps?
The repro steps are: on a mid-size LPAR (120 CPU threads, 256G RAM) create a KVM VM that uses all host resources. Run kernel build inside KVM VM, using all CPUs. In about a minute the host crashes with the above a or similar trace. I don't have any kernel version with aggressive preemption enabled that does not suffer from this problem.
There is another problem that Linux 7.2.2 often locks up on boot inside the guest, and as a result a different kernel is needed in the guest to reproduce the host crash. This is more recent, linux 6.12 does not have this problem. Will try some different kernel combinations to see if I can narrow this down. For this the repro is merely booting the kernel in the VM, it typically fails early before userspace produces any messages.
Thanks
Michal
Re: [Linux PPC] Disable PREEMPT
+ Amit, Gautam - since they recently came across a similar regression which is seen with non KVM workload as well.
+ Venkat - for CI improvement suggestion below.
Hi Michal,
Quoted 72 lines · Michal Suchánek
Quoted 67 lines · Shrikanth Hegde
Hi Michal.
Quoted 46 lines · Michal Suchánek
Quoted 44 lines · Shrikanth Hegde
Quoted 44 lines
Quoted 7 lines
Quoted 5 lines
This is not the latest kernel so it might have been fixed in the meantime for the platform in question. Will need to check that.
If possible run against current upstream and share the results.
[ 472.091531][ T6181] Kernel panic - not syncing: stack-protector: Kernel stack is corrupted in: kvmhv_run_single_vcpu+0x19d4/0x1b50 [kvm_hv] [ 472.091598][ T6181] CPU: 29 UID: 107 PID: 6181 Comm: CPU 112/KVM Not tainted 7.2.2-5.g6824496-default #1 PREEMPT(full) openSUSE Tumbleweed (unreleased) 61871a5f06863b4006f5ef27cd9f18e8a7a2edad [ 472.091612][ T6181] Hardware name: IBM,9824-42A Power11 (architected) 0x820200 0xf000007 of:IBM,FW1110.20 (OB1110_130) hv:phyp pSeries [ 472.091624][ T6181] Call Trace: [ 472.091630][ T6181] [c00000000fdfb680] [c00000000134ce90] dump_stack_lvl+0x84/0xc0 (unreliable) [ 472.091653][ T6181] [c00000000fdfb6b0] [c00000000022e7c8] vpanic+0x324/0x5e4 [ 472.091666][ T6181] [c00000000fdfb760] [c00000000022eac4] do_panic_on_target_cpu+0x0/0x2c [ 472.091677][ T6181] [c00000000fdfb780] [c0000000013c1ff8] __stack_chk_fail+0x48/0x60 [ 472.091689][ T6181] [c00000000fdfb7f0] [c00800001aae219c] kvmhv_run_single_vcpu+0x19d4/0x1b50 [kvm_hv] [ 472.091712][ T6181] [c00000000fdfb940] [c00800001aae24b4] kvmppc_vcpu_run_hv+0x19c/0x12f0 [kvm_hv] [ 472.091732][ T6181] [c00000000fdfba10] [c00800001aeeed18] kvmppc_vcpu_run+0x30/0x48 [kvm] [ 472.091779][ T6181] [c00000000fdfba30] [c00800001aee9ef4] kvm_arch_vcpu_ioctl_run+0x35c/0x4a0 [kvm] [ 472.091813][ T6181] [c00000000fdfbac0] [c00800001aedaac4] kvm_vcpu_ioctl+0x1ac/0xad8 [kvm] [ 472.091844][ T6181] [c00000000fdfbca0] [c0000000007f1244] sys_ioctl+0x374/0x1060 [ 472.091857][ T6181] [c00000000fdfbdb0] [c00000000002f7f8] system_call_exception+0x188/0x430 [ 472.091871][ T6181] [c00000000fdfbe50] [c00000000000cfdc] system_call_vectored_common+0x15c/0x2ec [ 472.091886][ T6181] ---- interrupt: 3000 at 0x7fffb5565fac [ 472.091896][ T6181] NIP: 00007fffb5565fac LR: 00007fffb5565fac CTR: 0000000000000000 [ 472.091904][ T6181] REGS: c00000000fdfbe80 TRAP: 3000 Not tainted (7.2.2-5.g6824496-default) [ 472.091911][ T6181] MSR: 800000000280f033 <SF,VEC,VSX,EE,PR,FP,ME,IR,DR,RI,LE> CR: 42044402 XER: 00000000 [ 472.091938][ T6181] IRQMASK: 0 [ 472.091938][ T6181] GPR00: 0000000000000036 00007fbfa77ed7a0 00007fffb5677100 00000000000000fa [ 472.091938][ T6181] GPR04: 000000002000ae80 0000000000000000 0000000000000000 0000000000000000 [ 472.091938][ T6181] GPR08: 00000000000000fa 0000000000000000 0000000000000000 0000000000000000 [ 472.091938][ T6181] GPR12: 0000000000000000 00007fbfa77f5ec0 000000014676f000 00007fbfa77ee7c0 [ 472.091938][ T6181] GPR16: 000000014674e8d0 00007fbfa77eeec0 00007fbfa77eeec0 fffffffffffffff7 [ 472.091938][ T6181] GPR20: 00007fffb71210d0 0000000000000001 00007fbfa77eeec0 0000000000000000 [ 472.091938][ T6181] GPR24: 00007fbfa77ed8e8 0000000105971428 000000002000ae80 0000000105f77a70 [ 472.091938][ T6181] GPR28: 0000000000000000 0000000000000000 000000002000ae80 000000014674f000 [ 472.092020][ T6181] NIP [00007fffb5565fac] 0x7fffb5565fac [ 472.092027][ T6181] LR [00007fffb5565fac] 0x7fffb5565fac [ 472.092033][ T6181] ---- interrupt: 3000 [ 472.098256][ T6181] pstore: backend (nvram) writing error (-1)Quoted 8 lines
Quoted 7 lines
Quoted 3 lines
This is the host, cannot run the kernel as guest because it fails to boot most of the time inside KVM.
Will look into. btw the patch shared i.e below patch fixes the boot hanf issue?
I see code has changed a bit. So this patch is not correct anymore. Sorry, i should have checked.
Quoted 5 lines
I would not bet on that. It looks like host side patch, and the problem is with booting 7.2.2 as guest. Some 6.12 frankenkernel can be booted on the same host, and used to produce the crash above by running a kernel build inside the guest.
Quoted 3 lines
I didn't get what you are saying. Could you see if it regression only in 7.2? Does 7.1 works fine? If it is regression could you see if it is bisectable? Also, could you share the repro steps?
Quoted 5 lines
The repro steps are: on a mid-size LPAR (120 CPU threads, 256G RAM) create a KVM VM that uses all host resources. Run kernel build inside KVM VM, using all CPUs. In about a minute the host crashes with the above a or similar trace. I don't have any kernel version with aggressive preemption enabled that does not suffer from this problem.
Looks like seen under heavy workloads when you say "KVM VM that uses all host rsources". Could you please confirm if the issue is seen with any other heavy workload also which consumes all host resources? I do not think we recently had any PPC KVM specific changes which would cause this. Also, if it's a regression, git bisect should point out the real culprit.
Venkat,
Can we include such a test case in upstream CI as well?
regards,
Harsh
Quoted 11 lines
There is another problem that Linux 7.2.2 often locks up on boot inside the guest, and as a result a different kernel is needed in the guest to reproduce the host crash. This is more recent, linux 6.12 does not have this problem. Will try some different kernel combinations to see if I can narrow this down. For this the repro is merely booting the kernel in the VM, it typically fails early before userspace produces any messages.
Thanks
Michal
Re: [Linux PPC] Disable PREEMPT
Quoted 85 lines · Harsh Prateek Bora
+ Amit, Gautam - since they recently came across a similar regression which is seen with non KVM workload as well.
+ Venkat - for CI improvement suggestion below.Hi Michal,
Quoted 72 lines · Michal Suchánek
Quoted 67 lines · Shrikanth Hegde
Hi Michal.
Quoted 46 lines · Michal Suchánek
Quoted 44 lines · Shrikanth Hegde
Quoted 44 lines
Quoted 7 lines
Quoted 5 lines
This is not the latest kernel so it might have been fixed in the meantime for the platform in question. Will need to check that.
If possible run against current upstream and share the results.
[ 472.091531][ T6181] Kernel panic - not syncing: stack-protector: Kernel stack is corrupted in: kvmhv_run_single_vcpu+0x19d4/0x1b50 [kvm_hv] [ 472.091598][ T6181] CPU: 29 UID: 107 PID: 6181 Comm: CPU 112/KVM Not tainted 7.2.2-5.g6824496-default #1 PREEMPT(full) openSUSE Tumbleweed (unreleased) 61871a5f06863b4006f5ef27cd9f18e8a7a2edad [ 472.091612][ T6181] Hardware name: IBM,9824-42A Power11 (architected) 0x820200 0xf000007 of:IBM,FW1110.20 (OB1110_130) hv:phyp pSeries [ 472.091624][ T6181] Call Trace: [ 472.091630][ T6181] [c00000000fdfb680] [c00000000134ce90] dump_stack_lvl+0x84/0xc0 (unreliable) [ 472.091653][ T6181] [c00000000fdfb6b0] [c00000000022e7c8] vpanic+0x324/0x5e4 [ 472.091666][ T6181] [c00000000fdfb760] [c00000000022eac4] do_panic_on_target_cpu+0x0/0x2c [ 472.091677][ T6181] [c00000000fdfb780] [c0000000013c1ff8] __stack_chk_fail+0x48/0x60 [ 472.091689][ T6181] [c00000000fdfb7f0] [c00800001aae219c] kvmhv_run_single_vcpu+0x19d4/0x1b50 [kvm_hv] [ 472.091712][ T6181] [c00000000fdfb940] [c00800001aae24b4] kvmppc_vcpu_run_hv+0x19c/0x12f0 [kvm_hv] [ 472.091732][ T6181] [c00000000fdfba10] [c00800001aeeed18] kvmppc_vcpu_run+0x30/0x48 [kvm] [ 472.091779][ T6181] [c00000000fdfba30] [c00800001aee9ef4] kvm_arch_vcpu_ioctl_run+0x35c/0x4a0 [kvm] [ 472.091813][ T6181] [c00000000fdfbac0] [c00800001aedaac4] kvm_vcpu_ioctl+0x1ac/0xad8 [kvm] [ 472.091844][ T6181] [c00000000fdfbca0] [c0000000007f1244] sys_ioctl+0x374/0x1060 [ 472.091857][ T6181] [c00000000fdfbdb0] [c00000000002f7f8] system_call_exception+0x188/0x430 [ 472.091871][ T6181] [c00000000fdfbe50] [c00000000000cfdc] system_call_vectored_common+0x15c/0x2ec [ 472.091886][ T6181] ---- interrupt: 3000 at 0x7fffb5565fac [ 472.091896][ T6181] NIP: 00007fffb5565fac LR: 00007fffb5565fac CTR: 0000000000000000 [ 472.091904][ T6181] REGS: c00000000fdfbe80 TRAP: 3000 Not tainted (7.2.2-5.g6824496-default) [ 472.091911][ T6181] MSR: 800000000280f033 <SF,VEC,VSX,EE,PR,FP,ME,IR,DR,RI,LE> CR: 42044402 XER: 00000000 [ 472.091938][ T6181] IRQMASK: 0 [ 472.091938][ T6181] GPR00: 0000000000000036 00007fbfa77ed7a0 00007fffb5677100 00000000000000fa [ 472.091938][ T6181] GPR04: 000000002000ae80 0000000000000000 0000000000000000 0000000000000000 [ 472.091938][ T6181] GPR08: 00000000000000fa 0000000000000000 0000000000000000 0000000000000000 [ 472.091938][ T6181] GPR12: 0000000000000000 00007fbfa77f5ec0 000000014676f000 00007fbfa77ee7c0 [ 472.091938][ T6181] GPR16: 000000014674e8d0 00007fbfa77eeec0 00007fbfa77eeec0 fffffffffffffff7 [ 472.091938][ T6181] GPR20: 00007fffb71210d0 0000000000000001 00007fbfa77eeec0 0000000000000000 [ 472.091938][ T6181] GPR24: 00007fbfa77ed8e8 0000000105971428 000000002000ae80 0000000105f77a70 [ 472.091938][ T6181] GPR28: 0000000000000000 0000000000000000 000000002000ae80 000000014674f000 [ 472.092020][ T6181] NIP [00007fffb5565fac] 0x7fffb5565fac [ 472.092027][ T6181] LR [00007fffb5565fac] 0x7fffb5565fac [ 472.092033][ T6181] ---- interrupt: 3000 [ 472.098256][ T6181] pstore: backend (nvram) writing error (-1)Quoted 8 lines
Quoted 7 lines
Quoted 3 lines
This is the host, cannot run the kernel as guest because it fails to boot most of the time inside KVM.
Will look into. btw the patch shared i.e below patch fixes the boot hanf issue?
I see code has changed a bit. So this patch is not correct anymore. Sorry, i should have checked.
Quoted 5 lines
I would not bet on that. It looks like host side patch, and the problem is with booting 7.2.2 as guest. Some 6.12 frankenkernel can be booted on the same host, and used to produce the crash above by running a kernel build inside the guest.
Quoted 3 lines
I didn't get what you are saying. Could you see if it regression only in 7.2? Does 7.1 works fine? If it is regression could you see if it is bisectable? Also, could you share the repro steps?
Quoted 5 lines
The repro steps are: on a mid-size LPAR (120 CPU threads, 256G RAM) create a KVM VM that uses all host resources. Run kernel build inside KVM VM, using all CPUs. In about a minute the host crashes with the above a or similar trace. I don't have any kernel version with aggressive preemption enabled that does not suffer from this problem.
Quoted 5 lines
Looks like seen under heavy workloads when you say "KVM VM that uses all host rsources". Could you please confirm if the issue is seen with any other heavy workload also which consumes all host resources? I do not think we recently had any PPC KVM specific changes which would cause this. Also, if it's a regression, git bisect should point out the real culprit.
It's a regression from switching to PREEMPT_LAZY (from PREEMPT_VOLUNTARY). Very likely the code was buggy to start with but because less aggressive preemption model was used the bug was never triggered. I cannot reproduce this under load without KVM. The other problem that is much harder to reproduce is machine locking up while idling. A dump then also shows stack corruption with completely but different stack trace, no KVM involved in that one. Did not see this with recent mainline yet.
I do get a problem with 7.2.2 building a kernel outside of kVM but that's probably because it's missing some of the recent entry fixes:
[ 5451.821931] [ T77619] as[77619]: segfault (11) at 3abd0 nip 7fff8fe56434 lr 7fff8fe55348 code 1 in ld64.so.2[36434,7fff8fe20000+60000]
[ 5451.821967] [ T77619] as[77619]: code: 60000000 60000000 60000000 f9490008 f9490010 39290020 f949fff8 f9490000
[ 5451.821973] [ T77619] as[77619]: code: 4200ffec 89210376 3d42ffff 394a7ea0 <e9028000> 7d081050 f9410030 f9010020
[ 5454.239768] [ T78922] awk[78922]: segfault (11) at 3abd0 nip 7fff8c386434 lr 7fff8c385348 code 1 in ld64.so.2[36434,7fff8c350000+60000]
[ 5454.239809] [ T78922] awk[78922]: code: 60000000 60000000 60000000 f9490008 f9490010 39290020 f949fff8 f9490000
[ 5454.239815] [ T78922] awk[78922]: code: 4200ffec 89210376 3d42ffff 394a7ea0 <e9028000> 7d081050 f9410030 f9010020
[ 5465.056566] [ T85518] sh[85518]: segfault (11) at 3abd0 nip 7fffb79a6434 lr 7fffb79a5348 code 1 in ld64.so.2[36434,7fffb7970000+60000]
[ 5465.056611] [ T85518] sh[85518]: code: 60000000 60000000 60000000 f9490008 f9490010 39290020 f949fff8 f9490000
[ 5465.056616] [ T85518] sh[85518]: code: 4200ffec 89210376 3d42ffff 394a7ea0 <e9028000> 7d081050 f9410030 f9010020
[ 5474.995476] [ T91034] Kernel panic - not syncing: stack-protector: Kernel stack is corrupted in: sys_ioctl+0xfe0/0x1060
[ 5474.995495] [ T91037] Kernel panic - not syncing: stack-protector: Kernel stack is corrupted in: vprintk_store+0x6a4/0x6c0
[ 5474.995508] [ T91037] ------------[ cut here ]------------
[ 5474.995513] [ T91037] kernel BUG at [regs_irqs_disabled(regs)] arch/powerpc/include/asm/entry-common.h:401!
[ 5474.995521] [ T91037] Oops: Exception in kernel mode, sig: 5 [#1]
[ 5474.995524] [ T91037] LE PAGE_SIZE=64K MMU=Radix SMP NR_CPUS=8192 NUMA pSeries
[ 5474.995528] [ T91037] Modules linked in: rpadlpar_io rpaphp kvm_hv kvm mptcp_diag xsk_diag tcp_diag udp_diag raw_diag inet_diag unix_diag af_packet_diag netlink_diag xt_conntrack xt_MASQUERADE xfrm_user xt_set ip_set xt_addrtype nft_compat nf_conntrack_netbios_ns nf_conntrack_broadcast nft_masq nft_fib_inet nft_fib_ipv4 nft_fib_ipv6 nft_fib nft_reject_inet nf_reject_ipv4 nf_reject_ipv6 nft_reject nft_ct bonding tls nft_chain_nat nf_nat nf_conntrack tun nf_defrag_ipv6 nf_defrag_ipv4 rfkill af_packet binfmt_misc xfs aes_gcm_p10_crypto ibmveth crypto_simd cryptd xts vmx_crypto rtc_generic fuse nvme_fabrics ip_tables x_tables ibmvscsi scsi_transport_srp sd_mod scsi_dh_emc scsi_dh_rdac scsi_dh_alua sg scsi_mod scsi_common nvme nvme_core nvme_keyring pseries_wdt nvme_auth btrfs xor libblake2b raid6_pq dm_mirror dm_region_hash dm_log dm_mod br_netfilter bridge stp llc nf_tables
[ 5474.995641] [ T91037] CPU: 110 UID: 399 PID: 91037 Comm: cc1 Not tainted 7.2.2-5.g6824496-default #1 PREEMPT(full) openSUSE Tumbleweed (unreleased) 61871a5f06863b4006f5ef27cd9f18e8a7a2edad
[ 5474.995649] [ T91037] Hardware name: IBM,9824-42A Power11 (architected) 0x820200 0xf000007 of:IBM,FW1110.20 (OB1110_130) hv:phyp pSeries
[ 5474.995653] [ T91037] NIP: c0000000013c2114 LR: c000000000148c88 CTR: c000000000008e40
[ 5474.995656] [ T91037] REGS: c000001f965d3b50 TRAP: 0700 Not tainted (7.2.2-5.g6824496-default)
[ 5474.995660] [ T91037] MSR: 8000000000029033 <SF,EE,ME,IR,DR,RI,LE> CR: 42004208 XER: 20040145
[ 5474.995670] [ T91037] CFAR: c0000000013c20b4 IRQMASK: 3
GPR00: c00000000000904c c000001f965d3df0 c00000000205ad00 c000001f965d3e80
GPR04: 0000000000000000 0000000000000000 0000000000000000 0000000000000000
GPR08: 0000000000000000 0000000000000001 0000000000004000 0000000053474552
GPR12: 0000000000000000 c000003ffef56300 0000000000000000 0000000000000000
GPR16: 0000000000000000 0000000000000000 0000000000000000 0000000000000000
GPR20: 0000000000000000 0000000000000000 0000000000000000 0000000000000000
GPR24: 0000000000000000 0000000000000000 0000000000000000 0000000000000000
GPR28: 0000000000000000 0000000000000000 0000000000000000 c000001f965d3e80
[ 5474.995708] [ T91037] NIP [c0000000013c2114] irqentry_enter+0x74/0x1a0
[ 5474.995719] [ T91037] LR [c000000000148c88] do_page_fault+0x68/0x140
[ 5474.995727] [ T91037] Call Trace:
[ 5474.995731] [ T91037] [c000001f965d3e10] [c000001f965d3e50] 0xc000001f965d3e50
[ 5474.995739] [ T91037] [c000001f965d3e50] [c00000000000904c] instruction_access_common_virt+0x20c/0x210
[ 5474.995751] [ T91037] ---- interrupt: 400 at 0x1043f158
[ 5474.995754] [ T91037] NIP: 000000001043f158 LR: 00000000101218e0 CTR: 00007fff7aef4f00
[ 5474.995756] [ T91037] REGS: c000001f965d3e80 TRAP: 0400 Not tainted (7.2.2-5.g6824496-default)
[ 5474.995759] [ T91037] MSR: 800000004280f033 <SF,VEC,VSX,EE,PR,FP,ME,IR,DR,RI,LE> CR: 82004208 XER: 20040145
[ 5474.995770] [ T91037] CFAR: 00000000101218dc IRQMASK: 1
GPR00: 00000000101218cc 00007ffffd284ce0 0000000011de7a00 0000000012c2c370
GPR04: 0000000000000001 0000000000000000 0000000000000001 0000000000000000
GPR08: 00007fff7b070d60 0000000000000000 0000000012c2c380 0000000000004000
GPR12: 00007fff7aef4f00 00007fff7ba8da00 0000000000000000 0000000000000000
GPR16: 0000000000000000 00007ffffd28c2ac 0000000000000000 0000000000000001
GPR20: 0000000000000197 0000000000c03cff 0000000011e0d210 0000000000000008
GPR24: 0000000000000000 00007ffffd284f58 0000000000000000 0000000000000000
GPR28: 0000000000000001 00007ffffd28c2ac 0000000000000000 0000000000000197
[ 5474.995809] [ T91037] NIP [000000001043f158] 0x1043f158
[ 5474.995812] [ T91037] LR [00000000101218e0] 0x101218e0
[ 5474.995814] [ T91037] ---- interrupt: 400
[ 5474.995816] [ T91037] Code: f8010030 4af8b211 60000000 e8010030 7c0803a6 4bffffd4 60420000 7929ffe2 69290001 0b090000 e9230138 792907e0 <0b090000> 4800001c e9230140 792907a4
[ 5474.995835] [ T91037] ---[ end trace 0000000000000000 ]---
[ 5492.821144] [ C110] watchdog: CPU 110 Hard LOCKUP
[ 5492.821159] [ C110] watchdog: CPU 110 TB:3408898268781396, last heartbeat TB:3408888039246087 (19979ms ago)
[ 5492.821162] [ C110] Modules linked in: rpadlpar_io rpaphp kvm_hv kvm mptcp_diag xsk_diag tcp_diag udp_diag raw_diag inet_diag unix_diag af_packet_diag netlink_diag xt_conntrack xt_MASQUERADE xfrm_user xt_set ip_set xt_addrtype nft_compat nf_conntrack_netbios_ns nf_conntrack_broadcast nft_masq nft_fib_inet nft_fib_ipv4 nft_fib_ipv6 nft_fib nft_reject_inet nf_reject_ipv4 nf_reject_ipv6 nft_reject nft_ct bonding tls nft_chain_nat nf_nat nf_conntrack tun nf_defrag_ipv6 nf_defrag_ipv4 rfkill af_packet binfmt_misc xfs aes_gcm_p10_crypto ibmveth crypto_simd cryptd xts vmx_crypto rtc_generic fuse nvme_fabrics ip_tables x_tables ibmvscsi scsi_transport_srp sd_mod scsi_dh_emc scsi_dh_rdac scsi_dh_alua sg scsi_mod scsi_common nvme nvme_core nvme_keyring pseries_wdt nvme_auth btrfs xor libblake2b raid6_pq dm_mirror dm_region_hash dm_log dm_mod br_netfilter bridge stp llc nf_tables
[ 5492.821225] [ C110] CPU: 110 UID: 399 PID: 91037 Comm: cc1 Tainted: G D 7.2.2-5.g6824496-default #1 PREEMPT(full) openSUSE Tumbleweed (unreleased) 61871a5f06863b4006f5ef27cd9f18e8a7a2edad
[ 5492.821234] [ C110] Tainted: [D]=DIE
[ 5492.821235] [ C110] Hardware name: IBM,9824-42A Power11 (architected) 0x820200 0xf000007 of:IBM,FW1110.20 (OB1110_130) hv:phyp pSeries
[ 5492.821237] [ C110] NIP: c0000000013d2c90 LR: c0000000013d4564 CTR: c000000000919460
[ 5492.821241] [ C110] REGS: c000003ffeb93d60 TRAP: 0100 Tainted: G D (7.2.2-5.g6824496-default)
[ 5492.821244] [ C110] MSR: 8000000000081033 <SF,ME,IR,DR,RI,LE> CR: 44004204 XER: 20040145
[ 5492.821252] [ C110] CFAR: 000000000000011c IRQMASK: 3
GPR00: c0000000009194f0 c000001f965d3730 c00000000205ad00 c0000000037b6510
GPR04: c000001f965d39d8 00000000000000dd fffffffffffe0000 0000000000010000
GPR08: 0000000000000001 0000000000000001 000000000fe67ee1 0000000000004000
GPR12: c000000000919460 c000003ffef56300 0000000000000000 0000000000000000
GPR16: 0000000000000000 0000000000000000 0000000000000000 0000000000000000
GPR20: 0000000000000000 0000000000000000 0000000000000000 0000000000000000
GPR24: 0000000000002800 c0000000018c5670 c000001f965d39d8 0000003ff1ae0000
GPR28: 0000000000de0000 c0000000032bbe80 c000003ff4d9be80 c0000000037b6510
[ 5492.821283] [ C110] NIP [c0000000013d2c90] queued_spin_lock_slowpath+0x160/0x19a0
[ 5492.821296] [ C110] LR [c0000000013d4564] _raw_spin_lock_irqsave+0x94/0xc0
[ 5492.821299] [ C110] Call Trace:
[ 5492.821302] [ C110] [c000001f965d3830] [0000000000000263] 0x263
[ 5492.821309] [ C110] [c000001f965d3860] [c0000000009194f0] pstore_dump+0x90/0x430
[ 5492.821317] [ C110] [c000001f965d39b0] [c00000000031ff40] kmsg_dump_desc+0xb0/0x100
[ 5492.821325] [ C110] [c000001f965d3a10] [c00000000022e2a4] oops_exit+0x54/0x70
[ 5492.821331] [ C110] [c000001f965d3a70] [c00000000002760c] oops_end+0x6c/0x1a0
[ 5492.821340] [ C110] [c000001f965d3af0] [c00000000002a61c] program_check_exception+0x7c/0xe0
[ 5492.821344] [ C110] [c000001f965d3b20] [c000000000009b2c] program_check_common_virt+0x3bc/0x3c0
[ 5492.821352] [ C110] ---- interrupt: 700 at irqentry_enter+0x74/0x1a0
[ 5492.821358] [ C110] NIP: c0000000013c2114 LR: c000000000148c88 CTR: c000000000008e40
[ 5492.821361] [ C110] REGS: c000001f965d3b50 TRAP: 0700 Tainted: G D (7.2.2-5.g6824496-default)
[ 5492.821363] [ C110] MSR: 8000000000029033 <SF,EE,ME,IR,DR,RI,LE> CR: 42004208 XER: 20040145
[ 5492.821370] [ C110] CFAR: c0000000013c20b4 IRQMASK: 3
GPR00: c00000000000904c c000001f965d3df0 c00000000205ad00 c000001f965d3e80
GPR04: 0000000000000000 0000000000000000 0000000000000000 0000000000000000
GPR08: 0000000000000000 0000000000000001 0000000000004000 0000000053474552
GPR12: 0000000000000000 c000003ffef56300 0000000000000000 0000000000000000
GPR16: 0000000000000000 0000000000000000 0000000000000000 0000000000000000
GPR20: 0000000000000000 0000000000000000 0000000000000000 0000000000000000
GPR24: 0000000000000000 0000000000000000 0000000000000000 0000000000000000
GPR28: 0000000000000000 0000000000000000 0000000000000000 c000001f965d3e80
[ 5492.821399] [ C110] NIP [c0000000013c2114] irqentry_enter+0x74/0x1a0
[ 5492.821403] [ C110] LR [c000000000148c88] do_page_fault+0x68/0x140
[ 5492.821409] [ C110] ---- interrupt: 700
[ 5492.821410] [ C110] [c000001f965d3df0] [0000000000000000] 0x0 (unreliable)
[ 5492.821414] [ C110] [c000001f965d3e10] [c000001f965d3e50] 0xc000001f965d3e50
[ 5492.821416] [ C110] [c000001f965d3e50] [c00000000000904c] instruction_access_common_virt+0x20c/0x210
[ 5492.821421] [ C110] ---- interrupt: 400 at 0x1043f158
[ 5492.821423] [ C110] NIP: 000000001043f158 LR: 00000000101218e0 CTR: 00007fff7aef4f00
[ 5492.821425] [ C110] REGS: c000001f965d3e80 TRAP: 0400 Tainted: G D (7.2.2-5.g6824496-default)
[ 5492.821428] [ C110] MSR: 800000004000f033 <SF,EE,PR,FP,ME,IR,DR,RI,LE> CR: 82004208 XER: 20040145
[ 5492.821436] [ C110] CFAR: 00000000101218dc IRQMASK: 1
GPR00: 00000000101218cc 00007ffffd284ce0 0000000011de7a00 0000000012c2c370
GPR04: 0000000000000001 0000000000000000 0000000000000001 0000000000000000
GPR08: 00007fff7b070d60 0000000000000000 0000000012c2c380 0000000000004000
GPR12: 00007fff7aef4f00 00007fff7ba8da00 0000000000000000 0000000000000000
GPR16: 0000000000000000 00007ffffd28c2ac 0000000000000000 0000000000000001
GPR20: 0000000000000197 0000000000c03cff 0000000011e0d210 0000000000000008
GPR24: 0000000000000000 00007ffffd284f58 0000000000000000 0000000000000000
GPR28: 0000000000000001 00007ffffd28c2ac 0000000000000000 0000000000000197
[ 5492.821464] [ C110] NIP [000000001043f158] 0x1043f158
[ 5492.821466] [ C110] LR [00000000101218e0] 0x101218e0
[ 5492.821468] [ C110] ---- interrupt: 400
[ 5492.821470] [ C110] Code: 7c085040 41810e8c 39400000 39000000 3cc0fffe 60000000 813f0000 71290001 41820050 3ce00001 60000000 60420000 <7c40003c> 71090001 394a0001 40820028 Thanks
Michal
Re: [Linux PPC] Disable PREEMPT
Quoted 92 lines · Michal Suchánek
Quoted 85 lines · Harsh Prateek Bora
+ Amit, Gautam - since they recently came across a similar regression which is seen with non KVM workload as well.
+ Venkat - for CI improvement suggestion below.Hi Michal,
Quoted 72 lines · Michal Suchánek
Quoted 67 lines · Shrikanth Hegde
Hi Michal.
Quoted 46 lines · Michal Suchánek
Quoted 44 lines · Shrikanth Hegde
Quoted 44 lines
Quoted 7 lines
Quoted 5 lines
This is not the latest kernel so it might have been fixed in the meantime for the platform in question. Will need to check that.
If possible run against current upstream and share the results.
[ 472.091531][ T6181] Kernel panic - not syncing: stack-protector: Kernel stack is corrupted in: kvmhv_run_single_vcpu+0x19d4/0x1b50 [kvm_hv] [ 472.091598][ T6181] CPU: 29 UID: 107 PID: 6181 Comm: CPU 112/KVM Not tainted 7.2.2-5.g6824496-default #1 PREEMPT(full) openSUSE Tumbleweed (unreleased) 61871a5f06863b4006f5ef27cd9f18e8a7a2edad [ 472.091612][ T6181] Hardware name: IBM,9824-42A Power11 (architected) 0x820200 0xf000007 of:IBM,FW1110.20 (OB1110_130) hv:phyp pSeries [ 472.091624][ T6181] Call Trace: [ 472.091630][ T6181] [c00000000fdfb680] [c00000000134ce90] dump_stack_lvl+0x84/0xc0 (unreliable) [ 472.091653][ T6181] [c00000000fdfb6b0] [c00000000022e7c8] vpanic+0x324/0x5e4 [ 472.091666][ T6181] [c00000000fdfb760] [c00000000022eac4] do_panic_on_target_cpu+0x0/0x2c [ 472.091677][ T6181] [c00000000fdfb780] [c0000000013c1ff8] __stack_chk_fail+0x48/0x60 [ 472.091689][ T6181] [c00000000fdfb7f0] [c00800001aae219c] kvmhv_run_single_vcpu+0x19d4/0x1b50 [kvm_hv] [ 472.091712][ T6181] [c00000000fdfb940] [c00800001aae24b4] kvmppc_vcpu_run_hv+0x19c/0x12f0 [kvm_hv] [ 472.091732][ T6181] [c00000000fdfba10] [c00800001aeeed18] kvmppc_vcpu_run+0x30/0x48 [kvm] [ 472.091779][ T6181] [c00000000fdfba30] [c00800001aee9ef4] kvm_arch_vcpu_ioctl_run+0x35c/0x4a0 [kvm] [ 472.091813][ T6181] [c00000000fdfbac0] [c00800001aedaac4] kvm_vcpu_ioctl+0x1ac/0xad8 [kvm] [ 472.091844][ T6181] [c00000000fdfbca0] [c0000000007f1244] sys_ioctl+0x374/0x1060 [ 472.091857][ T6181] [c00000000fdfbdb0] [c00000000002f7f8] system_call_exception+0x188/0x430 [ 472.091871][ T6181] [c00000000fdfbe50] [c00000000000cfdc] system_call_vectored_common+0x15c/0x2ec [ 472.091886][ T6181] ---- interrupt: 3000 at 0x7fffb5565fac [ 472.091896][ T6181] NIP: 00007fffb5565fac LR: 00007fffb5565fac CTR: 0000000000000000 [ 472.091904][ T6181] REGS: c00000000fdfbe80 TRAP: 3000 Not tainted (7.2.2-5.g6824496-default) [ 472.091911][ T6181] MSR: 800000000280f033 <SF,VEC,VSX,EE,PR,FP,ME,IR,DR,RI,LE> CR: 42044402 XER: 00000000 [ 472.091938][ T6181] IRQMASK: 0 [ 472.091938][ T6181] GPR00: 0000000000000036 00007fbfa77ed7a0 00007fffb5677100 00000000000000fa [ 472.091938][ T6181] GPR04: 000000002000ae80 0000000000000000 0000000000000000 0000000000000000 [ 472.091938][ T6181] GPR08: 00000000000000fa 0000000000000000 0000000000000000 0000000000000000 [ 472.091938][ T6181] GPR12: 0000000000000000 00007fbfa77f5ec0 000000014676f000 00007fbfa77ee7c0 [ 472.091938][ T6181] GPR16: 000000014674e8d0 00007fbfa77eeec0 00007fbfa77eeec0 fffffffffffffff7 [ 472.091938][ T6181] GPR20: 00007fffb71210d0 0000000000000001 00007fbfa77eeec0 0000000000000000 [ 472.091938][ T6181] GPR24: 00007fbfa77ed8e8 0000000105971428 000000002000ae80 0000000105f77a70 [ 472.091938][ T6181] GPR28: 0000000000000000 0000000000000000 000000002000ae80 000000014674f000 [ 472.092020][ T6181] NIP [00007fffb5565fac] 0x7fffb5565fac [ 472.092027][ T6181] LR [00007fffb5565fac] 0x7fffb5565fac [ 472.092033][ T6181] ---- interrupt: 3000 [ 472.098256][ T6181] pstore: backend (nvram) writing error (-1)Quoted 8 lines
Quoted 7 lines
Quoted 3 lines
This is the host, cannot run the kernel as guest because it fails to boot most of the time inside KVM.
Will look into. btw the patch shared i.e below patch fixes the boot hanf issue?
I see code has changed a bit. So this patch is not correct anymore. Sorry, i should have checked.
Quoted 5 lines
I would not bet on that. It looks like host side patch, and the problem is with booting 7.2.2 as guest. Some 6.12 frankenkernel can be booted on the same host, and used to produce the crash above by running a kernel build inside the guest.
Quoted 3 lines
I didn't get what you are saying. Could you see if it regression only in 7.2? Does 7.1 works fine? If it is regression could you see if it is bisectable? Also, could you share the repro steps?
Quoted 5 lines
The repro steps are: on a mid-size LPAR (120 CPU threads, 256G RAM) create a KVM VM that uses all host resources. Run kernel build inside KVM VM, using all CPUs. In about a minute the host crashes with the above a or similar trace. I don't have any kernel version with aggressive preemption enabled that does not suffer from this problem.
Quoted 5 lines
Looks like seen under heavy workloads when you say "KVM VM that uses all host rsources". Could you please confirm if the issue is seen with any other heavy workload also which consumes all host resources? I do not think we recently had any PPC KVM specific changes which would cause this. Also, if it's a regression, git bisect should point out the real culprit.
Quoted 4 lines
It's a regression from switching to
PREEMPT_LAZY(fromPREEMPT_VOLUNTARY). Very likely the code was buggy to start with but because less aggressive preemption model was used the bug was never triggered. I cannot reproduce this under load without KVM. The other
I think the problem here is the workload that may cause more aggressive preemptions. Also, it may also not be specific to KVM if we could trigger comparative number of preemptions on host too. Could we try running a more aggressive kernel compilation like running make with 4x or more parallel make jobs than the number of CPUs available on it. For example:
make -j $(( 4 * $(nproc)))
Thanks,
Amit
Quoted 129 lines
problem that is much harder to reproduce is machine locking up while idling. A dump then also shows stack corruption with completely but different stack trace, no KVM involved in that one. Did not see this with recent mainline yet.
I do get a problem with 7.2.2 building a kernel outside of kVM but that's probably because it's missing some of the recent entry fixes:
[ 5451.821931] [ T77619] as[77619]: segfault (11) at 3abd0 nip 7fff8fe56434 lr 7fff8fe55348 code 1 in ld64.so.2[36434,7fff8fe20000+60000] [ 5451.821967] [ T77619] as[77619]: code: 60000000 60000000 60000000 f9490008 f9490010 39290020 f949fff8 f9490000 [ 5451.821973] [ T77619] as[77619]: code: 4200ffec 89210376 3d42ffff 394a7ea0 <e9028000> 7d081050 f9410030 f9010020 [ 5454.239768] [ T78922] awk[78922]: segfault (11) at 3abd0 nip 7fff8c386434 lr 7fff8c385348 code 1 in ld64.so.2[36434,7fff8c350000+60000] [ 5454.239809] [ T78922] awk[78922]: code: 60000000 60000000 60000000 f9490008 f9490010 39290020 f949fff8 f9490000 [ 5454.239815] [ T78922] awk[78922]: code: 4200ffec 89210376 3d42ffff 394a7ea0 <e9028000> 7d081050 f9410030 f9010020 [ 5465.056566] [ T85518] sh[85518]: segfault (11) at 3abd0 nip 7fffb79a6434 lr 7fffb79a5348 code 1 in ld64.so.2[36434,7fffb7970000+60000] [ 5465.056611] [ T85518] sh[85518]: code: 60000000 60000000 60000000 f9490008 f9490010 39290020 f949fff8 f9490000 [ 5465.056616] [ T85518] sh[85518]: code: 4200ffec 89210376 3d42ffff 394a7ea0 <e9028000> 7d081050 f9410030 f9010020 [ 5474.995476] [ T91034] Kernel panic - not syncing: stack-protector: Kernel stack is corrupted in: sys_ioctl+0xfe0/0x1060 [ 5474.995495] [ T91037] Kernel panic - not syncing: stack-protector: Kernel stack is corrupted in: vprintk_store+0x6a4/0x6c0 [ 5474.995508] [ T91037] ------------[ cut here ]------------ [ 5474.995513] [ T91037] kernel BUG at [regs_irqs_disabled(regs)] arch/powerpc/include/asm/entry-common.h:401! [ 5474.995521] [ T91037] Oops: Exception in kernel mode, sig: 5 [#1] [ 5474.995524] [ T91037] LE PAGE_SIZE=64K MMU=Radix SMP NR_CPUS=8192 NUMA pSeries [ 5474.995528] [ T91037] Modules linked in: rpadlpar_io rpaphp kvm_hv kvm mptcp_diag xsk_diag tcp_diag udp_diag raw_diag inet_diag unix_diag af_packet_diag netlink_diag xt_conntrack xt_MASQUERADE xfrm_user xt_set ip_set xt_addrtype nft_compat nf_conntrack_netbios_ns nf_conntrack_broadcast nft_masq nft_fib_inet nft_fib_ipv4 nft_fib_ipv6 nft_fib nft_reject_inet nf_reject_ipv4 nf_reject_ipv6 nft_reject nft_ct bonding tls nft_chain_nat nf_nat nf_conntrack tun nf_defrag_ipv6 nf_defrag_ipv4 rfkill af_packet binfmt_misc xfs aes_gcm_p10_crypto ibmveth crypto_simd cryptd xts vmx_crypto rtc_generic fuse nvme_fabrics ip_tables x_tables ibmvscsi scsi_transport_srp sd_mod scsi_dh_emc scsi_dh_rdac scsi_dh_alua sg scsi_mod scsi_common nvme nvme_core nvme_keyring pseries_wdt nvme_auth btrfs xor libblake2b raid6_pq dm_mirror dm_region_hash dm_log dm_mod br_netfilter bridge stp llc nf_tables [ 5474.995641] [ T91037] CPU: 110 UID: 399 PID: 91037 Comm: cc1 Not tainted 7.2.2-5.g6824496-default #1 PREEMPT(full) openSUSE Tumbleweed (unreleased) 61871a5f06863b4006f5ef27cd9f18e8a7a2edad [ 5474.995649] [ T91037] Hardware name: IBM,9824-42A Power11 (architected) 0x820200 0xf000007 of:IBM,FW1110.20 (OB1110_130) hv:phyp pSeries [ 5474.995653] [ T91037] NIP: c0000000013c2114 LR: c000000000148c88 CTR: c000000000008e40 [ 5474.995656] [ T91037] REGS: c000001f965d3b50 TRAP: 0700 Not tainted (7.2.2-5.g6824496-default) [ 5474.995660] [ T91037] MSR: 8000000000029033 <SF,EE,ME,IR,DR,RI,LE> CR: 42004208 XER: 20040145 [ 5474.995670] [ T91037] CFAR: c0000000013c20b4 IRQMASK: 3 GPR00: c00000000000904c c000001f965d3df0 c00000000205ad00 c000001f965d3e80 GPR04: 0000000000000000 0000000000000000 0000000000000000 0000000000000000 GPR08: 0000000000000000 0000000000000001 0000000000004000 0000000053474552 GPR12: 0000000000000000 c000003ffef56300 0000000000000000 0000000000000000 GPR16: 0000000000000000 0000000000000000 0000000000000000 0000000000000000 GPR20: 0000000000000000 0000000000000000 0000000000000000 0000000000000000 GPR24: 0000000000000000 0000000000000000 0000000000000000 0000000000000000 GPR28: 0000000000000000 0000000000000000 0000000000000000 c000001f965d3e80 [ 5474.995708] [ T91037] NIP [c0000000013c2114] irqentry_enter+0x74/0x1a0 [ 5474.995719] [ T91037] LR [c000000000148c88] do_page_fault+0x68/0x140 [ 5474.995727] [ T91037] Call Trace: [ 5474.995731] [ T91037] [c000001f965d3e10] [c000001f965d3e50] 0xc000001f965d3e50 [ 5474.995739] [ T91037] [c000001f965d3e50] [c00000000000904c] instruction_access_common_virt+0x20c/0x210 [ 5474.995751] [ T91037] ---- interrupt: 400 at 0x1043f158 [ 5474.995754] [ T91037] NIP: 000000001043f158 LR: 00000000101218e0 CTR: 00007fff7aef4f00 [ 5474.995756] [ T91037] REGS: c000001f965d3e80 TRAP: 0400 Not tainted (7.2.2-5.g6824496-default) [ 5474.995759] [ T91037] MSR: 800000004280f033 <SF,VEC,VSX,EE,PR,FP,ME,IR,DR,RI,LE> CR: 82004208 XER: 20040145 [ 5474.995770] [ T91037] CFAR: 00000000101218dc IRQMASK: 1 GPR00: 00000000101218cc 00007ffffd284ce0 0000000011de7a00 0000000012c2c370 GPR04: 0000000000000001 0000000000000000 0000000000000001 0000000000000000 GPR08: 00007fff7b070d60 0000000000000000 0000000012c2c380 0000000000004000 GPR12: 00007fff7aef4f00 00007fff7ba8da00 0000000000000000 0000000000000000 GPR16: 0000000000000000 00007ffffd28c2ac 0000000000000000 0000000000000001 GPR20: 0000000000000197 0000000000c03cff 0000000011e0d210 0000000000000008 GPR24: 0000000000000000 00007ffffd284f58 0000000000000000 0000000000000000 GPR28: 0000000000000001 00007ffffd28c2ac 0000000000000000 0000000000000197 [ 5474.995809] [ T91037] NIP [000000001043f158] 0x1043f158 [ 5474.995812] [ T91037] LR [00000000101218e0] 0x101218e0 [ 5474.995814] [ T91037] ---- interrupt: 400 [ 5474.995816] [ T91037] Code: f8010030 4af8b211 60000000 e8010030 7c0803a6 4bffffd4 60420000 7929ffe2 69290001 0b090000 e9230138 792907e0 <0b090000> 4800001c e9230140 792907a4 [ 5474.995835] [ T91037] ---[ end trace 0000000000000000 ]--- [ 5492.821144] [ C110] watchdog: CPU 110 Hard LOCKUP [ 5492.821159] [ C110] watchdog: CPU 110 TB:3408898268781396, last heartbeat TB:3408888039246087 (19979ms ago) [ 5492.821162] [ C110] Modules linked in: rpadlpar_io rpaphp kvm_hv kvm mptcp_diag xsk_diag tcp_diag udp_diag raw_diag inet_diag unix_diag af_packet_diag netlink_diag xt_conntrack xt_MASQUERADE xfrm_user xt_set ip_set xt_addrtype nft_compat nf_conntrack_netbios_ns nf_conntrack_broadcast nft_masq nft_fib_inet nft_fib_ipv4 nft_fib_ipv6 nft_fib nft_reject_inet nf_reject_ipv4 nf_reject_ipv6 nft_reject nft_ct bonding tls nft_chain_nat nf_nat nf_conntrack tun nf_defrag_ipv6 nf_defrag_ipv4 rfkill af_packet binfmt_misc xfs aes_gcm_p10_crypto ibmveth crypto_simd cryptd xts vmx_crypto rtc_generic fuse nvme_fabrics ip_tables x_tables ibmvscsi scsi_transport_srp sd_mod scsi_dh_emc scsi_dh_rdac scsi_dh_alua sg scsi_mod scsi_common nvme nvme_core nvme_keyring pseries_wdt nvme_auth btrfs xor libblake2b raid6_pq dm_mirror dm_region_hash dm_log dm_mod br_netfilter bridge stp llc nf_tables [ 5492.821225] [ C110] CPU: 110 UID: 399 PID: 91037 Comm: cc1 Tainted: G D 7.2.2-5.g6824496-default #1 PREEMPT(full) openSUSE Tumbleweed (unreleased) 61871a5f06863b4006f5ef27cd9f18e8a7a2edad [ 5492.821234] [ C110] Tainted: [D]=DIE [ 5492.821235] [ C110] Hardware name: IBM,9824-42A Power11 (architected) 0x820200 0xf000007 of:IBM,FW1110.20 (OB1110_130) hv:phyp pSeries [ 5492.821237] [ C110] NIP: c0000000013d2c90 LR: c0000000013d4564 CTR: c000000000919460 [ 5492.821241] [ C110] REGS: c000003ffeb93d60 TRAP: 0100 Tainted: G D (7.2.2-5.g6824496-default) [ 5492.821244] [ C110] MSR: 8000000000081033 <SF,ME,IR,DR,RI,LE> CR: 44004204 XER: 20040145 [ 5492.821252] [ C110] CFAR: 000000000000011c IRQMASK: 3 GPR00: c0000000009194f0 c000001f965d3730 c00000000205ad00 c0000000037b6510 GPR04: c000001f965d39d8 00000000000000dd fffffffffffe0000 0000000000010000 GPR08: 0000000000000001 0000000000000001 000000000fe67ee1 0000000000004000 GPR12: c000000000919460 c000003ffef56300 0000000000000000 0000000000000000 GPR16: 0000000000000000 0000000000000000 0000000000000000 0000000000000000 GPR20: 0000000000000000 0000000000000000 0000000000000000 0000000000000000 GPR24: 0000000000002800 c0000000018c5670 c000001f965d39d8 0000003ff1ae0000 GPR28: 0000000000de0000 c0000000032bbe80 c000003ff4d9be80 c0000000037b6510 [ 5492.821283] [ C110] NIP [c0000000013d2c90] queued_spin_lock_slowpath+0x160/0x19a0 [ 5492.821296] [ C110] LR [c0000000013d4564] _raw_spin_lock_irqsave+0x94/0xc0 [ 5492.821299] [ C110] Call Trace: [ 5492.821302] [ C110] [c000001f965d3830] [0000000000000263] 0x263 [ 5492.821309] [ C110] [c000001f965d3860] [c0000000009194f0] pstore_dump+0x90/0x430 [ 5492.821317] [ C110] [c000001f965d39b0] [c00000000031ff40] kmsg_dump_desc+0xb0/0x100 [ 5492.821325] [ C110] [c000001f965d3a10] [c00000000022e2a4] oops_exit+0x54/0x70 [ 5492.821331] [ C110] [c000001f965d3a70] [c00000000002760c] oops_end+0x6c/0x1a0 [ 5492.821340] [ C110] [c000001f965d3af0] [c00000000002a61c] program_check_exception+0x7c/0xe0 [ 5492.821344] [ C110] [c000001f965d3b20] [c000000000009b2c] program_check_common_virt+0x3bc/0x3c0 [ 5492.821352] [ C110] ---- interrupt: 700 at irqentry_enter+0x74/0x1a0 [ 5492.821358] [ C110] NIP: c0000000013c2114 LR: c000000000148c88 CTR: c000000000008e40 [ 5492.821361] [ C110] REGS: c000001f965d3b50 TRAP: 0700 Tainted: G D (7.2.2-5.g6824496-default) [ 5492.821363] [ C110] MSR: 8000000000029033 <SF,EE,ME,IR,DR,RI,LE> CR: 42004208 XER: 20040145 [ 5492.821370] [ C110] CFAR: c0000000013c20b4 IRQMASK: 3 GPR00: c00000000000904c c000001f965d3df0 c00000000205ad00 c000001f965d3e80 GPR04: 0000000000000000 0000000000000000 0000000000000000 0000000000000000 GPR08: 0000000000000000 0000000000000001 0000000000004000 0000000053474552 GPR12: 0000000000000000 c000003ffef56300 0000000000000000 0000000000000000 GPR16: 0000000000000000 0000000000000000 0000000000000000 0000000000000000 GPR20: 0000000000000000 0000000000000000 0000000000000000 0000000000000000 GPR24: 0000000000000000 0000000000000000 0000000000000000 0000000000000000 GPR28: 0000000000000000 0000000000000000 0000000000000000 c000001f965d3e80 [ 5492.821399] [ C110] NIP [c0000000013c2114] irqentry_enter+0x74/0x1a0 [ 5492.821403] [ C110] LR [c000000000148c88] do_page_fault+0x68/0x140 [ 5492.821409] [ C110] ---- interrupt: 700 [ 5492.821410] [ C110] [c000001f965d3df0] [0000000000000000] 0x0 (unreliable) [ 5492.821414] [ C110] [c000001f965d3e10] [c000001f965d3e50] 0xc000001f965d3e50 [ 5492.821416] [ C110] [c000001f965d3e50] [c00000000000904c] instruction_access_common_virt+0x20c/0x210 [ 5492.821421] [ C110] ---- interrupt: 400 at 0x1043f158 [ 5492.821423] [ C110] NIP: 000000001043f158 LR: 00000000101218e0 CTR: 00007fff7aef4f00 [ 5492.821425] [ C110] REGS: c000001f965d3e80 TRAP: 0400 Tainted: G D (7.2.2-5.g6824496-default) [ 5492.821428] [ C110] MSR: 800000004000f033 <SF,EE,PR,FP,ME,IR,DR,RI,LE> CR: 82004208 XER: 20040145 [ 5492.821436] [ C110] CFAR: 00000000101218dc IRQMASK: 1 GPR00: 00000000101218cc 00007ffffd284ce0 0000000011de7a00 0000000012c2c370 GPR04: 0000000000000001 0000000000000000 0000000000000001 0000000000000000 GPR08: 00007fff7b070d60 0000000000000000 0000000012c2c380 0000000000004000 GPR12: 00007fff7aef4f00 00007fff7ba8da00 0000000000000000 0000000000000000 GPR16: 0000000000000000 00007ffffd28c2ac 0000000000000000 0000000000000001 GPR20: 0000000000000197 0000000000c03cff 0000000011e0d210 0000000000000008 GPR24: 0000000000000000 00007ffffd284f58 0000000000000000 0000000000000000 GPR28: 0000000000000001 00007ffffd28c2ac 0000000000000000 0000000000000197 [ 5492.821464] [ C110] NIP [000000001043f158] 0x1043f158 [ 5492.821466] [ C110] LR [00000000101218e0] 0x101218e0 [ 5492.821468] [ C110] ---- interrupt: 400 [ 5492.821470] [ C110] Code: 7c085040 41810e8c 39400000 39000000 3cc0fffe 60000000 813f0000 71290001 41820050 3ce00001 60000000 60420000 <7c40003c> 71090001 394a0001 40820028Thanks
Michal
Re: [Linux PPC] Disable PREEMPT
In reply to Harsh Prateek BoraQuoted 4 lines · Harsh Prateek Bora
+ Amit, Gautam - since they recently came across a similar regression which is seen with non KVM workload as well.
+ Venkat - for CI improvement suggestion below.
Quoted 11 lines
Hi Michal,
Quoted 7 lines · Michal Suchánek
There is another problem that Linux 7.2.2 often locks up on boot inside the guest, and as a result a different kernel is needed in the guest to reproduce the host crash. This is more recent, linux 6.12 does not have this problem. Will try some different kernel combinations to see if I can narrow this down. For this the repro is merely booting the kernel in the VM, it typically fails early before userspace produces any messages.
This one regressed between 6.19.12
https://github.com/openSUSE/kernel-source/blob/9f6830f/config/ppc64le/default
and 7.0.12
https://github.com/openSUSE/kernel-source/blob/2ebf0bc/config/ppc64le/default
Thanks
Michal
SLOF ********************************************************************** QEMU Starting
Build Date = Aug 13 2026 14:47:36
FW Version = abuild@OBS release 20230918
Press "s" to enter Open Firmware.
Populating /vdevice methods
Populating /vdevice/vty@30000000
Populating /vdevice/nvram@71000000
Populating /pci@800000020000000
Loading Linux 7.0.12-1.g2ebf0bc-default ...
Loading initial ramdisk ...
OF stdout device is: /vdevice/vty@30000000
Preparing to boot Linux version 7.0.12-1.g2ebf0bc-default (geeko@buildhost) (gcc (SUSE Linux) 15.3.0, GNU ld (GNU Binutils; openSUSE Tumbleweed) 2.45.0.20251103-4) #1 SMP PREEMPT_DYNAMIC Mon Jun 15 08:39:32 UTC 2026 (2ebf0bc) Detected machine type: 0000000000000101
command line: BOOT_IMAGE=/boot/vmlinux-7.0.12-1.g2ebf0bc-default root=UUID=304c7f07-efbb-1070-2f27-accd935ec088 rw quiet systemd.show_status=1 security=selinux selinux=1
Max number of cores passed to firmware: 8192 (NR_CPUS = 8192)
Calling ibm,client-architecture-support... done
memory layout at init:
memory_limit : 0000000000000000 (16 MB aligned)
alloc_bottom : 00000000066b0000
alloc_top : 0000000030000000
alloc_top_hi : 0000003e00000000
rmo_top : 0000000030000000
ram_top : 0000003e00000000
instantiating rtas at 0x000000002fff0000... doneprom_hold_cpus: skipped
copying OF device tree...
Building dt strings...
Building dt structure...
Device tree strings 0x00000000066c0000 -> 0x00000000066c0bec
Device tree struct 0x00000000066d0000 -> 0x00000000066f0000
Quiescing Open Firmware ...
Booting Linux via __start() @ 0x0000000000250000 ...
[ 0.000000][ T0] ERROR: Failed to allocate trace buffer [ 0.000000][ T0] ERROR: tracer: failed to allocate ring buffer! Linux ppc64le #1 SMP PREEMPT_D[ 0.285758][ T673] BUG: Kernel NULL pointer dereference on read at 0x00000010 [ 0.285877][ T673] Faulting instruction address: 0xc000000000485bd0 [ 0.285903][ T1] VFS: Dquot-cache hash table entries: 8192 (order 0, 65536 bytes) [ 0.285954][ T673] Oops: Kernel access of bad area, sig: 7 [#1] [ 0.286133][ T673] LE PAGE_SIZE=64K MMU=Radix SMP NR_CPUS=8192 NUMA pSeries [ 0.286240][ T673] Modules linked in: [ 0.286288][ T673] CPU: 15 UID: 0 PID: 673 Comm: kworker/u531:0 Not tainted 7.0.12-1.g2ebf0bc-default #1 PREEMPT(full) openSUSE Tumbleweed (unreleased) cf0846124d7853fab338aeae87203b36cac18419 [ 0.286527][ T673] Hardware name: IBM pSeries (emulated by qemu) Power11 (architected) 0x820200 0xf000007 of:SLOF,HEAD hv:linux,kvm pSeries [ 0.286739][ T673] Workqueue: trace_init_wq tracer_init_tracefs_work_func [ 0.286818][ T673] NIP: c000000000485bd0 LR: c000000000448864 CTR: c0000000005a3420 [ 0.286906][ T673] REGS: c00000000a7a7960 TRAP: 0300 Not tainted (7.0.12-1.g2ebf0bc-default) [ 0.287014][ T673] MSR: 8000000000009033 <SF,EE,ME,IR,DR,RI,LE> CR: 44088404 XER: 00000000 [ 0.287122][ T673] CFAR: c000000000448860 DAR: 0000000000000010 DSISR: 00080000 IRQMASK: 0 [ 0.287122][ T673] GPR00: c000000000448864 c00000000a7a7c00 c000000001f38100 c000000002a5c098 [ 0.287122][ T673] GPR04: c0000000017dc5f0 c0000000017dc5e8 000000000000001f 0000000000000064 [ 0.287122][ T673] GPR08: c0000000017dc628 00000000000005f0 00000000000005e8 0000000084000404 [ 0.287122][ T673] GPR12: c0000000005a3420 c000003dfff43d80 c0000000018e5600 c0000000018e54f0 [ 0.287122][ T673] GPR16: 0000000000000000 0000000000000000 0000000000000000 0000000000000000 [ 0.287122][ T673] GPR20: c0000000013ec418 c0000000013ef6d8 c0000000017dc5a0 c0000000017dc590 [ 0.287122][ T673] GPR24: c000000001825330 c0000000017dc628 c000000014b52a05 0000000000000000 [ 0.287122][ T673] GPR28: c0000000017dc5e8 0000000000000000 c0000000017dc5f0 c000000002a5e008 [ 0.287970][ T673] NIP [c000000000485bd0] __find_event_file+0x70/0x3c0 [ 0.288046][ T673] LR [c000000000448864] init_tracer_tracefs+0x274/0xc80 [ 0.288122][ T673] Call Trace: [ 0.288167][ T673] [c00000000a7a7c00] [c00000000a7a7c60] 0xc00000000a7a7c60 (unreliable) [ 0.288258][ T673] [c00000000a7a7c60] [c000000000448864] init_tracer_tracefs+0x274/0xc80 [ 0.288348][ T673] [c00000000a7a7dc0] [c00000000203fcf0] tracer_init_tracefs_work_func+0x50/0x320 [ 0.288452][ T673] [c00000000a7a7e50] [c0000000002620e8] process_one_work+0x1e8/0x5c0 [ 0.288541][ T673] [c00000000a7a7f10] [c00000000026309c] worker_thread+0x1dc/0x3d0 [ 0.288630][ T673] [c00000000a7a7f90] [c00000000026fa34] kthread+0x194/0x1b0 [ 0.288721][ T673] [c00000000a7a7fe0] [c00000000000de58] start_kernel_thread+0x14/0x18 [ 0.288810][ T673] Code: fb410030 fb810040 fba10048 7cbc2b78 3ba00000 fbc10050 7d194378 7c9e2378 2e2a0fc0 2da90fc0 f8010070 60420000 <e93b0010> 81490058 e8890018 714a0208 [ 0.289001][ T673] ---[ end trace 0000000000000000 ]--- [ 0.290718][ T673] pstore: backend (nvram) writing error (-1) [ 0.290805][ T673] [ 0.290839][ T673] note: kworker/u531:0[673] exited with irqs disabled [ 0.304261][ T1] NET: Registered PF_INET protocol family [ 0.304602][ T1] IP idents hash table entries: 262144 (order: 5, 2097152 bytes, linear) [ 0.315892][ T1] tcp_listen_portaddr_hash hash table entries: 65536 (order: 4, 1048576 bytes, linear) [ 0.316104][ T1] Table-perturb hash table entries: 65536 (order: 2, 262144 bytes, linear) [ 0.316224][ T1] TCP established hash table entries: 524288 (order: 6, 4194304 bytes, linear) [ 0.316873][ T1] TCP bind hash table entries: 65536 (order: 5, 2097152 bytes, linear) [ 0.317199][ T1] TCP: Hash tables configured (established 524288 bind 65536) [ 0.317748][ T1] MPTCP token hash table entries: 65536 (order: 5, 1572864 bytes, linear) [ 0.317970][ T1] UDP hash table entries: 65536 (order: 6, 4194304 bytes, linear) [ 0.318402][ T1] UDP-Lite hash table entries: 65536 (order: 6, 4194304 bytes, linear) [ 0.319148][ T1] NET: Registered PF_UNIX/PF_LOCAL protocol family [ 0.319249][ T1] NET: Registered PF_XDP protocol family [ 0.320019][ T1] PCI: CLS 0 bytes, default 128 [ 0.320281][ T1] rtas_flash: no firmware flash support [ 0.320967][ T770] Trying to unpack rootfs image as initramfs... [ 0.331385][ T1] Initialise system trusted keyrings [ 0.331739][ T1] Key type blacklist registered [ 0.332191][ T1] workingset: timestamp_bits=38 max_order=22 bucket_order=0 [ 0.333804][ T1] integrity: Platform Keyring initialized [ 0.333875][ T1] integrity: Machine keyring initialized [ 0.333935][ T1] Allocating IMA blacklist keyring. [ 0.343039][ T1] Key type asymmetric registered [ 0.343109][ T1] Asymmetric key parser 'x509' registered [ 0.344215][ T1] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 246) [ 0.344623][ T1] io scheduler mq-deadline registered [ 0.344688][ T1] io scheduler kyber registered [ 0.344800][ T1] io scheduler bfq registered [ 0.380554][ T1] ledtrig-cpu: registered to indicate activity on CPUs [ 0.380794][ T1] virtio-pci 0000:00:01.0: enabling device (0100 -> 0103) [ 0.382384][ T1] virtio-pci 0000:00:01.0: ibm,query-pe-dma-windows(2026) 800 8000000 20000000 returned 0, lb=2000000000 ps=107 wn=1 [ 0.383175][ T1] virtio-pci 0000:00:01.0: ibm,create-pe-dma-window(2027) 800 8000000 20000000 18 26 returned 0 (liobn = 0x80000001 starting addr = 8000000 0) [ 0.386395][ T1] virtio-pci 0000:00:01.0: lsa_required: 0, lsa_enabled: 0, direct mapping: 1 [ 0.386509][ T1] virtio-pci 0000:00:01.0: iommu: 64-bit OK but direct DMA is limited by 800004000000000 [ 0.386621][ T1] virtio-pci 0000:00:01.0: lsa_required: 0, lsa_enabled: 0, direct mapping: 1 [ 0.386723][ T1] virtio-pci 0000:00:01.0: iommu: 64-bit OK but direct DMA is limited by 800004000000000 [ 0.388040][ T1] virtio-pci 0000:00:03.0: enabling device (0100 -> 0103) [ 0.390005][ T1] virtio-pci 0000:00:03.0: lsa_required: 0, lsa_enabled: 0, direct mapping: 1 [ 0.390111][ T1] virtio-pci 0000:00:03.0: iommu: 64-bit OK but direct DMA is limited by 800004000000000 [ 0.390216][ T1] virtio-pci 0000:00:03.0: lsa_required: 0, lsa_enabled: 0, direct mapping: 1 [ 0.390316][ T1] virtio-pci 0000:00:03.0: iommu: 64-bit OK but direct DMA is limited by 800004000000000 [ 0.392116][ T1] virtio-pci 0000:00:04.0: enabling device (0100 -> 0103) [ 0.394076][ T1] virtio-pci 0000:00:04.0: lsa_required: 0, lsa_enabled: 0, direct mapping: 1 [ 0.394184][ T1] virtio-pci 0000:00:04.0: iommu: 64-bit OK but direct DMA is limited by 800004000000000 [ 0.394288][ T1] virtio-pci 0000:00:04.0: lsa_required: 0, lsa_enabled: 0, direct mapping: 1 [ 0.394389][ T1] virtio-pci 0000:00:04.0: iommu: 64-bit OK but direct DMA is limited by 800004000000000 [ 0.395729][ T1] virtio-pci 0000:00:05.0: enabling device (0100 -> 0103) [ 0.397705][ T1] virtio-pci 0000:00:05.0: lsa_required: 0, lsa_enabled: 0, direct mapping: 1 [ 0.397814][ T1] virtio-pci 0000:00:05.0: iommu: 64-bit OK but direct DMA is limited by 800004000000000 [ 0.397919][ T1] virtio-pci 0000:00:05.0: lsa_required: 0, lsa_enabled: 0, direct mapping: 1 [ 0.398024][ T1] virtio-pci 0000:00:05.0: iommu: 64-bit OK but direct DMA is limited by 800004000000000 [ 0.399426][ T1] virtio-pci 0000:00:06.0: enabling device (0100 -> 0103) [ 0.401288][ T1] virtio-pci 0000:00:06.0: lsa_required: 0, lsa_enabled: 0, direct mapping: 1 [ 0.401396][ T1] virtio-pci 0000:00:06.0: iommu: 64-bit OK but direct DMA is limited by 800004000000000 [ 0.401502][ T1] virtio-pci 0000:00:06.0: lsa_required: 0, lsa_enabled: 0, direct mapping: 1 [ 0.401604][ T1] virtio-pci 0000:00:06.0: iommu: 64-bit OK but direct DMA is limited by 800004000000000 [ 0.403644][ T1] virtio-pci 0000:00:07.0: enabling device (0100 -> 0103) [ 0.405723][ T1] virtio-pci 0000:00:07.0: lsa_required: 0, lsa_enabled: 0, direct mapping: 1 [ 0.405830][ T1] virtio-pci 0000:00:07.0: iommu: 64-bit OK but direct DMA is limited by 800004000000000 [ 0.405936][ T1] virtio-pci 0000:00:07.0: lsa_required: 0, lsa_enabled: 0, direct mapping: 1 [ 0.406044][ T1] virtio-pci 0000:00:07.0: iommu: 64-bit OK but direct DMA is limited by 800004000000000 [ 0.409460][ T1] Serial: 8250/16550 driver, 4 ports, IRQ sharing enabled [ 0.427929][ T770] Freeing initrd memory: 21120K [ 0.431965][ T1] Non-volatile memory driver v1.3 [ 0.432069][ T1] pseries_rng: Registering IBM pSeries RNG driver [ 0.433884][ T1] mousedev: PS/2 mouse device common for all mice [ 0.435769][ T1] pseries_idle_driver registered [ 0.435912][ T1] hid: raw HID events driver (C) Jiri Kosina [ 0.436062][ T1] drop_monitor: Initializing network drop monitor service [ 0.436412][ T1] NET: Registered PF_INET6 protocol family [ 0.437731][ T1] Segment Routing with IPv6 [ 0.437819][ T1] RPL Segment Routing with IPv6 [ 0.437897][ T1] In-situ OAM (IOAM) with IPv6 [ 0.438002][ T1] PFKEY is deprecated and scheduled to be removed in 2027, please contact the netdev mailing list [ 0.438125][ T1] NET: Registered PF_KEY protocol family [ 0.438508][ T1] secvar-sysfs: Failed to retrieve secvar operations [ 0.441215][ T1] registered taskstats version 1 [ 0.464617][ T1] Loading compiled-in X.509 certificates [ 0.481670][ T1] Loaded X.509 cert 'home:tiwai OBS Project: 466e10c6490242bdd3a9985914c1906197b53a81' [ 0.487739][ T1] Demotion targets for Node 0: null [ 0.487834][ T1] page_owner is disabled [ 0.518088][ T1] Key type .fscrypt registered [ 0.518163][ T1] Key type fscrypt-provisioning registered [ 0.518473][ T1] Key type big_key registered [ 0.536738][ T1] Key type encrypted registered [ 0.536916][ T1] Secure boot mode disabled [ 0.536994][ T1] ima: No TPM chip found, activating TPM-bypass! [ 0.537070][ T1] Loading compiled-in module X.509 certificates [ 0.537347][ T1] Loaded X.509 cert 'home:tiwai OBS Project: 466e10c6490242bdd3a9985914c1906197b53a81' [ 0.537451][ T1] ima: Allocated hash algorithm: sha256 [ 0.538132][ T1] Secure boot mode disabled [ 0.538236][ T1] Trusted boot mode disabled [ 0.538303][ T1] ima: No architecture policies found [ 0.538448][ T1] evm: Initialising EVM extended attributes: [ 0.538523][ T1] evm: security.selinux [ 0.538569][ T1] evm: security.SMACK64 (disabled) [ 0.538629][ T1] evm: security.SMACK64EXEC (disabled) [ 0.538689][ T1] evm: security.SMACK64TRANSMUTE (disabled) [ 0.538762][ T1] evm: security.SMACK64MMAP (disabled) [ 0.538822][ T1] evm: security.apparmor [ 0.538868][ T1] evm: security.ima [ 0.538915][ T1] evm: security.capability [ 0.538983][ T1] evm: HMAC attrs: 0x1 [ 0.553344][ T1] SED: plpks not available
Re: [Linux PPC] Disable PREEMPT
Quoted 89 lines · Michal Suchánek
Quoted 4 lines · Harsh Prateek Bora
+ Amit, Gautam - since they recently came across a similar regression which is seen with non KVM workload as well.
+ Venkat - for CI improvement suggestion below.Quoted 11 lines
Hi Michal,
Quoted 7 lines · Michal Suchánek
There is another problem that Linux 7.2.2 often locks up on boot inside the guest, and as a result a different kernel is needed in the guest to reproduce the host crash. This is more recent, linux 6.12 does not have this problem. Will try some different kernel combinations to see if I can narrow this down. For this the repro is merely booting the kernel in the VM, it typically fails early before userspace produces any messages.
This one regressed between 6.19.12
https://github.com/openSUSE/kernel-source/blob/9f6830f/config/ppc64le/default
and 7.0.12
https://github.com/openSUSE/kernel-source/blob/2ebf0bc/config/ppc64le/defaultThanks
Michal
SLOF ********************************************************************** QEMU Starting
Build Date = Aug 13 2026 14:47:36
FW Version = abuild@OBS release 20230918
Press "s" to enter Open Firmware.Populating /vdevice methods
Populating /vdevice/vty@30000000
Populating /vdevice/nvram@71000000
Populating /pci@800000020000000
Loading Linux 7.0.12-1.g2ebf0bc-default ...
Loading initial ramdisk ...
OF stdout device is: /vdevice/vty@30000000
Preparing to boot Linux version 7.0.12-1.g2ebf0bc-default (geeko@buildhost) (gcc (SUSE Linux) 15.3.0, GNU ld (GNU Binutils; openSUSE Tumbleweed) 2.45.0.20251103-4) #1 SMPPREEMPT_DYNAMICMon Jun 15 08:39:32 UTC 2026 (2ebf0bc) Detected machine type: 0000000000000101
command line: BOOT_IMAGE=/boot/vmlinux-7.0.12-1.g2ebf0bc-default root=UUID=304c7f07-efbb-1070-2f27-accd935ec088 rw quiet systemd.show_status=1 security=selinux selinux=1
Max number of cores passed to firmware: 8192 (NR_CPUS= 8192)
Calling ibm,client-architecture-support... done
memory layout at init:
memory_limit: 0000000000000000 (16 MB aligned)
alloc_bottom:00000000066b0000
alloc_top: 0000000030000000
alloc_top_hi:0000003e00000000
rmo_top: 0000000030000000
ram_top:0000003e00000000
instantiating rtas at0x000000002fff0000... doneprom_hold_cpus: skipped
copying OF device tree...
Building dt strings...
Building dt structure...
Device tree strings0x00000000066c0000->0x00000000066c0bec
Device tree struct0x00000000066d0000->0x00000000066f0000
Quiescing Open Firmware ...
Booting Linux via__start()@0x0000000000250000...[ 0.000000][ T0] ERROR: Failed to allocate trace buffer [ 0.000000][ T0] ERROR: tracer: failed to allocate ring buffer! Linux ppc64le #1 SMP PREEMPT_D[ 0.285758][ T673] BUG: Kernel NULL pointer dereference on read at 0x00000010 [ 0.285877][ T673] Faulting instruction address: 0xc000000000485bd0 [ 0.285903][ T1] VFS: Dquot-cache hash table entries: 8192 (order 0, 65536 bytes) [ 0.285954][ T673] Oops: Kernel access of bad area, sig: 7 [#1] [ 0.286133][ T673] LE PAGE_SIZE=64K MMU=Radix SMP NR_CPUS=8192 NUMA pSeries [ 0.286240][ T673] Modules linked in: [ 0.286288][ T673] CPU: 15 UID: 0 PID: 673 Comm: kworker/u531:0 Not tainted 7.0.12-1.g2ebf0bc-default #1 PREEMPT(full) openSUSE Tumbleweed (unreleased) cf0846124d7853fab338aeae87203b36cac18419 [ 0.286527][ T673] Hardware name: IBM pSeries (emulated by qemu) Power11 (architected) 0x820200 0xf000007 of:SLOF,HEAD hv:linux,kvm pSeries [ 0.286739][ T673] Workqueue: trace_init_wq tracer_init_tracefs_work_func [ 0.286818][ T673] NIP: c000000000485bd0 LR: c000000000448864 CTR: c0000000005a3420 [ 0.286906][ T673] REGS: c00000000a7a7960 TRAP: 0300 Not tainted (7.0.12-1.g2ebf0bc-default) [ 0.287014][ T673] MSR: 8000000000009033 <SF,EE,ME,IR,DR,RI,LE> CR: 44088404 XER: 00000000 [ 0.287122][ T673] CFAR: c000000000448860 DAR: 0000000000000010 DSISR: 00080000 IRQMASK: 0 [ 0.287122][ T673] GPR00: c000000000448864 c00000000a7a7c00 c000000001f38100 c000000002a5c098 [ 0.287122][ T673] GPR04: c0000000017dc5f0 c0000000017dc5e8 000000000000001f 0000000000000064 [ 0.287122][ T673] GPR08: c0000000017dc628 00000000000005f0 00000000000005e8 0000000084000404 [ 0.287122][ T673] GPR12: c0000000005a3420 c000003dfff43d80 c0000000018e5600 c0000000018e54f0 [ 0.287122][ T673] GPR16: 0000000000000000 0000000000000000 0000000000000000 0000000000000000 [ 0.287122][ T673] GPR20: c0000000013ec418 c0000000013ef6d8 c0000000017dc5a0 c0000000017dc590 [ 0.287122][ T673] GPR24: c000000001825330 c0000000017dc628 c000000014b52a05 0000000000000000 [ 0.287122][ T673] GPR28: c0000000017dc5e8 0000000000000000 c0000000017dc5f0 c000000002a5e008 [ 0.287970][ T673] NIP [c000000000485bd0] __find_event_file+0x70/0x3c0 [ 0.288046][ T673] LR [c000000000448864] init_tracer_tracefs+0x274/0xc80 [ 0.288122][ T673] Call Trace: [ 0.288167][ T673] [c00000000a7a7c00] [c00000000a7a7c60] 0xc00000000a7a7c60 (unreliable) [ 0.288258][ T673] [c00000000a7a7c60] [c000000000448864] init_tracer_tracefs+0x274/0xc80
Quoted 8 lines
[ 0.288348][ T673] [c00000000a7a7dc0] [c00000000203fcf0] tracer_init_tracefs_work_func+0x50/0x320 [ 0.288452][ T673] [c00000000a7a7e50] [c0000000002620e8] process_one_work+0x1e8/0x5c0 [ 0.288541][ T673] [c00000000a7a7f10] [c00000000026309c] worker_thread+0x1dc/0x3d0 [ 0.288630][ T673] [c00000000a7a7f90] [c00000000026fa34] kthread+0x194/0x1b0 [ 0.288721][ T673] [c00000000a7a7fe0] [c00000000000de58] start_kernel_thread+0x14/0x18 [ 0.288810][ T673] Code: fb410030 fb810040 fba10048 7cbc2b78 3ba00000 fbc10050 7d194378 7c9e2378 2e2a0fc0 2da90fc0 f8010070 60420000 <e93b0010> 81490058 e8890018 714a0208 [ 0.289001][ T673] ---[ end trace 0000000000000000 ]--- [ 0.290718][ T673] pstore: backend (nvram) writing error (-1)
This crash might be relevant to the problem, and while qemu can dump the memory content crash refuses to open it:
crash: incompatible arguments:
/usr/lib/modules/7.2.2-5.g6824496-default/vmlinux is not SMP -- /scratch/vmcore is SMP
The problem is not 100% reproducible, bisecting it may be tricky.
Thanks
Michal
Re: [Linux PPC] Disable PREEMPT
In reply to Michal SuchánekQuoted 17 lines · Michal Suchánek
Quoted 4 lines · Harsh Prateek Bora
+ Amit, Gautam - since they recently came across a similar regression which is seen with non KVM workload as well.
+ Venkat - for CI improvement suggestion below.Quoted 11 lines
Hi Michal,
Quoted 7 lines · Michal Suchánek
There is another problem that Linux 7.2.2 often locks up on boot inside the guest, and as a result a different kernel is needed in the guest to reproduce the host crash. This is more recent, linux 6.12 does not have this problem. Will try some different kernel combinations to see if I can narrow this down. For this the repro is merely booting the kernel in the VM, it typically fails early before userspace produces any messages.
Quoted 4 lines
This one regressed between 6.19.12
https://github.com/openSUSE/kernel-source/blob/9f6830f/config/ppc64le/default
and 7.0.12
https://github.com/openSUSE/kernel-source/blob/2ebf0bc/config/ppc64le/default
Which is when preempt was enabled.
Very likely preexisting problem that was exposed by enabling preemption again.
@@ -121,9 +122,7 @@ CONFIG_BPF_LSM=y
CONFIG_PREEMPT_BUILD=y
CONFIG_ARCH_HAS_PREEMPT_LAZY=y
-# CONFIG_PREEMPT_NONE is not set
-CONFIG_PREEMPT_VOLUNTARY=y
-# CONFIG_PREEMPT is not set
+CONFIG_PREEMPT=y
# CONFIG_PREEMPT_LAZY is not set
CONFIG_PREEMPT_COUNT=y
CONFIG_PREEMPTION=y
Thanks
Michal
Quoted 185 lines
Thanks
Michal
SLOF ********************************************************************** QEMU Starting
Build Date = Aug 13 2026 14:47:36
FW Version = abuild@OBS release 20230918
Press "s" to enter Open Firmware.Populating /vdevice methods
Populating /vdevice/vty@30000000
Populating /vdevice/nvram@71000000
Populating /pci@800000020000000
Loading Linux 7.0.12-1.g2ebf0bc-default ...
Loading initial ramdisk ...
OF stdout device is: /vdevice/vty@30000000
Preparing to boot Linux version 7.0.12-1.g2ebf0bc-default (geeko@buildhost) (gcc (SUSE Linux) 15.3.0, GNU ld (GNU Binutils; openSUSE Tumbleweed) 2.45.0.20251103-4) #1 SMPPREEMPT_DYNAMICMon Jun 15 08:39:32 UTC 2026 (2ebf0bc) Detected machine type: 0000000000000101
command line: BOOT_IMAGE=/boot/vmlinux-7.0.12-1.g2ebf0bc-default root=UUID=304c7f07-efbb-1070-2f27-accd935ec088 rw quiet systemd.show_status=1 security=selinux selinux=1
Max number of cores passed to firmware: 8192 (NR_CPUS= 8192)
Calling ibm,client-architecture-support... done
memory layout at init:
memory_limit: 0000000000000000 (16 MB aligned)
alloc_bottom:00000000066b0000
alloc_top: 0000000030000000
alloc_top_hi:0000003e00000000
rmo_top: 0000000030000000
ram_top:0000003e00000000
instantiating rtas at0x000000002fff0000... doneprom_hold_cpus: skipped
copying OF device tree...
Building dt strings...
Building dt structure...
Device tree strings0x00000000066c0000->0x00000000066c0bec
Device tree struct0x00000000066d0000->0x00000000066f0000
Quiescing Open Firmware ...
Booting Linux via__start()@0x0000000000250000...[ 0.000000][ T0] ERROR: Failed to allocate trace buffer [ 0.000000][ T0] ERROR: tracer: failed to allocate ring buffer! Linux ppc64le #1 SMP PREEMPT_D[ 0.285758][ T673] BUG: Kernel NULL pointer dereference on read at 0x00000010 [ 0.285877][ T673] Faulting instruction address: 0xc000000000485bd0 [ 0.285903][ T1] VFS: Dquot-cache hash table entries: 8192 (order 0, 65536 bytes) [ 0.285954][ T673] Oops: Kernel access of bad area, sig: 7 [#1] [ 0.286133][ T673] LE PAGE_SIZE=64K MMU=Radix SMP NR_CPUS=8192 NUMA pSeries [ 0.286240][ T673] Modules linked in: [ 0.286288][ T673] CPU: 15 UID: 0 PID: 673 Comm: kworker/u531:0 Not tainted 7.0.12-1.g2ebf0bc-default #1 PREEMPT(full) openSUSE Tumbleweed (unreleased) cf0846124d7853fab338aeae87203b36cac18419 [ 0.286527][ T673] Hardware name: IBM pSeries (emulated by qemu) Power11 (architected) 0x820200 0xf000007 of:SLOF,HEAD hv:linux,kvm pSeries [ 0.286739][ T673] Workqueue: trace_init_wq tracer_init_tracefs_work_func [ 0.286818][ T673] NIP: c000000000485bd0 LR: c000000000448864 CTR: c0000000005a3420 [ 0.286906][ T673] REGS: c00000000a7a7960 TRAP: 0300 Not tainted (7.0.12-1.g2ebf0bc-default) [ 0.287014][ T673] MSR: 8000000000009033 <SF,EE,ME,IR,DR,RI,LE> CR: 44088404 XER: 00000000 [ 0.287122][ T673] CFAR: c000000000448860 DAR: 0000000000000010 DSISR: 00080000 IRQMASK: 0 [ 0.287122][ T673] GPR00: c000000000448864 c00000000a7a7c00 c000000001f38100 c000000002a5c098 [ 0.287122][ T673] GPR04: c0000000017dc5f0 c0000000017dc5e8 000000000000001f 0000000000000064 [ 0.287122][ T673] GPR08: c0000000017dc628 00000000000005f0 00000000000005e8 0000000084000404 [ 0.287122][ T673] GPR12: c0000000005a3420 c000003dfff43d80 c0000000018e5600 c0000000018e54f0 [ 0.287122][ T673] GPR16: 0000000000000000 0000000000000000 0000000000000000 0000000000000000 [ 0.287122][ T673] GPR20: c0000000013ec418 c0000000013ef6d8 c0000000017dc5a0 c0000000017dc590 [ 0.287122][ T673] GPR24: c000000001825330 c0000000017dc628 c000000014b52a05 0000000000000000 [ 0.287122][ T673] GPR28: c0000000017dc5e8 0000000000000000 c0000000017dc5f0 c000000002a5e008 [ 0.287970][ T673] NIP [c000000000485bd0] __find_event_file+0x70/0x3c0 [ 0.288046][ T673] LR [c000000000448864] init_tracer_tracefs+0x274/0xc80 [ 0.288122][ T673] Call Trace: [ 0.288167][ T673] [c00000000a7a7c00] [c00000000a7a7c60] 0xc00000000a7a7c60 (unreliable) [ 0.288258][ T673] [c00000000a7a7c60] [c000000000448864] init_tracer_tracefs+0x274/0xc80 [ 0.288348][ T673] [c00000000a7a7dc0] [c00000000203fcf0] tracer_init_tracefs_work_func+0x50/0x320 [ 0.288452][ T673] [c00000000a7a7e50] [c0000000002620e8] process_one_work+0x1e8/0x5c0 [ 0.288541][ T673] [c00000000a7a7f10] [c00000000026309c] worker_thread+0x1dc/0x3d0 [ 0.288630][ T673] [c00000000a7a7f90] [c00000000026fa34] kthread+0x194/0x1b0 [ 0.288721][ T673] [c00000000a7a7fe0] [c00000000000de58] start_kernel_thread+0x14/0x18 [ 0.288810][ T673] Code: fb410030 fb810040 fba10048 7cbc2b78 3ba00000 fbc10050 7d194378 7c9e2378 2e2a0fc0 2da90fc0 f8010070 60420000 <e93b0010> 81490058 e8890018 714a0208 [ 0.289001][ T673] ---[ end trace 0000000000000000 ]--- [ 0.290718][ T673] pstore: backend (nvram) writing error (-1) [ 0.290805][ T673] [ 0.290839][ T673] note: kworker/u531:0[673] exited with irqs disabled [ 0.304261][ T1] NET: Registered PF_INET protocol family [ 0.304602][ T1] IP idents hash table entries: 262144 (order: 5, 2097152 bytes, linear) [ 0.315892][ T1] tcp_listen_portaddr_hash hash table entries: 65536 (order: 4, 1048576 bytes, linear) [ 0.316104][ T1] Table-perturb hash table entries: 65536 (order: 2, 262144 bytes, linear) [ 0.316224][ T1] TCP established hash table entries: 524288 (order: 6, 4194304 bytes, linear) [ 0.316873][ T1] TCP bind hash table entries: 65536 (order: 5, 2097152 bytes, linear) [ 0.317199][ T1] TCP: Hash tables configured (established 524288 bind 65536) [ 0.317748][ T1] MPTCP token hash table entries: 65536 (order: 5, 1572864 bytes, linear) [ 0.317970][ T1] UDP hash table entries: 65536 (order: 6, 4194304 bytes, linear) [ 0.318402][ T1] UDP-Lite hash table entries: 65536 (order: 6, 4194304 bytes, linear) [ 0.319148][ T1] NET: Registered PF_UNIX/PF_LOCAL protocol family [ 0.319249][ T1] NET: Registered PF_XDP protocol family [ 0.320019][ T1] PCI: CLS 0 bytes, default 128 [ 0.320281][ T1] rtas_flash: no firmware flash support [ 0.320967][ T770] Trying to unpack rootfs image as initramfs... [ 0.331385][ T1] Initialise system trusted keyrings [ 0.331739][ T1] Key type blacklist registered [ 0.332191][ T1] workingset: timestamp_bits=38 max_order=22 bucket_order=0 [ 0.333804][ T1] integrity: Platform Keyring initialized [ 0.333875][ T1] integrity: Machine keyring initialized [ 0.333935][ T1] Allocating IMA blacklist keyring. [ 0.343039][ T1] Key type asymmetric registered [ 0.343109][ T1] Asymmetric key parser 'x509' registered [ 0.344215][ T1] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 246) [ 0.344623][ T1] io scheduler mq-deadline registered [ 0.344688][ T1] io scheduler kyber registered [ 0.344800][ T1] io scheduler bfq registered [ 0.380554][ T1] ledtrig-cpu: registered to indicate activity on CPUs [ 0.380794][ T1] virtio-pci 0000:00:01.0: enabling device (0100 -> 0103) [ 0.382384][ T1] virtio-pci 0000:00:01.0: ibm,query-pe-dma-windows(2026) 800 8000000 20000000 returned 0, lb=2000000000 ps=107 wn=1 [ 0.383175][ T1] virtio-pci 0000:00:01.0: ibm,create-pe-dma-window(2027) 800 8000000 20000000 18 26 returned 0 (liobn = 0x80000001 starting addr = 8000000 0) [ 0.386395][ T1] virtio-pci 0000:00:01.0: lsa_required: 0, lsa_enabled: 0, direct mapping: 1 [ 0.386509][ T1] virtio-pci 0000:00:01.0: iommu: 64-bit OK but direct DMA is limited by 800004000000000 [ 0.386621][ T1] virtio-pci 0000:00:01.0: lsa_required: 0, lsa_enabled: 0, direct mapping: 1 [ 0.386723][ T1] virtio-pci 0000:00:01.0: iommu: 64-bit OK but direct DMA is limited by 800004000000000 [ 0.388040][ T1] virtio-pci 0000:00:03.0: enabling device (0100 -> 0103) [ 0.390005][ T1] virtio-pci 0000:00:03.0: lsa_required: 0, lsa_enabled: 0, direct mapping: 1 [ 0.390111][ T1] virtio-pci 0000:00:03.0: iommu: 64-bit OK but direct DMA is limited by 800004000000000 [ 0.390216][ T1] virtio-pci 0000:00:03.0: lsa_required: 0, lsa_enabled: 0, direct mapping: 1 [ 0.390316][ T1] virtio-pci 0000:00:03.0: iommu: 64-bit OK but direct DMA is limited by 800004000000000 [ 0.392116][ T1] virtio-pci 0000:00:04.0: enabling device (0100 -> 0103) [ 0.394076][ T1] virtio-pci 0000:00:04.0: lsa_required: 0, lsa_enabled: 0, direct mapping: 1 [ 0.394184][ T1] virtio-pci 0000:00:04.0: iommu: 64-bit OK but direct DMA is limited by 800004000000000 [ 0.394288][ T1] virtio-pci 0000:00:04.0: lsa_required: 0, lsa_enabled: 0, direct mapping: 1 [ 0.394389][ T1] virtio-pci 0000:00:04.0: iommu: 64-bit OK but direct DMA is limited by 800004000000000 [ 0.395729][ T1] virtio-pci 0000:00:05.0: enabling device (0100 -> 0103) [ 0.397705][ T1] virtio-pci 0000:00:05.0: lsa_required: 0, lsa_enabled: 0, direct mapping: 1 [ 0.397814][ T1] virtio-pci 0000:00:05.0: iommu: 64-bit OK but direct DMA is limited by 800004000000000 [ 0.397919][ T1] virtio-pci 0000:00:05.0: lsa_required: 0, lsa_enabled: 0, direct mapping: 1 [ 0.398024][ T1] virtio-pci 0000:00:05.0: iommu: 64-bit OK but direct DMA is limited by 800004000000000 [ 0.399426][ T1] virtio-pci 0000:00:06.0: enabling device (0100 -> 0103) [ 0.401288][ T1] virtio-pci 0000:00:06.0: lsa_required: 0, lsa_enabled: 0, direct mapping: 1 [ 0.401396][ T1] virtio-pci 0000:00:06.0: iommu: 64-bit OK but direct DMA is limited by 800004000000000 [ 0.401502][ T1] virtio-pci 0000:00:06.0: lsa_required: 0, lsa_enabled: 0, direct mapping: 1 [ 0.401604][ T1] virtio-pci 0000:00:06.0: iommu: 64-bit OK but direct DMA is limited by 800004000000000 [ 0.403644][ T1] virtio-pci 0000:00:07.0: enabling device (0100 -> 0103) [ 0.405723][ T1] virtio-pci 0000:00:07.0: lsa_required: 0, lsa_enabled: 0, direct mapping: 1 [ 0.405830][ T1] virtio-pci 0000:00:07.0: iommu: 64-bit OK but direct DMA is limited by 800004000000000 [ 0.405936][ T1] virtio-pci 0000:00:07.0: lsa_required: 0, lsa_enabled: 0, direct mapping: 1 [ 0.406044][ T1] virtio-pci 0000:00:07.0: iommu: 64-bit OK but direct DMA is limited by 800004000000000 [ 0.409460][ T1] Serial: 8250/16550 driver, 4 ports, IRQ sharing enabled [ 0.427929][ T770] Freeing initrd memory: 21120K [ 0.431965][ T1] Non-volatile memory driver v1.3 [ 0.432069][ T1] pseries_rng: Registering IBM pSeries RNG driver [ 0.433884][ T1] mousedev: PS/2 mouse device common for all mice [ 0.435769][ T1] pseries_idle_driver registered [ 0.435912][ T1] hid: raw HID events driver (C) Jiri Kosina [ 0.436062][ T1] drop_monitor: Initializing network drop monitor service [ 0.436412][ T1] NET: Registered PF_INET6 protocol family [ 0.437731][ T1] Segment Routing with IPv6 [ 0.437819][ T1] RPL Segment Routing with IPv6 [ 0.437897][ T1] In-situ OAM (IOAM) with IPv6 [ 0.438002][ T1] PFKEY is deprecated and scheduled to be removed in 2027, please contact the netdev mailing list [ 0.438125][ T1] NET: Registered PF_KEY protocol family [ 0.438508][ T1] secvar-sysfs: Failed to retrieve secvar operations [ 0.441215][ T1] registered taskstats version 1 [ 0.464617][ T1] Loading compiled-in X.509 certificates [ 0.481670][ T1] Loaded X.509 cert 'home:tiwai OBS Project: 466e10c6490242bdd3a9985914c1906197b53a81' [ 0.487739][ T1] Demotion targets for Node 0: null [ 0.487834][ T1] page_owner is disabled [ 0.518088][ T1] Key type .fscrypt registered [ 0.518163][ T1] Key type fscrypt-provisioning registered [ 0.518473][ T1] Key type big_key registered [ 0.536738][ T1] Key type encrypted registered [ 0.536916][ T1] Secure boot mode disabled [ 0.536994][ T1] ima: No TPM chip found, activating TPM-bypass! [ 0.537070][ T1] Loading compiled-in module X.509 certificates [ 0.537347][ T1] Loaded X.509 cert 'home:tiwai OBS Project: 466e10c6490242bdd3a9985914c1906197b53a81' [ 0.537451][ T1] ima: Allocated hash algorithm: sha256 [ 0.538132][ T1] Secure boot mode disabled [ 0.538236][ T1] Trusted boot mode disabled [ 0.538303][ T1] ima: No architecture policies found [ 0.538448][ T1] evm: Initialising EVM extended attributes: [ 0.538523][ T1] evm: security.selinux [ 0.538569][ T1] evm: security.SMACK64 (disabled) [ 0.538629][ T1] evm: security.SMACK64EXEC (disabled) [ 0.538689][ T1] evm: security.SMACK64TRANSMUTE (disabled) [ 0.538762][ T1] evm: security.SMACK64MMAP (disabled) [ 0.538822][ T1] evm: security.apparmor [ 0.538868][ T1] evm: security.ima [ 0.538915][ T1] evm: security.capability [ 0.538983][ T1] evm: HMAC attrs: 0x1 [ 0.553344][ T1] SED: plpks not available
Re: [Linux PPC] Disable PREEMPT
Quoted 29 lines · Michal Suchánek
Quoted 17 lines · Michal Suchánek
Quoted 4 lines · Harsh Prateek Bora
+ Amit, Gautam - since they recently came across a similar regression which is seen with non KVM workload as well.
+ Venkat - for CI improvement suggestion below.Quoted 11 lines
Hi Michal,
Quoted 7 lines · Michal Suchánek
There is another problem that Linux 7.2.2 often locks up on boot inside the guest, and as a result a different kernel is needed in the guest to reproduce the host crash. This is more recent, linux 6.12 does not have this problem. Will try some different kernel combinations to see if I can narrow this down. For this the repro is merely booting the kernel in the VM, it typically fails early before userspace produces any messages.
Quoted 4 lines
This one regressed between 6.19.12
https://github.com/openSUSE/kernel-source/blob/9f6830f/config/ppc64le/default
and 7.0.12
https://github.com/openSUSE/kernel-source/blob/2ebf0bc/config/ppc64le/defaultWhich is when preempt was enabled.
Very likely preexisting problem that was exposed by enabling preemption again.
Review CONFIG_BPF_LSM=y · line 128
Quoted 10 lines
(quoted diff) +1
-3@@ -121,9 +122,7 @@ CONFIG_BPF_LSM=y CONFIG_PREEMPT_BUILD=y CONFIG_ARCH_HAS_PREEMPT_LAZY=y -# CONFIG_PREEMPT_NONE is not set -CONFIG_PREEMPT_VOLUNTARY=y -# CONFIG_PREEMPT is not set +CONFIG_PREEMPT=y # CONFIG_PREEMPT_LAZY is not set CONFIG_PREEMPT_COUNT=y CONFIG_PREEMPTION=y
Looking more into this the problem is not reproducible with 6.19 with full preempt, and can be reproduced with 7.0 with full preempt where preemtion is mandatory. It only so happens that 1.19 was last kernel where preemption was not mandatory and where this problem also happened to not manifest with the Tumbleweed config.
It is not deterministic enough to bisect. It's probably some kind of race condition or code generation problem that can surface and go away or become too difficult to reproduce with seemingly unrelated changes.
Crash happens very early but it's eemu so the memory can be saved regardelss. The problem is that the crash tool refuses to load the core bacause it detects the core as SMP and vmlinux as non-SMP or the other way around.
Thanks
Michal
Quoted 191 lines
Thanks
Michal
Quoted 185 lines
Thanks
Michal
SLOF ********************************************************************** QEMU Starting
Build Date = Aug 13 2026 14:47:36
FW Version = abuild@OBS release 20230918
Press "s" to enter Open Firmware.Populating /vdevice methods
Populating /vdevice/vty@30000000
Populating /vdevice/nvram@71000000
Populating /pci@800000020000000
Loading Linux 7.0.12-1.g2ebf0bc-default ...
Loading initial ramdisk ...
OF stdout device is: /vdevice/vty@30000000
Preparing to boot Linux version 7.0.12-1.g2ebf0bc-default (geeko@buildhost) (gcc (SUSE Linux) 15.3.0, GNU ld (GNU Binutils; openSUSE Tumbleweed) 2.45.0.20251103-4) #1 SMPPREEMPT_DYNAMICMon Jun 15 08:39:32 UTC 2026 (2ebf0bc) Detected machine type: 0000000000000101
command line: BOOT_IMAGE=/boot/vmlinux-7.0.12-1.g2ebf0bc-default root=UUID=304c7f07-efbb-1070-2f27-accd935ec088 rw quiet systemd.show_status=1 security=selinux selinux=1
Max number of cores passed to firmware: 8192 (NR_CPUS= 8192)
Calling ibm,client-architecture-support... done
memory layout at init:
memory_limit: 0000000000000000 (16 MB aligned)
alloc_bottom:00000000066b0000
alloc_top: 0000000030000000
alloc_top_hi:0000003e00000000
rmo_top: 0000000030000000
ram_top:0000003e00000000
instantiating rtas at0x000000002fff0000... doneprom_hold_cpus: skipped
copying OF device tree...
Building dt strings...
Building dt structure...
Device tree strings0x00000000066c0000->0x00000000066c0bec
Device tree struct0x00000000066d0000->0x00000000066f0000
Quiescing Open Firmware ...
Booting Linux via__start()@0x0000000000250000...[ 0.000000][ T0] ERROR: Failed to allocate trace buffer [ 0.000000][ T0] ERROR: tracer: failed to allocate ring buffer! Linux ppc64le #1 SMP PREEMPT_D[ 0.285758][ T673] BUG: Kernel NULL pointer dereference on read at 0x00000010 [ 0.285877][ T673] Faulting instruction address: 0xc000000000485bd0 [ 0.285903][ T1] VFS: Dquot-cache hash table entries: 8192 (order 0, 65536 bytes) [ 0.285954][ T673] Oops: Kernel access of bad area, sig: 7 [#1] [ 0.286133][ T673] LE PAGE_SIZE=64K MMU=Radix SMP NR_CPUS=8192 NUMA pSeries [ 0.286240][ T673] Modules linked in: [ 0.286288][ T673] CPU: 15 UID: 0 PID: 673 Comm: kworker/u531:0 Not tainted 7.0.12-1.g2ebf0bc-default #1 PREEMPT(full) openSUSE Tumbleweed (unreleased) cf0846124d7853fab338aeae87203b36cac18419 [ 0.286527][ T673] Hardware name: IBM pSeries (emulated by qemu) Power11 (architected) 0x820200 0xf000007 of:SLOF,HEAD hv:linux,kvm pSeries [ 0.286739][ T673] Workqueue: trace_init_wq tracer_init_tracefs_work_func [ 0.286818][ T673] NIP: c000000000485bd0 LR: c000000000448864 CTR: c0000000005a3420 [ 0.286906][ T673] REGS: c00000000a7a7960 TRAP: 0300 Not tainted (7.0.12-1.g2ebf0bc-default) [ 0.287014][ T673] MSR: 8000000000009033 <SF,EE,ME,IR,DR,RI,LE> CR: 44088404 XER: 00000000 [ 0.287122][ T673] CFAR: c000000000448860 DAR: 0000000000000010 DSISR: 00080000 IRQMASK: 0 [ 0.287122][ T673] GPR00: c000000000448864 c00000000a7a7c00 c000000001f38100 c000000002a5c098 [ 0.287122][ T673] GPR04: c0000000017dc5f0 c0000000017dc5e8 000000000000001f 0000000000000064 [ 0.287122][ T673] GPR08: c0000000017dc628 00000000000005f0 00000000000005e8 0000000084000404 [ 0.287122][ T673] GPR12: c0000000005a3420 c000003dfff43d80 c0000000018e5600 c0000000018e54f0 [ 0.287122][ T673] GPR16: 0000000000000000 0000000000000000 0000000000000000 0000000000000000 [ 0.287122][ T673] GPR20: c0000000013ec418 c0000000013ef6d8 c0000000017dc5a0 c0000000017dc590 [ 0.287122][ T673] GPR24: c000000001825330 c0000000017dc628 c000000014b52a05 0000000000000000 [ 0.287122][ T673] GPR28: c0000000017dc5e8 0000000000000000 c0000000017dc5f0 c000000002a5e008 [ 0.287970][ T673] NIP [c000000000485bd0] __find_event_file+0x70/0x3c0 [ 0.288046][ T673] LR [c000000000448864] init_tracer_tracefs+0x274/0xc80 [ 0.288122][ T673] Call Trace: [ 0.288167][ T673] [c00000000a7a7c00] [c00000000a7a7c60] 0xc00000000a7a7c60 (unreliable) [ 0.288258][ T673] [c00000000a7a7c60] [c000000000448864] init_tracer_tracefs+0x274/0xc80 [ 0.288348][ T673] [c00000000a7a7dc0] [c00000000203fcf0] tracer_init_tracefs_work_func+0x50/0x320 [ 0.288452][ T673] [c00000000a7a7e50] [c0000000002620e8] process_one_work+0x1e8/0x5c0 [ 0.288541][ T673] [c00000000a7a7f10] [c00000000026309c] worker_thread+0x1dc/0x3d0 [ 0.288630][ T673] [c00000000a7a7f90] [c00000000026fa34] kthread+0x194/0x1b0 [ 0.288721][ T673] [c00000000a7a7fe0] [c00000000000de58] start_kernel_thread+0x14/0x18 [ 0.288810][ T673] Code: fb410030 fb810040 fba10048 7cbc2b78 3ba00000 fbc10050 7d194378 7c9e2378 2e2a0fc0 2da90fc0 f8010070 60420000 <e93b0010> 81490058 e8890018 714a0208 [ 0.289001][ T673] ---[ end trace 0000000000000000 ]--- [ 0.290718][ T673] pstore: backend (nvram) writing error (-1) [ 0.290805][ T673] [ 0.290839][ T673] note: kworker/u531:0[673] exited with irqs disabled [ 0.304261][ T1] NET: Registered PF_INET protocol family [ 0.304602][ T1] IP idents hash table entries: 262144 (order: 5, 2097152 bytes, linear) [ 0.315892][ T1] tcp_listen_portaddr_hash hash table entries: 65536 (order: 4, 1048576 bytes, linear) [ 0.316104][ T1] Table-perturb hash table entries: 65536 (order: 2, 262144 bytes, linear) [ 0.316224][ T1] TCP established hash table entries: 524288 (order: 6, 4194304 bytes, linear) [ 0.316873][ T1] TCP bind hash table entries: 65536 (order: 5, 2097152 bytes, linear) [ 0.317199][ T1] TCP: Hash tables configured (established 524288 bind 65536) [ 0.317748][ T1] MPTCP token hash table entries: 65536 (order: 5, 1572864 bytes, linear) [ 0.317970][ T1] UDP hash table entries: 65536 (order: 6, 4194304 bytes, linear) [ 0.318402][ T1] UDP-Lite hash table entries: 65536 (order: 6, 4194304 bytes, linear) [ 0.319148][ T1] NET: Registered PF_UNIX/PF_LOCAL protocol family [ 0.319249][ T1] NET: Registered PF_XDP protocol family [ 0.320019][ T1] PCI: CLS 0 bytes, default 128 [ 0.320281][ T1] rtas_flash: no firmware flash support [ 0.320967][ T770] Trying to unpack rootfs image as initramfs... [ 0.331385][ T1] Initialise system trusted keyrings [ 0.331739][ T1] Key type blacklist registered [ 0.332191][ T1] workingset: timestamp_bits=38 max_order=22 bucket_order=0 [ 0.333804][ T1] integrity: Platform Keyring initialized [ 0.333875][ T1] integrity: Machine keyring initialized [ 0.333935][ T1] Allocating IMA blacklist keyring. [ 0.343039][ T1] Key type asymmetric registered [ 0.343109][ T1] Asymmetric key parser 'x509' registered [ 0.344215][ T1] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 246) [ 0.344623][ T1] io scheduler mq-deadline registered [ 0.344688][ T1] io scheduler kyber registered [ 0.344800][ T1] io scheduler bfq registered [ 0.380554][ T1] ledtrig-cpu: registered to indicate activity on CPUs [ 0.380794][ T1] virtio-pci 0000:00:01.0: enabling device (0100 -> 0103) [ 0.382384][ T1] virtio-pci 0000:00:01.0: ibm,query-pe-dma-windows(2026) 800 8000000 20000000 returned 0, lb=2000000000 ps=107 wn=1 [ 0.383175][ T1] virtio-pci 0000:00:01.0: ibm,create-pe-dma-window(2027) 800 8000000 20000000 18 26 returned 0 (liobn = 0x80000001 starting addr = 8000000 0) [ 0.386395][ T1] virtio-pci 0000:00:01.0: lsa_required: 0, lsa_enabled: 0, direct mapping: 1 [ 0.386509][ T1] virtio-pci 0000:00:01.0: iommu: 64-bit OK but direct DMA is limited by 800004000000000 [ 0.386621][ T1] virtio-pci 0000:00:01.0: lsa_required: 0, lsa_enabled: 0, direct mapping: 1 [ 0.386723][ T1] virtio-pci 0000:00:01.0: iommu: 64-bit OK but direct DMA is limited by 800004000000000 [ 0.388040][ T1] virtio-pci 0000:00:03.0: enabling device (0100 -> 0103) [ 0.390005][ T1] virtio-pci 0000:00:03.0: lsa_required: 0, lsa_enabled: 0, direct mapping: 1 [ 0.390111][ T1] virtio-pci 0000:00:03.0: iommu: 64-bit OK but direct DMA is limited by 800004000000000 [ 0.390216][ T1] virtio-pci 0000:00:03.0: lsa_required: 0, lsa_enabled: 0, direct mapping: 1 [ 0.390316][ T1] virtio-pci 0000:00:03.0: iommu: 64-bit OK but direct DMA is limited by 800004000000000 [ 0.392116][ T1] virtio-pci 0000:00:04.0: enabling device (0100 -> 0103) [ 0.394076][ T1] virtio-pci 0000:00:04.0: lsa_required: 0, lsa_enabled: 0, direct mapping: 1 [ 0.394184][ T1] virtio-pci 0000:00:04.0: iommu: 64-bit OK but direct DMA is limited by 800004000000000 [ 0.394288][ T1] virtio-pci 0000:00:04.0: lsa_required: 0, lsa_enabled: 0, direct mapping: 1 [ 0.394389][ T1] virtio-pci 0000:00:04.0: iommu: 64-bit OK but direct DMA is limited by 800004000000000 [ 0.395729][ T1] virtio-pci 0000:00:05.0: enabling device (0100 -> 0103) [ 0.397705][ T1] virtio-pci 0000:00:05.0: lsa_required: 0, lsa_enabled: 0, direct mapping: 1 [ 0.397814][ T1] virtio-pci 0000:00:05.0: iommu: 64-bit OK but direct DMA is limited by 800004000000000 [ 0.397919][ T1] virtio-pci 0000:00:05.0: lsa_required: 0, lsa_enabled: 0, direct mapping: 1 [ 0.398024][ T1] virtio-pci 0000:00:05.0: iommu: 64-bit OK but direct DMA is limited by 800004000000000 [ 0.399426][ T1] virtio-pci 0000:00:06.0: enabling device (0100 -> 0103) [ 0.401288][ T1] virtio-pci 0000:00:06.0: lsa_required: 0, lsa_enabled: 0, direct mapping: 1 [ 0.401396][ T1] virtio-pci 0000:00:06.0: iommu: 64-bit OK but direct DMA is limited by 800004000000000 [ 0.401502][ T1] virtio-pci 0000:00:06.0: lsa_required: 0, lsa_enabled: 0, direct mapping: 1 [ 0.401604][ T1] virtio-pci 0000:00:06.0: iommu: 64-bit OK but direct DMA is limited by 800004000000000 [ 0.403644][ T1] virtio-pci 0000:00:07.0: enabling device (0100 -> 0103) [ 0.405723][ T1] virtio-pci 0000:00:07.0: lsa_required: 0, lsa_enabled: 0, direct mapping: 1 [ 0.405830][ T1] virtio-pci 0000:00:07.0: iommu: 64-bit OK but direct DMA is limited by 800004000000000 [ 0.405936][ T1] virtio-pci 0000:00:07.0: lsa_required: 0, lsa_enabled: 0, direct mapping: 1 [ 0.406044][ T1] virtio-pci 0000:00:07.0: iommu: 64-bit OK but direct DMA is limited by 800004000000000 [ 0.409460][ T1] Serial: 8250/16550 driver, 4 ports, IRQ sharing enabled [ 0.427929][ T770] Freeing initrd memory: 21120K [ 0.431965][ T1] Non-volatile memory driver v1.3 [ 0.432069][ T1] pseries_rng: Registering IBM pSeries RNG driver [ 0.433884][ T1] mousedev: PS/2 mouse device common for all mice [ 0.435769][ T1] pseries_idle_driver registered [ 0.435912][ T1] hid: raw HID events driver (C) Jiri Kosina [ 0.436062][ T1] drop_monitor: Initializing network drop monitor service [ 0.436412][ T1] NET: Registered PF_INET6 protocol family [ 0.437731][ T1] Segment Routing with IPv6 [ 0.437819][ T1] RPL Segment Routing with IPv6 [ 0.437897][ T1] In-situ OAM (IOAM) with IPv6 [ 0.438002][ T1] PFKEY is deprecated and scheduled to be removed in 2027, please contact the netdev mailing list [ 0.438125][ T1] NET: Registered PF_KEY protocol family [ 0.438508][ T1] secvar-sysfs: Failed to retrieve secvar operations [ 0.441215][ T1] registered taskstats version 1 [ 0.464617][ T1] Loading compiled-in X.509 certificates [ 0.481670][ T1] Loaded X.509 cert 'home:tiwai OBS Project: 466e10c6490242bdd3a9985914c1906197b53a81' [ 0.487739][ T1] Demotion targets for Node 0: null [ 0.487834][ T1] page_owner is disabled [ 0.518088][ T1] Key type .fscrypt registered [ 0.518163][ T1] Key type fscrypt-provisioning registered [ 0.518473][ T1] Key type big_key registered [ 0.536738][ T1] Key type encrypted registered [ 0.536916][ T1] Secure boot mode disabled [ 0.536994][ T1] ima: No TPM chip found, activating TPM-bypass! [ 0.537070][ T1] Loading compiled-in module X.509 certificates [ 0.537347][ T1] Loaded X.509 cert 'home:tiwai OBS Project: 466e10c6490242bdd3a9985914c1906197b53a81' [ 0.537451][ T1] ima: Allocated hash algorithm: sha256 [ 0.538132][ T1] Secure boot mode disabled [ 0.538236][ T1] Trusted boot mode disabled [ 0.538303][ T1] ima: No architecture policies found [ 0.538448][ T1] evm: Initialising EVM extended attributes: [ 0.538523][ T1] evm: security.selinux [ 0.538569][ T1] evm: security.SMACK64 (disabled) [ 0.538629][ T1] evm: security.SMACK64EXEC (disabled) [ 0.538689][ T1] evm: security.SMACK64TRANSMUTE (disabled) [ 0.538762][ T1] evm: security.SMACK64MMAP (disabled) [ 0.538822][ T1] evm: security.apparmor [ 0.538868][ T1] evm: security.ima [ 0.538915][ T1] evm: security.capability [ 0.538983][ T1] evm: HMAC attrs: 0x1 [ 0.553344][ T1] SED: plpks not available
Shrikanth Hegde
reviewerRe: [Linux PPC] Disable PREEMPT
Hi Michal,
Quoted 31 lines · Michal Suchánek
Quoted 30 lines · Michal Suchánek
Quoted 17 lines · Michal Suchánek
Quoted 4 lines · Harsh Prateek Bora
+ Amit, Gautam - since they recently came across a similar regression which is seen with non KVM workload as well.
+ Venkat - for CI improvement suggestion below.Quoted 11 lines
Hi Michal,
Quoted 7 lines · Michal Suchánek
There is another problem that Linux 7.2.2 often locks up on boot inside the guest, and as a result a different kernel is needed in the guest to reproduce the host crash. This is more recent, linux 6.12 does not have this problem. Will try some different kernel combinations to see if I can narrow this down. For this the repro is merely booting the kernel in the VM, it typically fails early before userspace produces any messages.
Quoted 4 lines
This one regressed between 6.19.12
https://github.com/openSUSE/kernel-source/blob/9f6830f/config/ppc64le/default
and 7.0.12
https://github.com/openSUSE/kernel-source/blob/2ebf0bc/config/ppc64le/defaultWhich is when preempt was enabled.
Very likely preexisting problem that was exposed by enabling preemption again.
(quoted diff) +0
-0@@ -121,9 +122,7 @@ CONFIG_BPF_LSM=y
Quoted 16 lines
Review CONFIG_BPF_LSM=y · line 128
Quoted 9 lines
(quoted diff) +1
-3CONFIG_PREEMPT_BUILD=y CONFIG_ARCH_HAS_PREEMPT_LAZY=y -# CONFIG_PREEMPT_NONE is not set -CONFIG_PREEMPT_VOLUNTARY=y -# CONFIG_PREEMPT is not set +CONFIG_PREEMPT=y # CONFIG_PREEMPT_LAZY is not set CONFIG_PREEMPT_COUNT=y CONFIG_PREEMPTION=yLooking more into this the problem is not reproducible with 6.19 with full preempt, and can be reproduced with 7.0 with full preempt where preemtion is mandatory. It only so happens that 1.19 was last kernel where preemption was not mandatory and where this problem also happened to not manifest with the Tumbleweed config.
I am bit confused. Is it different problem than the kprobe/bpf issue which was observed on host?
Is this kvm/guest specific problem you are observing? Is it still seen even with that kprobe/bpf fix?
Quoted 4 lines
It is not deterministic enough to bisect. It's probably some kind of race condition or code generation problem that can surface and go away or become too difficult to reproduce with seemingly unrelated changes.
Can you try latest kernel?
There was change recently to move to use
generic transfer to guest mode work. i.e VIRT_XFER_TO_GUEST_WORK.
Quoted 9 lines
Crash happens very early but it's eemu so the memory can be saved regardelss. The problem is that the crash tool refuses to load the core bacause it detects the core as SMP and vmlinux as non-SMP or the other way around.
Thanks
Michal
Re: [Linux PPC] Disable PREEMPT
Quoted 50 lines · Shrikanth Hegde
Hi Michal,
Quoted 29 lines · Michal Suchánek
Quoted 28 lines · Michal Suchánek
Quoted 17 lines · Michal Suchánek
Quoted 4 lines · Harsh Prateek Bora
+ Amit, Gautam - since they recently came across a similar regression which is seen with non KVM workload as well.
+ Venkat - for CI improvement suggestion below.Quoted 11 lines
Hi Michal,
Quoted 7 lines · Michal Suchánek
There is another problem that Linux 7.2.2 often locks up on boot inside the guest, and as a result a different kernel is needed in the guest to reproduce the host crash. This is more recent, linux 6.12 does not have this problem. Will try some different kernel combinations to see if I can narrow this down. For this the repro is merely booting the kernel in the VM, it typically fails early before userspace produces any messages.
Quoted 4 lines
This one regressed between 6.19.12
https://github.com/openSUSE/kernel-source/blob/9f6830f/config/ppc64le/default
and 7.0.12
https://github.com/openSUSE/kernel-source/blob/2ebf0bc/config/ppc64le/defaultWhich is when preempt was enabled.
Very likely preexisting problem that was exposed by enabling preemption again.
Quoted 17 lines
Review CONFIG_BPF_LSM=y · line 127
Quoted 10 lines
(quoted diff) +1
-3@@ -121,9 +122,7 @@ CONFIG_BPF_LSM=y CONFIG_PREEMPT_BUILD=y CONFIG_ARCH_HAS_PREEMPT_LAZY=y -# CONFIG_PREEMPT_NONE is not set -CONFIG_PREEMPT_VOLUNTARY=y -# CONFIG_PREEMPT is not set +CONFIG_PREEMPT=y # CONFIG_PREEMPT_LAZY is not set CONFIG_PREEMPT_COUNT=y CONFIG_PREEMPTION=yLooking more into this the problem is not reproducible with 6.19 with full preempt, and can be reproduced with 7.0 with full preempt where preemtion is mandatory. It only so happens that 1.19 was last kernel where preemption was not mandatory and where this problem also happened to not manifest with the Tumbleweed config.
Quoted 2 lines
I am bit confused. Is it different problem than the kprobe/bpf issue which was observed on host?
Yes, it appears to be different, a crash very early during boot with a different stack trace.
Quoted 3 lines
Is this kvm/guest specific problem you are observing? Is it still seen even with that kprobe/bpf fix?
Yes, even with the fix this can be observed.
Quoted 7 lines
Quoted 5 lines
It is not deterministic enough to bisect. It's probably some kind of race condition or code generation problem that can surface and go away or become too difficult to reproduce with seemingly unrelated changes.
Can you try latest kernel?
How much latest?
I tried with 7.2.6 with the kprobe fix as guest, and some earlier 7.2.x as host already, and the problem is reproducible.
Thanks
Michal
Quoted 14 lines
There was change recently to move to use
generic transfer to guest mode work. i.eVIRT_XFER_TO_GUEST_WORK.Quoted 9 lines
Crash happens very early but it's eemu so the memory can be saved regardelss. The problem is that the crash tool refuses to load the core bacause it detects the core as SMP and vmlinux as non-SMP or the other way around.
Thanks
Michal
Shrikanth Hegde
reviewerRe: [Linux PPC] Disable PREEMPT
In reply to Michal SuchánekQuoted 60 lines
Quoted 2 lines
If possible run against current upstream and share the results.
[ 472.091531][ T6181] Kernel panic - not syncing: stack-protector: Kernel stack is corrupted in: kvmhv_run_single_vcpu+0x19d4/0x1b50 [kvm_hv] [ 472.091598][ T6181] CPU: 29 UID: 107 PID: 6181 Comm: CPU 112/KVM Not tainted 7.2.2-5.g6824496-default #1 PREEMPT(full) openSUSE Tumbleweed (unreleased) 61871a5f06863b4006f5ef27cd9f18e8a7a2edad [ 472.091612][ T6181] Hardware name: IBM,9824-42A Power11 (architected) 0x820200 0xf000007 of:IBM,FW1110.20 (OB1110_130) hv:phyp pSeries [ 472.091624][ T6181] Call Trace: [ 472.091630][ T6181] [c00000000fdfb680] [c00000000134ce90] dump_stack_lvl+0x84/0xc0 (unreliable) [ 472.091653][ T6181] [c00000000fdfb6b0] [c00000000022e7c8] vpanic+0x324/0x5e4 [ 472.091666][ T6181] [c00000000fdfb760] [c00000000022eac4] do_panic_on_target_cpu+0x0/0x2c [ 472.091677][ T6181] [c00000000fdfb780] [c0000000013c1ff8] __stack_chk_fail+0x48/0x60 [ 472.091689][ T6181] [c00000000fdfb7f0] [c00800001aae219c] kvmhv_run_single_vcpu+0x19d4/0x1b50 [kvm_hv] [ 472.091712][ T6181] [c00000000fdfb940] [c00800001aae24b4] kvmppc_vcpu_run_hv+0x19c/0x12f0 [kvm_hv] [ 472.091732][ T6181] [c00000000fdfba10] [c00800001aeeed18] kvmppc_vcpu_run+0x30/0x48 [kvm] [ 472.091779][ T6181] [c00000000fdfba30] [c00800001aee9ef4] kvm_arch_vcpu_ioctl_run+0x35c/0x4a0 [kvm] [ 472.091813][ T6181] [c00000000fdfbac0] [c00800001aedaac4] kvm_vcpu_ioctl+0x1ac/0xad8 [kvm] [ 472.091844][ T6181] [c00000000fdfbca0] [c0000000007f1244] sys_ioctl+0x374/0x1060 [ 472.091857][ T6181] [c00000000fdfbdb0] [c00000000002f7f8] system_call_exception+0x188/0x430 [ 472.091871][ T6181] [c00000000fdfbe50] [c00000000000cfdc] system_call_vectored_common+0x15c/0x2ec [ 472.091886][ T6181] ---- interrupt: 3000 at 0x7fffb5565fac [ 472.091896][ T6181] NIP: 00007fffb5565fac LR: 00007fffb5565fac CTR: 0000000000000000 [ 472.091904][ T6181] REGS: c00000000fdfbe80 TRAP: 3000 Not tainted (7.2.2-5.g6824496-default) [ 472.091911][ T6181] MSR: 800000000280f033 <SF,VEC,VSX,EE,PR,FP,ME,IR,DR,RI,LE> CR: 42044402 XER: 00000000 [ 472.091938][ T6181] IRQMASK: 0 [ 472.091938][ T6181] GPR00: 0000000000000036 00007fbfa77ed7a0 00007fffb5677100 00000000000000fa [ 472.091938][ T6181] GPR04: 000000002000ae80 0000000000000000 0000000000000000 0000000000000000 [ 472.091938][ T6181] GPR08: 00000000000000fa 0000000000000000 0000000000000000 0000000000000000 [ 472.091938][ T6181] GPR12: 0000000000000000 00007fbfa77f5ec0 000000014676f000 00007fbfa77ee7c0 [ 472.091938][ T6181] GPR16: 000000014674e8d0 00007fbfa77eeec0 00007fbfa77eeec0 fffffffffffffff7 [ 472.091938][ T6181] GPR20: 00007fffb71210d0 0000000000000001 00007fbfa77eeec0 0000000000000000 [ 472.091938][ T6181] GPR24: 00007fbfa77ed8e8 0000000105971428 000000002000ae80 0000000105f77a70 [ 472.091938][ T6181] GPR28: 0000000000000000 0000000000000000 000000002000ae80 000000014674f000 [ 472.092020][ T6181] NIP [00007fffb5565fac] 0x7fffb5565fac [ 472.092027][ T6181] LR [00007fffb5565fac] 0x7fffb5565fac [ 472.092033][ T6181] ---- interrupt: 3000 [ 472.098256][ T6181] pstore: backend (nvram) writing error (-1)This is the host, cannot run the kernel as guest because it fails to boot most of the time inside KVM.
Quoted 9 lines
Quoted 7 lines
Nonethless, there are quite a few platforms. Originally no preemption was the only option, and that's the reason why many people run that. It's the conservative, known working option. And that's the reason a lot of platfrom code does not get tested with more aggressive preemtion models, and never gets fixed to work with them.
Full preemption has been there for many years!.
Possible for years, forced only recently.
Quoted 6 lines
Lazy is not that aggressive compared to that.
Quoted 3 lines
Simply disabling the no preemtion option does not make the platform code ready.
Quoted 8 lines
Quoted 2 lines
Let's understand your crash case. Let's see where it is going wrong. I am suspecting it is some wrong usage of preemption api rather than arch can't support preemption.
Very likely some wrong use of the preemption API by the arch code, or no use where it should have been used. It did not matter so long as people could run their no preempt configs and ignore the problem.
Thanks
Friendly LLM analysis says preemption is enabled too early and before completing kvmppc_handle_exit_hv() / kvmppc_handle_nested_exit()
Below is ONLY a speculation and completely UNTESTED. Maybe worth a try.
---
arch/powerpc/kvm/book3s_hv.c +2 -2
@@ -5049,8 +5049,6 @@ int kvmhv_run_single_vcpu(struct kvm_vcpu *vcpu, u64 time_limit,powerpc_local_irq_pmu_restore (flags); -preempt_enable (); -/* * cancel pending decrementer exception if DEC is now positive, or if * entering a nested guest in which case the decrementer is now owned
@@ -5072,6 +5070,8 @@ int kvmhv_run_single_vcpu(struct kvm_vcpu *vcpu, u64 time_limit, } vcpu->arch.ret = r; +preempt_enable (); +if (is_kvmppc_resume_guest (r) && !kvmppc_vcpu_check_block (vcpu)) {kvmppc_set_timer (vcpu);
Quoted 2 lines
Michal
Re: [Linux PPC] Disable PREEMPT
Quoted 67 lines · Shrikanth Hegde
Quoted 67 lines
Quoted 2 lines
If possible run against current upstream and share the results.
[ 472.091531][ T6181] Kernel panic - not syncing: stack-protector: Kernel stack is corrupted in: kvmhv_run_single_vcpu+0x19d4/0x1b50 [kvm_hv] [ 472.091598][ T6181] CPU: 29 UID: 107 PID: 6181 Comm: CPU 112/KVM Not tainted 7.2.2-5.g6824496-default #1 PREEMPT(full) openSUSE Tumbleweed (unreleased) 61871a5f06863b4006f5ef27cd9f18e8a7a2edad [ 472.091612][ T6181] Hardware name: IBM,9824-42A Power11 (architected) 0x820200 0xf000007 of:IBM,FW1110.20 (OB1110_130) hv:phyp pSeries [ 472.091624][ T6181] Call Trace: [ 472.091630][ T6181] [c00000000fdfb680] [c00000000134ce90] dump_stack_lvl+0x84/0xc0 (unreliable) [ 472.091653][ T6181] [c00000000fdfb6b0] [c00000000022e7c8] vpanic+0x324/0x5e4 [ 472.091666][ T6181] [c00000000fdfb760] [c00000000022eac4] do_panic_on_target_cpu+0x0/0x2c [ 472.091677][ T6181] [c00000000fdfb780] [c0000000013c1ff8] __stack_chk_fail+0x48/0x60 [ 472.091689][ T6181] [c00000000fdfb7f0] [c00800001aae219c] kvmhv_run_single_vcpu+0x19d4/0x1b50 [kvm_hv] [ 472.091712][ T6181] [c00000000fdfb940] [c00800001aae24b4] kvmppc_vcpu_run_hv+0x19c/0x12f0 [kvm_hv] [ 472.091732][ T6181] [c00000000fdfba10] [c00800001aeeed18] kvmppc_vcpu_run+0x30/0x48 [kvm] [ 472.091779][ T6181] [c00000000fdfba30] [c00800001aee9ef4] kvm_arch_vcpu_ioctl_run+0x35c/0x4a0 [kvm] [ 472.091813][ T6181] [c00000000fdfbac0] [c00800001aedaac4] kvm_vcpu_ioctl+0x1ac/0xad8 [kvm] [ 472.091844][ T6181] [c00000000fdfbca0] [c0000000007f1244] sys_ioctl+0x374/0x1060 [ 472.091857][ T6181] [c00000000fdfbdb0] [c00000000002f7f8] system_call_exception+0x188/0x430 [ 472.091871][ T6181] [c00000000fdfbe50] [c00000000000cfdc] system_call_vectored_common+0x15c/0x2ec [ 472.091886][ T6181] ---- interrupt: 3000 at 0x7fffb5565fac [ 472.091896][ T6181] NIP: 00007fffb5565fac LR: 00007fffb5565fac CTR: 0000000000000000 [ 472.091904][ T6181] REGS: c00000000fdfbe80 TRAP: 3000 Not tainted (7.2.2-5.g6824496-default) [ 472.091911][ T6181] MSR: 800000000280f033 <SF,VEC,VSX,EE,PR,FP,ME,IR,DR,RI,LE> CR: 42044402 XER: 00000000 [ 472.091938][ T6181] IRQMASK: 0 [ 472.091938][ T6181] GPR00: 0000000000000036 00007fbfa77ed7a0 00007fffb5677100 00000000000000fa [ 472.091938][ T6181] GPR04: 000000002000ae80 0000000000000000 0000000000000000 0000000000000000 [ 472.091938][ T6181] GPR08: 00000000000000fa 0000000000000000 0000000000000000 0000000000000000 [ 472.091938][ T6181] GPR12: 0000000000000000 00007fbfa77f5ec0 000000014676f000 00007fbfa77ee7c0 [ 472.091938][ T6181] GPR16: 000000014674e8d0 00007fbfa77eeec0 00007fbfa77eeec0 fffffffffffffff7 [ 472.091938][ T6181] GPR20: 00007fffb71210d0 0000000000000001 00007fbfa77eeec0 0000000000000000 [ 472.091938][ T6181] GPR24: 00007fbfa77ed8e8 0000000105971428 000000002000ae80 0000000105f77a70 [ 472.091938][ T6181] GPR28: 0000000000000000 0000000000000000 000000002000ae80 000000014674f000 [ 472.092020][ T6181] NIP [00007fffb5565fac] 0x7fffb5565fac [ 472.092027][ T6181] LR [00007fffb5565fac] 0x7fffb5565fac [ 472.092033][ T6181] ---- interrupt: 3000 [ 472.098256][ T6181] pstore: backend (nvram) writing error (-1)This is the host, cannot run the kernel as guest because it fails to boot most of the time inside KVM.
Quoted 9 lines
Quoted 7 lines
Nonethless, there are quite a few platforms. Originally no preemption was the only option, and that's the reason why many people run that. It's the conservative, known working option. And that's the reason a lot of platfrom code does not get tested with more aggressive preemtion models, and never gets fixed to work with them.
Full preemption has been there for many years!.
Possible for years, forced only recently.
Quoted 8 lines
Lazy is not that aggressive compared to that.
Quoted 3 lines
Simply disabling the no preemtion option does not make the platform code ready.
Let's understand your crash case. Let's see where it is going wrong. I am suspecting it is some wrong usage of preemption api rather than arch can't support preemption.
Very likely some wrong use of the preemption API by the arch code, or no use where it should have been used. It did not matter so long as people could run their no preempt configs and ignore the problem.
Quoted 8 lines
Quoted 1 line
Thanks
Friendly LLM analysis says preemption is enabled too early and before completing
kvmppc_handle_exit_hv()/kvmppc_handle_nested_exit()Below is ONLY a speculation and completely UNTESTED. Maybe worth a try.
The patch is munged by the e-mail client, and it causes immediate voluntary preemprion in rcu critical section and hard lockup on starting a KVM VM.
Also it would be sort of bad news if it worked because that would be specific to book3s KVM HV and would not help with the KVM HV from the original report which likely is not book3s, nor with KVM PR.
Thanks
Michal
Shrikanth Hegde
reviewerRe: [Linux PPC] Disable PREEMPT
Quoted 77 lines · Michal Suchánek
Quoted 67 lines · Shrikanth Hegde
Quoted 67 lines
Quoted 2 lines
If possible run against current upstream and share the results.
[ 472.091531][ T6181] Kernel panic - not syncing: stack-protector: Kernel stack is corrupted in: kvmhv_run_single_vcpu+0x19d4/0x1b50 [kvm_hv] [ 472.091598][ T6181] CPU: 29 UID: 107 PID: 6181 Comm: CPU 112/KVM Not tainted 7.2.2-5.g6824496-default #1 PREEMPT(full) openSUSE Tumbleweed (unreleased) 61871a5f06863b4006f5ef27cd9f18e8a7a2edad [ 472.091612][ T6181] Hardware name: IBM,9824-42A Power11 (architected) 0x820200 0xf000007 of:IBM,FW1110.20 (OB1110_130) hv:phyp pSeries [ 472.091624][ T6181] Call Trace: [ 472.091630][ T6181] [c00000000fdfb680] [c00000000134ce90] dump_stack_lvl+0x84/0xc0 (unreliable) [ 472.091653][ T6181] [c00000000fdfb6b0] [c00000000022e7c8] vpanic+0x324/0x5e4 [ 472.091666][ T6181] [c00000000fdfb760] [c00000000022eac4] do_panic_on_target_cpu+0x0/0x2c [ 472.091677][ T6181] [c00000000fdfb780] [c0000000013c1ff8] __stack_chk_fail+0x48/0x60 [ 472.091689][ T6181] [c00000000fdfb7f0] [c00800001aae219c] kvmhv_run_single_vcpu+0x19d4/0x1b50 [kvm_hv] [ 472.091712][ T6181] [c00000000fdfb940] [c00800001aae24b4] kvmppc_vcpu_run_hv+0x19c/0x12f0 [kvm_hv] [ 472.091732][ T6181] [c00000000fdfba10] [c00800001aeeed18] kvmppc_vcpu_run+0x30/0x48 [kvm] [ 472.091779][ T6181] [c00000000fdfba30] [c00800001aee9ef4] kvm_arch_vcpu_ioctl_run+0x35c/0x4a0 [kvm] [ 472.091813][ T6181] [c00000000fdfbac0] [c00800001aedaac4] kvm_vcpu_ioctl+0x1ac/0xad8 [kvm] [ 472.091844][ T6181] [c00000000fdfbca0] [c0000000007f1244] sys_ioctl+0x374/0x1060 [ 472.091857][ T6181] [c00000000fdfbdb0] [c00000000002f7f8] system_call_exception+0x188/0x430 [ 472.091871][ T6181] [c00000000fdfbe50] [c00000000000cfdc] system_call_vectored_common+0x15c/0x2ec [ 472.091886][ T6181] ---- interrupt: 3000 at 0x7fffb5565fac [ 472.091896][ T6181] NIP: 00007fffb5565fac LR: 00007fffb5565fac CTR: 0000000000000000 [ 472.091904][ T6181] REGS: c00000000fdfbe80 TRAP: 3000 Not tainted (7.2.2-5.g6824496-default) [ 472.091911][ T6181] MSR: 800000000280f033 <SF,VEC,VSX,EE,PR,FP,ME,IR,DR,RI,LE> CR: 42044402 XER: 00000000 [ 472.091938][ T6181] IRQMASK: 0 [ 472.091938][ T6181] GPR00: 0000000000000036 00007fbfa77ed7a0 00007fffb5677100 00000000000000fa [ 472.091938][ T6181] GPR04: 000000002000ae80 0000000000000000 0000000000000000 0000000000000000 [ 472.091938][ T6181] GPR08: 00000000000000fa 0000000000000000 0000000000000000 0000000000000000 [ 472.091938][ T6181] GPR12: 0000000000000000 00007fbfa77f5ec0 000000014676f000 00007fbfa77ee7c0 [ 472.091938][ T6181] GPR16: 000000014674e8d0 00007fbfa77eeec0 00007fbfa77eeec0 fffffffffffffff7 [ 472.091938][ T6181] GPR20: 00007fffb71210d0 0000000000000001 00007fbfa77eeec0 0000000000000000 [ 472.091938][ T6181] GPR24: 00007fbfa77ed8e8 0000000105971428 000000002000ae80 0000000105f77a70 [ 472.091938][ T6181] GPR28: 0000000000000000 0000000000000000 000000002000ae80 000000014674f000 [ 472.092020][ T6181] NIP [00007fffb5565fac] 0x7fffb5565fac [ 472.092027][ T6181] LR [00007fffb5565fac] 0x7fffb5565fac [ 472.092033][ T6181] ---- interrupt: 3000 [ 472.098256][ T6181] pstore: backend (nvram) writing error (-1)This is the host, cannot run the kernel as guest because it fails to boot most of the time inside KVM.
Quoted 9 lines
Quoted 7 lines
Nonethless, there are quite a few platforms. Originally no preemption was the only option, and that's the reason why many people run that. It's the conservative, known working option. And that's the reason a lot of platfrom code does not get tested with more aggressive preemtion models, and never gets fixed to work with them.
Full preemption has been there for many years!.
Possible for years, forced only recently.
Quoted 8 lines
Lazy is not that aggressive compared to that.
Quoted 3 lines
Simply disabling the no preemtion option does not make the platform code ready.
Let's understand your crash case. Let's see where it is going wrong. I am suspecting it is some wrong usage of preemption api rather than arch can't support preemption.
Very likely some wrong use of the preemption API by the arch code, or no use where it should have been used. It did not matter so long as people could run their no preempt configs and ignore the problem.
Quoted 8 lines
Quoted 1 line
Thanks
Friendly LLM analysis says preemption is enabled too early and before completing
kvmppc_handle_exit_hv()/kvmppc_handle_nested_exit()Below is ONLY a speculation and completely UNTESTED. Maybe worth a try.
Quoted 8 lines
The patch is munged by the e-mail client, and it causes immediate voluntary preemprion in rcu critical section and hard lockup on starting a KVM VM.
Also it would be sort of bad news if it worked because that would be specific to book3s KVM HV and would not help with the KVM HV from the original report which likely is not book3s, nor with KVM PR.
Thanks for trying. We will try a local repro and look into it why stack is getting corrupted.
Quoted 3 lines
Thanks
Michal
Re: [Linux PPC] Disable PREEMPT
Quoted 84 lines · Shrikanth Hegde
Quoted 81 lines · Michal Suchánek
Quoted 67 lines · Shrikanth Hegde
Quoted 67 lines
Quoted 2 lines
If possible run against current upstream and share the results.
[ 472.091531][ T6181] Kernel panic - not syncing: stack-protector: Kernel stack is corrupted in: kvmhv_run_single_vcpu+0x19d4/0x1b50 [kvm_hv] [ 472.091598][ T6181] CPU: 29 UID: 107 PID: 6181 Comm: CPU 112/KVM Not tainted 7.2.2-5.g6824496-default #1 PREEMPT(full) openSUSE Tumbleweed (unreleased) 61871a5f06863b4006f5ef27cd9f18e8a7a2edad [ 472.091612][ T6181] Hardware name: IBM,9824-42A Power11 (architected) 0x820200 0xf000007 of:IBM,FW1110.20 (OB1110_130) hv:phyp pSeries [ 472.091624][ T6181] Call Trace: [ 472.091630][ T6181] [c00000000fdfb680] [c00000000134ce90] dump_stack_lvl+0x84/0xc0 (unreliable) [ 472.091653][ T6181] [c00000000fdfb6b0] [c00000000022e7c8] vpanic+0x324/0x5e4 [ 472.091666][ T6181] [c00000000fdfb760] [c00000000022eac4] do_panic_on_target_cpu+0x0/0x2c [ 472.091677][ T6181] [c00000000fdfb780] [c0000000013c1ff8] __stack_chk_fail+0x48/0x60 [ 472.091689][ T6181] [c00000000fdfb7f0] [c00800001aae219c] kvmhv_run_single_vcpu+0x19d4/0x1b50 [kvm_hv] [ 472.091712][ T6181] [c00000000fdfb940] [c00800001aae24b4] kvmppc_vcpu_run_hv+0x19c/0x12f0 [kvm_hv] [ 472.091732][ T6181] [c00000000fdfba10] [c00800001aeeed18] kvmppc_vcpu_run+0x30/0x48 [kvm] [ 472.091779][ T6181] [c00000000fdfba30] [c00800001aee9ef4] kvm_arch_vcpu_ioctl_run+0x35c/0x4a0 [kvm] [ 472.091813][ T6181] [c00000000fdfbac0] [c00800001aedaac4] kvm_vcpu_ioctl+0x1ac/0xad8 [kvm] [ 472.091844][ T6181] [c00000000fdfbca0] [c0000000007f1244] sys_ioctl+0x374/0x1060 [ 472.091857][ T6181] [c00000000fdfbdb0] [c00000000002f7f8] system_call_exception+0x188/0x430 [ 472.091871][ T6181] [c00000000fdfbe50] [c00000000000cfdc] system_call_vectored_common+0x15c/0x2ec [ 472.091886][ T6181] ---- interrupt: 3000 at 0x7fffb5565fac [ 472.091896][ T6181] NIP: 00007fffb5565fac LR: 00007fffb5565fac CTR: 0000000000000000 [ 472.091904][ T6181] REGS: c00000000fdfbe80 TRAP: 3000 Not tainted (7.2.2-5.g6824496-default) [ 472.091911][ T6181] MSR: 800000000280f033 <SF,VEC,VSX,EE,PR,FP,ME,IR,DR,RI,LE> CR: 42044402 XER: 00000000 [ 472.091938][ T6181] IRQMASK: 0 [ 472.091938][ T6181] GPR00: 0000000000000036 00007fbfa77ed7a0 00007fffb5677100 00000000000000fa [ 472.091938][ T6181] GPR04: 000000002000ae80 0000000000000000 0000000000000000 0000000000000000 [ 472.091938][ T6181] GPR08: 00000000000000fa 0000000000000000 0000000000000000 0000000000000000 [ 472.091938][ T6181] GPR12: 0000000000000000 00007fbfa77f5ec0 000000014676f000 00007fbfa77ee7c0 [ 472.091938][ T6181] GPR16: 000000014674e8d0 00007fbfa77eeec0 00007fbfa77eeec0 fffffffffffffff7 [ 472.091938][ T6181] GPR20: 00007fffb71210d0 0000000000000001 00007fbfa77eeec0 0000000000000000 [ 472.091938][ T6181] GPR24: 00007fbfa77ed8e8 0000000105971428 000000002000ae80 0000000105f77a70 [ 472.091938][ T6181] GPR28: 0000000000000000 0000000000000000 000000002000ae80 000000014674f000 [ 472.092020][ T6181] NIP [00007fffb5565fac] 0x7fffb5565fac [ 472.092027][ T6181] LR [00007fffb5565fac] 0x7fffb5565fac [ 472.092033][ T6181] ---- interrupt: 3000 [ 472.098256][ T6181] pstore: backend (nvram) writing error (-1)This is the host, cannot run the kernel as guest because it fails to boot most of the time inside KVM.
Quoted 9 lines
Quoted 7 lines
Nonethless, there are quite a few platforms. Originally no preemption was the only option, and that's the reason why many people run that. It's the conservative, known working option. And that's the reason a lot of platfrom code does not get tested with more aggressive preemtion models, and never gets fixed to work with them.
Full preemption has been there for many years!.
Possible for years, forced only recently.
Quoted 8 lines
Lazy is not that aggressive compared to that.
Quoted 3 lines
Simply disabling the no preemtion option does not make the platform code ready.
Let's understand your crash case. Let's see where it is going wrong. I am suspecting it is some wrong usage of preemption api rather than arch can't support preemption.
Very likely some wrong use of the preemption API by the arch code, or no use where it should have been used. It did not matter so long as people could run their no preempt configs and ignore the problem.
Quoted 8 lines
Quoted 1 line
Thanks
Friendly LLM analysis says preemption is enabled too early and before completing
kvmppc_handle_exit_hv()/kvmppc_handle_nested_exit()Below is ONLY a speculation and completely UNTESTED. Maybe worth a try.
The patch is munged by the e-mail client, and it causes immediate voluntary preemprion in rcu critical section and hard lockup on starting a KVM VM.
Quoted 7 lines
Quoted 4 lines
Also it would be sort of bad news if it worked because that would be specific to book3s KVM HV and would not help with the KVM HV from the original report which likely is not book3s, nor with KVM PR.
Thanks for trying. We will try a local repro and look into it why stack is getting corrupted.
There is also stack corruption when idling. At this point the machine is stuck half-dead and would not go through with the panic, it requires dump from the hyprvisor side to capture this.
Thanks
Michal
[542489.550547] [ T0] Kernel panic - not syncing: stack-protector: Kernel stack is corrupted in: __sprint_symbol+0x1e4/0x1f0
[542489.557809] [ T0] ------------[ cut here ]------------
[542489.557814] [ T0] Voluntary context switch within RCU read-side critical section!
[542489.557822] [ T0] WARNING: [] kernel/rcu/tree_plugin.h:332 at rcu_note_context_switch+0x6a0/0x7b0, CPU#59: swapper/59/0
[542489.557837] [ T0] Modules linked in: vhost_net vhost vhost_iotlb tap rpadlpar_io rpaphp kvm_hv kvm mptcp_diag xsk_diag tcp_diag udp_diag raw_diag inet_diag unix_diag af_packet_diag netlink_diag xt_conntrack xt_MASQUERADE xfrm_user xt_set ip_set xt_addrtype nft_compat nf_conntrack_netbios_ns nf_conntrack_broadcast nft_masq nft_fib_inet nft_fib_ipv4 nft_fib_ipv6 nft_fib nft_reject_inet nf_reject_ipv4 nf_reject_ipv6 nft_reject nft_ct bonding tls nft_chain_nat nf_nat nf_conntrack tun nf_defrag_ipv6 nf_defrag_ipv4 rfkill af_packet binfmt_misc xfs aes_gcm_p10_crypto crypto_simd ibmveth cryptd xts vmx_crypto rtc_generic fuse nvme_fabrics ip_tables x_tables ibmvscsi scsi_transport_srp sd_mod scsi_dh_emc scsi_dh_rdac scsi_dh_alua sg scsi_mod scsi_common nvme nvme_core nvme_keyring nvme_auth pseries_wdt btrfs xor libblake2b raid6_pq dm_mirror dm_region_hash dm_log dm_mod br_netfilter bridge stp llc nf_tables
[542489.557944] [ T0] CPU: 59 UID: 0 PID: 0 Comm: swapper/59 Tainted: G D W 7.2.2-5.g6824496-default #1 PREEMPT(full) openSUSE Tumbleweed (unreleased) 61871a5f06863b4006f5ef27cd9f18e8a7a2edad
[542489.557957] [ T0] Tainted: [D]=DIE, [W]=WARN
[542489.557961] [ T0] Hardware name: IBM,9824-42A Power11 (architected) 0x820200 0xf000007 of:IBM,FW1110.20 (OB1110_130) hv:phyp pSeries
[542489.557967] [ T0] NIP: c00000000035d700 LR: c00000000035d6fc CTR: 0000000000000000
[542489.557974] [ T0] REGS: c000001de047f990 TRAP: 0700 Tainted: G D W (7.2.2-5.g6824496-default)
[542489.557980] [ T0] MSR: 800000000282b033 <SF,VEC,VSX,EE,FP,ME,IR,DR,RI,LE> CR: 44002284 XER: 0000000e
[542489.557999] [ T0] CFAR: c00000000022d7a8 IRQMASK: 1
GPR00: c00000000035d6fc c000001de047fc30 c00000000205ad00 000000000000003f
GPR04: 3ffffffffffc02ef c000001de047f950 c000001de047f910 0000003ff0e20000
GPR08: 0000000000000027 0000000000000001 c000001de0191300 0000000044002284
GPR12: c000003ff1614890 c000003fffff9f00 0000000000000000 000000002eef9860
GPR16: 0000000000000000 c000003ff40dcc80 0000003ff0e20000 c000000000058010
GPR20: c000000000058160 c0000000032bcc80 c0000000032bcc80 c000000000057f80
GPR24: ffffffffffffffff 000000000000003b c000001de0191300 c000000003bea6e0
GPR28: c000000000058010 ffffffffffffffff 0000000000000000 c000003ff40de100
[542489.558066] [ T0] NIP [c00000000035d700] rcu_note_context_switch+0x6a0/0x7b0
[542489.558072] [ T0] LR [c00000000035d6fc] rcu_note_context_switch+0x69c/0x7b0
[542489.558078] [ T0] Call Trace:
[542489.558082] [ T0] [c000001de047fc30] [c00000000035d6fc] rcu_note_context_switch+0x69c/0x7b0 (unreliable)
[542489.558092] [ T0] [c000001de047fcd0] [c0000000013c4fc0] __schedule+0xf0/0x1d10
[542489.558108] [ T0] [c000001de047fe20] [c0000000013c6eb0] schedule_idle+0x30/0x60
[542489.558121] [ T0] [c000001de047fe40] [c0000000002caed8] do_idle+0x258/0x470
[542489.558133] [ T0] [c000001de047feb0] [c0000000002cb3b4] cpu_startup_entry+0x54/0x60
[542489.558145] [ T0] [c000001de047fee0] [c00000000005a720] start_secondary+0x860/0xd70
[542489.558154] [ T0] [c000001de047ffe0] [c00000000000e158] start_secondary_prolog+0x10/0x14
[542489.558162] [ T0] Code: f8c900a8 4bfffe6c 60000000 60420000 3c62ff87 39200001 f9410068 3d4201b2 386329d8 992aa087 4becff91 60000000 <0fe00000> e9410068 4bfff9c4 60420000
[542489.558184] [ T0] ---[ end trace 0000000000000000 ]---
[542521.228724] [ C59] watchdog: CPU 59 Hard LOCKUP
[542521.228726] [ C59] watchdog: CPU 59 TB:3697937465165330, last heartbeat TB:3697921085812082 (31990ms ago)
[542521.228728] [ C59] Modules linked in: vhost_net vhost vhost_iotlb tap rpadlpar_io rpaphp kvm_hv kvm mptcp_diag xsk_diag tcp_diag udp_diag raw_diag inet_diag unix_diag af_packet_diag netlink_diag xt_conntrack xt_MASQUERADE xfrm_user xt_set ip_set xt_addrtype nft_compat nf_conntrack_netbios_ns nf_conntrack_broadcast nft_masq nft_fib_inet nft_fib_ipv4 nft_fib_ipv6 nft_fib nft_reject_inet nf_reject_ipv4 nf_reject_ipv6 nft_reject nft_ct bonding tls nft_chain_nat nf_nat nf_conntrack tun nf_defrag_ipv6 nf_defrag_ipv4 rfkill af_packet binfmt_misc xfs aes_gcm_p10_crypto crypto_simd ibmveth cryptd xts vmx_crypto rtc_generic fuse nvme_fabrics ip_tables x_tables ibmvscsi scsi_transport_srp sd_mod scsi_dh_emc scsi_dh_rdac scsi_dh_alua sg scsi_mod scsi_common nvme nvme_core nvme_keyring nvme_auth pseries_wdt btrfs xor libblake2b raid6_pq dm_mirror dm_region_hash dm_log dm_mod br_netfilter bridge stp llc nf_tables
[542521.228776] [ C59] CPU: 59 UID: 0 PID: 0 Comm: swapper/59 Tainted: G D W 7.2.2-5.g6824496-default #1 PREEMPT(full) openSUSE Tumbleweed (unreleased) 61871a5f06863b4006f5ef27cd9f18e8a7a2edad
[542521.228780] [ C59] Tainted: [D]=DIE, [W]=WARN
[542521.228781] [ C59] Hardware name: IBM,9824-42A Power11 (architected) 0x820200 0xf000007 of:IBM,FW1110.20 (OB1110_130) hv:phyp pSeries
[542521.228783] [ C59] NIP: c0000000013d2c94 LR: c0000000013d5330 CTR: c000000003812be8
[542521.228785] [ C59] REGS: c000003ffed2bd60 TRAP: 0100 Tainted: G D W (7.2.2-5.g6824496-default)
[542521.228788] [ C59] MSR: 8000000000081033 <SF,ME,IR,DR,RI,LE> CR: 42002282 XER: 2004000e
[542521.228794] [ C59] CFAR: 000000000000011c IRQMASK: 3
GPR00: c000000000260a58 c000003ffef2fb60 c00000000205ad00 c000001deaab3c00
GPR04: 00000000000001f8 0000000000000000 fffffffffffe0000 0000000000010000
GPR08: 0000000000000001 0000000000000001 000000001c82ef77 fffffffffffffffd
GPR12: c000000003812be0 c000003fffff9f00 0000000000000000 0000000000000000
GPR16: 0000000000000000 0000000000000000 0000000000000001 c000000003bc2b00
GPR20: c000003ff40c8de8 0000000000000001 c000003ff40c8da8 c000003ffef2fe08
GPR24: 0000000000000000 c000000003bea6e0 000000000000003b 0000003ff0e20000
GPR28: 0000000000780000 c0000000032bbe80 c000003ff40dbe80 c000001deaab3c00
[542521.228820] [ C59] NIP [c0000000013d2c94] queued_spin_lock_slowpath+0x164/0x19a0
[542521.228824] [ C59] LR [c0000000013d5330] _raw_spin_lock+0x80/0xa0
[542521.228827] [ C59] Call Trace:
[542521.228827] [ C59] [c000003ffef2fb60] [0000000000001000] 0x1000 (unreliable)
[542521.228833] [ C59] [c000003ffef2fc60] [c000001de0191300] 0xc000001de0191300
[542521.228836] [ C59] [c000003ffef2fc80] [c000000000260a58] __queue_work+0x2f8/0x740
[542521.228841] [ C59] [c000003ffef2fd50] [c00000000038ceac] call_timer_fn+0x4c/0x260
[542521.228845] [ C59] [c000003ffef2fde0] [c00000000038d308] __run_timers+0x248/0x410
[542521.228849] [ C59] [c000003ffef2fec0] [c00000000038d56c] run_timer_softirq+0x9c/0x130
[542521.228852] [ C59] [c000003ffef2fef0] [c00000000023ab0c] handle_softirqs+0x14c/0x4a0
[542521.228855] [ C59] [c000003ffef2ffe0] [c000000000018418] do_softirq_own_stack+0x38/0x50
[542521.228860] [ C59] [c000001de047f910] [c00000000023a238] __irq_exit_rcu+0x198/0x1c0
[542521.228862] [ C59] [c000001de047f940] [c000000000026acc] timer_interrupt+0x1cc/0x4f0
[542521.228866] [ C59] [c000001de047f9b0] [c000000000009fdc] decrementer_common_virt+0x28c/0x290
[542521.228871] [ C59] ---- interrupt: 900 at plpar_hcall_norets_notrace+0x18/0x2c
[542521.228876] [ C59] NIP: c0000000001b7634 LR: c0000000013c4898 CTR: 0000000000000000
[542521.228877] [ C59] REGS: c000001de047f9e0 TRAP: 0900 Tainted: G D W (7.2.2-5.g6824496-default)
[542521.228879] [ C59] MSR: 800000000280b033 <SF,VEC,VSX,EE,FP,ME,IR,DR,RI,LE> CR: 22000282 XER: 2004000e
[542521.228886] [ C59] CFAR: 0000000000000000 IRQMASK: 0
GPR00: 0000000000000000 c000001de047fc80 c00000000205ad00 0000000000000000
GPR04: 0000000000000000 0000000000000039 0000000000000000 0000000000000000
GPR08: ffffffffffffff7f 0000000000000000 ffffffffffffffff 0000000000000000
GPR12: 0000000000000000 c000003fffff9f00 0000000000000000 000000002eef9860
GPR16: 0000000000000000 0000000000000001 0000000000000001 c000000000058010
GPR20: c000000000058160 0000000000000002 c000000000057fb0 c000000000057f80
GPR24: ffffffffffffffff 0001ed6431fbb852 0000000000000000 0000000000000001
GPR28: 0000000000000000 0000000000000000 c0000000032a1878 c0000000032a1870
[542521.228911] [ C59] NIP [c0000000001b7634] plpar_hcall_norets_notrace+0x18/0x2c
[542521.228915] [ C59] LR [c0000000013c4898] check_and_cede_processor+0x48/0x60
[542521.228918] [ C59] ---- interrupt: 900
[542521.228919] [ C59] [c000001de047fc80] [ffffffffffffffff] 0xffffffffffffffff (unreliable)
[542521.228922] [ C59] [c000001de047fce0] [c0000000013c4944] dedicated_cede_loop+0x94/0x1a0
[542521.228926] [ C59] [c000001de047fd30] [c0000000013c3f00] cpuidle_enter_state+0x300/0x748
[542521.228930] [ C59] [c000001de047fde0] [c000000000f5ff10] cpuidle_enter+0x50/0x80
[542521.228935] [ C59] [c000001de047fe20] [c0000000002ba358] call_cpuidle+0x48/0x90
[542521.228939] [ C59] [c000001de047fe40] [c0000000002caf5c] do_idle+0x2dc/0x470
[542521.228942] [ C59] [c000001de047feb0] [c0000000002cb3b8] cpu_startup_entry+0x58/0x60
[542521.228945] [ C59] [c000001de047fee0] [c00000000005a720] start_secondary+0x860/0xd70
[542521.228948] [ C59] [c000001de047ffe0] [c00000000000e158] start_secondary_prolog+0x10/0x14
[542521.228951] [ C59] Code: 41810e8c 39400000 39000000 3cc0fffe 60000000 813f0000 71290001 41820050 3ce00001 60000000 60420000 7c40003c <71090001> 394a0001 40820028 3d2201ba
[568119.679467] [ C59] pstore: dump skipped in NMI path because of concurrent dumpShrikanth Hegde
reviewerRe: [Linux PPC] Disable PREEMPT
Quoted 93 lines · Michal Suchánek
Quoted 84 lines · Shrikanth Hegde
Quoted 81 lines · Michal Suchánek
Quoted 67 lines · Shrikanth Hegde
Quoted 67 lines
Quoted 2 lines
If possible run against current upstream and share the results.
[ 472.091531][ T6181] Kernel panic - not syncing: stack-protector: Kernel stack is corrupted in: kvmhv_run_single_vcpu+0x19d4/0x1b50 [kvm_hv] [ 472.091598][ T6181] CPU: 29 UID: 107 PID: 6181 Comm: CPU 112/KVM Not tainted 7.2.2-5.g6824496-default #1 PREEMPT(full) openSUSE Tumbleweed (unreleased) 61871a5f06863b4006f5ef27cd9f18e8a7a2edad [ 472.091612][ T6181] Hardware name: IBM,9824-42A Power11 (architected) 0x820200 0xf000007 of:IBM,FW1110.20 (OB1110_130) hv:phyp pSeries [ 472.091624][ T6181] Call Trace: [ 472.091630][ T6181] [c00000000fdfb680] [c00000000134ce90] dump_stack_lvl+0x84/0xc0 (unreliable) [ 472.091653][ T6181] [c00000000fdfb6b0] [c00000000022e7c8] vpanic+0x324/0x5e4 [ 472.091666][ T6181] [c00000000fdfb760] [c00000000022eac4] do_panic_on_target_cpu+0x0/0x2c [ 472.091677][ T6181] [c00000000fdfb780] [c0000000013c1ff8] __stack_chk_fail+0x48/0x60 [ 472.091689][ T6181] [c00000000fdfb7f0] [c00800001aae219c] kvmhv_run_single_vcpu+0x19d4/0x1b50 [kvm_hv] [ 472.091712][ T6181] [c00000000fdfb940] [c00800001aae24b4] kvmppc_vcpu_run_hv+0x19c/0x12f0 [kvm_hv] [ 472.091732][ T6181] [c00000000fdfba10] [c00800001aeeed18] kvmppc_vcpu_run+0x30/0x48 [kvm] [ 472.091779][ T6181] [c00000000fdfba30] [c00800001aee9ef4] kvm_arch_vcpu_ioctl_run+0x35c/0x4a0 [kvm] [ 472.091813][ T6181] [c00000000fdfbac0] [c00800001aedaac4] kvm_vcpu_ioctl+0x1ac/0xad8 [kvm] [ 472.091844][ T6181] [c00000000fdfbca0] [c0000000007f1244] sys_ioctl+0x374/0x1060 [ 472.091857][ T6181] [c00000000fdfbdb0] [c00000000002f7f8] system_call_exception+0x188/0x430 [ 472.091871][ T6181] [c00000000fdfbe50] [c00000000000cfdc] system_call_vectored_common+0x15c/0x2ec [ 472.091886][ T6181] ---- interrupt: 3000 at 0x7fffb5565fac [ 472.091896][ T6181] NIP: 00007fffb5565fac LR: 00007fffb5565fac CTR: 0000000000000000 [ 472.091904][ T6181] REGS: c00000000fdfbe80 TRAP: 3000 Not tainted (7.2.2-5.g6824496-default) [ 472.091911][ T6181] MSR: 800000000280f033 <SF,VEC,VSX,EE,PR,FP,ME,IR,DR,RI,LE> CR: 42044402 XER: 00000000 [ 472.091938][ T6181] IRQMASK: 0 [ 472.091938][ T6181] GPR00: 0000000000000036 00007fbfa77ed7a0 00007fffb5677100 00000000000000fa [ 472.091938][ T6181] GPR04: 000000002000ae80 0000000000000000 0000000000000000 0000000000000000 [ 472.091938][ T6181] GPR08: 00000000000000fa 0000000000000000 0000000000000000 0000000000000000 [ 472.091938][ T6181] GPR12: 0000000000000000 00007fbfa77f5ec0 000000014676f000 00007fbfa77ee7c0 [ 472.091938][ T6181] GPR16: 000000014674e8d0 00007fbfa77eeec0 00007fbfa77eeec0 fffffffffffffff7 [ 472.091938][ T6181] GPR20: 00007fffb71210d0 0000000000000001 00007fbfa77eeec0 0000000000000000 [ 472.091938][ T6181] GPR24: 00007fbfa77ed8e8 0000000105971428 000000002000ae80 0000000105f77a70 [ 472.091938][ T6181] GPR28: 0000000000000000 0000000000000000 000000002000ae80 000000014674f000 [ 472.092020][ T6181] NIP [00007fffb5565fac] 0x7fffb5565fac [ 472.092027][ T6181] LR [00007fffb5565fac] 0x7fffb5565fac [ 472.092033][ T6181] ---- interrupt: 3000 [ 472.098256][ T6181] pstore: backend (nvram) writing error (-1)This is the host, cannot run the kernel as guest because it fails to boot most of the time inside KVM.
Quoted 9 lines
Quoted 7 lines
Nonethless, there are quite a few platforms. Originally no preemption was the only option, and that's the reason why many people run that. It's the conservative, known working option. And that's the reason a lot of platfrom code does not get tested with more aggressive preemtion models, and never gets fixed to work with them.
Full preemption has been there for many years!.
Possible for years, forced only recently.
Quoted 8 lines
Lazy is not that aggressive compared to that.
Quoted 3 lines
Simply disabling the no preemtion option does not make the platform code ready.
Let's understand your crash case. Let's see where it is going wrong. I am suspecting it is some wrong usage of preemption api rather than arch can't support preemption.
Very likely some wrong use of the preemption API by the arch code, or no use where it should have been used. It did not matter so long as people could run their no preempt configs and ignore the problem.
Quoted 8 lines
Quoted 1 line
Thanks
Friendly LLM analysis says preemption is enabled too early and before completing
kvmppc_handle_exit_hv()/kvmppc_handle_nested_exit()Below is ONLY a speculation and completely UNTESTED. Maybe worth a try.
The patch is munged by the e-mail client, and it causes immediate voluntary preemprion in rcu critical section and hard lockup on starting a KVM VM.
Quoted 7 lines
Quoted 4 lines
Also it would be sort of bad news if it worked because that would be specific to book3s KVM HV and would not help with the KVM HV from the original report which likely is not book3s, nor with KVM PR.
Thanks for trying. We will try a local repro and look into it why stack is getting corrupted.
Quoted 8 lines
There is also stack corruption when idling. At this point the machine is stuck half-dead and would not go through with the panic, it requires dump from the hyprvisor side to capture this.
Thanks
Michal
is this on host with kvm running or this is without kvm running anything?
Do you see corruption if you don't have kvm module loaded?
These maybe two independent issue.
Our KVM team is trying local repro for the kvm issue you have reported.
If possible, could you try vmcore capture (maybe with fadump)?
Quoted 92 lines
[542489.550547] [ T0] Kernel panic - not syncing: stack-protector: Kernel stack is corrupted in: __sprint_symbol+0x1e4/0x1f0
[542489.557809] [ T0] ------------[ cut here ]------------
[542489.557814] [ T0] Voluntary context switch within RCU read-side critical section!
[542489.557822] [ T0] WARNING: [] kernel/rcu/tree_plugin.h:332 at rcu_note_context_switch+0x6a0/0x7b0, CPU#59: swapper/59/0
[542489.557837] [ T0] Modules linked in: vhost_net vhost vhost_iotlb tap rpadlpar_io rpaphp kvm_hv kvm mptcp_diag xsk_diag tcp_diag udp_diag raw_diag inet_diag unix_diag af_packet_diag netlink_diag xt_conntrack xt_MASQUERADE xfrm_user xt_set ip_set xt_addrtype nft_compat nf_conntrack_netbios_ns nf_conntrack_broadcast nft_masq nft_fib_inet nft_fib_ipv4 nft_fib_ipv6 nft_fib nft_reject_inet nf_reject_ipv4 nf_reject_ipv6 nft_reject nft_ct bonding tls nft_chain_nat nf_nat nf_conntrack tun nf_defrag_ipv6 nf_defrag_ipv4 rfkill af_packet binfmt_misc xfs aes_gcm_p10_crypto crypto_simd ibmveth cryptd xts vmx_crypto rtc_generic fuse nvme_fabrics ip_tables x_tables ibmvscsi scsi_transport_srp sd_mod scsi_dh_emc scsi_dh_rdac scsi_dh_alua sg scsi_mod scsi_common nvme nvme_core nvme_keyring nvme_auth pseries_wdt btrfs xor libblake2b raid6_pq dm_mirror dm_region_hash dm_log dm_mod br_netfilter bridge stp llc nf_tables
[542489.557944] [ T0] CPU: 59 UID: 0 PID: 0 Comm: swapper/59 Tainted: G D W 7.2.2-5.g6824496-default #1 PREEMPT(full) openSUSE Tumbleweed (unreleased) 61871a5f06863b4006f5ef27cd9f18e8a7a2edad
[542489.557957] [ T0] Tainted: [D]=DIE, [W]=WARN
[542489.557961] [ T0] Hardware name: IBM,9824-42A Power11 (architected) 0x820200 0xf000007 of:IBM,FW1110.20 (OB1110_130) hv:phyp pSeries
[542489.557967] [ T0] NIP: c00000000035d700 LR: c00000000035d6fc CTR: 0000000000000000
[542489.557974] [ T0] REGS: c000001de047f990 TRAP: 0700 Tainted: G D W (7.2.2-5.g6824496-default)
[542489.557980] [ T0] MSR: 800000000282b033 <SF,VEC,VSX,EE,FP,ME,IR,DR,RI,LE> CR: 44002284 XER: 0000000e
[542489.557999] [ T0] CFAR: c00000000022d7a8 IRQMASK: 1
GPR00: c00000000035d6fc c000001de047fc30 c00000000205ad00 000000000000003f
GPR04: 3ffffffffffc02ef c000001de047f950 c000001de047f910 0000003ff0e20000
GPR08: 0000000000000027 0000000000000001 c000001de0191300 0000000044002284
GPR12: c000003ff1614890 c000003fffff9f00 0000000000000000 000000002eef9860
GPR16: 0000000000000000 c000003ff40dcc80 0000003ff0e20000 c000000000058010
GPR20: c000000000058160 c0000000032bcc80 c0000000032bcc80 c000000000057f80
GPR24: ffffffffffffffff 000000000000003b c000001de0191300 c000000003bea6e0
GPR28: c000000000058010 ffffffffffffffff 0000000000000000 c000003ff40de100
[542489.558066] [ T0] NIP [c00000000035d700] rcu_note_context_switch+0x6a0/0x7b0
[542489.558072] [ T0] LR [c00000000035d6fc] rcu_note_context_switch+0x69c/0x7b0
[542489.558078] [ T0] Call Trace:
[542489.558082] [ T0] [c000001de047fc30] [c00000000035d6fc] rcu_note_context_switch+0x69c/0x7b0 (unreliable)
[542489.558092] [ T0] [c000001de047fcd0] [c0000000013c4fc0] __schedule+0xf0/0x1d10
[542489.558108] [ T0] [c000001de047fe20] [c0000000013c6eb0] schedule_idle+0x30/0x60
[542489.558121] [ T0] [c000001de047fe40] [c0000000002caed8] do_idle+0x258/0x470
[542489.558133] [ T0] [c000001de047feb0] [c0000000002cb3b4] cpu_startup_entry+0x54/0x60
[542489.558145] [ T0] [c000001de047fee0] [c00000000005a720] start_secondary+0x860/0xd70
[542489.558154] [ T0] [c000001de047ffe0] [c00000000000e158] start_secondary_prolog+0x10/0x14
[542489.558162] [ T0] Code: f8c900a8 4bfffe6c 60000000 60420000 3c62ff87 39200001 f9410068 3d4201b2 386329d8 992aa087 4becff91 60000000 <0fe00000> e9410068 4bfff9c4 60420000
[542489.558184] [ T0] ---[ end trace 0000000000000000 ]---
[542521.228724] [ C59] watchdog: CPU 59 Hard LOCKUP
[542521.228726] [ C59] watchdog: CPU 59 TB:3697937465165330, last heartbeat TB:3697921085812082 (31990ms ago)
[542521.228728] [ C59] Modules linked in: vhost_net vhost vhost_iotlb tap rpadlpar_io rpaphp kvm_hv kvm mptcp_diag xsk_diag tcp_diag udp_diag raw_diag inet_diag unix_diag af_packet_diag netlink_diag xt_conntrack xt_MASQUERADE xfrm_user xt_set ip_set xt_addrtype nft_compat nf_conntrack_netbios_ns nf_conntrack_broadcast nft_masq nft_fib_inet nft_fib_ipv4 nft_fib_ipv6 nft_fib nft_reject_inet nf_reject_ipv4 nf_reject_ipv6 nft_reject nft_ct bonding tls nft_chain_nat nf_nat nf_conntrack tun nf_defrag_ipv6 nf_defrag_ipv4 rfkill af_packet binfmt_misc xfs aes_gcm_p10_crypto crypto_simd ibmveth cryptd xts vmx_crypto rtc_generic fuse nvme_fabrics ip_tables x_tables ibmvscsi scsi_transport_srp sd_mod scsi_dh_emc scsi_dh_rdac scsi_dh_alua sg scsi_mod scsi_common nvme nvme_core nvme_keyring nvme_auth pseries_wdt btrfs xor libblake2b raid6_pq dm_mirror dm_region_hash dm_log dm_mod br_netfilter bridge stp llc nf_tables
[542521.228776] [ C59] CPU: 59 UID: 0 PID: 0 Comm: swapper/59 Tainted: G D W 7.2.2-5.g6824496-default #1 PREEMPT(full) openSUSE Tumbleweed (unreleased) 61871a5f06863b4006f5ef27cd9f18e8a7a2edad
[542521.228780] [ C59] Tainted: [D]=DIE, [W]=WARN
[542521.228781] [ C59] Hardware name: IBM,9824-42A Power11 (architected) 0x820200 0xf000007 of:IBM,FW1110.20 (OB1110_130) hv:phyp pSeries
[542521.228783] [ C59] NIP: c0000000013d2c94 LR: c0000000013d5330 CTR: c000000003812be8
[542521.228785] [ C59] REGS: c000003ffed2bd60 TRAP: 0100 Tainted: G D W (7.2.2-5.g6824496-default)
[542521.228788] [ C59] MSR: 8000000000081033 <SF,ME,IR,DR,RI,LE> CR: 42002282 XER: 2004000e
[542521.228794] [ C59] CFAR: 000000000000011c IRQMASK: 3
GPR00: c000000000260a58 c000003ffef2fb60 c00000000205ad00 c000001deaab3c00
GPR04: 00000000000001f8 0000000000000000 fffffffffffe0000 0000000000010000
GPR08: 0000000000000001 0000000000000001 000000001c82ef77 fffffffffffffffd
GPR12: c000000003812be0 c000003fffff9f00 0000000000000000 0000000000000000
GPR16: 0000000000000000 0000000000000000 0000000000000001 c000000003bc2b00
GPR20: c000003ff40c8de8 0000000000000001 c000003ff40c8da8 c000003ffef2fe08
GPR24: 0000000000000000 c000000003bea6e0 000000000000003b 0000003ff0e20000
GPR28: 0000000000780000 c0000000032bbe80 c000003ff40dbe80 c000001deaab3c00
[542521.228820] [ C59] NIP [c0000000013d2c94] queued_spin_lock_slowpath+0x164/0x19a0
[542521.228824] [ C59] LR [c0000000013d5330] _raw_spin_lock+0x80/0xa0
[542521.228827] [ C59] Call Trace:
[542521.228827] [ C59] [c000003ffef2fb60] [0000000000001000] 0x1000 (unreliable)
[542521.228833] [ C59] [c000003ffef2fc60] [c000001de0191300] 0xc000001de0191300
[542521.228836] [ C59] [c000003ffef2fc80] [c000000000260a58] __queue_work+0x2f8/0x740
[542521.228841] [ C59] [c000003ffef2fd50] [c00000000038ceac] call_timer_fn+0x4c/0x260
[542521.228845] [ C59] [c000003ffef2fde0] [c00000000038d308] __run_timers+0x248/0x410
[542521.228849] [ C59] [c000003ffef2fec0] [c00000000038d56c] run_timer_softirq+0x9c/0x130
[542521.228852] [ C59] [c000003ffef2fef0] [c00000000023ab0c] handle_softirqs+0x14c/0x4a0
[542521.228855] [ C59] [c000003ffef2ffe0] [c000000000018418] do_softirq_own_stack+0x38/0x50
[542521.228860] [ C59] [c000001de047f910] [c00000000023a238] __irq_exit_rcu+0x198/0x1c0
[542521.228862] [ C59] [c000001de047f940] [c000000000026acc] timer_interrupt+0x1cc/0x4f0
[542521.228866] [ C59] [c000001de047f9b0] [c000000000009fdc] decrementer_common_virt+0x28c/0x290
[542521.228871] [ C59] ---- interrupt: 900 at plpar_hcall_norets_notrace+0x18/0x2c
[542521.228876] [ C59] NIP: c0000000001b7634 LR: c0000000013c4898 CTR: 0000000000000000
[542521.228877] [ C59] REGS: c000001de047f9e0 TRAP: 0900 Tainted: G D W (7.2.2-5.g6824496-default)
[542521.228879] [ C59] MSR: 800000000280b033 <SF,VEC,VSX,EE,FP,ME,IR,DR,RI,LE> CR: 22000282 XER: 2004000e
[542521.228886] [ C59] CFAR: 0000000000000000 IRQMASK: 0
GPR00: 0000000000000000 c000001de047fc80 c00000000205ad00 0000000000000000
GPR04: 0000000000000000 0000000000000039 0000000000000000 0000000000000000
GPR08: ffffffffffffff7f 0000000000000000 ffffffffffffffff 0000000000000000
GPR12: 0000000000000000 c000003fffff9f00 0000000000000000 000000002eef9860
GPR16: 0000000000000000 0000000000000001 0000000000000001 c000000000058010
GPR20: c000000000058160 0000000000000002 c000000000057fb0 c000000000057f80
GPR24: ffffffffffffffff 0001ed6431fbb852 0000000000000000 0000000000000001
GPR28: 0000000000000000 0000000000000000 c0000000032a1878 c0000000032a1870
[542521.228911] [ C59] NIP [c0000000001b7634] plpar_hcall_norets_notrace+0x18/0x2c
[542521.228915] [ C59] LR [c0000000013c4898] check_and_cede_processor+0x48/0x60
[542521.228918] [ C59] ---- interrupt: 900
[542521.228919] [ C59] [c000001de047fc80] [ffffffffffffffff] 0xffffffffffffffff (unreliable)
[542521.228922] [ C59] [c000001de047fce0] [c0000000013c4944] dedicated_cede_loop+0x94/0x1a0
[542521.228926] [ C59] [c000001de047fd30] [c0000000013c3f00] cpuidle_enter_state+0x300/0x748
[542521.228930] [ C59] [c000001de047fde0] [c000000000f5ff10] cpuidle_enter+0x50/0x80
[542521.228935] [ C59] [c000001de047fe20] [c0000000002ba358] call_cpuidle+0x48/0x90
[542521.228939] [ C59] [c000001de047fe40] [c0000000002caf5c] do_idle+0x2dc/0x470
[542521.228942] [ C59] [c000001de047feb0] [c0000000002cb3b8] cpu_startup_entry+0x58/0x60
[542521.228945] [ C59] [c000001de047fee0] [c00000000005a720] start_secondary+0x860/0xd70
[542521.228948] [ C59] [c000001de047ffe0] [c00000000000e158] start_secondary_prolog+0x10/0x14
[542521.228951] [ C59] Code: 41810e8c 39400000 39000000 3cc0fffe 60000000 813f0000 71290001 41820050 3ce00001 60000000 60420000 7c40003c <71090001> 394a0001 40820028 3d2201ba
[568119.679467] [ C59] pstore: dump skipped in NMI path because of concurrent dumpRe: [Linux PPC] Disable PREEMPT
Quoted 100 lines · Shrikanth Hegde
Quoted 97 lines · Michal Suchánek
Quoted 84 lines · Shrikanth Hegde
Quoted 81 lines · Michal Suchánek
Quoted 67 lines · Shrikanth Hegde
Quoted 67 lines
Quoted 2 lines
If possible run against current upstream and share the results.
[ 472.091531][ T6181] Kernel panic - not syncing: stack-protector: Kernel stack is corrupted in: kvmhv_run_single_vcpu+0x19d4/0x1b50 [kvm_hv] [ 472.091598][ T6181] CPU: 29 UID: 107 PID: 6181 Comm: CPU 112/KVM Not tainted 7.2.2-5.g6824496-default #1 PREEMPT(full) openSUSE Tumbleweed (unreleased) 61871a5f06863b4006f5ef27cd9f18e8a7a2edad [ 472.091612][ T6181] Hardware name: IBM,9824-42A Power11 (architected) 0x820200 0xf000007 of:IBM,FW1110.20 (OB1110_130) hv:phyp pSeries [ 472.091624][ T6181] Call Trace: [ 472.091630][ T6181] [c00000000fdfb680] [c00000000134ce90] dump_stack_lvl+0x84/0xc0 (unreliable) [ 472.091653][ T6181] [c00000000fdfb6b0] [c00000000022e7c8] vpanic+0x324/0x5e4 [ 472.091666][ T6181] [c00000000fdfb760] [c00000000022eac4] do_panic_on_target_cpu+0x0/0x2c [ 472.091677][ T6181] [c00000000fdfb780] [c0000000013c1ff8] __stack_chk_fail+0x48/0x60 [ 472.091689][ T6181] [c00000000fdfb7f0] [c00800001aae219c] kvmhv_run_single_vcpu+0x19d4/0x1b50 [kvm_hv] [ 472.091712][ T6181] [c00000000fdfb940] [c00800001aae24b4] kvmppc_vcpu_run_hv+0x19c/0x12f0 [kvm_hv] [ 472.091732][ T6181] [c00000000fdfba10] [c00800001aeeed18] kvmppc_vcpu_run+0x30/0x48 [kvm] [ 472.091779][ T6181] [c00000000fdfba30] [c00800001aee9ef4] kvm_arch_vcpu_ioctl_run+0x35c/0x4a0 [kvm] [ 472.091813][ T6181] [c00000000fdfbac0] [c00800001aedaac4] kvm_vcpu_ioctl+0x1ac/0xad8 [kvm] [ 472.091844][ T6181] [c00000000fdfbca0] [c0000000007f1244] sys_ioctl+0x374/0x1060 [ 472.091857][ T6181] [c00000000fdfbdb0] [c00000000002f7f8] system_call_exception+0x188/0x430 [ 472.091871][ T6181] [c00000000fdfbe50] [c00000000000cfdc] system_call_vectored_common+0x15c/0x2ec [ 472.091886][ T6181] ---- interrupt: 3000 at 0x7fffb5565fac [ 472.091896][ T6181] NIP: 00007fffb5565fac LR: 00007fffb5565fac CTR: 0000000000000000 [ 472.091904][ T6181] REGS: c00000000fdfbe80 TRAP: 3000 Not tainted (7.2.2-5.g6824496-default) [ 472.091911][ T6181] MSR: 800000000280f033 <SF,VEC,VSX,EE,PR,FP,ME,IR,DR,RI,LE> CR: 42044402 XER: 00000000 [ 472.091938][ T6181] IRQMASK: 0 [ 472.091938][ T6181] GPR00: 0000000000000036 00007fbfa77ed7a0 00007fffb5677100 00000000000000fa [ 472.091938][ T6181] GPR04: 000000002000ae80 0000000000000000 0000000000000000 0000000000000000 [ 472.091938][ T6181] GPR08: 00000000000000fa 0000000000000000 0000000000000000 0000000000000000 [ 472.091938][ T6181] GPR12: 0000000000000000 00007fbfa77f5ec0 000000014676f000 00007fbfa77ee7c0 [ 472.091938][ T6181] GPR16: 000000014674e8d0 00007fbfa77eeec0 00007fbfa77eeec0 fffffffffffffff7 [ 472.091938][ T6181] GPR20: 00007fffb71210d0 0000000000000001 00007fbfa77eeec0 0000000000000000 [ 472.091938][ T6181] GPR24: 00007fbfa77ed8e8 0000000105971428 000000002000ae80 0000000105f77a70 [ 472.091938][ T6181] GPR28: 0000000000000000 0000000000000000 000000002000ae80 000000014674f000 [ 472.092020][ T6181] NIP [00007fffb5565fac] 0x7fffb5565fac [ 472.092027][ T6181] LR [00007fffb5565fac] 0x7fffb5565fac [ 472.092033][ T6181] ---- interrupt: 3000 [ 472.098256][ T6181] pstore: backend (nvram) writing error (-1)This is the host, cannot run the kernel as guest because it fails to boot most of the time inside KVM.
Quoted 9 lines
Quoted 7 lines
Nonethless, there are quite a few platforms. Originally no preemption was the only option, and that's the reason why many people run that. It's the conservative, known working option. And that's the reason a lot of platfrom code does not get tested with more aggressive preemtion models, and never gets fixed to work with them.
Full preemption has been there for many years!.
Possible for years, forced only recently.
Quoted 8 lines
Lazy is not that aggressive compared to that.
Quoted 3 lines
Simply disabling the no preemtion option does not make the platform code ready.
Let's understand your crash case. Let's see where it is going wrong. I am suspecting it is some wrong usage of preemption api rather than arch can't support preemption.
Very likely some wrong use of the preemption API by the arch code, or no use where it should have been used. It did not matter so long as people could run their no preempt configs and ignore the problem.
Quoted 8 lines
Quoted 1 line
Thanks
Friendly LLM analysis says preemption is enabled too early and before completing
kvmppc_handle_exit_hv()/kvmppc_handle_nested_exit()Below is ONLY a speculation and completely UNTESTED. Maybe worth a try.
The patch is munged by the e-mail client, and it causes immediate voluntary preemprion in rcu critical section and hard lockup on starting a KVM VM.
Quoted 7 lines
Quoted 4 lines
Also it would be sort of bad news if it worked because that would be specific to book3s KVM HV and would not help with the KVM HV from the original report which likely is not book3s, nor with KVM PR.
Thanks for trying. We will try a local repro and look into it why stack is getting corrupted.
There is also stack corruption when idling. At this point the machine is stuck half-dead and would not go through with the panic, it requires dump from the hyprvisor side to capture this.
Quoted 7 lines
Quoted 4 lines
Thanks
Michal
is this on host with kvm running or this is without kvm running anything?
Difficult to say after the fact. Given running KVM VMs is crashing with this kernel most likely no VM was running.
Quoted 2 lines
Do you see corruption if you don't have kvm module loaded?
Difficult to say, this takes hours to days to reproduce, and the module is normally loaded by default. I can blacklist it to make sure it does not get loaded.
Quoted 5 lines
These maybe two independent issue.
Our KVM team is trying local repro for the kvm issue you have reported.If possible, could you try vmcore capture (maybe with fadump)?
I have the vmcore, this dmesg is from the vmcore. I would not get displayed otherwise, or maybe some content from the console is lost.
Unfortunately, this is a kernel from a rolling distribution, and may be difficult to analyze bacause new kernel build is used by now.
Thanks
Michal
Quoted 94 lines
Quoted 93 lines
[542489.550547] [ T0] Kernel panic - not syncing: stack-protector: Kernel stack is corrupted in: __sprint_symbol+0x1e4/0x1f0 [542489.557809] [ T0] ------------[ cut here ]------------ [542489.557814] [ T0] Voluntary context switch within RCU read-side critical section! [542489.557822] [ T0] WARNING: [] kernel/rcu/tree_plugin.h:332 at rcu_note_context_switch+0x6a0/0x7b0, CPU#59: swapper/59/0 [542489.557837] [ T0] Modules linked in: vhost_net vhost vhost_iotlb tap rpadlpar_io rpaphp kvm_hv kvm mptcp_diag xsk_diag tcp_diag udp_diag raw_diag inet_diag unix_diag af_packet_diag netlink_diag xt_conntrack xt_MASQUERADE xfrm_user xt_set ip_set xt_addrtype nft_compat nf_conntrack_netbios_ns nf_conntrack_broadcast nft_masq nft_fib_inet nft_fib_ipv4 nft_fib_ipv6 nft_fib nft_reject_inet nf_reject_ipv4 nf_reject_ipv6 nft_reject nft_ct bonding tls nft_chain_nat nf_nat nf_conntrack tun nf_defrag_ipv6 nf_defrag_ipv4 rfkill af_packet binfmt_misc xfs aes_gcm_p10_crypto crypto_simd ibmveth cryptd xts vmx_crypto rtc_generic fuse nvme_fabrics ip_tables x_tables ibmvscsi scsi_transport_srp sd_mod scsi_dh_emc scsi_dh_rdac scsi_dh_alua sg scsi_mod scsi_common nvme nvme_core nvme_keyring nvme_auth pseries_wdt btrfs xor libblake2b raid6_pq dm_mirror dm_region_hash dm_log dm_mod br_netfilter bridge stp llc nf_tables [542489.557944] [ T0] CPU: 59 UID: 0 PID: 0 Comm: swapper/59 Tainted: G D W 7.2.2-5.g6824496-default #1 PREEMPT(full) openSUSE Tumbleweed (unreleased) 61871a5f06863b4006f5ef27cd9f18e8a7a2edad [542489.557957] [ T0] Tainted: [D]=DIE, [W]=WARN [542489.557961] [ T0] Hardware name: IBM,9824-42A Power11 (architected) 0x820200 0xf000007 of:IBM,FW1110.20 (OB1110_130) hv:phyp pSeries [542489.557967] [ T0] NIP: c00000000035d700 LR: c00000000035d6fc CTR: 0000000000000000 [542489.557974] [ T0] REGS: c000001de047f990 TRAP: 0700 Tainted: G D W (7.2.2-5.g6824496-default) [542489.557980] [ T0] MSR: 800000000282b033 <SF,VEC,VSX,EE,FP,ME,IR,DR,RI,LE> CR: 44002284 XER: 0000000e [542489.557999] [ T0] CFAR: c00000000022d7a8 IRQMASK: 1 GPR00: c00000000035d6fc c000001de047fc30 c00000000205ad00 000000000000003f GPR04: 3ffffffffffc02ef c000001de047f950 c000001de047f910 0000003ff0e20000 GPR08: 0000000000000027 0000000000000001 c000001de0191300 0000000044002284 GPR12: c000003ff1614890 c000003fffff9f00 0000000000000000 000000002eef9860 GPR16: 0000000000000000 c000003ff40dcc80 0000003ff0e20000 c000000000058010 GPR20: c000000000058160 c0000000032bcc80 c0000000032bcc80 c000000000057f80 GPR24: ffffffffffffffff 000000000000003b c000001de0191300 c000000003bea6e0 GPR28: c000000000058010 ffffffffffffffff 0000000000000000 c000003ff40de100 [542489.558066] [ T0] NIP [c00000000035d700] rcu_note_context_switch+0x6a0/0x7b0 [542489.558072] [ T0] LR [c00000000035d6fc] rcu_note_context_switch+0x69c/0x7b0 [542489.558078] [ T0] Call Trace: [542489.558082] [ T0] [c000001de047fc30] [c00000000035d6fc] rcu_note_context_switch+0x69c/0x7b0 (unreliable) [542489.558092] [ T0] [c000001de047fcd0] [c0000000013c4fc0] __schedule+0xf0/0x1d10 [542489.558108] [ T0] [c000001de047fe20] [c0000000013c6eb0] schedule_idle+0x30/0x60 [542489.558121] [ T0] [c000001de047fe40] [c0000000002caed8] do_idle+0x258/0x470 [542489.558133] [ T0] [c000001de047feb0] [c0000000002cb3b4] cpu_startup_entry+0x54/0x60 [542489.558145] [ T0] [c000001de047fee0] [c00000000005a720] start_secondary+0x860/0xd70 [542489.558154] [ T0] [c000001de047ffe0] [c00000000000e158] start_secondary_prolog+0x10/0x14 [542489.558162] [ T0] Code: f8c900a8 4bfffe6c 60000000 60420000 3c62ff87 39200001 f9410068 3d4201b2 386329d8 992aa087 4becff91 60000000 <0fe00000> e9410068 4bfff9c4 60420000 [542489.558184] [ T0] ---[ end trace 0000000000000000 ]--- [542521.228724] [ C59] watchdog: CPU 59 Hard LOCKUP [542521.228726] [ C59] watchdog: CPU 59 TB:3697937465165330, last heartbeat TB:3697921085812082 (31990ms ago) [542521.228728] [ C59] Modules linked in: vhost_net vhost vhost_iotlb tap rpadlpar_io rpaphp kvm_hv kvm mptcp_diag xsk_diag tcp_diag udp_diag raw_diag inet_diag unix_diag af_packet_diag netlink_diag xt_conntrack xt_MASQUERADE xfrm_user xt_set ip_set xt_addrtype nft_compat nf_conntrack_netbios_ns nf_conntrack_broadcast nft_masq nft_fib_inet nft_fib_ipv4 nft_fib_ipv6 nft_fib nft_reject_inet nf_reject_ipv4 nf_reject_ipv6 nft_reject nft_ct bonding tls nft_chain_nat nf_nat nf_conntrack tun nf_defrag_ipv6 nf_defrag_ipv4 rfkill af_packet binfmt_misc xfs aes_gcm_p10_crypto crypto_simd ibmveth cryptd xts vmx_crypto rtc_generic fuse nvme_fabrics ip_tables x_tables ibmvscsi scsi_transport_srp sd_mod scsi_dh_emc scsi_dh_rdac scsi_dh_alua sg scsi_mod scsi_common nvme nvme_core nvme_keyring nvme_auth pseries_wdt btrfs xor libblake2b raid6_pq dm_mirror dm_region_hash dm_log dm_mod br_netfilter bridge stp llc nf_tables [542521.228776] [ C59] CPU: 59 UID: 0 PID: 0 Comm: swapper/59 Tainted: G D W 7.2.2-5.g6824496-default #1 PREEMPT(full) openSUSE Tumbleweed (unreleased) 61871a5f06863b4006f5ef27cd9f18e8a7a2edad [542521.228780] [ C59] Tainted: [D]=DIE, [W]=WARN [542521.228781] [ C59] Hardware name: IBM,9824-42A Power11 (architected) 0x820200 0xf000007 of:IBM,FW1110.20 (OB1110_130) hv:phyp pSeries [542521.228783] [ C59] NIP: c0000000013d2c94 LR: c0000000013d5330 CTR: c000000003812be8 [542521.228785] [ C59] REGS: c000003ffed2bd60 TRAP: 0100 Tainted: G D W (7.2.2-5.g6824496-default) [542521.228788] [ C59] MSR: 8000000000081033 <SF,ME,IR,DR,RI,LE> CR: 42002282 XER: 2004000e [542521.228794] [ C59] CFAR: 000000000000011c IRQMASK: 3 GPR00: c000000000260a58 c000003ffef2fb60 c00000000205ad00 c000001deaab3c00 GPR04: 00000000000001f8 0000000000000000 fffffffffffe0000 0000000000010000 GPR08: 0000000000000001 0000000000000001 000000001c82ef77 fffffffffffffffd GPR12: c000000003812be0 c000003fffff9f00 0000000000000000 0000000000000000 GPR16: 0000000000000000 0000000000000000 0000000000000001 c000000003bc2b00 GPR20: c000003ff40c8de8 0000000000000001 c000003ff40c8da8 c000003ffef2fe08 GPR24: 0000000000000000 c000000003bea6e0 000000000000003b 0000003ff0e20000 GPR28: 0000000000780000 c0000000032bbe80 c000003ff40dbe80 c000001deaab3c00 [542521.228820] [ C59] NIP [c0000000013d2c94] queued_spin_lock_slowpath+0x164/0x19a0 [542521.228824] [ C59] LR [c0000000013d5330] _raw_spin_lock+0x80/0xa0 [542521.228827] [ C59] Call Trace: [542521.228827] [ C59] [c000003ffef2fb60] [0000000000001000] 0x1000 (unreliable) [542521.228833] [ C59] [c000003ffef2fc60] [c000001de0191300] 0xc000001de0191300 [542521.228836] [ C59] [c000003ffef2fc80] [c000000000260a58] __queue_work+0x2f8/0x740 [542521.228841] [ C59] [c000003ffef2fd50] [c00000000038ceac] call_timer_fn+0x4c/0x260 [542521.228845] [ C59] [c000003ffef2fde0] [c00000000038d308] __run_timers+0x248/0x410 [542521.228849] [ C59] [c000003ffef2fec0] [c00000000038d56c] run_timer_softirq+0x9c/0x130 [542521.228852] [ C59] [c000003ffef2fef0] [c00000000023ab0c] handle_softirqs+0x14c/0x4a0 [542521.228855] [ C59] [c000003ffef2ffe0] [c000000000018418] do_softirq_own_stack+0x38/0x50 [542521.228860] [ C59] [c000001de047f910] [c00000000023a238] __irq_exit_rcu+0x198/0x1c0 [542521.228862] [ C59] [c000001de047f940] [c000000000026acc] timer_interrupt+0x1cc/0x4f0 [542521.228866] [ C59] [c000001de047f9b0] [c000000000009fdc] decrementer_common_virt+0x28c/0x290 [542521.228871] [ C59] ---- interrupt: 900 at plpar_hcall_norets_notrace+0x18/0x2c [542521.228876] [ C59] NIP: c0000000001b7634 LR: c0000000013c4898 CTR: 0000000000000000 [542521.228877] [ C59] REGS: c000001de047f9e0 TRAP: 0900 Tainted: G D W (7.2.2-5.g6824496-default) [542521.228879] [ C59] MSR: 800000000280b033 <SF,VEC,VSX,EE,FP,ME,IR,DR,RI,LE> CR: 22000282 XER: 2004000e [542521.228886] [ C59] CFAR: 0000000000000000 IRQMASK: 0 GPR00: 0000000000000000 c000001de047fc80 c00000000205ad00 0000000000000000 GPR04: 0000000000000000 0000000000000039 0000000000000000 0000000000000000 GPR08: ffffffffffffff7f 0000000000000000 ffffffffffffffff 0000000000000000 GPR12: 0000000000000000 c000003fffff9f00 0000000000000000 000000002eef9860 GPR16: 0000000000000000 0000000000000001 0000000000000001 c000000000058010 GPR20: c000000000058160 0000000000000002 c000000000057fb0 c000000000057f80 GPR24: ffffffffffffffff 0001ed6431fbb852 0000000000000000 0000000000000001 GPR28: 0000000000000000 0000000000000000 c0000000032a1878 c0000000032a1870 [542521.228911] [ C59] NIP [c0000000001b7634] plpar_hcall_norets_notrace+0x18/0x2c [542521.228915] [ C59] LR [c0000000013c4898] check_and_cede_processor+0x48/0x60 [542521.228918] [ C59] ---- interrupt: 900 [542521.228919] [ C59] [c000001de047fc80] [ffffffffffffffff] 0xffffffffffffffff (unreliable) [542521.228922] [ C59] [c000001de047fce0] [c0000000013c4944] dedicated_cede_loop+0x94/0x1a0 [542521.228926] [ C59] [c000001de047fd30] [c0000000013c3f00] cpuidle_enter_state+0x300/0x748 [542521.228930] [ C59] [c000001de047fde0] [c000000000f5ff10] cpuidle_enter+0x50/0x80 [542521.228935] [ C59] [c000001de047fe20] [c0000000002ba358] call_cpuidle+0x48/0x90 [542521.228939] [ C59] [c000001de047fe40] [c0000000002caf5c] do_idle+0x2dc/0x470 [542521.228942] [ C59] [c000001de047feb0] [c0000000002cb3b8] cpu_startup_entry+0x58/0x60 [542521.228945] [ C59] [c000001de047fee0] [c00000000005a720] start_secondary+0x860/0xd70 [542521.228948] [ C59] [c000001de047ffe0] [c00000000000e158] start_secondary_prolog+0x10/0x14 [542521.228951] [ C59] Code: 41810e8c 39400000 39000000 3cc0fffe 60000000 813f0000 71290001 41820050 3ce00001 60000000 60420000 7c40003c <71090001> 394a0001 40820028 3d2201ba [568119.679467] [ C59] pstore: dump skipped in NMI path because of concurrent dump
Re: [Linux PPC] Disable PREEMPT
Quoted 128 lines · Michal Suchánek
Quoted 100 lines · Shrikanth Hegde
Quoted 97 lines · Michal Suchánek
Quoted 84 lines · Shrikanth Hegde
Quoted 81 lines · Michal Suchánek
Quoted 67 lines · Shrikanth Hegde
Quoted 67 lines
Quoted 2 lines
If possible run against current upstream and share the results.
[ 472.091531][ T6181] Kernel panic - not syncing: stack-protector: Kernel stack is corrupted in: kvmhv_run_single_vcpu+0x19d4/0x1b50 [kvm_hv] [ 472.091598][ T6181] CPU: 29 UID: 107 PID: 6181 Comm: CPU 112/KVM Not tainted 7.2.2-5.g6824496-default #1 PREEMPT(full) openSUSE Tumbleweed (unreleased) 61871a5f06863b4006f5ef27cd9f18e8a7a2edad [ 472.091612][ T6181] Hardware name: IBM,9824-42A Power11 (architected) 0x820200 0xf000007 of:IBM,FW1110.20 (OB1110_130) hv:phyp pSeries [ 472.091624][ T6181] Call Trace: [ 472.091630][ T6181] [c00000000fdfb680] [c00000000134ce90] dump_stack_lvl+0x84/0xc0 (unreliable) [ 472.091653][ T6181] [c00000000fdfb6b0] [c00000000022e7c8] vpanic+0x324/0x5e4 [ 472.091666][ T6181] [c00000000fdfb760] [c00000000022eac4] do_panic_on_target_cpu+0x0/0x2c [ 472.091677][ T6181] [c00000000fdfb780] [c0000000013c1ff8] __stack_chk_fail+0x48/0x60 [ 472.091689][ T6181] [c00000000fdfb7f0] [c00800001aae219c] kvmhv_run_single_vcpu+0x19d4/0x1b50 [kvm_hv] [ 472.091712][ T6181] [c00000000fdfb940] [c00800001aae24b4] kvmppc_vcpu_run_hv+0x19c/0x12f0 [kvm_hv] [ 472.091732][ T6181] [c00000000fdfba10] [c00800001aeeed18] kvmppc_vcpu_run+0x30/0x48 [kvm] [ 472.091779][ T6181] [c00000000fdfba30] [c00800001aee9ef4] kvm_arch_vcpu_ioctl_run+0x35c/0x4a0 [kvm] [ 472.091813][ T6181] [c00000000fdfbac0] [c00800001aedaac4] kvm_vcpu_ioctl+0x1ac/0xad8 [kvm] [ 472.091844][ T6181] [c00000000fdfbca0] [c0000000007f1244] sys_ioctl+0x374/0x1060 [ 472.091857][ T6181] [c00000000fdfbdb0] [c00000000002f7f8] system_call_exception+0x188/0x430 [ 472.091871][ T6181] [c00000000fdfbe50] [c00000000000cfdc] system_call_vectored_common+0x15c/0x2ec [ 472.091886][ T6181] ---- interrupt: 3000 at 0x7fffb5565fac [ 472.091896][ T6181] NIP: 00007fffb5565fac LR: 00007fffb5565fac CTR: 0000000000000000 [ 472.091904][ T6181] REGS: c00000000fdfbe80 TRAP: 3000 Not tainted (7.2.2-5.g6824496-default) [ 472.091911][ T6181] MSR: 800000000280f033 <SF,VEC,VSX,EE,PR,FP,ME,IR,DR,RI,LE> CR: 42044402 XER: 00000000 [ 472.091938][ T6181] IRQMASK: 0 [ 472.091938][ T6181] GPR00: 0000000000000036 00007fbfa77ed7a0 00007fffb5677100 00000000000000fa [ 472.091938][ T6181] GPR04: 000000002000ae80 0000000000000000 0000000000000000 0000000000000000 [ 472.091938][ T6181] GPR08: 00000000000000fa 0000000000000000 0000000000000000 0000000000000000 [ 472.091938][ T6181] GPR12: 0000000000000000 00007fbfa77f5ec0 000000014676f000 00007fbfa77ee7c0 [ 472.091938][ T6181] GPR16: 000000014674e8d0 00007fbfa77eeec0 00007fbfa77eeec0 fffffffffffffff7 [ 472.091938][ T6181] GPR20: 00007fffb71210d0 0000000000000001 00007fbfa77eeec0 0000000000000000 [ 472.091938][ T6181] GPR24: 00007fbfa77ed8e8 0000000105971428 000000002000ae80 0000000105f77a70 [ 472.091938][ T6181] GPR28: 0000000000000000 0000000000000000 000000002000ae80 000000014674f000 [ 472.092020][ T6181] NIP [00007fffb5565fac] 0x7fffb5565fac [ 472.092027][ T6181] LR [00007fffb5565fac] 0x7fffb5565fac [ 472.092033][ T6181] ---- interrupt: 3000 [ 472.098256][ T6181] pstore: backend (nvram) writing error (-1)This is the host, cannot run the kernel as guest because it fails to boot most of the time inside KVM.
Quoted 9 lines
Quoted 7 lines
Nonethless, there are quite a few platforms. Originally no preemption was the only option, and that's the reason why many people run that. It's the conservative, known working option. And that's the reason a lot of platfrom code does not get tested with more aggressive preemtion models, and never gets fixed to work with them.
Full preemption has been there for many years!.
Possible for years, forced only recently.
Quoted 8 lines
Lazy is not that aggressive compared to that.
Quoted 3 lines
Simply disabling the no preemtion option does not make the platform code ready.
Let's understand your crash case. Let's see where it is going wrong. I am suspecting it is some wrong usage of preemption api rather than arch can't support preemption.
Very likely some wrong use of the preemption API by the arch code, or no use where it should have been used. It did not matter so long as people could run their no preempt configs and ignore the problem.
Quoted 8 lines
Quoted 1 line
Thanks
Friendly LLM analysis says preemption is enabled too early and before completing
kvmppc_handle_exit_hv()/kvmppc_handle_nested_exit()Below is ONLY a speculation and completely UNTESTED. Maybe worth a try.
The patch is munged by the e-mail client, and it causes immediate voluntary preemprion in rcu critical section and hard lockup on starting a KVM VM.
Quoted 7 lines
Quoted 4 lines
Also it would be sort of bad news if it worked because that would be specific to book3s KVM HV and would not help with the KVM HV from the original report which likely is not book3s, nor with KVM PR.
Thanks for trying. We will try a local repro and look into it why stack is getting corrupted.
There is also stack corruption when idling. At this point the machine is stuck half-dead and would not go through with the panic, it requires dump from the hyprvisor side to capture this.
Quoted 7 lines
Quoted 4 lines
Thanks
Michal
is this on host with kvm running or this is without kvm running anything?
Difficult to say after the fact. Given running KVM VMs is crashing with this kernel most likely no VM was running.
Quoted 2 lines
Do you see corruption if you don't have kvm module loaded?
Difficult to say, this takes hours to days to reproduce, and the module is normally loaded by default. I can blacklist it to make sure it does not get loaded.
Quoted 5 lines
These maybe two independent issue.
Our KVM team is trying local repro for the kvm issue you have reported.If possible, could you try vmcore capture (maybe with fadump)?
I have the vmcore, this dmesg is from the vmcore. I would not get displayed otherwise, or maybe some content from the console is lost.
Quoted 102 lines
Unfortunately, this is a kernel from a rolling distribution, and may be difficult to analyze bacause new kernel build is used by now.
Thanks
Michal
Quoted 94 lines
Quoted 93 lines
[542489.550547] [ T0] Kernel panic - not syncing: stack-protector: Kernel stack is corrupted in: __sprint_symbol+0x1e4/0x1f0 [542489.557809] [ T0] ------------[ cut here ]------------ [542489.557814] [ T0] Voluntary context switch within RCU read-side critical section! [542489.557822] [ T0] WARNING: [] kernel/rcu/tree_plugin.h:332 at rcu_note_context_switch+0x6a0/0x7b0, CPU#59: swapper/59/0 [542489.557837] [ T0] Modules linked in: vhost_net vhost vhost_iotlb tap rpadlpar_io rpaphp kvm_hv kvm mptcp_diag xsk_diag tcp_diag udp_diag raw_diag inet_diag unix_diag af_packet_diag netlink_diag xt_conntrack xt_MASQUERADE xfrm_user xt_set ip_set xt_addrtype nft_compat nf_conntrack_netbios_ns nf_conntrack_broadcast nft_masq nft_fib_inet nft_fib_ipv4 nft_fib_ipv6 nft_fib nft_reject_inet nf_reject_ipv4 nf_reject_ipv6 nft_reject nft_ct bonding tls nft_chain_nat nf_nat nf_conntrack tun nf_defrag_ipv6 nf_defrag_ipv4 rfkill af_packet binfmt_misc xfs aes_gcm_p10_crypto crypto_simd ibmveth cryptd xts vmx_crypto rtc_generic fuse nvme_fabrics ip_tables x_tables ibmvscsi scsi_transport_srp sd_mod scsi_dh_emc scsi_dh_rdac scsi_dh_alua sg scsi_mod scsi_common nvme nvme_core nvme_keyring nvme_auth pseries_wdt btrfs xor libblake2b raid6_pq dm_mirror dm_region_hash dm_log dm_mod br_netfilter bridge stp llc nf_tables [542489.557944] [ T0] CPU: 59 UID: 0 PID: 0 Comm: swapper/59 Tainted: G D W 7.2.2-5.g6824496-default #1 PREEMPT(full) openSUSE Tumbleweed (unreleased) 61871a5f06863b4006f5ef27cd9f18e8a7a2edad [542489.557957] [ T0] Tainted: [D]=DIE, [W]=WARN [542489.557961] [ T0] Hardware name: IBM,9824-42A Power11 (architected) 0x820200 0xf000007 of:IBM,FW1110.20 (OB1110_130) hv:phyp pSeries [542489.557967] [ T0] NIP: c00000000035d700 LR: c00000000035d6fc CTR: 0000000000000000 [542489.557974] [ T0] REGS: c000001de047f990 TRAP: 0700 Tainted: G D W (7.2.2-5.g6824496-default) [542489.557980] [ T0] MSR: 800000000282b033 <SF,VEC,VSX,EE,FP,ME,IR,DR,RI,LE> CR: 44002284 XER: 0000000e [542489.557999] [ T0] CFAR: c00000000022d7a8 IRQMASK: 1 GPR00: c00000000035d6fc c000001de047fc30 c00000000205ad00 000000000000003f GPR04: 3ffffffffffc02ef c000001de047f950 c000001de047f910 0000003ff0e20000 GPR08: 0000000000000027 0000000000000001 c000001de0191300 0000000044002284 GPR12: c000003ff1614890 c000003fffff9f00 0000000000000000 000000002eef9860 GPR16: 0000000000000000 c000003ff40dcc80 0000003ff0e20000 c000000000058010 GPR20: c000000000058160 c0000000032bcc80 c0000000032bcc80 c000000000057f80 GPR24: ffffffffffffffff 000000000000003b c000001de0191300 c000000003bea6e0 GPR28: c000000000058010 ffffffffffffffff 0000000000000000 c000003ff40de100 [542489.558066] [ T0] NIP [c00000000035d700] rcu_note_context_switch+0x6a0/0x7b0 [542489.558072] [ T0] LR [c00000000035d6fc] rcu_note_context_switch+0x69c/0x7b0 [542489.558078] [ T0] Call Trace: [542489.558082] [ T0] [c000001de047fc30] [c00000000035d6fc] rcu_note_context_switch+0x69c/0x7b0 (unreliable) [542489.558092] [ T0] [c000001de047fcd0] [c0000000013c4fc0] __schedule+0xf0/0x1d10 [542489.558108] [ T0] [c000001de047fe20] [c0000000013c6eb0] schedule_idle+0x30/0x60 [542489.558121] [ T0] [c000001de047fe40] [c0000000002caed8] do_idle+0x258/0x470 [542489.558133] [ T0] [c000001de047feb0] [c0000000002cb3b4] cpu_startup_entry+0x54/0x60 [542489.558145] [ T0] [c000001de047fee0] [c00000000005a720] start_secondary+0x860/0xd70 [542489.558154] [ T0] [c000001de047ffe0] [c00000000000e158] start_secondary_prolog+0x10/0x14 [542489.558162] [ T0] Code: f8c900a8 4bfffe6c 60000000 60420000 3c62ff87 39200001 f9410068 3d4201b2 386329d8 992aa087 4becff91 60000000 <0fe00000> e9410068 4bfff9c4 60420000 [542489.558184] [ T0] ---[ end trace 0000000000000000 ]--- [542521.228724] [ C59] watchdog: CPU 59 Hard LOCKUP [542521.228726] [ C59] watchdog: CPU 59 TB:3697937465165330, last heartbeat TB:3697921085812082 (31990ms ago) [542521.228728] [ C59] Modules linked in: vhost_net vhost vhost_iotlb tap rpadlpar_io rpaphp kvm_hv kvm mptcp_diag xsk_diag tcp_diag udp_diag raw_diag inet_diag unix_diag af_packet_diag netlink_diag xt_conntrack xt_MASQUERADE xfrm_user xt_set ip_set xt_addrtype nft_compat nf_conntrack_netbios_ns nf_conntrack_broadcast nft_masq nft_fib_inet nft_fib_ipv4 nft_fib_ipv6 nft_fib nft_reject_inet nf_reject_ipv4 nf_reject_ipv6 nft_reject nft_ct bonding tls nft_chain_nat nf_nat nf_conntrack tun nf_defrag_ipv6 nf_defrag_ipv4 rfkill af_packet binfmt_misc xfs aes_gcm_p10_crypto crypto_simd ibmveth cryptd xts vmx_crypto rtc_generic fuse nvme_fabrics ip_tables x_tables ibmvscsi scsi_transport_srp sd_mod scsi_dh_emc scsi_dh_rdac scsi_dh_alua sg scsi_mod scsi_common nvme nvme_core nvme_keyring nvme_auth pseries_wdt btrfs xor libblake2b raid6_pq dm_mirror dm_region_hash dm_log dm_mod br_netfilter bridge stp llc nf_tables [542521.228776] [ C59] CPU: 59 UID: 0 PID: 0 Comm: swapper/59 Tainted: G D W 7.2.2-5.g6824496-default #1 PREEMPT(full) openSUSE Tumbleweed (unreleased) 61871a5f06863b4006f5ef27cd9f18e8a7a2edad [542521.228780] [ C59] Tainted: [D]=DIE, [W]=WARN [542521.228781] [ C59] Hardware name: IBM,9824-42A Power11 (architected) 0x820200 0xf000007 of:IBM,FW1110.20 (OB1110_130) hv:phyp pSeries [542521.228783] [ C59] NIP: c0000000013d2c94 LR: c0000000013d5330 CTR: c000000003812be8 [542521.228785] [ C59] REGS: c000003ffed2bd60 TRAP: 0100 Tainted: G D W (7.2.2-5.g6824496-default) [542521.228788] [ C59] MSR: 8000000000081033 <SF,ME,IR,DR,RI,LE> CR: 42002282 XER: 2004000e [542521.228794] [ C59] CFAR: 000000000000011c IRQMASK: 3 GPR00: c000000000260a58 c000003ffef2fb60 c00000000205ad00 c000001deaab3c00 GPR04: 00000000000001f8 0000000000000000 fffffffffffe0000 0000000000010000 GPR08: 0000000000000001 0000000000000001 000000001c82ef77 fffffffffffffffd GPR12: c000000003812be0 c000003fffff9f00 0000000000000000 0000000000000000 GPR16: 0000000000000000 0000000000000000 0000000000000001 c000000003bc2b00 GPR20: c000003ff40c8de8 0000000000000001 c000003ff40c8da8 c000003ffef2fe08 GPR24: 0000000000000000 c000000003bea6e0 000000000000003b 0000003ff0e20000 GPR28: 0000000000780000 c0000000032bbe80 c000003ff40dbe80 c000001deaab3c00 [542521.228820] [ C59] NIP [c0000000013d2c94] queued_spin_lock_slowpath+0x164/0x19a0 [542521.228824] [ C59] LR [c0000000013d5330] _raw_spin_lock+0x80/0xa0 [542521.228827] [ C59] Call Trace: [542521.228827] [ C59] [c000003ffef2fb60] [0000000000001000] 0x1000 (unreliable) [542521.228833] [ C59] [c000003ffef2fc60] [c000001de0191300] 0xc000001de0191300 [542521.228836] [ C59] [c000003ffef2fc80] [c000000000260a58] __queue_work+0x2f8/0x740 [542521.228841] [ C59] [c000003ffef2fd50] [c00000000038ceac] call_timer_fn+0x4c/0x260 [542521.228845] [ C59] [c000003ffef2fde0] [c00000000038d308] __run_timers+0x248/0x410 [542521.228849] [ C59] [c000003ffef2fec0] [c00000000038d56c] run_timer_softirq+0x9c/0x130 [542521.228852] [ C59] [c000003ffef2fef0] [c00000000023ab0c] handle_softirqs+0x14c/0x4a0 [542521.228855] [ C59] [c000003ffef2ffe0] [c000000000018418] do_softirq_own_stack+0x38/0x50 [542521.228860] [ C59] [c000001de047f910] [c00000000023a238] __irq_exit_rcu+0x198/0x1c0 [542521.228862] [ C59] [c000001de047f940] [c000000000026acc] timer_interrupt+0x1cc/0x4f0 [542521.228866] [ C59] [c000001de047f9b0] [c000000000009fdc] decrementer_common_virt+0x28c/0x290 [542521.228871] [ C59] ---- interrupt: 900 at plpar_hcall_norets_notrace+0x18/0x2c [542521.228876] [ C59] NIP: c0000000001b7634 LR: c0000000013c4898 CTR: 0000000000000000 [542521.228877] [ C59] REGS: c000001de047f9e0 TRAP: 0900 Tainted: G D W (7.2.2-5.g6824496-default) [542521.228879] [ C59] MSR: 800000000280b033 <SF,VEC,VSX,EE,FP,ME,IR,DR,RI,LE> CR: 22000282 XER: 2004000e [542521.228886] [ C59] CFAR: 0000000000000000 IRQMASK: 0 GPR00: 0000000000000000 c000001de047fc80 c00000000205ad00 0000000000000000 GPR04: 0000000000000000 0000000000000039 0000000000000000 0000000000000000 GPR08: ffffffffffffff7f 0000000000000000 ffffffffffffffff 0000000000000000 GPR12: 0000000000000000 c000003fffff9f00 0000000000000000 000000002eef9860 GPR16: 0000000000000000 0000000000000001 0000000000000001 c000000000058010 GPR20: c000000000058160 0000000000000002 c000000000057fb0 c000000000057f80 GPR24: ffffffffffffffff 0001ed6431fbb852 0000000000000000 0000000000000001 GPR28: 0000000000000000 0000000000000000 c0000000032a1878 c0000000032a1870 [542521.228911] [ C59] NIP [c0000000001b7634] plpar_hcall_norets_notrace+0x18/0x2c [542521.228915] [ C59] LR [c0000000013c4898] check_and_cede_processor+0x48/0x60 [542521.228918] [ C59] ---- interrupt: 900 [542521.228919] [ C59] [c000001de047fc80] [ffffffffffffffff] 0xffffffffffffffff (unreliable) [542521.228922] [ C59] [c000001de047fce0] [c0000000013c4944] dedicated_cede_loop+0x94/0x1a0 [542521.228926] [ C59] [c000001de047fd30] [c0000000013c3f00] cpuidle_enter_state+0x300/0x748 [542521.228930] [ C59] [c000001de047fde0] [c000000000f5ff10] cpuidle_enter+0x50/0x80 [542521.228935] [ C59] [c000001de047fe20] [c0000000002ba358] call_cpuidle+0x48/0x90 [542521.228939] [ C59] [c000001de047fe40] [c0000000002caf5c] do_idle+0x2dc/0x470 [542521.228942] [ C59] [c000001de047feb0] [c0000000002cb3b8] cpu_startup_entry+0x58/0x60 [542521.228945] [ C59] [c000001de047fee0] [c00000000005a720] start_secondary+0x860/0xd70 [542521.228948] [ C59] [c000001de047ffe0] [c00000000000e158] start_secondary_prolog+0x10/0x14 [542521.228951] [ C59] Code: 41810e8c 39400000 39000000 3cc0fffe 60000000 813f0000 71290001 41820050 3ce00001 60000000 60420000 7c40003c <71090001> 394a0001 40820028 3d2201ba [568119.679467] [ C59] pstore: dump skipped in NMI path because of concurrent dump
And now with the entry fixes merged I can finally crash the kernel by runnin kernel build on the host with no KVM involvement. It does lock up during crash and requires fadump to collect vmcore.
Thanks
Michal
[ 1919.695922] [ T2102] Kernel panic - not syncing: stack-protector: Kernel stack is corrupted in: sys_ioctl+0xfe0/0x1060
[ 1919.695966] [ T2102] CPU: 4 UID: 0 PID: 2102 Comm: velociraptor-cl Not tainted 7.2.4-4.gefe5825-default #1 PREEMPT(full) openSUSE Tumbleweed (unreleased) d4e9af9c041454ba4e51c7aa59aeea774951e118
[ 1919.695981] [ T2102] Hardware name: IBM,9824-42A Power11 (architected) 0x820200 0xf000007 of:IBM,FW1110.20 (OB1110_130) hv:phyp pSeries
[ 1919.695991] [ T2102] Call Trace:
[ 1919.696653] [ T2102] ------------[ cut here ]------------
[ 1919.696665] [ T2102] Voluntary context switch within RCU read-side critical section!
[ 1919.696681] [ T2102] WARNING: [] kernel/rcu/tree_plugin.h:332 at rcu_note_context_switch+0x6a0/0x7b0, CPU#4: velociraptor-cl/2102
[ 1919.696700] [ T2102] Modules linked in: rpadlpar_io rpaphp mptcp_diag xsk_diag tcp_diag udp_diag raw_diag inet_diag unix_diag af_packet_diag netlink_diag xt_conntrack xt_MASQUERADE xfrm_user xt_set ip_set xt_addrtype nft_compat nf_conntrack_netbios_ns nf_conntrack_broadcast nft_masq nft_fib_inet nft_fib_ipv4 nft_fib_ipv6 nft_fib nft_reject_inet nf_reject_ipv4 nf_reject_ipv6 nft_reject nft_ct bonding tls nft_chain_nat nf_nat nf_conntrack tun nf_defrag_ipv6 nf_defrag_ipv4 rfkill af_packet binfmt_misc xfs aes_gcm_p10_crypto crypto_simd ibmveth cryptd xts vmx_crypto rtc_generic fuse nvme_fabrics ip_tables x_tables ibmvscsi scsi_transport_srp sd_mod scsi_dh_emc scsi_dh_rdac scsi_dh_alua sg scsi_mod scsi_common nvme nvme_core nvme_keyring nvme_auth pseries_wdt btrfs xor libblake2b raid6_pq dm_mirror dm_region_hash dm_log dm_mod br_netfilter bridge stp llc nf_tables
[ 1919.696862] [ T2102] CPU: 4 UID: 0 PID: 2102 Comm: velociraptor-cl Not tainted 7.2.4-4.gefe5825-default #1 PREEMPT(full) openSUSE Tumbleweed (unreleased) d4e9af9c041454ba4e51c7aa59aeea774951e118
[ 1919.696874] [ T2102] Hardware name: IBM,9824-42A Power11 (architected) 0x820200 0xf000007 of:IBM,FW1110.20 (OB1110_130) hv:phyp pSeries
[ 1919.696882] [ T2102] NIP: c00000000035e000 LR: c00000000035dffc CTR: 0000000000000001
[ 1919.696889] [ T2102] REGS: c00000001c36b6b0 TRAP: 0700 Not tainted (7.2.4-4.gefe5825-default)
[ 1919.696897] [ T2102] MSR: 8000000000029033 <SF,EE,ME,IR,DR,RI,LE> CR: 48222200 XER: 00000000
[ 1919.696917] [ T2102] CFAR: c00000000022da28 IRQMASK: 1
GPR00: c00000000035dffc c00000001c36b950 c00000000205ad00 000000000000003f
GPR04: 3ffffffffffc023a c00000001c36b670 c00000001c36b630 0000001dd4260000
GPR08: 0000000000000027 0000000000000001 c00000002992a300 0000000048222200
GPR12: c000003ff160f960 c000001ddfffb700 c000001dd751cc80 0000000000000000
GPR16: 0000000000000000 c0000000032bcc80 0000000000000000 0000000000000000
GPR20: 0000000000000000 c0000000032bcc80 0000000000000000 0000000000000000
GPR24: c00000002992a300 0000000000000000 0000000000000000 c000000003bea6e0
GPR28: 0000000000000000 c00000002992a300 0000000000000000 c000001dd751e180
[ 1919.697002] [ T2102] NIP [c00000000035e000] rcu_note_context_switch+0x6a0/0x7b0
[ 1919.697010] [ T2102] LR [c00000000035dffc] rcu_note_context_switch+0x69c/0x7b0
[ 1919.697018] [ T2102] Call Trace:
[ 1919.697022] [ T2102] [c00000001c36b950] [c00000000035dffc] rcu_note_context_switch+0x69c/0x7b0 (unreliable)
[ 1919.697033] [ T2102] [c00000001c36b9f0] [c0000000013c7e64] __schedule+0xf4/0x1d90
[ 1919.697045] [ T2102] [c00000001c36bb40] [c0000000013c9b48] schedule+0x48/0x130
[ 1919.697059] [ T2102] [c00000001c36bb70] [c0000000002c28b8] do_sched_yield+0xb8/0x150
[ 1919.697069] [ T2102] [c00000001c36bba0] [c0000000002c296c] sys_sched_yield+0x1c/0x30
[ 1919.697077] [ T2102] [c00000001c36bbc0] [c00000000002fa08] system_call_exception+0x188/0x430
[ 1919.697089] [ T2102] [c00000001c36be50] [c00000000000d620] system_call_common+0x160/0x2c4
[ 1919.697104] [ T2102] ---- interrupt: c00 at 0x100aba48
[ 1919.697113] [ T2102] NIP: 00000000100aba48 LR: 00000000100280a4 CTR: 0000000000000000
[ 1919.697120] [ T2102] REGS: c00000001c36be80 TRAP: 0c00 Not tainted (7.2.4-4.gefe5825-default)
[ 1919.697126] [ T2102] MSR: 800000000000f033 <SF,EE,PR,FP,ME,IR,DR,RI,LE> CR: 24228408 XER: 00000000
[ 1919.697147] [ T2102] IRQMASK: 0
GPR00: 000000000000009e 0000162f3b39bcc0 0000162f3a97ac40 0000162f3a7cabc8
GPR04: 0000000000000000 0000162f3a1d6e00 0000000000000004 0000000000000101
GPR08: 0000000000000005 0000000000000000 0000000000000000 0000000000000000
GPR12: 0000000000000000 00007ffdffed68c0 0000000000000001 0000000000000001
GPR16: 0000000000000000 fffffffffffffffd 0000000000000000 000000000000000c
GPR20: 0000000000800000 0000000000000001 0000162f3b39bba0 00007ffdffece148
GPR24: 00000007bd628d91 00000008c8044b7c 00000007d72eb2ef 000000009e36057c
GPR28: 0000000002c19fa3 000000006e9ed76c 0000162f3a1d6e00 0000000000000001
[ 1919.697230] [ T2102] NIP [00000000100aba48] 0x100aba48
[ 1919.697236] [ T2102] LR [00000000100280a4] 0x100280a4
[ 1919.697242] [ T2102] ---- interrupt: c00
[ 1919.697247] [ T2102] Code: f8c900a8 4bfffe6c 60000000 60420000 3c62ff87 39200001 f9410068 3d4201b2 38632b78 992aa187 4becf911 60000000 <0fe00000> e9410068 4bfff9c4 60420000
[ 1919.697279] [ T2102] ---[ end trace 0000000000000000 ]---
[ 1934.578776] [ C4] watchdog: CPU 4 self-detected hard LOCKUP @ queued_spin_lock_slowpath+0x1004/0x19a0
[ 1934.578791] [ C4] watchdog: CPU 4 TB:3717005501731461, last heartbeat TB:3716998337363492 (13992ms ago)
[ 1934.578794] [ C4] Modules linked in: rpadlpar_io rpaphp mptcp_diag xsk_diag tcp_diag udp_diag raw_diag inet_diag unix_diag af_packet_diag netlink_diag xt_conntrack xt_MASQUERADE xfrm_user xt_set ip_set xt_addrtype nft_compat nf_conntrack_netbios_ns nf_conntrack_broadcast nft_masq nft_fib_inet nft_fib_ipv4 nft_fib_ipv6 nft_fib nft_reject_inet nf_reject_ipv4 nf_reject_ipv6 nft_reject nft_ct bonding tls nft_chain_nat nf_nat nf_conntrack tun nf_defrag_ipv6 nf_defrag_ipv4 rfkill af_packet binfmt_misc xfs aes_gcm_p10_crypto crypto_simd ibmveth cryptd xts vmx_crypto rtc_generic fuse nvme_fabrics ip_tables x_tables ibmvscsi scsi_transport_srp sd_mod scsi_dh_emc scsi_dh_rdac scsi_dh_alua sg scsi_mod scsi_common nvme nvme_core nvme_keyring nvme_auth pseries_wdt btrfs xor libblake2b raid6_pq dm_mirror dm_region_hash dm_log dm_mod br_netfilter bridge stp llc nf_tables
[ 1934.578841] [ C4] CPU: 4 UID: 399 PID: 49635 Comm: cc1 Tainted: G D W 7.2.4-4.gefe5825-default #1 PREEMPT(full) openSUSE Tumbleweed (unreleased) d4e9af9c041454ba4e51c7aa59aeea774951e118
[ 1934.578846] [ C4] Tainted: [D]=DIE, [W]=WARN
[ 1934.578847] [ C4] Hardware name: IBM,9824-42A Power11 (architected) 0x820200 0xf000007 of:IBM,FW1110.20 (OB1110_130) hv:phyp pSeries
[ 1934.578849] [ C4] NIP: c0000000013d6a54 LR: c0000000013d6a38 CTR: 0000000000000004
[ 1934.578851] [ C4] REGS: c000001ddfdd7d60 TRAP: 0900 Tainted: G D W (7.2.4-4.gefe5825-default)
[ 1934.578854] [ C4] MSR: 8000000000009033 <SF,EE,ME,IR,DR,RI,LE> CR: 28002822 XER: 20040004
[ 1934.578861] [ C4] CFAR: 0000000000000000 IRQMASK: 1
GPR00: c0000000013d8870 c000000021d0baf0 c00000000205ad00 c000003ff449be88
GPR04: 0000000000000250 c000001dd7507960 00000000000b0077 c000000003bc1084
GPR08: 0000000000000000 0000000000000000 c000003ff449be80 c00000019f264400
GPR12: c000000000776400 c000001ddfffb700 0000000000000000 0000000000000000
GPR16: 0000000000000000 0000000000000000 0000000000000000 0000000000000000
GPR20: 0000000000000000 0000000000000000 0000000000000000 0000000000000000
GPR24: 0000000000000000 c000000003bc1080 c000001dd751be88 0000001dd4260000
GPR28: 00000000000a0000 c0000000032bbe80 c000001dd751be80 c000000003bc1084
[ 1934.578887] [ C4] NIP [c0000000013d6a54] queued_spin_lock_slowpath+0x1004/0x19a0
[ 1934.578890] [ C4] LR [c0000000013d6a38] queued_spin_lock_slowpath+0xfe8/0x19a0
[ 1934.578893] [ C4] Call Trace:
[ 1934.578894] [ C4] [c000000021d0bbf0] [c0000000013d8870] queued_write_lock_slowpath+0x250/0x270
[ 1934.578897] [ C4] [c000000021d0bc20] [c0000000013d81bc] _raw_write_lock_irq+0x5c/0x70
[ 1934.578901] [ C4] [c000000021d0bc40] [c000000000237df4] do_exit+0x3b4/0xd00
[ 1934.578905] [ C4] [c000000021d0bd00] [c0000000002389cc] do_group_exit+0x3c/0xe0
[ 1934.578909] [ C4] [c000000021d0bd50] [c000000000238a94] sys_exit_group+0x24/0x30
[ 1934.578913] [ C4] [c000000021d0bd70] [c00000000002fa08] system_call_exception+0x188/0x430
[ 1934.578917] [ C4] [c000000021d0be50] [c00000000000cfdc] system_call_vectored_common+0x15c/0x2ec
[ 1934.578922] [ C4] ---- interrupt: 3000 at 0x7fff7fd34344
[ 1934.578926] [ C4] NIP: 00007fff7fd34344 LR: 00007fff7fd34344 CTR: 0000000000000000
[ 1934.578928] [ C4] REGS: c000000021d0be80 TRAP: 3000 Tainted: G D W (7.2.4-4.gefe5825-default)
[ 1934.578930] [ C4] MSR: 800000000280f033 <SF,VEC,VSX,EE,PR,FP,ME,IR,DR,RI,LE> CR: 44002422 XER: 00000000
[ 1934.578938] [ C4] IRQMASK: 0
GPR00: 00000000000000ea 00007fffe2884cc0 00007fff7fe96d00 0000000000000000
GPR04: 0000000000000000 0000000038ed25e0 0000000000000000 0000000000000008
GPR08: 0000000000000008 0000000000000000 0000000000000000 0000000000000000
GPR12: 0000000000000000 00007fff8097dc80 0000000000000000 0000000000000000
GPR16: 0000000000000000 0000000000000000 0000000000000000 0000000000000000
GPR20: 0000000000000000 0000000000000000 0000000000000001 0000000000000000
GPR24: 00007fff7fe90828 0000000000000000 0000000000000000 0000000000000001
GPR28: 00007fff7fe99028 00007fff80977030 fffffffffffff000 0000000000000000
[ 1934.578962] [ C4] NIP [00007fff7fd34344] 0x7fff7fd34344
[ 1934.578964] [ C4] LR [00007fff7fd34344] 0x7fff7fd34344
[ 1934.578965] [ C4] ---- interrupt: 3000
[ 1934.578966] [ C4] Code: 3888ffff 7f474a14 f8010110 7c8407b4 4ad9b325 fb430000 60000000 893e001d 2c090000 40820018 60420000 7c40003c <893e001d> 2c090000 4182fff4 60000000
[ 2710.413634] [ C4] pstore: dump skipped in NMI path because of concurrent dumpShrikanth Hegde
reviewerRe: [Linux PPC] Disable PREEMPT
Hi Michal,
Quoted 90 lines · Michal Suchánek
Quoted 89 lines · Michal Suchánek
Quoted 88 lines · Shrikanth Hegde
Quoted 85 lines · Michal Suchánek
Quoted 84 lines · Shrikanth Hegde
Quoted 81 lines · Michal Suchánek
Quoted 67 lines · Shrikanth Hegde
Quoted 67 lines
Quoted 2 lines
If possible run against current upstream and share the results.
[ 472.091531][ T6181] Kernel panic - not syncing: stack-protector: Kernel stack is corrupted in: kvmhv_run_single_vcpu+0x19d4/0x1b50 [kvm_hv] [ 472.091598][ T6181] CPU: 29 UID: 107 PID: 6181 Comm: CPU 112/KVM Not tainted 7.2.2-5.g6824496-default #1 PREEMPT(full) openSUSE Tumbleweed (unreleased) 61871a5f06863b4006f5ef27cd9f18e8a7a2edad [ 472.091612][ T6181] Hardware name: IBM,9824-42A Power11 (architected) 0x820200 0xf000007 of:IBM,FW1110.20 (OB1110_130) hv:phyp pSeries [ 472.091624][ T6181] Call Trace: [ 472.091630][ T6181] [c00000000fdfb680] [c00000000134ce90] dump_stack_lvl+0x84/0xc0 (unreliable) [ 472.091653][ T6181] [c00000000fdfb6b0] [c00000000022e7c8] vpanic+0x324/0x5e4 [ 472.091666][ T6181] [c00000000fdfb760] [c00000000022eac4] do_panic_on_target_cpu+0x0/0x2c [ 472.091677][ T6181] [c00000000fdfb780] [c0000000013c1ff8] __stack_chk_fail+0x48/0x60 [ 472.091689][ T6181] [c00000000fdfb7f0] [c00800001aae219c] kvmhv_run_single_vcpu+0x19d4/0x1b50 [kvm_hv] [ 472.091712][ T6181] [c00000000fdfb940] [c00800001aae24b4] kvmppc_vcpu_run_hv+0x19c/0x12f0 [kvm_hv] [ 472.091732][ T6181] [c00000000fdfba10] [c00800001aeeed18] kvmppc_vcpu_run+0x30/0x48 [kvm] [ 472.091779][ T6181] [c00000000fdfba30] [c00800001aee9ef4] kvm_arch_vcpu_ioctl_run+0x35c/0x4a0 [kvm] [ 472.091813][ T6181] [c00000000fdfbac0] [c00800001aedaac4] kvm_vcpu_ioctl+0x1ac/0xad8 [kvm] [ 472.091844][ T6181] [c00000000fdfbca0] [c0000000007f1244] sys_ioctl+0x374/0x1060 [ 472.091857][ T6181] [c00000000fdfbdb0] [c00000000002f7f8] system_call_exception+0x188/0x430 [ 472.091871][ T6181] [c00000000fdfbe50] [c00000000000cfdc] system_call_vectored_common+0x15c/0x2ec [ 472.091886][ T6181] ---- interrupt: 3000 at 0x7fffb5565fac [ 472.091896][ T6181] NIP: 00007fffb5565fac LR: 00007fffb5565fac CTR: 0000000000000000 [ 472.091904][ T6181] REGS: c00000000fdfbe80 TRAP: 3000 Not tainted (7.2.2-5.g6824496-default) [ 472.091911][ T6181] MSR: 800000000280f033 <SF,VEC,VSX,EE,PR,FP,ME,IR,DR,RI,LE> CR: 42044402 XER: 00000000 [ 472.091938][ T6181] IRQMASK: 0 [ 472.091938][ T6181] GPR00: 0000000000000036 00007fbfa77ed7a0 00007fffb5677100 00000000000000fa [ 472.091938][ T6181] GPR04: 000000002000ae80 0000000000000000 0000000000000000 0000000000000000 [ 472.091938][ T6181] GPR08: 00000000000000fa 0000000000000000 0000000000000000 0000000000000000 [ 472.091938][ T6181] GPR12: 0000000000000000 00007fbfa77f5ec0 000000014676f000 00007fbfa77ee7c0 [ 472.091938][ T6181] GPR16: 000000014674e8d0 00007fbfa77eeec0 00007fbfa77eeec0 fffffffffffffff7 [ 472.091938][ T6181] GPR20: 00007fffb71210d0 0000000000000001 00007fbfa77eeec0 0000000000000000 [ 472.091938][ T6181] GPR24: 00007fbfa77ed8e8 0000000105971428 000000002000ae80 0000000105f77a70 [ 472.091938][ T6181] GPR28: 0000000000000000 0000000000000000 000000002000ae80 000000014674f000 [ 472.092020][ T6181] NIP [00007fffb5565fac] 0x7fffb5565fac [ 472.092027][ T6181] LR [00007fffb5565fac] 0x7fffb5565fac [ 472.092033][ T6181] ---- interrupt: 3000 [ 472.098256][ T6181] pstore: backend (nvram) writing error (-1)This is the host, cannot run the kernel as guest because it fails to boot most of the time inside KVM.
Quoted 9 lines
Quoted 7 lines
Nonethless, there are quite a few platforms. Originally no preemption was the only option, and that's the reason why many people run that. It's the conservative, known working option. And that's the reason a lot of platfrom code does not get tested with more aggressive preemtion models, and never gets fixed to work with them.
Full preemption has been there for many years!.
Possible for years, forced only recently.
Quoted 8 lines
Lazy is not that aggressive compared to that.
Quoted 3 lines
Simply disabling the no preemtion option does not make the platform code ready.
Let's understand your crash case. Let's see where it is going wrong. I am suspecting it is some wrong usage of preemption api rather than arch can't support preemption.
Very likely some wrong use of the preemption API by the arch code, or no use where it should have been used. It did not matter so long as people could run their no preempt configs and ignore the problem.
Quoted 8 lines
Quoted 1 line
Thanks
Friendly LLM analysis says preemption is enabled too early and before completing
kvmppc_handle_exit_hv()/kvmppc_handle_nested_exit()Below is ONLY a speculation and completely UNTESTED. Maybe worth a try.
The patch is munged by the e-mail client, and it causes immediate voluntary preemprion in rcu critical section and hard lockup on starting a KVM VM.
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
Quoted 7 lines
Quoted 4 lines
Also it would be sort of bad news if it worked because that would be specific to book3s KVM HV and would not help with the KVM HV from the original report which likely is not book3s, nor with KVM PR.
Thanks for trying. We will try a local repro and look into it why stack is getting corrupted.
As we discussed offlist, samir helped to run a similar test on his machine, and he didn't run into issue so far. we will try more.
I am just wondering what different in your case?
By any chance we are running into below one? Can you check your gcc version?
https://lore.kernel.org/all/CAABZP2z=xu+07-y5fqFLidZz1VpSgrSwXa1mFHPb=b3Ezr3OtA@mail.gmail.com/
Maybe CONFIG_DEBUG_PREEMPT worth a try to if it shows up anything.
Quoted 16 lines
Quoted 16 lines
Quoted 11 lines
Quoted 8 lines
There is also stack corruption when idling. At this point the machine is stuck half-dead and would not go through with the panic, it requires dump from the hyprvisor side to capture this.
Thanks
Michal
is this on host with kvm running or this is without kvm running anything?
Difficult to say after the fact. Given running KVM VMs is crashing with this kernel most likely no VM was running.
Quoted 1 line
Quoted 6 lines
Quoted 6 lines
Quoted 1 line
Do you see corruption if you don't have kvm module loaded?
Difficult to say, this takes hours to days to reproduce, and the module is normally loaded by default. I can blacklist it to make sure it does not get loaded.
We might need exact vmlinux and if possible vmcore to see the paca saving into specific register or why it could possibly go wrong.
Michael, Christophe, anything rings a bell? What might be going wrong here?
Re: [Linux PPC] Disable PREEMPT
Quoted 105 lines · Shrikanth Hegde
Hi Michal,
Quoted 90 lines · Michal Suchánek
Quoted 89 lines · Michal Suchánek
Quoted 88 lines · Shrikanth Hegde
Quoted 85 lines · Michal Suchánek
Quoted 84 lines · Shrikanth Hegde
Quoted 81 lines · Michal Suchánek
Quoted 67 lines · Shrikanth Hegde
Quoted 67 lines
Quoted 2 lines
If possible run against current upstream and share the results.
[ 472.091531][ T6181] Kernel panic - not syncing: stack-protector: Kernel stack is corrupted in: kvmhv_run_single_vcpu+0x19d4/0x1b50 [kvm_hv] [ 472.091598][ T6181] CPU: 29 UID: 107 PID: 6181 Comm: CPU 112/KVM Not tainted 7.2.2-5.g6824496-default #1 PREEMPT(full) openSUSE Tumbleweed (unreleased) 61871a5f06863b4006f5ef27cd9f18e8a7a2edad [ 472.091612][ T6181] Hardware name: IBM,9824-42A Power11 (architected) 0x820200 0xf000007 of:IBM,FW1110.20 (OB1110_130) hv:phyp pSeries [ 472.091624][ T6181] Call Trace: [ 472.091630][ T6181] [c00000000fdfb680] [c00000000134ce90] dump_stack_lvl+0x84/0xc0 (unreliable) [ 472.091653][ T6181] [c00000000fdfb6b0] [c00000000022e7c8] vpanic+0x324/0x5e4 [ 472.091666][ T6181] [c00000000fdfb760] [c00000000022eac4] do_panic_on_target_cpu+0x0/0x2c [ 472.091677][ T6181] [c00000000fdfb780] [c0000000013c1ff8] __stack_chk_fail+0x48/0x60 [ 472.091689][ T6181] [c00000000fdfb7f0] [c00800001aae219c] kvmhv_run_single_vcpu+0x19d4/0x1b50 [kvm_hv] [ 472.091712][ T6181] [c00000000fdfb940] [c00800001aae24b4] kvmppc_vcpu_run_hv+0x19c/0x12f0 [kvm_hv] [ 472.091732][ T6181] [c00000000fdfba10] [c00800001aeeed18] kvmppc_vcpu_run+0x30/0x48 [kvm] [ 472.091779][ T6181] [c00000000fdfba30] [c00800001aee9ef4] kvm_arch_vcpu_ioctl_run+0x35c/0x4a0 [kvm] [ 472.091813][ T6181] [c00000000fdfbac0] [c00800001aedaac4] kvm_vcpu_ioctl+0x1ac/0xad8 [kvm] [ 472.091844][ T6181] [c00000000fdfbca0] [c0000000007f1244] sys_ioctl+0x374/0x1060 [ 472.091857][ T6181] [c00000000fdfbdb0] [c00000000002f7f8] system_call_exception+0x188/0x430 [ 472.091871][ T6181] [c00000000fdfbe50] [c00000000000cfdc] system_call_vectored_common+0x15c/0x2ec [ 472.091886][ T6181] ---- interrupt: 3000 at 0x7fffb5565fac [ 472.091896][ T6181] NIP: 00007fffb5565fac LR: 00007fffb5565fac CTR: 0000000000000000 [ 472.091904][ T6181] REGS: c00000000fdfbe80 TRAP: 3000 Not tainted (7.2.2-5.g6824496-default) [ 472.091911][ T6181] MSR: 800000000280f033 <SF,VEC,VSX,EE,PR,FP,ME,IR,DR,RI,LE> CR: 42044402 XER: 00000000 [ 472.091938][ T6181] IRQMASK: 0 [ 472.091938][ T6181] GPR00: 0000000000000036 00007fbfa77ed7a0 00007fffb5677100 00000000000000fa [ 472.091938][ T6181] GPR04: 000000002000ae80 0000000000000000 0000000000000000 0000000000000000 [ 472.091938][ T6181] GPR08: 00000000000000fa 0000000000000000 0000000000000000 0000000000000000 [ 472.091938][ T6181] GPR12: 0000000000000000 00007fbfa77f5ec0 000000014676f000 00007fbfa77ee7c0 [ 472.091938][ T6181] GPR16: 000000014674e8d0 00007fbfa77eeec0 00007fbfa77eeec0 fffffffffffffff7 [ 472.091938][ T6181] GPR20: 00007fffb71210d0 0000000000000001 00007fbfa77eeec0 0000000000000000 [ 472.091938][ T6181] GPR24: 00007fbfa77ed8e8 0000000105971428 000000002000ae80 0000000105f77a70 [ 472.091938][ T6181] GPR28: 0000000000000000 0000000000000000 000000002000ae80 000000014674f000 [ 472.092020][ T6181] NIP [00007fffb5565fac] 0x7fffb5565fac [ 472.092027][ T6181] LR [00007fffb5565fac] 0x7fffb5565fac [ 472.092033][ T6181] ---- interrupt: 3000 [ 472.098256][ T6181] pstore: backend (nvram) writing error (-1)This is the host, cannot run the kernel as guest because it fails to boot most of the time inside KVM.
Quoted 9 lines
Quoted 7 lines
Nonethless, there are quite a few platforms. Originally no preemption was the only option, and that's the reason why many people run that. It's the conservative, known working option. And that's the reason a lot of platfrom code does not get tested with more aggressive preemtion models, and never gets fixed to work with them.
Full preemption has been there for many years!.
Possible for years, forced only recently.
Quoted 8 lines
Lazy is not that aggressive compared to that.
Quoted 3 lines
Simply disabling the no preemtion option does not make the platform code ready.
Let's understand your crash case. Let's see where it is going wrong. I am suspecting it is some wrong usage of preemption api rather than arch can't support preemption.
Very likely some wrong use of the preemption API by the arch code, or no use where it should have been used. It did not matter so long as people could run their no preempt configs and ignore the problem.
Quoted 8 lines
Quoted 1 line
Thanks
Friendly LLM analysis says preemption is enabled too early and before completing
kvmppc_handle_exit_hv()/kvmppc_handle_nested_exit()Below is ONLY a speculation and completely UNTESTED. Maybe worth a try.
The patch is munged by the e-mail client, and it causes immediate voluntary preemprion in rcu critical section and hard lockup on starting a KVM VM.
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
Quoted 7 lines
Quoted 4 lines
Also it would be sort of bad news if it worked because that would be specific to book3s KVM HV and would not help with the KVM HV from the original report which likely is not book3s, nor with KVM PR.
Thanks for trying. We will try a local repro and look into it why stack is getting corrupted.
As we discussed offlist, samir helped to run a similar test on his machine, and he didn't run into issue so far. we will try more.
Quoted 6 lines
I am just wondering what different in your case?
By any chance we are running into below one? Can you check your gcc version?https://lore.kernel.org/all/CAABZP2z=xu+07-y5fqFLidZz1VpSgrSwXa1mFHPb=b3Ezr3OtA@mail.gmail.com/
Maybe
CONFIG_DEBUG_PREEMPTworth a try to if it shows up anything.
Does not change anything, the kernel crashes all the same.
Nonetheless, I noticed that a tool that does some BPF tracing is running, and without it the problem is not reproducible.
Thanks
Michal
Re: [Linux PPC] Disable PREEMPT
Quoted 113 lines · Michal Suchánek
Quoted 105 lines · Shrikanth Hegde
Hi Michal,
Quoted 90 lines · Michal Suchánek
Quoted 89 lines · Michal Suchánek
Quoted 88 lines · Shrikanth Hegde
Quoted 85 lines · Michal Suchánek
Quoted 84 lines · Shrikanth Hegde
Quoted 81 lines · Michal Suchánek
Quoted 67 lines · Shrikanth Hegde
Quoted 67 lines
Quoted 2 lines
If possible run against current upstream and share the results.
[ 472.091531][ T6181] Kernel panic - not syncing: stack-protector: Kernel stack is corrupted in: kvmhv_run_single_vcpu+0x19d4/0x1b50 [kvm_hv] [ 472.091598][ T6181] CPU: 29 UID: 107 PID: 6181 Comm: CPU 112/KVM Not tainted 7.2.2-5.g6824496-default #1 PREEMPT(full) openSUSE Tumbleweed (unreleased) 61871a5f06863b4006f5ef27cd9f18e8a7a2edad [ 472.091612][ T6181] Hardware name: IBM,9824-42A Power11 (architected) 0x820200 0xf000007 of:IBM,FW1110.20 (OB1110_130) hv:phyp pSeries [ 472.091624][ T6181] Call Trace: [ 472.091630][ T6181] [c00000000fdfb680] [c00000000134ce90] dump_stack_lvl+0x84/0xc0 (unreliable) [ 472.091653][ T6181] [c00000000fdfb6b0] [c00000000022e7c8] vpanic+0x324/0x5e4 [ 472.091666][ T6181] [c00000000fdfb760] [c00000000022eac4] do_panic_on_target_cpu+0x0/0x2c [ 472.091677][ T6181] [c00000000fdfb780] [c0000000013c1ff8] __stack_chk_fail+0x48/0x60 [ 472.091689][ T6181] [c00000000fdfb7f0] [c00800001aae219c] kvmhv_run_single_vcpu+0x19d4/0x1b50 [kvm_hv] [ 472.091712][ T6181] [c00000000fdfb940] [c00800001aae24b4] kvmppc_vcpu_run_hv+0x19c/0x12f0 [kvm_hv] [ 472.091732][ T6181] [c00000000fdfba10] [c00800001aeeed18] kvmppc_vcpu_run+0x30/0x48 [kvm] [ 472.091779][ T6181] [c00000000fdfba30] [c00800001aee9ef4] kvm_arch_vcpu_ioctl_run+0x35c/0x4a0 [kvm] [ 472.091813][ T6181] [c00000000fdfbac0] [c00800001aedaac4] kvm_vcpu_ioctl+0x1ac/0xad8 [kvm] [ 472.091844][ T6181] [c00000000fdfbca0] [c0000000007f1244] sys_ioctl+0x374/0x1060 [ 472.091857][ T6181] [c00000000fdfbdb0] [c00000000002f7f8] system_call_exception+0x188/0x430 [ 472.091871][ T6181] [c00000000fdfbe50] [c00000000000cfdc] system_call_vectored_common+0x15c/0x2ec [ 472.091886][ T6181] ---- interrupt: 3000 at 0x7fffb5565fac [ 472.091896][ T6181] NIP: 00007fffb5565fac LR: 00007fffb5565fac CTR: 0000000000000000 [ 472.091904][ T6181] REGS: c00000000fdfbe80 TRAP: 3000 Not tainted (7.2.2-5.g6824496-default) [ 472.091911][ T6181] MSR: 800000000280f033 <SF,VEC,VSX,EE,PR,FP,ME,IR,DR,RI,LE> CR: 42044402 XER: 00000000 [ 472.091938][ T6181] IRQMASK: 0 [ 472.091938][ T6181] GPR00: 0000000000000036 00007fbfa77ed7a0 00007fffb5677100 00000000000000fa [ 472.091938][ T6181] GPR04: 000000002000ae80 0000000000000000 0000000000000000 0000000000000000 [ 472.091938][ T6181] GPR08: 00000000000000fa 0000000000000000 0000000000000000 0000000000000000 [ 472.091938][ T6181] GPR12: 0000000000000000 00007fbfa77f5ec0 000000014676f000 00007fbfa77ee7c0 [ 472.091938][ T6181] GPR16: 000000014674e8d0 00007fbfa77eeec0 00007fbfa77eeec0 fffffffffffffff7 [ 472.091938][ T6181] GPR20: 00007fffb71210d0 0000000000000001 00007fbfa77eeec0 0000000000000000 [ 472.091938][ T6181] GPR24: 00007fbfa77ed8e8 0000000105971428 000000002000ae80 0000000105f77a70 [ 472.091938][ T6181] GPR28: 0000000000000000 0000000000000000 000000002000ae80 000000014674f000 [ 472.092020][ T6181] NIP [00007fffb5565fac] 0x7fffb5565fac [ 472.092027][ T6181] LR [00007fffb5565fac] 0x7fffb5565fac [ 472.092033][ T6181] ---- interrupt: 3000 [ 472.098256][ T6181] pstore: backend (nvram) writing error (-1)This is the host, cannot run the kernel as guest because it fails to boot most of the time inside KVM.
Quoted 9 lines
Quoted 7 lines
Nonethless, there are quite a few platforms. Originally no preemption was the only option, and that's the reason why many people run that. It's the conservative, known working option. And that's the reason a lot of platfrom code does not get tested with more aggressive preemtion models, and never gets fixed to work with them.
Full preemption has been there for many years!.
Possible for years, forced only recently.
Quoted 8 lines
Lazy is not that aggressive compared to that.
Quoted 3 lines
Simply disabling the no preemtion option does not make the platform code ready.
Let's understand your crash case. Let's see where it is going wrong. I am suspecting it is some wrong usage of preemption api rather than arch can't support preemption.
Very likely some wrong use of the preemption API by the arch code, or no use where it should have been used. It did not matter so long as people could run their no preempt configs and ignore the problem.
Quoted 8 lines
Quoted 1 line
Thanks
Friendly LLM analysis says preemption is enabled too early and before completing
kvmppc_handle_exit_hv()/kvmppc_handle_nested_exit()Below is ONLY a speculation and completely UNTESTED. Maybe worth a try.
The patch is munged by the e-mail client, and it causes immediate voluntary preemprion in rcu critical section and hard lockup on starting a KVM VM.
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
Quoted 7 lines
Quoted 4 lines
Also it would be sort of bad news if it worked because that would be specific to book3s KVM HV and would not help with the KVM HV from the original report which likely is not book3s, nor with KVM PR.
Thanks for trying. We will try a local repro and look into it why stack is getting corrupted.
As we discussed offlist, samir helped to run a similar test on his machine, and he didn't run into issue so far. we will try more.
Quoted 6 lines
I am just wondering what different in your case?
By any chance we are running into below one? Can you check your gcc version?https://lore.kernel.org/all/CAABZP2z=xu+07-y5fqFLidZz1VpSgrSwXa1mFHPb=b3Ezr3OtA@mail.gmail.com/
Maybe
CONFIG_DEBUG_PREEMPTworth a try to if it shows up anything.
Quoted 8 lines
Does not change anything, the kernel crashes all the same.
Nonetheless, I noticed that a tool that does some BPF tracing is running, and without it the problem is not reproducible.
Thanks
Michal
Thanks Michal for the update.
Interesting finding! Since the crash is only reproducible when the BPF tracing tool is running, could you share the following details?
Which BPF tracing tool are you using (e.g., bpftrace, perf, bcc-based tool, a custom tool)? What is the specific BPF program or filter being attached — particularly which kernel function(s) or tracepoints it hooks into (e.g., is it attaching a kprobe/uprobe/tracepoint anywhere inside kvmhv_run_single_vcpu or related KVM HV paths)? What is the BPF program type — kprobe, tracepoint, perf_event, fentry/fexit, etc.?
Regards,
Narayana Murty.
Re: [Linux PPC] Disable PREEMPT
Quoted 123 lines · Narayana Murty N
Quoted 120 lines · Michal Suchánek
Quoted 105 lines · Shrikanth Hegde
Hi Michal,
Quoted 90 lines · Michal Suchánek
Quoted 89 lines · Michal Suchánek
Quoted 88 lines · Shrikanth Hegde
Quoted 85 lines · Michal Suchánek
Quoted 84 lines · Shrikanth Hegde
Quoted 81 lines · Michal Suchánek
Quoted 67 lines · Shrikanth Hegde
Quoted 67 lines
Quoted 2 lines
If possible run against current upstream and share the results.
[ 472.091531][ T6181] Kernel panic - not syncing: stack-protector: Kernel stack is corrupted in: kvmhv_run_single_vcpu+0x19d4/0x1b50 [kvm_hv] [ 472.091598][ T6181] CPU: 29 UID: 107 PID: 6181 Comm: CPU 112/KVM Not tainted 7.2.2-5.g6824496-default #1 PREEMPT(full) openSUSE Tumbleweed (unreleased) 61871a5f06863b4006f5ef27cd9f18e8a7a2edad [ 472.091612][ T6181] Hardware name: IBM,9824-42A Power11 (architected) 0x820200 0xf000007 of:IBM,FW1110.20 (OB1110_130) hv:phyp pSeries [ 472.091624][ T6181] Call Trace: [ 472.091630][ T6181] [c00000000fdfb680] [c00000000134ce90] dump_stack_lvl+0x84/0xc0 (unreliable) [ 472.091653][ T6181] [c00000000fdfb6b0] [c00000000022e7c8] vpanic+0x324/0x5e4 [ 472.091666][ T6181] [c00000000fdfb760] [c00000000022eac4] do_panic_on_target_cpu+0x0/0x2c [ 472.091677][ T6181] [c00000000fdfb780] [c0000000013c1ff8] __stack_chk_fail+0x48/0x60 [ 472.091689][ T6181] [c00000000fdfb7f0] [c00800001aae219c] kvmhv_run_single_vcpu+0x19d4/0x1b50 [kvm_hv] [ 472.091712][ T6181] [c00000000fdfb940] [c00800001aae24b4] kvmppc_vcpu_run_hv+0x19c/0x12f0 [kvm_hv] [ 472.091732][ T6181] [c00000000fdfba10] [c00800001aeeed18] kvmppc_vcpu_run+0x30/0x48 [kvm] [ 472.091779][ T6181] [c00000000fdfba30] [c00800001aee9ef4] kvm_arch_vcpu_ioctl_run+0x35c/0x4a0 [kvm] [ 472.091813][ T6181] [c00000000fdfbac0] [c00800001aedaac4] kvm_vcpu_ioctl+0x1ac/0xad8 [kvm] [ 472.091844][ T6181] [c00000000fdfbca0] [c0000000007f1244] sys_ioctl+0x374/0x1060 [ 472.091857][ T6181] [c00000000fdfbdb0] [c00000000002f7f8] system_call_exception+0x188/0x430 [ 472.091871][ T6181] [c00000000fdfbe50] [c00000000000cfdc] system_call_vectored_common+0x15c/0x2ec [ 472.091886][ T6181] ---- interrupt: 3000 at 0x7fffb5565fac [ 472.091896][ T6181] NIP: 00007fffb5565fac LR: 00007fffb5565fac CTR: 0000000000000000 [ 472.091904][ T6181] REGS: c00000000fdfbe80 TRAP: 3000 Not tainted (7.2.2-5.g6824496-default) [ 472.091911][ T6181] MSR: 800000000280f033 <SF,VEC,VSX,EE,PR,FP,ME,IR,DR,RI,LE> CR: 42044402 XER: 00000000 [ 472.091938][ T6181] IRQMASK: 0 [ 472.091938][ T6181] GPR00: 0000000000000036 00007fbfa77ed7a0 00007fffb5677100 00000000000000fa [ 472.091938][ T6181] GPR04: 000000002000ae80 0000000000000000 0000000000000000 0000000000000000 [ 472.091938][ T6181] GPR08: 00000000000000fa 0000000000000000 0000000000000000 0000000000000000 [ 472.091938][ T6181] GPR12: 0000000000000000 00007fbfa77f5ec0 000000014676f000 00007fbfa77ee7c0 [ 472.091938][ T6181] GPR16: 000000014674e8d0 00007fbfa77eeec0 00007fbfa77eeec0 fffffffffffffff7 [ 472.091938][ T6181] GPR20: 00007fffb71210d0 0000000000000001 00007fbfa77eeec0 0000000000000000 [ 472.091938][ T6181] GPR24: 00007fbfa77ed8e8 0000000105971428 000000002000ae80 0000000105f77a70 [ 472.091938][ T6181] GPR28: 0000000000000000 0000000000000000 000000002000ae80 000000014674f000 [ 472.092020][ T6181] NIP [00007fffb5565fac] 0x7fffb5565fac [ 472.092027][ T6181] LR [00007fffb5565fac] 0x7fffb5565fac [ 472.092033][ T6181] ---- interrupt: 3000 [ 472.098256][ T6181] pstore: backend (nvram) writing error (-1)This is the host, cannot run the kernel as guest because it fails to boot most of the time inside KVM.
Quoted 9 lines
Quoted 7 lines
Nonethless, there are quite a few platforms. Originally no preemption
was the only option, and that's the reason why many people run that.
It's the conservative, known working option. And that's the reason a lot
of platfrom code does not get tested with more aggressive preemtion
models, and never gets fixed to work with them.Full preemption has been there for many years!.
Possible for years, forced only recently.
Quoted 8 lines
Lazy is not that aggressive compared to that.
Quoted 3 lines
Simply disabling the no preemtion option does not make the platform code
ready.Let's understand your crash case. Let's see where it is going wrong. I am suspecting it is some wrong usage of preemption api rather than arch can't support preemption.
Very likely some wrong use of the preemption API by the arch code, or no use where it should have been used. It did not matter so long as people could run their no preempt configs and ignore the problem.
Quoted 8 lines
Quoted 1 line
Thanks
Friendly LLM analysis says preemption is enabled too early and before completing
kvmppc_handle_exit_hv()/kvmppc_handle_nested_exit()Below is ONLY a speculation and completely UNTESTED. Maybe worth a try.
The patch is munged by the e-mail client, and it causes immediate voluntary preemprion in rcu critical section and hard lockup on starting a KVM VM.
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
Quoted 7 lines
Quoted 4 lines
Also it would be sort of bad news if it worked because that would be specific to book3s KVM HV and would not help with the KVM HV from the original report which likely is not book3s, nor with KVM PR.
Thanks for trying. We will try a local repro and look into it why stack is getting corrupted.
As we discussed offlist, samir helped to run a similar test on his machine, and he didn't run into issue so far. we will try more.
Quoted 6 lines
I am just wondering what different in your case?
By any chance we are running into below one? Can you check your gcc version?https://lore.kernel.org/all/CAABZP2z=xu+07-y5fqFLidZz1VpSgrSwXa1mFHPb=b3Ezr3OtA@mail.gmail.com/
Maybe
CONFIG_DEBUG_PREEMPTworth a try to if it shows up anything.Does not change anything, the kernel crashes all the same.
Nonetheless, I noticed that a tool that does some BPF tracing is running, and without it the problem is not reproducible.
Thanks
Quoted 8 lines
Quoted 1 line
Michal
Thanks Michal for the update.
Interesting finding! Since the crash is only reproducible when the BPF tracing tool is running, could you share the following details?
Which BPF tracing tool are you using (e.g., bpftrace, perf, bcc-based tool, a custom tool)?
A custom tool, likely a version of this:
https://build.opensuse.org/package/show/security:sensor/velociraptor
Quoted 6 lines
What is the specific BPF program or filter being attached — particularly which kernel function(s) or tracepoints it hooks into (e.g., is it attaching a kprobe/uprobe/tracepoint anywhere inside
kvmhv_run_single_vcpuor related KVM HV paths)?
What is the BPF program type — kprobe, tracepoint,perf_event, fentry/fexit, etc.?
It would be likely these programs:
https://github.com/SUSE/linux-security-sensor/tree/sensor-base-0.76.7/vql/linux/bpf
Thanks
Michal
Shrikanth Hegde
reviewerRe: [Linux PPC] Disable PREEMPT
Hi.
Quoted 143 lines · Michal Suchánek
Quoted 123 lines · Narayana Murty N
Quoted 120 lines · Michal Suchánek
Quoted 105 lines · Shrikanth Hegde
Hi Michal,
Quoted 90 lines · Michal Suchánek
Quoted 89 lines · Michal Suchánek
Quoted 88 lines · Shrikanth Hegde
Quoted 85 lines · Michal Suchánek
Quoted 84 lines · Shrikanth Hegde
Quoted 81 lines · Michal Suchánek
Quoted 67 lines · Shrikanth Hegde
Quoted 67 lines
Quoted 2 lines
If possible run against current upstream and share the results.
[ 472.091531][ T6181] Kernel panic - not syncing: stack-protector: Kernel stack is corrupted in: kvmhv_run_single_vcpu+0x19d4/0x1b50 [kvm_hv] [ 472.091598][ T6181] CPU: 29 UID: 107 PID: 6181 Comm: CPU 112/KVM Not tainted 7.2.2-5.g6824496-default #1 PREEMPT(full) openSUSE Tumbleweed (unreleased) 61871a5f06863b4006f5ef27cd9f18e8a7a2edad [ 472.091612][ T6181] Hardware name: IBM,9824-42A Power11 (architected) 0x820200 0xf000007 of:IBM,FW1110.20 (OB1110_130) hv:phyp pSeries [ 472.091624][ T6181] Call Trace: [ 472.091630][ T6181] [c00000000fdfb680] [c00000000134ce90] dump_stack_lvl+0x84/0xc0 (unreliable) [ 472.091653][ T6181] [c00000000fdfb6b0] [c00000000022e7c8] vpanic+0x324/0x5e4 [ 472.091666][ T6181] [c00000000fdfb760] [c00000000022eac4] do_panic_on_target_cpu+0x0/0x2c [ 472.091677][ T6181] [c00000000fdfb780] [c0000000013c1ff8] __stack_chk_fail+0x48/0x60 [ 472.091689][ T6181] [c00000000fdfb7f0] [c00800001aae219c] kvmhv_run_single_vcpu+0x19d4/0x1b50 [kvm_hv] [ 472.091712][ T6181] [c00000000fdfb940] [c00800001aae24b4] kvmppc_vcpu_run_hv+0x19c/0x12f0 [kvm_hv] [ 472.091732][ T6181] [c00000000fdfba10] [c00800001aeeed18] kvmppc_vcpu_run+0x30/0x48 [kvm] [ 472.091779][ T6181] [c00000000fdfba30] [c00800001aee9ef4] kvm_arch_vcpu_ioctl_run+0x35c/0x4a0 [kvm] [ 472.091813][ T6181] [c00000000fdfbac0] [c00800001aedaac4] kvm_vcpu_ioctl+0x1ac/0xad8 [kvm] [ 472.091844][ T6181] [c00000000fdfbca0] [c0000000007f1244] sys_ioctl+0x374/0x1060 [ 472.091857][ T6181] [c00000000fdfbdb0] [c00000000002f7f8] system_call_exception+0x188/0x430 [ 472.091871][ T6181] [c00000000fdfbe50] [c00000000000cfdc] system_call_vectored_common+0x15c/0x2ec [ 472.091886][ T6181] ---- interrupt: 3000 at 0x7fffb5565fac [ 472.091896][ T6181] NIP: 00007fffb5565fac LR: 00007fffb5565fac CTR: 0000000000000000 [ 472.091904][ T6181] REGS: c00000000fdfbe80 TRAP: 3000 Not tainted (7.2.2-5.g6824496-default) [ 472.091911][ T6181] MSR: 800000000280f033 <SF,VEC,VSX,EE,PR,FP,ME,IR,DR,RI,LE> CR: 42044402 XER: 00000000 [ 472.091938][ T6181] IRQMASK: 0 [ 472.091938][ T6181] GPR00: 0000000000000036 00007fbfa77ed7a0 00007fffb5677100 00000000000000fa [ 472.091938][ T6181] GPR04: 000000002000ae80 0000000000000000 0000000000000000 0000000000000000 [ 472.091938][ T6181] GPR08: 00000000000000fa 0000000000000000 0000000000000000 0000000000000000 [ 472.091938][ T6181] GPR12: 0000000000000000 00007fbfa77f5ec0 000000014676f000 00007fbfa77ee7c0 [ 472.091938][ T6181] GPR16: 000000014674e8d0 00007fbfa77eeec0 00007fbfa77eeec0 fffffffffffffff7 [ 472.091938][ T6181] GPR20: 00007fffb71210d0 0000000000000001 00007fbfa77eeec0 0000000000000000 [ 472.091938][ T6181] GPR24: 00007fbfa77ed8e8 0000000105971428 000000002000ae80 0000000105f77a70 [ 472.091938][ T6181] GPR28: 0000000000000000 0000000000000000 000000002000ae80 000000014674f000 [ 472.092020][ T6181] NIP [00007fffb5565fac] 0x7fffb5565fac [ 472.092027][ T6181] LR [00007fffb5565fac] 0x7fffb5565fac [ 472.092033][ T6181] ---- interrupt: 3000 [ 472.098256][ T6181] pstore: backend (nvram) writing error (-1)This is the host, cannot run the kernel as guest because it fails to boot most of the time inside KVM.
Quoted 9 lines
Nonethless, there are quite a few platforms. Originally no preemption
was the only option, and that's the reason why many people run that.
It's the conservative, known working option. And that's the reason a lot
of platfrom code does not get tested with more aggressive preemtion
models, and never gets fixed to work with them.Full preemption has been there for many years!.
Possible for years, forced only recently.
Quoted 8 lines
Lazy is not that aggressive compared to that.
Simply disabling the no preemtion option does not make the platform code
ready.Let's understand your crash case. Let's see where it is going wrong. I am suspecting
it is some wrong usage of preemption api rather than arch can't support preemption.Very likely some wrong use of the preemption API by the arch code, or no use where it should have been used. It did not matter so long as people could run their no preempt configs and ignore the problem.
Quoted 8 lines
Quoted 1 line
Thanks
Friendly LLM analysis says preemption is enabled too early and before completing
kvmppc_handle_exit_hv()/kvmppc_handle_nested_exit()Below is ONLY a speculation and completely UNTESTED. Maybe worth a try.
The patch is munged by the e-mail client, and it causes immediate voluntary preemprion in rcu critical section and hard lockup on starting a KVM VM.
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
Quoted 7 lines
Quoted 4 lines
Also it would be sort of bad news if it worked because that would be specific to book3s KVM HV and would not help with the KVM HV from the original report which likely is not book3s, nor with KVM PR.
Thanks for trying. We will try a local repro and look into it why stack is getting corrupted.
As we discussed offlist, samir helped to run a similar test on his machine, and he didn't run into issue so far. we will try more.
Quoted 6 lines
I am just wondering what different in your case?
By any chance we are running into below one? Can you check your gcc version?https://lore.kernel.org/all/CAABZP2z=xu+07-y5fqFLidZz1VpSgrSwXa1mFHPb=b3Ezr3OtA@mail.gmail.com/
Maybe
CONFIG_DEBUG_PREEMPTworth a try to if it shows up anything.Does not change anything, the kernel crashes all the same.
Nonetheless, I noticed that a tool that does some BPF tracing is running, and without it the problem is not reproducible.
Thanks
Quoted 8 lines
Quoted 1 line
Michal
Thanks Michal for the update.
Interesting finding! Since the crash is only reproducible when the BPF tracing tool is running, could you share the following details?
Which BPF tracing tool are you using (e.g., bpftrace, perf, bcc-based tool, a custom tool)?
A custom tool, likely a version of this:
https://build.opensuse.org/package/show/security:sensor/velociraptorQuoted 6 lines
What is the specific BPF program or filter being attached — particularly which kernel function(s) or tracepoints it hooks into (e.g., is it attaching a kprobe/uprobe/tracepoint anywhere inside
kvmhv_run_single_vcpuor related KVM HV paths)?
What is the BPF program type — kprobe, tracepoint,perf_event, fentry/fexit, etc.?
Quoted 6 lines
It would be likely these programs:
https://github.com/SUSE/linux-security-sensor/tree/sensor-base-0.76.7/vql/linux/bpfThanks
Michal
It seems easy to re-create.
The key is running bcc/bpf program in parallel to kernel build.
For example, these two in parallal, leads to stack corruption panic. Stacktrace does differ sometimes.
./funccount rcu* -d 100
make -j 32
Boom. Will try to debug this further.
[ 3979.381003][ T0] Kernel panic - not syncing: stack-protector: Kernel stack is corrupted in: prb_reserve+0x498/0x4a0 [ 3979.385530][ C114] pstore: backend (nvram) writing error (-1) [ 3980.385590][ C114] Oops: System Reset, sig: 6 [#1] [ 3980.385605][ C114] LE PAGE_SIZE=64K MMU=Radix SMP NR_CPUS=2048 NUMA pSeries [ 3980.385611][ C114] Modules linked in: bonding pseries_rng rng_core vmx_crypto fuse ibmvfc ibmveth dm_mirror dm_region_hash dm_log autofs4 [ 3980.385630][ C114] CPU: 114 UID: 0 PID: 0 Comm: swapper/114 Not tainted 7.3.0-rc1-00026-gd3d9a20b4eb9 #23 PREEMPT(full) [ 3980.385634][ C114] Hardware name: IBM,9043-MRU Power11 (architected) 0x820200 0xf000007 of:IBM,FW1120.00 (RF1120_183) hv:phyp pSeries [ 3980.385636][ C114] NIP: c0000000001ae714 LR: c000000001552b08 CTR: 0000000000000000 [ 3980.385638][ C114] REGS: c0000007ffc2fd60 TRAP: 0100 Not tainted (7.3.0-rc1-00026-gd3d9a20b4eb9) [ 3980.385641][ C114] MSR: 800000000298b033 <SF,VEC,VSX,EE,FP,ME,IR,DR,RI,LE> CR: 22000202 XER: 20040006 [ 3980.385649][ C114] CFAR: 000000000000011c IRQMASK: 3 [ 3980.385649][ C114] GPR00: 0000000000000000 c00000040030fd50 c000000001be8100 0000000000000000 [ 3980.385649][ C114] GPR04: 0000000000000001 000000000000003a 0000000000000000 0000010000000000 [ 3980.385649][ C114] GPR08: ffffffffffffffbf 0000000000000000 ffffffffffffffff 0000000000000000 [ 3980.385649][ C114] GPR12: 0000000000000000 c0000007fffdeb00 0000000000000000 000000002ef01f40 [ 3980.385649][ C114] GPR16: 0000000000000000 0000000000000000 0000000000000000 0000000000000000 [ 3980.385649][ C114] GPR20: 0000000000000000 0000000000000000 0000000000000000 0000000000000001 [ 3980.385649][ C114] GPR24: 0000000000000001 0000000000000000 0000039e85974a0e c0000000029ab5a8 [ 3980.385649][ C114] GPR28: c0000007fe8f9a40 0000000000000001 c0000000022020a8 c0000000022020b0 [ 3980.385675][ C114] NIP [c0000000001ae714] plpar_hcall_norets_notrace+0x18/0x2c [ 3980.385684][ C114] LR [c000000001552b08] check_and_cede_processor+0x48/0x60 [ 3980.385692][ C114] Call Trace: [ 3980.385693][ C114] [c00000040030fd50] [0000000042000202] 0x42000202 (unreliable) [ 3980.385703][ C114] [c00000040030fdb0] [c000000001552d30] shared_cede_loop+0x70/0x170 [ 3980.385708][ C114] [c00000040030fdf0] [c000000001552170] cpuidle_enter_state+0x300/0x748 [ 3980.385712][ C114] [c00000040030fe90] [c0000000011394f0] cpuidle_enter+0x50/0x80 [ 3980.385718][ C114] [c00000040030fed0] [c0000000002a5a78] call_cpuidle+0x48/0x90 [ 3980.385722][ C114] [c00000040030fef0] [c0000000002acb0c] do_idle+0x2cc/0x470 [ 3980.385725][ C114] [c00000040030ff60] [c0000000002acf7c] cpu_startup_entry+0x4c/0x50 [ 3980.385729][ C114] [c00000040030ff90] [c00000000005be80] start_secondary+0x290/0x2a0 [ 3980.385733][ C114] [c00000040030ffe0] [c00000000000e258] start_secondary_prolog+0x10/0x14 [ 3980.385737][ C114] Code: 3d220063 39295780 7c634a78 7c630074 7863d182 4e800020 3c4c01a4 38429a04 7c421378 7c000026 90010008 44000022 <38800000> 988d0931 80010008 7c0ff120
Shrikanth Hegde
reviewerRe: [Linux PPC] Disable PREEMPT
Hi Michal,
Quoted 11 lines
It seems easy to re-create.
The key is running bcc/bpf program in parallel to kernel build.For example, these two in parallal, leads to stack corruption panic. Stacktrace does differ sometimes.
./funccount rcu* -d 100
make -j 32Boom. Will try to debug this further.
A bit more debugging.
1. A few functions seems to crash, specially ones that call schedule.
So picked schedule itself for tracing
2. Used plain ftrace. No crash.
3. Used kprobes. Boom. Crash appears. But this helped to avoid BPF JIT, or BCC part of it.
4. Did some preempt count validation with annotations. Seems to be holding fine.
5. Since unlock can call schedule while tracing schedule, there is possible looping. Need to see further why it happens to be crashing there. Maybe regs or paca handling needs a closer look.
For now, below patch helps to keep the system stable under kprobes, bcc tools. I will look further into see why exactly it is crashing and below one is going to be the proper fix or not.
Feel free to give it a try.
--- arch/powerpc/kernel/kprobes-ftrace.c | 2 ++ 1 file changed, 2 insertions(+)
arch/powerpc/kernel/kprobes-ftrace.c +2 -0
@@ -63,7 +63,9 @@ void kprobe_ftrace_handler(unsigned long nip, unsigned long parent_nip,__this_cpu_write (current_kprobe,NULL ); } out: +preempt_disable_notrace ();ftrace_test_recursion_unlock (bit); +preempt_enable_no_resched_notrace (); }NOKPROBE_SYMBOL (kprobe_ftrace_handler);
Signature · 1 line
2.52.0
Re: [Linux PPC] Disable PREEMPT
Hello,
Quoted 25 lines · Shrikanth Hegde
Hi Michal,
Quoted 11 lines
It seems easy to re-create.
The key is running bcc/bpf program in parallel to kernel build.For example, these two in parallal, leads to stack corruption panic. Stacktrace does differ sometimes.
./funccount rcu* -d 100
make -j 32Boom. Will try to debug this further.
A bit more debugging.
1. A few functions seems to crash, specially ones that call schedule.
So picked schedule itself for tracing
2. Used plain ftrace. No crash.
3. Used kprobes. Boom. Crash appears. But this helped to avoid BPF JIT, or BCC part of it.
4. Did some preempt count validation with annotations. Seems to be holding fine.
5. Since unlock can call schedule while tracing schedule, there is possible looping. Need to see further why it happens to be crashing there. Maybe regs or paca handling needs a closer look.
Quoted 5 lines
For now, below patch helps to keep the system stable under kprobes, bcc tools. I will look further into see why exactly it is crashing and below one is going to be the proper fix or not.
Feel free to give it a try.
thanks for the patch.
While it is mangled by the e-mail client in different way compared to the previous patch it does seem to mitigate the issue.
As it is unlikely the board where KVM lockup was originally observed is running kpbobes it will probably not address the original problem.
Thanks
Michal
Quoted 20 lines
--- arch/powerpc/kernel/kprobes-ftrace.c | 2 ++ 1 file changed, 2 insertions(+)arch/powerpc/kernel/kprobes-ftrace.c +2
-0@@ -63,7 +63,9 @@ void kprobe_ftrace_handler(unsigned long nip, unsigned long parent_nip,__this_cpu_write (current_kprobe,NULL ); } out: +preempt_disable_notrace ();ftrace_test_recursion_unlock (bit); +preempt_enable_no_resched_notrace (); }NOKPROBE_SYMBOL (kprobe_ftrace_handler);Signature · 1 line
2.52.0
Shrikanth Hegde
reviewerRe: [Linux PPC] Disable PREEMPT
Hi Michal,
Quoted 32 lines · Michal Suchánek
Hello,
Quoted 29 lines · Shrikanth Hegde
Hi Michal,
Quoted 11 lines
It seems easy to re-create.
The key is running bcc/bpf program in parallel to kernel build.For example, these two in parallal, leads to stack corruption panic. Stacktrace does differ sometimes.
./funccount rcu* -d 100
make -j 32Boom. Will try to debug this further.
A bit more debugging.
1. A few functions seems to crash, specially ones that call schedule.
So picked schedule itself for tracing
2. Used plain ftrace. No crash.
3. Used kprobes. Boom. Crash appears. But this helped to avoid BPF JIT, or BCC part of it.
4. Did some preempt count validation with annotations. Seems to be holding fine.
5. Since unlock can call schedule while tracing schedule, there is possible looping. Need to see further why it happens to be crashing there. Maybe regs or paca handling needs a closer look.For now, below patch helps to keep the system stable under kprobes, bcc tools. I will look further into see why exactly it is crashing and below one is going to be the proper fix or not.
Quoted 6 lines
Quoted 1 line
Feel free to give it a try.
thanks for the patch.
While it is mangled by the e-mail client in different way compared to the previous patch it does seem to mitigate the issue.
Thanks for trying.
Quoted 4 lines
As it is unlikely the board where KVM lockup was originally observed is running kpbobes it will probably not address the original problem.
Give it a try.
I am suspecting both lockup, stack corruptions are secondary symptoms here. While recreate, I have different type of traces.
Quoted 24 lines
Thanks
Michal
Quoted 20 lines
--- arch/powerpc/kernel/kprobes-ftrace.c | 2 ++ 1 file changed, 2 insertions(+)arch/powerpc/kernel/kprobes-ftrace.c +2
-0@@ -63,7 +63,9 @@ void kprobe_ftrace_handler(unsigned long nip, unsigned long parent_nip,__this_cpu_write (current_kprobe,NULL ); } out: +preempt_disable_notrace ();ftrace_test_recursion_unlock (bit); +preempt_enable_no_resched_notrace (); }NOKPROBE_SYMBOL (kprobe_ftrace_handler);Signature · 1 line
2.52.0
Re: [Linux PPC] Disable PREEMPT
Quoted 45 lines · Shrikanth Hegde
Hi Michal,
Quoted 32 lines · Michal Suchánek
Hello,
Quoted 29 lines · Shrikanth Hegde
Hi Michal,
Quoted 11 lines
It seems easy to re-create.
The key is running bcc/bpf program in parallel to kernel build.For example, these two in parallal, leads to stack corruption panic. Stacktrace does differ sometimes.
./funccount rcu* -d 100
make -j 32Boom. Will try to debug this further.
A bit more debugging.
1. A few functions seems to crash, specially ones that call schedule.
So picked schedule itself for tracing
2. Used plain ftrace. No crash.
3. Used kprobes. Boom. Crash appears. But this helped to avoid BPF JIT, or BCC part of it.
4. Did some preempt count validation with annotations. Seems to be holding fine.
5. Since unlock can call schedule while tracing schedule, there is possible looping. Need to see further why it happens to be crashing there. Maybe regs or paca handling needs a closer look.For now, below patch helps to keep the system stable under kprobes, bcc tools. I will look further into see why exactly it is crashing and below one is going to be the proper fix or not.
Quoted 6 lines
Quoted 1 line
Feel free to give it a try.
thanks for the patch.
While it is mangled by the e-mail client in different way compared to the previous patch it does seem to mitigate the issue.
Thanks for trying.
Quoted 1 line
Quoted 8 lines
Quoted 3 lines
As it is unlikely the board where KVM lockup was originally observed is running kpbobes it will probably not address the original problem.
Give it a try.
I am suspecting both lockup, stack corruptions are secondary symptoms here. While recreate, I have different type of traces.
Yes, it does work for the crash I see. However, we hijacked the report of KVM locking up on FSL Cyrus+, and that is likely a different problem still not addressed.
Thanks
Michal
Quoted 26 lines
Quoted 25 lines
Thanks
Michal
Quoted 20 lines
--- arch/powerpc/kernel/kprobes-ftrace.c | 2 ++ 1 file changed, 2 insertions(+)arch/powerpc/kernel/kprobes-ftrace.c +2
-0@@ -63,7 +63,9 @@ void kprobe_ftrace_handler(unsigned long nip, unsigned long parent_nip,__this_cpu_write (current_kprobe,NULL ); } out: +preempt_disable_notrace ();ftrace_test_recursion_unlock (bit); +preempt_enable_no_resched_notrace (); }NOKPROBE_SYMBOL (kprobe_ftrace_handler);Signature · 1 line
2.52.0
Shrikanth Hegde
reviewerRe: [Linux PPC] Disable PREEMPT
Hi Michal,
Quoted 7 lines
Quoted 5 lines
Give it a try.
I am suspecting both lockup, stack corruptions are secondary symptoms here. While recreate, I have different type of traces.
Yes, it does work for the crash I see.
Thanks. Give me sometime to see further on that. Didn't get any time today.
Quoted 4 lines
However, we hijacked the report
of KVM locking up on FSL Cyrus+, and that is likely a different problem still not addressed.
Ah, that's what you meant. Yes, i still don't know where FSL Cyrus+ is stuck.
I would need help from FSL Cyrus+ to get some logs or is there a way we can spin of a QEMU guest of it? We should have the log to start somewhere.
Re: [Linux PPC] Disable PREEMPT
Quoted 18 lines · Shrikanth Hegde
Hi Michal,
Quoted 7 lines
Quoted 5 lines
Give it a try.
I am suspecting both lockup, stack corruptions are secondary symptoms here. While recreate, I have different type of traces.
Yes, it does work for the crash I see.
Thanks. Give me sometime to see further on that. Didn't get any time today.
Quoted 4 lines
However, we hijacked the report
of KVM locking up on FSL Cyrus+, and that is likely a different problem still not addressed.
Quoted 6 lines
Ah, that's what you meant. Yes, i still don't know where FSL Cyrus+ is stuck.
I would need help from FSL Cyrus+ to get some logs or is there a way we can spin of a QEMU guest of it? We should have the log to start somewhere.
It's difficult to get a log because it freezes and can't write any error messages to the log files. This bug is very old. We had this issue some years ago but we was able to disable PREEMPT because we don't need it.
-- Christian
Signature · 1 line
Sent with BrassMonkey 34.3.2.1 (https://github.com/chzigotzky/Web-Browsers-and-Suites-for-Linux-PPC/releases/tag/BrassMonkey_34.3.2.1)
Re: [Linux PPC] Disable PREEMPT
Quoted 24 lines · Christian Zigotzky
Quoted 23 lines · Shrikanth Hegde
Hi Michal,
Quoted 8 lines
Quoted 6 lines
Give it a try.
I am suspecting both lockup, stack corruptions are secondary symptoms here.
While recreate, I have different type of traces.Yes, it does work for the crash I see.
Thanks. Give me sometime to see further on that. Didn't get any time today.
Quoted 4 lines
However, we hijacked the report
of KVM locking up on FSL Cyrus+, and that is likely a different problem still not addressed.Ah, that's what you meant. Yes, i still don't know where FSL Cyrus+ is stuck.
Quoted 8 lines
Quoted 5 lines
I would need help from FSL Cyrus+ to get some logs or is there a way we can spin of
a QEMU guest of it? We should have the log to start somewhere.It's difficult to get a log because it freezes and can't write any error messages to the log files. This bug is very old. We had this issue some years ago but we was able to disable PREEMPT because we don't need it.
I would expect serial console and sysrq could give something, depending on how much of the kernel is frozen.
Thanks
Michal
Re: [Linux PPC] Disable PREEMPT
Quoted 28 lines · Michal Suchánek
Quoted 19 lines · Christian Zigotzky
Quoted 18 lines · Shrikanth Hegde
Hi Michal,
Quoted 6 lines
Quoted 5 lines
Give it a try.
I am suspecting both lockup, stack corruptions are secondary symptoms here.
While recreate, I have different type of traces.Yes, it does work for the crash I see.
Thanks. Give me sometime to see further on that. Didn't get any time today.
Quoted 4 lines
However, we hijacked the report
of KVM locking up on FSL Cyrus+, and that is likely a different problem still not addressed.Ah, that's what you meant. Yes, i still don't know where FSL Cyrus+ is stuck.
Quoted 8 lines
Quoted 5 lines
I would need help from FSL Cyrus+ to get some logs or is there a way we can spin of
a QEMU guest of it? We should have the log to start somewhere.It's difficult to get a log because it freezes and can't write any error messages to the log files. This bug is very old. We had this issue some years ago but we was able to disable PREEMPT because we don't need it.
Quoted 6 lines
I would expect serial console and sysrq could give something, depending on how much of the kernel is frozen.
Thanks
Michal
Here is a serial log: https://github.com/user-attachments/files/32433586/e5500_preempt_putty.log
Signature · 1 line
Sent with BrassMonkey 34.3.2.1 (https://github.com/chzigotzky/Web-Browsers-and-Suites-for-Linux-PPC/releases/tag/BrassMonkey_34.3.2.1)
Re: [Linux PPC] Disable PREEMPT
Quoted 29 lines · Christian Zigotzky
Quoted 28 lines · Michal Suchánek
Quoted 27 lines · Christian Zigotzky
Quoted 15 lines · Shrikanth Hegde
Hi Michal,
Quoted 6 lines
Quoted 5 lines
Give it a try.
I am suspecting both lockup, stack corruptions are secondary symptoms here.
While recreate, I have different type of traces.Yes, it does work for the crash I see.
Thanks. Give me sometime to see further on that. Didn't get any time today.
Quoted 4 lines
However, we hijacked the report
of KVM locking up on FSL Cyrus+, and that is likely a different problem still not addressed.Quoted 8 lines
Ah, that's what you meant. Yes, i still don't know where FSL Cyrus+ is stuck.
I would need help from FSL Cyrus+ to get some logs or is there a way we can spin of
a QEMU guest of it? We should have the log to start somewhere.It's difficult to get a log because it freezes and can't write any error messages to the log files. This bug is very old. We had this issue some years ago but we was able to disable PREEMPT because we don't need it.
Quoted 8 lines
Quoted 6 lines
I would expect serial console and sysrq could give something, depending on how much of the kernel is frozen.
Thanks
Michal
Here is a serial log: https://github.com/user-attachments/files/32433586/e5500_preempt_putty.log
Another serial log with pcie_ports=compat: https://github.com/user-attachments/files/32434487/e5500_preempt_pcie_ports_compat_putty.log
Signature · 1 line
Sent with BrassMonkey 34.3.2.1 (https://github.com/chzigotzky/Web-Browsers-and-Suites-for-Linux-PPC/releases/tag/BrassMonkey_34.3.2.1)
Shrikanth Hegde
reviewerRe: [Linux PPC] Disable PREEMPT
Hi Christian.
Quoted 30 lines · Christian Zigotzky
Quoted 29 lines · Christian Zigotzky
Quoted 28 lines · Michal Suchánek
Quoted 27 lines · Christian Zigotzky
Quoted 15 lines · Shrikanth Hegde
Hi Michal,
Quoted 6 lines
Quoted 5 lines
Give it a try.
I am suspecting both lockup, stack corruptions are secondary symptoms here.
While recreate, I have different type of traces.Yes, it does work for the crash I see.
Thanks. Give me sometime to see further on that. Didn't get any time today.
Quoted 4 lines
However, we hijacked the report
of KVM locking up on FSL Cyrus+, and that is likely a different problem still not addressed.Quoted 8 lines
Ah, that's what you meant. Yes, i still don't know where FSL Cyrus+ is stuck.
I would need help from FSL Cyrus+ to get some logs or is there a way we can spin of
a QEMU guest of it? We should have the log to start somewhere.It's difficult to get a log because it freezes and can't write any error messages to the log files. This bug is very old. We had this issue some years ago but we was able to disable PREEMPT because we don't need it.
Quoted 8 lines
Quoted 8 lines
Quoted 6 lines
I would expect serial console and sysrq could give something, depending on how much of the kernel is frozen.
Thanks
Michal
Here is a serial log: https://github.com/user-attachments/files/32433586/e5500_preempt_putty.log
Thanks Michal for helping to get the traces.
Quoted 2 lines
Another serial log with pcie_ports=compat: https://github.com/user-attachments/files/32434487/e5500_preempt_pcie_ports_compat_putty.log
I see it is mostly busy with printing
WARNING: at .enable_kernel_fp+0x30/0x78, CPU#3: qemu-system-ppc/4884
The path seems to be same also.
[c000000085ca7700] [c00000000005de84] .kvmppc_load_guest_fp+0x30/0x80 [c000000085ca7780] [c00000000005f2a0] .kvmppc_handle_exit+0x5bc/0x5cc [c000000085ca7830] [c00000000006204c] .kvmppc_resume_host+0xb8/0x10c
Does below help to boot or make it stable?
--- arch/powerpc/kvm/booke.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-)
arch/powerpc/kvm/booke.c +8 -1
@@ -1404,10 +1404,17 @@ 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 */ +/* +* interrupts now hard-disabled. i.e EE=0 +* But irqs_disabled relies on PACA entries +* and fixup below enables it. +* So irqs_disabled == false +*/ kvmppc_fix_ee_before_entry (); +preempt_disable ();kvmppc_load_guest_fp (vcpu);kvmppc_load_guest_altivec (vcpu); +preempt_enable_no_resched (); } }
Re: [Linux PPC] Disable PREEMPT
Quoted 78 lines · Shrikanth Hegde
Hi Christian.
Quoted 30 lines · Christian Zigotzky
Quoted 29 lines · Christian Zigotzky
Quoted 28 lines · Michal Suchánek
Quoted 27 lines · Christian Zigotzky
Quoted 15 lines · Shrikanth Hegde
Hi Michal,
Quoted 6 lines
Quoted 5 lines
Give it a try.
I am suspecting both lockup, stack corruptions are secondary symptoms here.
While recreate, I have different type of traces.Yes, it does work for the crash I see.
Thanks. Give me sometime to see further on that. Didn't get any time today.
Quoted 4 lines
However, we hijacked the report
of KVM locking up on FSL Cyrus+, and that is likely a different problem still not addressed.Quoted 8 lines
Ah, that's what you meant. Yes, i still don't know where FSL Cyrus+ is stuck.
I would need help from FSL Cyrus+ to get some logs or is there a way we can spin of
a QEMU guest of it? We should have the log to start somewhere.It's difficult to get a log because it freezes and can't write any error messages to the log files. This bug is very old. We had this issue some years ago but we was able to disable PREEMPT because we don't need it.
Quoted 8 lines
Quoted 8 lines
Quoted 6 lines
I would expect serial console and sysrq could give something, depending on how much of the kernel is frozen.
Thanks
Michal
Here is a serial log: https://github.com/user-attachments/files/32433586/e5500_preempt_putty.log
Thanks Michal for helping to get the traces.
Quoted 3 lines
Another serial log with pcie_ports=compat: https://github.com/user-attachments/files/32434487/e5500_preempt_pcie_ports_compat_putty.log
I see it is mostly busy with printing
WARNING: at .enable_kernel_fp+0x30/0x78, CPU#3: qemu-system-ppc/4884The path seems to be same also.
[
c000000085ca7700] [c00000000005de84] .kvmppc_load_guest_fp+0x30/0x80 [c000000085ca7780] [c00000000005f2a0] .kvmppc_handle_exit+0x5bc/0x5cc [c000000085ca7830] [c00000000006204c] .kvmppc_resume_host+0xb8/0x10cDoes below help to boot or make it stable?
---
arch/powerpc/kvm/booke.c | 9 ++++++++-1 file changed, 8 insertions(+), 1 deletion(-)arch/powerpc/kvm/booke.c +3
-1@@ -1404,10 +1404,17 @@ 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 */ + /* +* interrupts now hard-disabled. i.e EE=0 +* But irqs_disabled relies on PACA entries
arch/powerpc/kvm/booke.c int kvmppc_handle_exit(struct kvm_vcpu *vcpu, · line 1420
Quoted 10 lines
arch/powerpc/kvm/booke.c +5
-0+* and fixup below enables it. +* So irqs_disabled == false +*/ kvmppc_fix_ee_before_entry(); + preempt_disable(); kvmppc_load_guest_fp(vcpu); kvmppc_load_guest_altivec(vcpu); + preempt_enable_no_resched(); } }
Hi,
Thanks a lot for your patch!
I patched the 7.3-rc4 kernel sources with your new patch and compiled the kernel again yesterday. [1]
Unfortunately, the issue still exists.
I tested it with a guest kernel with and without preempt support.
Cheers,
Christian
[1] https://github.com/chzigotzky/kernels/releases/tag/v7.3.0-rc4-2-preempt
Signature · 1 line
Sent with BrassMonkey 34.3.2.1 (https://github.com/chzigotzky/Web-Browsers-and-Suites-for-Linux-PPC/releases/tag/BrassMonkey_34.3.2.1)
Shrikanth Hegde
reviewerRe: [Linux PPC] Disable PREEMPT
Quoted 89 lines · Christian Zigotzky
Quoted 76 lines · Shrikanth Hegde
Hi Christian.
Quoted 30 lines · Christian Zigotzky
Quoted 29 lines · Christian Zigotzky
Quoted 28 lines · Michal Suchánek
Quoted 27 lines · Christian Zigotzky
Quoted 15 lines · Shrikanth Hegde
Hi Michal,
Quoted 6 lines
Quoted 5 lines
Give it a try.
I am suspecting both lockup, stack corruptions are secondary symptoms here.
While recreate, I have different type of traces.Yes, it does work for the crash I see.
Thanks. Give me sometime to see further on that. Didn't get any time today.
Quoted 4 lines
However, we hijacked the report
of KVM locking up on FSL Cyrus+, and that is likely a different problem still not addressed.Quoted 8 lines
Ah, that's what you meant. Yes, i still don't know where FSL Cyrus+ is stuck.
I would need help from FSL Cyrus+ to get some logs or is there a way we can spin of
a QEMU guest of it? We should have the log to start somewhere.It's difficult to get a log because it freezes and can't write any error messages to the log files. This bug is very old. We had this issue some years ago but we was able to disable PREEMPT because we don't need it.
Quoted 8 lines
Quoted 8 lines
Quoted 6 lines
I would expect serial console and sysrq could give something, depending on how much of the kernel is frozen.
Thanks
Michal
Here is a serial log: https://github.com/user-attachments/files/32433586/e5500_preempt_putty.log
Thanks Michal for helping to get the traces.
Quoted 2 lines
Another serial log with pcie_ports=compat: https://github.com/user-attachments/files/32434487/e5500_preempt_pcie_ports_compat_putty.log
I see it is mostly busy with printing
WARNING: at .enable_kernel_fp+0x30/0x78, CPU#3: qemu-system-ppc/4884The path seems to be same also.
[
c000000085ca7700] [c00000000005de84] .kvmppc_load_guest_fp+0x30/0x80 [c000000085ca7780] [c00000000005f2a0] .kvmppc_handle_exit+0x5bc/0x5cc [c000000085ca7830] [c00000000006204c] .kvmppc_resume_host+0xb8/0x10cDoes below help to boot or make it stable?
---
arch/powerpc/kvm/booke.c | 9 ++++++++-1 file changed, 8 insertions(+), 1 deletion(-)arch/powerpc/kvm/booke.c +4
-1@@ -1404,10 +1404,17 @@ 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 */ + /* +* interrupts now hard-disabled. i.e EE=0 +* But irqs_disabled relies on PACA entries +* and fixup below enables it. arch/powerpc/kvm/booke.c int kvmppc_handle_exit(struct kvm_vcpu *vcpu, unsigned int exit_nr) · line 1420
Quoted 10 lines
arch/powerpc/kvm/booke.c +4
-0+* So irqs_disabled == false +*/ kvmppc_fix_ee_before_entry(); + preempt_disable(); kvmppc_load_guest_fp(vcpu); kvmppc_load_guest_altivec(vcpu); + preempt_enable_no_resched(); } }Hi,
Quoted 4 lines
Thanks a lot for your patch!
I patched the 7.3-rc4 kernel sources with your new patch and compiled the kernel again yesterday. [1]
Thanks for trying.
Quoted 2 lines
Unfortunately, the issue still exists.
Can you share the console log of the kernel with the patch applied? We need to see where it is stuck now. Has it made forward progress?
Quoted 7 lines
I tested it with a guest kernel with and without preempt support.
Cheers,
Christian[1] https://github.com/chzigotzky/kernels/releases/tag/v7.3.0-rc4-2-preempt
Re: [Linux PPC] Disable PREEMPT
Quoted 98 lines · Shrikanth Hegde
Quoted 90 lines · Christian Zigotzky
Quoted 77 lines · Shrikanth Hegde
Hi Christian.
Quoted 30 lines · Christian Zigotzky
Quoted 29 lines · Christian Zigotzky
Quoted 28 lines · Michal Suchánek
Quoted 27 lines · Christian Zigotzky
Quoted 15 lines · Shrikanth Hegde
Hi Michal,
Quoted 6 lines
Quoted 5 lines
Give it a try.
I am suspecting both lockup, stack corruptions are secondary symptoms here.
While recreate, I have different type of traces.Yes, it does work for the crash I see.
Thanks. Give me sometime to see further on that. Didn't get any time today.
Quoted 4 lines
However, we hijacked the report
of KVM locking up on FSL Cyrus+, and that is likely a different problem still not addressed.Quoted 8 lines
Ah, that's what you meant. Yes, i still don't know where FSL Cyrus+ is stuck.
I would need help from FSL Cyrus+ to get some logs or is there a way we can spin of
a QEMU guest of it? We should have the log to start somewhere.It's difficult to get a log because it freezes and can't write any error messages to the log files. This bug is very old. We had this issue some years ago but we was able to disable PREEMPT because we don't need it.
Quoted 8 lines
Quoted 8 lines
Quoted 6 lines
I would expect serial console and sysrq could give something, depending on how much of the kernel is frozen.
Thanks
Michal
Here is a serial log: https://github.com/user-attachments/files/32433586/e5500_preempt_putty.log
Thanks Michal for helping to get the traces.
Quoted 2 lines
Another serial log with pcie_ports=compat: https://github.com/user-attachments/files/32434487/e5500_preempt_pcie_ports_compat_putty.log
I see it is mostly busy with printing
WARNING: at .enable_kernel_fp+0x30/0x78, CPU#3: qemu-system-ppc/4884The path seems to be same also.
[
c000000085ca7700] [c00000000005de84] .kvmppc_load_guest_fp+0x30/0x80 [c000000085ca7780] [c00000000005f2a0] .kvmppc_handle_exit+0x5bc/0x5cc [c000000085ca7830] [c00000000006204c] .kvmppc_resume_host+0xb8/0x10cDoes below help to boot or make it stable?
---
arch/powerpc/kvm/booke.c | 9 ++++++++-1 file changed, 8 insertions(+), 1 deletion(-)arch/powerpc/kvm/booke.c +3
-1@@ -1404,10 +1404,17 @@ 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 */ + /* +* interrupts now hard-disabled. i.e EE=0 +* But irqs_disabled relies on PACA entries arch/powerpc/kvm/booke.c int kvmppc_handle_exit(struct kvm_vcpu · line 1420
Quoted 10 lines
arch/powerpc/kvm/booke.c +5
-0+* and fixup below enables it. +* So irqs_disabled == false +*/ kvmppc_fix_ee_before_entry(); + preempt_disable(); kvmppc_load_guest_fp(vcpu); kvmppc_load_guest_altivec(vcpu); + preempt_enable_no_resched(); } }Hi,
Quoted 4 lines
Thanks a lot for your patch!
I patched the 7.3-rc4 kernel sources with your new patch and compiled the kernel again yesterday. [1]
Quoted 16 lines
Thanks for trying.
Quoted 2 lines
Unfortunately, the issue still exists.
Can you share the console log of the kernel with the patch applied? We need to see where it is stuck now. Has it made forward progress?
Quoted 7 lines
I tested it with a guest kernel with and without preempt support.
Cheers,
Christian[1] https://github.com/chzigotzky/kernels/releases/tag/v7.3.0-rc4-2-preempt
Here is a new serial log from the patched kernel: https://github.com/user-attachments/files/32570808/e5500_preempt_pcie_ports_compat_patched_putty.log
Thanks
Signature · 1 line
Sent with BrassMonkey 34.3.2.1 (https://github.com/chzigotzky/Web-Browsers-and-Suites-for-Linux-PPC/releases/tag/BrassMonkey_34.3.2.1)
Shrikanth Hegde
reviewerRe: [Linux PPC] Disable PREEMPT
Hi
Quoted 108 lines · Christian Zigotzky
Quoted 107 lines · Shrikanth Hegde
Quoted 89 lines · Christian Zigotzky
Quoted 76 lines · Shrikanth Hegde
Hi Christian.
Quoted 30 lines · Christian Zigotzky
Quoted 29 lines · Christian Zigotzky
Quoted 28 lines · Michal Suchánek
Quoted 27 lines · Christian Zigotzky
Quoted 15 lines · Shrikanth Hegde
Hi Michal,
Quoted 6 lines
Quoted 5 lines
Give it a try.
I am suspecting both lockup, stack corruptions are secondary symptoms here.
While recreate, I have different type of traces.Yes, it does work for the crash I see.
Thanks. Give me sometime to see further on that. Didn't get any time today.
Quoted 4 lines
However, we hijacked the report
of KVM locking up on FSL Cyrus+, and that is likely a different problem still not addressed.Quoted 8 lines
Ah, that's what you meant. Yes, i still don't know where FSL Cyrus+ is stuck.
I would need help from FSL Cyrus+ to get some logs or is there a way we can spin of
a QEMU guest of it? We should have the log to start somewhere.It's difficult to get a log because it freezes and can't write any error messages to the log files. This bug is very old. We had this issue some years ago but we was able to disable PREEMPT because we don't need it.
Quoted 8 lines
Quoted 8 lines
Quoted 6 lines
I would expect serial console and sysrq could give something, depending on how much of the kernel is frozen.
Thanks
Michal
Here is a serial log: https://github.com/user-attachments/files/32433586/e5500_preempt_putty.log
Thanks Michal for helping to get the traces.
Quoted 2 lines
Another serial log with pcie_ports=compat: https://github.com/user-attachments/files/32434487/e5500_preempt_pcie_ports_compat_putty.log
I see it is mostly busy with printing
WARNING: at .enable_kernel_fp+0x30/0x78, CPU#3: qemu-system-ppc/4884The path seems to be same also.
[
c000000085ca7700] [c00000000005de84] .kvmppc_load_guest_fp+0x30/0x80 [c000000085ca7780] [c00000000005f2a0] .kvmppc_handle_exit+0x5bc/0x5cc [c000000085ca7830] [c00000000006204c] .kvmppc_resume_host+0xb8/0x10cDoes below help to boot or make it stable?
---
arch/powerpc/kvm/booke.c | 9 ++++++++-1 file changed, 8 insertions(+), 1 deletion(-)arch/powerpc/kvm/booke.c +4
-1@@ -1404,10 +1404,17 @@ 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 */ + /* +* interrupts now hard-disabled. i.e EE=0 +* But irqs_disabled relies on PACA entries +* and fixup below enables it. arch/powerpc/kvm/booke.c int kvmppc_handle_exit(struct kvm_vcpu *vcpu, unsigned int exit_nr) · line 1420
Quoted 10 lines
arch/powerpc/kvm/booke.c +4
-0+* So irqs_disabled == false +*/ kvmppc_fix_ee_before_entry(); + preempt_disable(); kvmppc_load_guest_fp(vcpu); kvmppc_load_guest_altivec(vcpu); + preempt_enable_no_resched(); } }Hi,
Quoted 4 lines
Thanks a lot for your patch!
I patched the 7.3-rc4 kernel sources with your new patch and compiled the kernel again yesterday. [1]
Thanks for trying.
Quoted 2 lines
Unfortunately, the issue still exists.
Can you share the console log of the kernel with the patch applied? We need to see where it is stuck now. Has it made forward progress?
Quoted 2 lines
I tested it with a guest kernel with and without preempt support.
Quoted 8 lines
Quoted 6 lines
Quoted 5 lines
Cheers,
Christian[1] https://github.com/chzigotzky/kernels/releases/tag/v7.3.0-rc4-2-preempt
Here is a new serial log from the patched kernel: https://github.com/user-attachments/files/32570808/e5500_preempt_pcie_ports_compat_patched_putty.log
That paca mismatch is independent of preemption modes.
It shows a few warnings and even after that a console message has come through. Do warning continue forever?
To fix those warnings, can you try this diff on the top of the earlier ones? (Igonore whitespace mangling if any, Also patch is UNTESTED. It is more of my speculation.).
Sorry, I don't have any way to test it out locally.
---
arch/powerpc/kvm/powerpc.c +13 -0
@@ -147,6 +147,19 @@ int kvmppc_prepare_to_enter(struct kvm_vcpu *vcpu)continue ; } +#ifdef CONFIG_PPC64 +if (unlikely (local_paca->irq_happened !=PACA_IRQ_HARD_DIS )) { +/* +* An interrupt arrived between the soft and hard +* disable. Replay it and retry guest entry. +*/ +local_irq_enable (); +local_irq_disable (); +hard_irq_disable (); +continue ; + } +#endif +guest_enter_irqoff ();return 1 ; }
Quoted 2 lines
Thanks
Re: [Linux PPC] Disable PREEMPT
Quoted 114 lines · Shrikanth Hegde
Hi
Quoted 64 lines · Christian Zigotzky
Quoted 63 lines · Shrikanth Hegde
Quoted 45 lines · Christian Zigotzky
Quoted 32 lines · Shrikanth Hegde
Hi Christian.
I see it is mostly busy with printing
WARNING: at .enable_kernel_fp+0x30/0x78, CPU#3: qemu-system-ppc/4884The path seems to be same also.
[
c000000085ca7700] [c00000000005de84] .kvmppc_load_guest_fp+0x30/0x80 [c000000085ca7780] [c00000000005f2a0] .kvmppc_handle_exit+0x5bc/0x5cc [c000000085ca7830] [c00000000006204c] .kvmppc_resume_host+0xb8/0x10cDoes below help to boot or make it stable?
---
arch/powerpc/kvm/booke.c | 9 ++++++++-1 file changed, 8 insertions(+), 1 deletion(-)arch/powerpc/kvm/booke.c +3
-1@@ -1404,10 +1404,17 @@ 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 */ + /* +* interrupts now hard-disabled. i.e EE=0 +* But irqs_disabled relies on PACA entries arch/powerpc/kvm/booke.c int kvmppc_handle_exit(struct kvm_vcpu · line 1420
Quoted 10 lines
arch/powerpc/kvm/booke.c +5
-0+* and fixup below enables it. +* So irqs_disabled == false +*/ kvmppc_fix_ee_before_entry(); + preempt_disable(); kvmppc_load_guest_fp(vcpu); kvmppc_load_guest_altivec(vcpu); + preempt_enable_no_resched(); } }Hi,
Quoted 4 lines
Thanks a lot for your patch!
I patched the 7.3-rc4 kernel sources with your new patch and compiled the kernel again yesterday. [1]
Thanks for trying.
Quoted 2 lines
Unfortunately, the issue still exists.
Can you share the console log of the kernel with the patch applied? We need to see where it is stuck now. Has it made forward progress?
Quoted 2 lines
I tested it with a guest kernel with and without preempt support.
Quoted 9 lines
Quoted 7 lines
Quoted 6 lines
Cheers,
Christian[1] https://github.com/chzigotzky/kernels/releases/tag/v7.3.0-rc4-2-preempt
Here is a new serial log from the patched kernel: https://github.com/user-attachments/files/32570808/e5500_preempt_pcie_ports_compat_patched_putty.log
That paca mismatch is independent of preemption modes.
It shows a few warnings and even after that a console message has come through. Do warning continue forever?
To fix those warnings, can you try this diff on the top of the earlier ones? (Igonore whitespace mangling if any, Also patch is UNTESTED. It is more of my speculation.).
Sorry, I don't have any way to test it out locally.
---
arch/powerpc/kvm/powerpc.c +13
-0@@ -147,6 +147,19 @@ int kvmppc_prepare_to_enter(struct kvm_vcpu *vcpu) continue; } +#ifdef CONFIG_PPC64 + if (unlikely(local_paca->irq_happened !=PACA_IRQ_HARD_DIS )) { + /* + * An interrupt arrived between the soft and hard + * disable. Replay it and retry guest entry. + */ + local_irq_enable(); + local_irq_disable(); + hard_irq_disable(); + continue; + } +#endif + guest_enter_irqoff(); return 1;
Quoted 2 lines
}
Hi,
I patched the RC4 of kernel 7.3 with the two patches and compiled it again today.
I'm happy to report that the patched PREEMPT kernel with KVM HV works on the X5000/40. (e5500)
Serial log: https://github.com/user-attachments/files/32619259/e5500_preempt_pcie_ports_compat_patched-2_putty.log
I also successfully tested it with KVM PR on the X1000 today. (PA6T)
Further information: https://github.com/chzigotzky/kernels/issues/19#issuecomment-5818925408
Many thanks for your help,
Christian
Signature · 1 line
Sent with BrassMonkey 34.3.2.1 (https://github.com/chzigotzky/Web-Browsers-and-Suites-for-Linux-PPC/releases/tag/BrassMonkey_34.3.2.1)
Shrikanth Hegde
reviewerRe: [Linux PPC] Disable PREEMPT
Hi Christian, Michal,
Quoted 107 lines
Quoted 94 lines
Quoted 57 lines
Quoted 57 lines
Quoted 42 lines
Quoted 30 lines
I see it is mostly busy with printing
WARNING: at .enable_kernel_fp+0x30/0x78, CPU#3: qemu-system-ppc/4884The path seems to be same also.
[
c000000085ca7700] [c00000000005de84] .kvmppc_load_guest_fp+0x30/0x80 [c000000085ca7780] [c00000000005f2a0] .kvmppc_handle_exit+0x5bc/0x5cc [c000000085ca7830] [c00000000006204c] .kvmppc_resume_host+0xb8/0x10cDoes below help to boot or make it stable?
---
arch/powerpc/kvm/booke.c | 9 ++++++++-1 file changed, 8 insertions(+), 1 deletion(-)arch/powerpc/kvm/booke.c +4
-1@@ -1404,10 +1404,17 @@ 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 */ + /* +* interrupts now hard-disabled. i.e EE=0 +* But irqs_disabled relies on PACA entries +* and fixup below enables it. arch/powerpc/kvm/booke.c int kvmppc_handle_exit(struct kvm_vcpu *vcpu, unsigned int exit_nr) · line 1420
Quoted 10 lines
arch/powerpc/kvm/booke.c +4
-0+* So irqs_disabled == false +*/ kvmppc_fix_ee_before_entry(); + preempt_disable(); kvmppc_load_guest_fp(vcpu); kvmppc_load_guest_altivec(vcpu); + preempt_enable_no_resched(); } }Hi,
Quoted 4 lines
Thanks a lot for your patch!
I patched the 7.3-rc4 kernel sources with your new patch and compiled the kernel again yesterday. [1]
Thanks for trying.
Quoted 2 lines
Unfortunately, the issue still exists.
Can you share the console log of the kernel with the patch applied? We need to see where it is stuck now. Has it made forward progress?
Quoted 2 lines
I tested it with a guest kernel with and without preempt support.
Quoted 8 lines
Quoted 6 lines
Quoted 5 lines
Cheers,
Christian[1] https://github.com/chzigotzky/kernels/releases/tag/v7.3.0-rc4-2-preempt
Here is a new serial log from the patched kernel: https://github.com/user-attachments/files/32570808/e5500_preempt_pcie_ports_compat_patched_putty.log
That paca mismatch is independent of preemption modes.
It shows a few warnings and even after that a console message has come through. Do warning continue forever?
To fix those warnings, can you try this diff on the top of the earlier ones? (Igonore whitespace mangling if any, Also patch is UNTESTED. It is more of my speculation.).
Sorry, I don't have any way to test it out locally.
---
arch/powerpc/kvm/powerpc.c +6
-0@@ -147,6 +147,19 @@ int kvmppc_prepare_to_enter(struct kvm_vcpu *vcpu) continue; } +#ifdef CONFIG_PPC64 + if (unlikely(local_paca->irq_happened != PACA_IRQ_HARD_DIS)) { + /* +* An interrupt arrived between the soft and hard +* disable. Replay it and retry guest entry. +*/ arch/powerpc/kvm/powerpc.c int kvmppc_prepare_to_enter(struct kvm_vcpu *vcpu) · line 165
Quoted 10 lines
arch/powerpc/kvm/powerpc.c +7
-0+ local_irq_enable(); + local_irq_disable(); + hard_irq_disable(); + continue; + } +#endif + guest_enter_irqoff(); return 1; }Hi,
Quoted 4 lines
I patched the RC4 of kernel 7.3 with the two patches and compiled it again today.
I'm happy to report that the patched PREEMPT kernel with KVM HV works on the X5000/40. (e5500)
That's very nice to hear. I will write changelog for both and send it across soon. Give me sometime.
Quoted 4 lines
Serial log: https://github.com/user-attachments/files/32619259/e5500_preempt_pcie_ports_compat_patched-2_putty.log
I also successfully tested it with KVM PR on the X1000 today. (PA6T)
Nice.
Quoted 4 lines
Further information: https://github.com/chzigotzky/kernels/issues/19#issuecomment-5818925408
Many thanks for your help,
Happy to help.
Thanks for reporting and testing. We can finally close this thread :) Thanks to michal for helping in getting the logs.
Quoted 2 lines
Christian
Also, Michal, can you report that kvm specific issue you are seeing with the ftrace fix applied in separate thread. This thread has become long already.
Shrikanth Hegde
reviewerRe: [Linux PPC] Disable PREEMPT
In reply to Shrikanth HegdeHi Michal.
Quoted 4 lines · Shrikanth Hegde
Hi Michal,
Quoted 1 line
Quoted 1 line
Quoted 9 lines
Quoted 6 lines
Quoted 4 lines
Give it a try.
I am suspecting both lockup, stack corruptions are secondary symptoms here. While recreate, I have different type of traces.
Yes, it does work for the crash I see.
Thanks. Give me sometime to see further on that. Didn't get any time today.
This is going to be the fix IMO. It passes all the recreates i have as of now. (Please ignore the whitespace mangling if any)
Let me write changelog and send it across.
---
arch/powerpc/kernel/trace/ftrace_entry.S +3 -1
@@ -220,7 +220,9 @@ /* Restore gprs */ .if \allregs == 1 - REST_GPRS(2, 31, r1) + REST_GPRS(2, 12, r1) + /* Do not restore a stale PACA pointer if the task migrated */ + REST_GPRS(14, 31, r1) .else REST_GPRS(3, 10, r1) #if defined(CONFIG_LIVEPATCH_64) || defined(CONFIG_PPC_FTRACE_OUT_OF_LINE)
Re: [Linux PPC] Disable PREEMPT
Quoted 27 lines · Shrikanth Hegde
Hi Michal.
Quoted 4 lines · Shrikanth Hegde
Hi Michal,
Quoted 1 line
Quoted 1 line
Quoted 9 lines
Quoted 6 lines
Quoted 4 lines
Give it a try.
I am suspecting both lockup, stack corruptions are secondary symptoms here. While recreate, I have different type of traces.
Yes, it does work for the crash I see.
Thanks. Give me sometime to see further on that. Didn't get any time today.
This is going to be the fix IMO. It passes all the recreates i have as of now. (Please ignore the whitespace mangling if any)
Let me write changelog and send it across.
---arch/powerpc/kernel/trace/ftrace_entry.S +0
-0
arch/powerpc/kernel/trace/ftrace_entry.S line 227
Quoted 9 lines
arch/powerpc/kernel/trace/ftrace_entry.S +3
-1@@ -220,7 +220,9 @@ /* Restore gprs */ .if \allregs == 1 - REST_GPRS(2, 31, r1) + REST_GPRS(2, 12, r1) + /* Do not restore a stale PACA pointer if the task migrated */ + REST_GPRS(14, 31, r1) .else REST_GPRS(3, 10, r1) #if defined(CONFIG_LIVEPATCH_64) || defined(CONFIG_PPC_FTRACE_OUT_OF_LINE)
This also works
Thanks
Michal
Re: [Linux PPC] Disable PREEMPT
In reply to Shrikanth HegdeOn 03 September 2026 at 07:23 Shrikanth Hegde <[email protected]> wrote:
Friendly LLM analysis says preemption is enabled too early and before completing kvmppc_handle_exit_hv() / kvmppc_handle_nested_exit()
Below is ONLY a speculation and completely UNTESTED. Maybe worth a try.
---
arch/powerpc/kvm/book3s_hv.c +2 -2
@@ -5049,8 +5049,6 @@ int kvmhv_run_single_vcpu(struct kvm_vcpu *vcpu, u64 time_limit,powerpc_local_irq_pmu_restore (flags); -preempt_enable (); -/* * cancel pending decrementer exception if DEC is now positive, or if * entering a nested guest in which case the decrementer is now owned
@@ -5072,6 +5070,8 @@ int kvmhv_run_single_vcpu(struct kvm_vcpu *vcpu, u64 time_limit, } vcpu->arch.ret = r; +preempt_enable (); +if (is_kvmppc_resume_guest (r) && !kvmppc_vcpu_check_block (vcpu)) {kvmppc_set_timer (vcpu);
Michal
- - -
Michal,
Is this patch also for the issues with KVM PR and KVM HV if PREEMPT is activated?
The entire FSL Cyrus+ board freezes when using KVM HV with PREEMPT.
The guest kernel doesn't boot if we use KVM PR with a PREEMPT kernel on the PA Semi Nemo board.
Bug report: https://github.com/chzigotzky/kernels/issues/19
Thanks,
Christian
Re: [Linux PPC] Disable PREEMPT
Quoted 35 lines · On 04 September 2026 at 10:56 Christian Zigotzky <[email protected]> wrote:
On 03 September 2026 at 07:23 Shrikanth Hegde <[email protected]> wrote:
Friendly LLM analysis says preemption is enabled too early and before completing
kvmppc_handle_exit_hv()/kvmppc_handle_nested_exit()Below is ONLY a speculation and completely UNTESTED. Maybe worth a try.
---
arch/powerpc/kvm/book3s_hv.c +2
-2@@ -5049,8 +5049,6 @@ int kvmhv_run_single_vcpu(struct kvm_vcpu *vcpu, u64 time_limit,powerpc_local_irq_pmu_restore (flags); -preempt_enable (); -/* * cancel pending decrementer exception if DEC is now positive, or if * entering a nested guest in which case the decrementer is now owned @@ -5072,6 +5070,8 @@ int kvmhv_run_single_vcpu(struct kvm_vcpu *vcpu, u64 time_limit, } vcpu->arch.ret = r; +preempt_enable (); +if (is_kvmppc_resume_guest (r) && !kvmppc_vcpu_check_block (vcpu)) {kvmppc_set_timer (vcpu);
Quoted 5 lines
Michal
- - -
Michal,
Sorry, I meant Shrikanth.
Quoted 12 lines
Is this patch also for the issues with KVM PR and KVM HV if PREEMPT is activated?
The entire FSL Cyrus+ board freezes when using KVM HV with PREEMPT.
The guest kernel doesn't boot if we use KVM PR with a PREEMPT kernel on the PA Semi Nemo board.
Bug report: https://github.com/chzigotzky/kernels/issues/19
Thanks,
Christian
Shrikanth Hegde
reviewerRe: [Linux PPC] Disable PREEMPT
Quoted 35 lines · Christian Zigotzky
Quoted 35 lines · On 04 September 2026 at 10:56 Christian Zigotzky <[email protected]> wrote:
On 03 September 2026 at 07:23 Shrikanth Hegde <[email protected]> wrote:
Friendly LLM analysis says preemption is enabled too early and before completing
kvmppc_handle_exit_hv()/kvmppc_handle_nested_exit()Below is ONLY a speculation and completely UNTESTED. Maybe worth a try.
---
arch/powerpc/kvm/book3s_hv.c +2
-2@@ -5049,8 +5049,6 @@ int kvmhv_run_single_vcpu(struct kvm_vcpu *vcpu, u64 time_limit,powerpc_local_irq_pmu_restore (flags); -preempt_enable (); -/* * cancel pending decrementer exception if DEC is now positive, or if * entering a nested guest in which case the decrementer is now owned @@ -5072,6 +5070,8 @@ int kvmhv_run_single_vcpu(struct kvm_vcpu *vcpu, u64 time_limit, } vcpu->arch.ret = r; +preempt_enable (); +if (is_kvmppc_resume_guest (r) && !kvmppc_vcpu_check_block (vcpu)) {kvmppc_set_timer (vcpu);
Quoted 8 lines
Quoted 5 lines
Michal
- - -
Michal,
Sorry, I meant Shrikanth.
Leave that patch, it was only a speculation.
Quoted 5 lines
Quoted 5 lines
Is this patch also for the issues with KVM PR and KVM HV if PREEMPT is activated?
The entire FSL Cyrus+ board freezes when using KVM HV with PREEMPT.
You have any logs? can you try with latest code? maybe 7.2? there is usage of generic api to handle the work now which renders the patch shared long back which you tried irrelevant.
Quoted 8 lines
Quoted 7 lines
The guest kernel doesn't boot if we use KVM PR with a PREEMPT kernel on the PA Semi Nemo board.
Bug report: https://github.com/chzigotzky/kernels/issues/19
Thanks,
Christian
Re: [Linux PPC] Disable PREEMPT
Quoted 6 lines · On 04 September 2026 at 11:24 Shrikanth Hegde <[email protected]> wrote:
can you try with latest code? maybe 7.2? there is usage
of generic api to handle the work now which renders the patch shared long back which you tried irrelevant.
Thanks. I will test the RC1 of kernel 7.3 with PREEMPT enabled.
- Christian
Re: [Linux PPC] Disable PREEMPT
Quoted 8 lines · Christian Zigotzky
Quoted 5 lines · On 04 September 2026 at 11:24 Shrikanth Hegde <[email protected]> wrote:
can you try with latest code? maybe 7.2? there is usage
of generic api to handle the work now which renders the patch shared long back which you tried irrelevant.Thanks. I will test the RC1 of kernel 7.3 with PREEMPT enabled.
- Christian
I compiled and tested the RC1 of kernel 7.3 with PREEMPT support today [1]. Unfortunately the issue [2] still exists.
The entire FSL Cyrus+ board freezes when using KVM HV with PREEMPT.
I will disable PREEMPT with the Kconfig.preempt.patch [3] for the RC2.
- Christian
[1] https://github.com/chzigotzky/kernels/releases/tag/v7.3.0-rc1-preempt
[2] https://github.com/chzigotzky/kernels/issues/19
[3] https://github.com/chzigotzky/kernels/blob/main/patches/e5500/Kconfig.preempt.patch
Signature · 1 line
Sent with BrassMonkey 34.3.2.1 (https://github.com/chzigotzky/Web-Browsers-and-Suites-for-Linux-PPC/releases/tag/BrassMonkey_34.3.2.1)
Re: [Linux PPC] Disable PREEMPT
Quoted 8 lines · Christian Zigotzky
Quoted 7 lines · Christian Zigotzky
Quoted 5 lines · On 04 September 2026 at 11:24 Shrikanth Hegde <[email protected]> wrote:
can you try with latest code? maybe 7.2? there is usage
of generic api to handle the work now which renders the patch shared long back which you tried irrelevant.Thanks. I will test the RC1 of kernel 7.3 with PREEMPT enabled.
Quoted 8 lines
Quoted 1 line
- Christian
I compiled and tested the RC1 of kernel 7.3 with PREEMPT support today [1]. Unfortunately the issue [2] still exists.
The entire FSL Cyrus+ board freezes when using KVM HV with PREEMPT.
I will disable PREEMPT with the
Kconfig.preempt.patch[3] for the RC2.
There is the obvious question which I did not notice answered in this
thread: Did you set up sysrq and/or kdump and find out where the kernel is stuck?
Thanks
Michal
Re: [Linux PPC] Disable PREEMPT
On 07 September 2026 at 10:51 am, Michal Suchánek <[email protected]> wrote:
There is the obvious question which I did not notice answered in this
thread: Did you set up sysrq and/or kdump and find out where the kernel is stuck?
Thanks
Michal
- - -
I think I need kexec for kdump due to the system freezing after activating of KVM HV. Unfortunately kexec doesn’t work on my machines.
Further information: https://github.com/chzigotzky/kernels/releases/tag/Kexec
Re: [Linux PPC] Disable PREEMPT
Quoted 8 lines · Christian Zigotzky
On 07 September 2026 at 10:51 am, Michal Suchánek <[email protected]> wrote:
There is the obvious question which I did not notice answered in this
thread: Did you set up sysrq and/or kdump and find out where the kernel is stuck?Thanks
Quoted 7 lines
Michal
- - -
I think I need kexec for kdump due to the system freezing after activating of KVM HV. Unfortunately kexec doesn’t work on my machines.
Further information: https://github.com/chzigotzky/kernels/releases/tag/Kexec
So there is some bug with kexec initialization on your platform.
Sysrg for dumping stacks to console might still work.
Thanks
Michal
Re: [Linux PPC] Disable PREEMPT
Quoted 11 lines · Michal Suchánek
Quoted 10 lines · Christian Zigotzky
On 07 September 2026 at 10:51 am, Michal Suchánek <[email protected]> wrote:
There is the obvious question which I did not notice answered in this
thread: Did you set up sysrq and/or kdump and find out where the kernel is stuck?Thanks
Michal
Quoted 7 lines
Quoted 5 lines
- - -
I think I need kexec for kdump due to the system freezing after activating of KVM HV. Unfortunately kexec doesn’t work on my machines.
Further information: https://github.com/chzigotzky/kernels/releases/tag/Kexec
So there is some bug with kexec initialization on your platform.
Right, you are missing this part:
https://github.com/torvalds/linux/blob/50d05c7c76c96b90462f24debacca971d2e86713/arch/powerpc/kexec/core.c#L205
Maybe it needs to be called from your platform code or something.
Thanks
Michal
Quoted 7 lines
Sysrg for dumping stacks to console might still work.
Thanks
Michal
Re: [Linux PPC] Disable PREEMPT
Quoted 16 lines · Michal Suchánek
Quoted 15 lines · Michal Suchánek
Quoted 14 lines · Christian Zigotzky
On 07 September 2026 at 10:51 am, Michal Suchánek <[email protected]> wrote:
There is the obvious question which I did not notice answered in this
thread: Did you set up sysrq and/or kdump and find out where the kernel is stuck?Thanks
Michal
- - -
I think I need kexec for kdump due to the system freezing after activating of KVM HV. Unfortunately kexec doesn’t work on my machines.
Quoted 8 lines
Quoted 3 lines
Quoted 1 line
Further information: https://github.com/chzigotzky/kernels/releases/tag/Kexec
So there is some bug with kexec initialization on your platform.
Right, you are missing this part:
https://github.com/torvalds/linux/blob/50d05c7c76c96b90462f24debacca971d2e86713/arch/powerpc/kexec/core.c#L205Maybe it needs to be called from your platform code or something.
Lookig at the code it likely runs always but if your device tree does not have a /chosen node it does not add the property that kexec needs to load the kernel. Can you try adding a /chosen node to your device tree?
Thanks
Michal
Quoted 13 lines
Thanks
Michal
Quoted 7 lines
Sysrg for dumping stacks to console might still work.
Thanks
Michal