WARNING in enter_vmx_operation

Status: fixed on 2019/04/02 11:50
Subsystems: kvm
[Documentation on labels]
Fix commit: 5bea5123cbf0 KVM: VMX: check nested state and CR4.VMXE against SMM
First crash: 2128d, last: 2112d
Cause bisection: introduced by (bisect log) :
commit 8fcc4b5923af5de58b80b53a069453b135693304
Author: Jim Mattson <>
Date: Tue Jul 10 09:27:20 2018 +0000

  kvm: nVMX: Introduce KVM_CAP_NESTED_STATE

Crash: WARNING in free_loaded_vmcs (log)
Repro: syz .config
Discussions (1)
Title Replies (including bot) Last reply
WARNING in enter_vmx_operation 1 (3) 2019/04/01 19:21

Sample crash report:
IPv6: ADDRCONF(NETDEV_UP): veth1: link is not ready
IPv6: ADDRCONF(NETDEV_CHANGE): veth1: link becomes ready
IPv6: ADDRCONF(NETDEV_CHANGE): veth0: link becomes ready
8021q: adding VLAN 0 to HW filter on device team0
L1TF CPU bug present and SMT on, data leak possible. See CVE-2018-3646 and for details.
WARNING: CPU: 0 PID: 5632 at arch/x86/kvm/vmx.c:8247 alloc_shadow_vmcs arch/x86/kvm/vmx.c:8247 [inline]
WARNING: CPU: 0 PID: 5632 at arch/x86/kvm/vmx.c:8247 enter_vmx_operation+0x391/0x470 arch/x86/kvm/vmx.c:8274
Kernel panic - not syncing: panic_on_warn set ...

CPU: 0 PID: 5632 Comm: syz-executor0 Not tainted 4.19.0-rc3+ #231
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
Call Trace:
 __dump_stack lib/dump_stack.c:77 [inline]
 dump_stack+0x1c4/0x2b4 lib/dump_stack.c:113
 panic+0x238/0x4e7 kernel/panic.c:184
 __warn.cold.8+0x163/0x1ba kernel/panic.c:536
 report_bug+0x254/0x2d0 lib/bug.c:186
 fixup_bug arch/x86/kernel/traps.c:178 [inline]
 do_error_trap+0x1fc/0x4d0 arch/x86/kernel/traps.c:296
 do_invalid_op+0x1b/0x20 arch/x86/kernel/traps.c:316
 invalid_op+0x14/0x20 arch/x86/entry/entry_64.S:993
RIP: 0010:alloc_shadow_vmcs arch/x86/kvm/vmx.c:8247 [inline]
RIP: 0010:enter_vmx_operation+0x391/0x470 arch/x86/kvm/vmx.c:8274
Code: 00 4c 89 ef bb f4 ff ff ff e8 eb c6 ff ff e9 f2 fe ff ff e8 31 85 61 00 48 8b 4d d0 48 85 c9 0f 84 08 ff ff ff e8 1f 85 61 00 <0f> 0b e9 0e fe ff ff e8 d3 eb a4 00 e9 c1 fe ff ff e8 e9 eb a4 00
RSP: 0018:ffff8801b8f1f2d8 EFLAGS: 00010293
RAX: ffff8801b8b88000 RBX: ffff8801d30c0040 RCX: ffff8801d141d000
RDX: 0000000000000000 RSI: ffffffff811d4ba1 RDI: ffff8801d30c5820
RBP: ffff8801b8f1f310 R08: ffff8801b8b88000 R09: 1ffffffff12b43d5
R10: ffffed003b5c4732 R11: ffff8801dae23993 R12: ffff8801d30c5ba8
R13: ffff8801d30c5bb8 R14: ffff8801d30c5ba0 R15: ffff8801d30c57a8
 handle_vmon+0x46b/0x500 arch/x86/kvm/vmx.c:8378
 vmx_handle_exit+0x2f7/0x17e0 arch/x86/kvm/vmx.c:10115
 vcpu_enter_guest+0x14a9/0x62e0 arch/x86/kvm/x86.c:7648
 vcpu_run arch/x86/kvm/x86.c:7711 [inline]
 kvm_arch_vcpu_ioctl_run+0x375/0x16e0 arch/x86/kvm/x86.c:7888
 kvm_vcpu_ioctl+0x72b/0x1150 arch/x86/kvm/../../../virt/kvm/kvm_main.c:2590
 vfs_ioctl fs/ioctl.c:46 [inline]
 file_ioctl fs/ioctl.c:501 [inline]
 do_vfs_ioctl+0x1de/0x1720 fs/ioctl.c:685
 ksys_ioctl+0xa9/0xd0 fs/ioctl.c:702
 __do_sys_ioctl fs/ioctl.c:709 [inline]
 __se_sys_ioctl fs/ioctl.c:707 [inline]
 __x64_sys_ioctl+0x73/0xb0 fs/ioctl.c:707
 do_syscall_64+0x1b9/0x820 arch/x86/entry/common.c:290
RIP: 0033:0x4572a9
Code: fd b4 fb ff c3 66 2e 0f 1f 84 00 00 00 00 00 66 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 0f 83 cb b4 fb ff c3 66 2e 0f 1f 84 00 00 00 00
RSP: 002b:00007fff152c9638 EFLAGS: 00000246 ORIG_RAX: 0000000000000010
RAX: ffffffffffffffda RBX: 00000000013e2914 RCX: 00000000004572a9
RDX: 0000000000000000 RSI: 000000000000ae80 RDI: 0000000000000005
RBP: 00000000009300a0 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 00000000ffffffff
R13: 00000000004cf9b0 R14: 00000000004c5c37 R15: 0000000000000000
Dumping ftrace buffer:
   (ftrace buffer empty)
Kernel Offset: disabled
Rebooting in 86400 seconds..

Crashes (8):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2018/09/11 10:59 upstream 11da3a7f84f1 8c88323f .config console log report syz ci-upstream-kasan-gce-root
2018/09/11 01:50 upstream 11da3a7f84f1 f167cb6b .config console log report syz ci-upstream-kasan-gce-selinux-root
2018/09/10 11:44 upstream 11da3a7f84f1 6b5120a4 .config console log report syz ci-upstream-kasan-gce
2018/08/29 03:50 upstream 3f16503b7d22 b771b17e .config console log report syz ci-upstream-kasan-gce-root
2018/09/09 14:45 linux-next f2b6e66e9885 6b5120a4 .config console log report syz ci-upstream-linux-next-kasan-gce-root
2018/08/29 02:53 upstream 3f16503b7d22 b771b17e .config console log report ci-upstream-kasan-gce-root
2018/09/09 13:21 linux-next f2b6e66e9885 6b5120a4 .config console log report ci-upstream-linux-next-kasan-gce-root
2018/08/27 00:25 linux-next e27bc174c9c6 758cd203 .config console log report ci-upstream-linux-next-kasan-gce-root
* Struck through repros no longer work on HEAD.