------------[ cut here ]------------ WARNING: CPU: 0 PID: 5014 at arch/x86/kvm/lapic.c:341 kvm_recalculate_apic_map+0xc97/0x15b0 arch/x86/kvm/lapic.c:424 Modules linked in: CPU: 0 PID: 5014 Comm: syz-executor181 Not tainted 6.5.0-rc6-syzkaller-00036-g4853c74bd7ab #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 07/26/2023 RIP: 0010:kvm_recalculate_logical_map arch/x86/kvm/lapic.c:341 [inline] RIP: 0010:kvm_recalculate_apic_map+0xc97/0x15b0 arch/x86/kvm/lapic.c:424 Code: 54 74 00 83 fb 01 7e 29 83 fb 02 74 5d 83 fb 03 74 6e 83 fb 04 0f 85 be 00 00 00 e8 d3 4f 74 00 e9 bb 00 00 00 e8 c9 4f 74 00 <0f> 0b e9 fd fe ff ff 85 db 0f 84 96 00 00 00 83 fb 01 0f 85 97 00 RSP: 0018:ffffc90003aaf400 EFLAGS: 00010293 RAX: ffffffff81176867 RBX: 0000000000000001 RCX: ffff8880277e8000 RDX: 0000000000000000 RSI: 0000000000000001 RDI: 0000000000082000 RBP: ffffc90003aaf548 R08: ffffffff8117675d R09: 1ffffffff1d30ead R10: dffffc0000000000 R11: fffffbfff1d30eae R12: ffffc900015c6e58 R13: ffff88801fb2e090 R14: 0000000000082000 R15: ffff888076ea8024 FS: 0000555556776380(0000) GS:ffff8880b9800000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 000000002004d008 CR3: 00000000283c0000 CR4: 00000000003526f0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 Call Trace: kvm_apic_set_state+0x519/0x1700 arch/x86/kvm/lapic.c:2971 kvm_vcpu_ioctl_set_lapic+0x20/0x180 arch/x86/kvm/x86.c:4944 kvm_arch_vcpu_ioctl+0x1389/0x2a30 arch/x86/kvm/x86.c:5682 kvm_vcpu_ioctl+0x6df/0xd00 arch/x86/kvm/../../../virt/kvm/kvm_main.c:4280 vfs_ioctl fs/ioctl.c:51 [inline] __do_sys_ioctl fs/ioctl.c:870 [inline] __se_sys_ioctl+0xf8/0x170 fs/ioctl.c:856 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x41/0xc0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x63/0xcd RIP: 0033:0x7f3b14249439 Code: 48 83 c4 28 c3 e8 37 17 00 00 0f 1f 80 00 00 00 00 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 c7 c1 b8 ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007ffe1b9bfab8 EFLAGS: 00000246 ORIG_RAX: 0000000000000010 RAX: ffffffffffffffda RBX: 00007ffe1b9bfc88 RCX: 00007f3b14249439 RDX: 0000000020000880 RSI: 000000004400ae8f RDI: 0000000000000005 RBP: 00007f3b142bc610 R08: 00007ffe1b9bfc88 R09: 00007ffe1b9bfc88 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000001 R13: 00007ffe1b9bfc78 R14: 0000000000000001 R15: 0000000000000001