------------[ cut here ]------------ WARNING: CPU: 0 PID: 21959 at arch/x86/kvm/lapic.c:330 kvm_recalculate_logical_map arch/x86/kvm/lapic.c:330 [inline] WARNING: CPU: 0 PID: 21959 at arch/x86/kvm/lapic.c:330 kvm_recalculate_apic_map+0x1267/0x14e0 arch/x86/kvm/lapic.c:413 Modules linked in: CPU: 0 PID: 21959 Comm: syz-executor.3 Not tainted 6.4.0-rc4-syzkaller-00265-g4ecd704a4c51 #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 05/25/2023 RIP: 0010:kvm_recalculate_logical_map arch/x86/kvm/lapic.c:330 [inline] RIP: 0010:kvm_recalculate_apic_map+0x1267/0x14e0 arch/x86/kvm/lapic.c:413 Code: df 1d a4 00 48 8b 3c 24 ba 01 00 00 00 be 04 00 00 00 e8 ac 96 fb ff 48 c7 44 24 08 00 00 00 00 e9 9b f7 ff ff e8 99 4d 6d 00 <0f> 0b e9 d2 f6 ff ff e8 8d 4d 6d 00 4c 89 23 e9 c5 f6 ff ff 48 8b RSP: 0018:ffffc90005f877f0 EFLAGS: 00010206 RAX: 00000000000008b0 RBX: 0000000000000001 RCX: ffffc9000c2f1000 RDX: 0000000000040000 RSI: ffffffff8116f8a7 RDI: 0000000000000004 RBP: 0000000000000400 R08: 0000000000000004 R09: 0000000000000001 R10: 0000000000084000 R11: 0000000000094001 R12: ffff888018a4fc00 R13: ffff88802e300000 R14: dffffc0000000000 R15: 0000000000084000 FS: 00007fd783fbd700(0000) GS:ffff8880b9800000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 0000001b2e428000 CR3: 0000000040b2c000 CR4: 00000000003526f0 Call Trace: kvm_apic_set_state+0x468/0xeb0 arch/x86/kvm/lapic.c:2951 kvm_vcpu_ioctl_set_lapic arch/x86/kvm/x86.c:4921 [inline] kvm_arch_vcpu_ioctl+0x24db/0x4000 arch/x86/kvm/x86.c:5659 kvm_vcpu_ioctl+0x977/0xea0 arch/x86/kvm/../../../virt/kvm/kvm_main.c:4262 vfs_ioctl fs/ioctl.c:51 [inline] __do_sys_ioctl fs/ioctl.c:870 [inline] __se_sys_ioctl fs/ioctl.c:856 [inline] __x64_sys_ioctl+0x197/0x210 fs/ioctl.c:856 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x39/0xb0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x63/0xcd RIP: 0033:0x7fd78328c169 Code: 28 00 00 00 75 05 48 83 c4 28 c3 e8 f1 19 00 00 90 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:00007fd783fbd168 EFLAGS: 00000246 ORIG_RAX: 0000000000000010 RAX: ffffffffffffffda RBX: 00007fd7833abf80 RCX: 00007fd78328c169 RDX: 00000000200006c0 RSI: 000000004400ae8f RDI: 0000000000000005 RBP: 00007fd7832e7ca1 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 00007fd7834cfb1f R14: 00007fd783fbd300 R15: 0000000000022000