WARNING: at drivers/cpuidle/cpuidle.c:269
Quoted 54 lines
-----Original Message-----
From: Li,Rongqing
Sent: Monday, December 18, 2023 4:13 PM
To: [email protected]
Subject: WARNING: atdrivers/cpuidle/cpuidle.c:269[ 775.997365] ------------[ cut here ]------------ [ 775.997962] default_enter_idle leaked IRQ state [ 775.997985] WARNING: CPU: 2 PID: 0 at drivers/cpuidle/cpuidle.c:269 cpuidle_enter_state+0x3bc/0x450 [ 775.999461] Modules linked in: nft_compat(E) nf_tables(E) libcrc32c(E) nfnetlink(E) isofs(E)
crct10dif_pclmul(E)crc32_pclmul(E)ghash_clmulni_intel(E)sha512_ssse3(E)hid_generic(E)aesni_intel(E)crypto_simd(E)cryptd(E)input_leds(E)led_class(E)pcspkr(E)i2c_i801(E)i2c_smbus(E)usbhid(E) hid(E)i2c_core(E)virtio_net(E)net_failover(E)failover(E)sch_fq_codel(E)virtio_blk(E)atkbd(E)vivaldi_fmap(E)crc32c_intel(E)serio_raw(E)sr_mod(E)cdrom(E)uhci_hcd(E)virtio_pci(E)sg(E) virtio(E)virtio_pci_legacy_dev(E)ehci_pci(E)ehci_hcd(E)virtio_pci_modern_dev(E)virtio_ring(E)[ 776.004677] CPU: 2 PID: 0 Comm: swapper/2 Tainted: G E 6.7.0-rc3 #21 [ 776.006896] RIP: 0010:cpuidle_enter_state+0x3bc/0x450 [ 776.007517] Code: 4a 71 43 ff e9 91 fd ff ff 80 3d a0 86 d7 00 00 75 1a 49 8b74 24 50 48 c7 c7 2d 2c c8 84 c6 05 8b 86 d7 00 01 e8 44 3e 4d ff <0f> 0b fa e9 ce fc ff ff 8b 73 04 65 8b 05 ce 4a a6 7b 89 c0 48 0f [ 776.009582] RSP:
0018:ffffb765000abe90 EFLAGS: 00010282 [ 776.010217] RAX:
0000000000000000 RBX:ffffd764ffd00988RCX: 0000000000000027[ 776.011033] RDX: 0000000000a1810d RSI: ffffb765000abd78 RDI: ffff95c22fd204c8 [ 776.011847] RBP: 0000000000000001 R08: 0000000000000000 R09: c0000000ffff7fff [ 776.012660] R10: 0000000000000001 R11: ffffb765000abd18 R12: ffffffff85314bc0 [ 776.013483] R13: ffffffff85314b40 R14: 0000000000000001 R15:0000000000000000 [ 776.014304] FS: 0000000000000000(0000) GS:ffff95c22fd00000(0000) knlGS:0000000000000000 [ 776.015286] CS:
0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 776.015973] CR2:00007f0e0260c1a0CR3:00000001087e0006CR4:0000000000770ef0[ 776.016789] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 [ 776.017606] DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 [ 776.018425] PKRU: 55555554 [ 776.018825] Call Trace: [ 776.019200] <TASK> [ 776.019539] ? __warn+0x85/0x140 [ 776.019995] ? cpuidle_enter_state+0x3bc/0x450 [ 776.020559] ? report_bug+0xfc/0x1e0 [ 776.021044] ? console_unlock+0x51/0xe0 [ 776.021554] ? handle_bug+0x3f/0x70 [ 776.022032] ? exc_invalid_op+0x17/0x70 [ 776.022536] ? asm_exc_invalid_op+0x1a/0x20 [ 776.023076] ? cpuidle_enter_state+0x3bc/0x450 [ 776.023641] cpuidle_enter+0x2d/0x40 [ 776.024127] do_idle+0x138/0x200 [ 776.024574] cpu_startup_entry+0x2a/0x30 [ 776.025091] start_secondary+0x119/0x140 [ 776.025610] secondary_startup_64_no_verify+0x16b/0x16b [ 776.026249] </TASK> [ 776.026594] ---[ end trace 0000000000000000 ]---
Quoted 2 lines
cat
/sys/devices/system/cpu/cpuidle/current_governor_rohaltpoll
Peter:
I see the below warning in VM with haltpoll driver, seem it is caused by this commit
cpuidle: Move IRQ state validation
Make cpuidle_enter_state() consistent with the s2idle variant and verify ->enter() always returns with interrupts disabled.
default_enter_idle maybe enable irq as below
28 static int default_enter_idle(struct cpuidle_device *dev,
29 struct cpuidle_driver *drv, int index)
30 {
31 if (current_clr_polling_and_test()) {
32 local_irq_enable();
33 return index;
34 } 35 arch_cpu_idle(); 36 return index;
37 }
Thanks
-Li