github.com/google/syzkaller@v0.0.0-20251211124644-a066d2bc4b02/sys/linux/test/amd64-syz_kvm_setup_syzos_vm-hlt (about) 1 # 2 # requires: arch=amd64 -threaded 3 # 4 r0 = openat$kvm(0, &AUTO='/dev/kvm\x00', 0x0, 0x0) 5 r1 = ioctl$KVM_CREATE_VM(r0, AUTO, 0x0) 6 r2 = syz_kvm_setup_syzos_vm$x86(r1, &(0x7f0000c00000/0x400000)=nil) 7 8 # 0xf4 is the HLT instruction. 9 # 10 r3 = syz_kvm_add_vcpu$x86(r2, &AUTO={0x0, &AUTO=[@code={AUTO, AUTO, {"f4", 0x1}}], AUTO}) 11 r4 = ioctl$KVM_GET_VCPU_MMAP_SIZE(r0, AUTO) 12 r5 = mmap$KVM_VCPU(&(0x7f0000009000/0x1000)=nil, r4, 0x3, 0x1, r3, 0x0) 13 14 # KVM_RUN should exit with KVM_EXIT_HLT = 0x5. 15 # 16 ioctl$KVM_RUN(r3, AUTO, 0x0) 17 syz_kvm_assert_syzos_kvm_exit$x86(r5, 0x5)