github.com/google/syzkaller@v0.0.0-20251211124644-a066d2bc4b02/sys/linux/test/arm64-syz_kvm_setup_syzos_vm-msr-emul-3 (about)

     1  #
     2  # requires: arch=arm64 -threaded
     3  #
     4  # This series of tests exercise the system registers that are exposed in the QEMU emulation mode.
     5  # They should not be used in the corpus when running on real HW.
     6  #
     7  r0 = openat$kvm(0, &AUTO='/dev/kvm\x00', 0x0, 0x0)
     8  r1 = ioctl$KVM_CREATE_VM(r0, AUTO, 0x0)
     9  r2 = syz_kvm_setup_syzos_vm$arm64(r1, &(0x7f0000c00000/0x400000)=nil)
    10  #
    11  # 0x603000000013c520 is LORSA_EL1.
    12  # 0x603000000013c521 is LOREA_EL1.
    13  # 0x603000000013c522 is LORN_EL1.
    14  # 0x603000000013c523 is LORC_EL1.
    15  # 0x603000000013c641 is ICC_EOIR0_EL1.
    16  # 0x603000000013c643 is ICC_BPR0_EL1.
    17  # 0x603000000013c644 is ICC_AP0R0_EL1.
    18  # 0x603000000013c648 is ICC_AP1R0_EL1.
    19  # 0x603000000013c659 is ICC_DIR_EL1.
    20  # 0x603000000013c65d is ICC_SGI1R_EL1.
    21  #
    22  r3 = syz_kvm_add_vcpu$arm64(r2, &AUTO={0x0, &AUTO=[@msr={AUTO, AUTO, {0x603000000013c520, 0x8000}}, @msr={AUTO, AUTO, {0x603000000013c521, 0x8000}}, @msr={AUTO, AUTO, {0x603000000013c522, 0x8000}}, @msr={AUTO, AUTO, {0x603000000013c523, 0x8000}}, @msr={AUTO, AUTO, {0x603000000013c641, 0x8000}}, @msr={AUTO, AUTO, {0x603000000013c643, 0x8000}}, @msr={AUTO, AUTO, {0x603000000013c644, 0x8000}}, @msr={AUTO, AUTO, {0x603000000013c648, 0x8000}}, @msr={AUTO, AUTO, {0x603000000013c659, 0x8000}}, @msr={AUTO, AUTO, {0x603000000013c65d, 0x8000}}], AUTO}, 0x0, 0x0)
    23  r4 = ioctl$KVM_GET_VCPU_MMAP_SIZE(r0, AUTO)
    24  r5 = mmap$KVM_VCPU(&(0x7f0000009000/0x1000)=nil, r4, 0x3, 0x1, r3, 0x0)
    25  
    26  # Run till the end of guest_main(). 0xffffffffffffffff is UEXIT_END.
    27  #
    28  ioctl$KVM_RUN(r3, AUTO, 0x0)
    29  syz_kvm_assert_syzos_uexit$arm64(r5, 0xffffffffffffffff)
    30  syz_kvm_assert_reg(r3, 0x603000000013c520, 0x8000)
    31  syz_kvm_assert_reg(r3, 0x603000000013c521, 0x8000)
    32  syz_kvm_assert_reg(r3, 0x603000000013c522, 0x8000)
    33  syz_kvm_assert_reg(r3, 0x603000000013c523, 0x8000)
    34  syz_kvm_assert_reg(r3, 0x603000000013c641, 0x8000)
    35  syz_kvm_assert_reg(r3, 0x603000000013c643, 0x8000)
    36  syz_kvm_assert_reg(r3, 0x603000000013c644, 0x8000)
    37  syz_kvm_assert_reg(r3, 0x603000000013c648, 0x8000)
    38  syz_kvm_assert_reg(r3, 0x603000000013c659, 0x8000)
    39  syz_kvm_assert_reg(r3, 0x603000000013c65d, 0x8000)