Skip to content

Commit 0c2e164

Browse files
sys/linux/test: update after syz_kvm_assert_syzos_uexit API change
This patch updates all relevant regression tests in sys/linux/test/ to align with the API change introduced in syz_kvm_assert_syzos_uexit. The syz_kvm_assert_syzos_uexit syscall now requires the VCPU file descriptor as its first argument.
1 parent 67ef04e commit 0c2e164

File tree

40 files changed

+74
-74
lines changed

40 files changed

+74
-74
lines changed

sys/linux/test/amd64-syz_kvm_nested_amd_inject

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,9 @@ r5 = mmap$KVM_VCPU(&(0x7f0000009000/0x1000)=nil, r4, 0x3, 0x1, r3, 0x0)
2929
# If KVM L0 processes the EVENTINJ correctly, the guest should eventually exit back to us.
3030
#
3131
ioctl$KVM_RUN(r3, AUTO, 0x0)
32-
syz_kvm_assert_syzos_uexit$x86(r5, 0xface)
32+
syz_kvm_assert_syzos_uexit$x86(r3, r5, 0xface)
3333

3434
# Cleanup
3535
#
3636
ioctl$KVM_RUN(r3, AUTO, 0x0)
37-
syz_kvm_assert_syzos_uexit$x86(r5, 0xffffffff)
37+
syz_kvm_assert_syzos_uexit$x86(r3, r5, 0xffffffff)

sys/linux/test/amd64-syz_kvm_nested_amd_invlpga

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,9 @@ r5 = mmap$KVM_VCPU(&(0x7f0000009000/0x1000)=nil, r4, 0x3, 0x1, r3, 0x0)
2727
# and then immediately yield with UEXIT code 0xface.
2828
#
2929
ioctl$KVM_RUN(r3, AUTO, 0x0)
30-
syz_kvm_assert_syzos_uexit$x86(r5, 0xface)
30+
syz_kvm_assert_syzos_uexit$x86(r3, r5, 0xface)
3131

3232
# guest_main should finish with guest_uexit(-1).
3333
#
3434
ioctl$KVM_RUN(r3, AUTO, 0x0)
35-
syz_kvm_assert_syzos_uexit$x86(r5, 0xffffffff)
35+
syz_kvm_assert_syzos_uexit$x86(r3, r5, 0xffffffff)

sys/linux/test/amd64-syz_kvm_nested_amd_stgi

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ r5 = mmap$KVM_VCPU(&(0x7f0000009000/0x1000)=nil, r4, 0x3, 0x1, r3, 0x0)
2121
# Run 1: Execute CLGI -> UEXIT(0x1337)
2222
#
2323
ioctl$KVM_RUN(r3, AUTO, 0x0)
24-
syz_kvm_assert_syzos_uexit$x86(r5, 0x1337)
24+
syz_kvm_assert_syzos_uexit$x86(r3, r5, 0x1337)
2525

2626
# Inject NMI into the vCPU.
2727
# Since GIF=0 in the guest, this NMI should be queued by L0.
@@ -39,9 +39,9 @@ ioctl$KVM_RUN(r3, AUTO, 0x0)
3939
# If the guest handles it transparently, we see 0xface.
4040
# For this regression test, ensuring we don't crash L0 is the primary goal.
4141
#
42-
syz_kvm_assert_syzos_uexit$x86(r5, 0xface)
42+
syz_kvm_assert_syzos_uexit$x86(r3, r5, 0xface)
4343

4444
# Cleanup.
4545
#
4646
ioctl$KVM_RUN(r3, AUTO, 0x0)
47-
syz_kvm_assert_syzos_uexit$x86(r5, 0xffffffff)
47+
syz_kvm_assert_syzos_uexit$x86(r3, r5, 0xffffffff)

sys/linux/test/amd64-syz_kvm_nested_amd_vmcb_write_mask

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ r5 = mmap$KVM_VCPU(&(0x7f0000009000/0x1000)=nil, r4, 0x3, 0x1, r3, 0x0)
2424
# L2 VM executes HLT. Exit reason is mapped to 0xe2e20001.
2525
#
2626
ioctl$KVM_RUN(r3, AUTO, 0x0)
27-
syz_kvm_assert_syzos_uexit$x86(r5, 0xe2e20001)
27+
syz_kvm_assert_syzos_uexit$x86(r3, r5, 0xe2e20001)
2828

2929
# L1 disables HLT intercept and resumes L2. L2 executes HLT, causing KVM_EXIT_HLT (0x5) from L1 to L0.
3030
# This confirms that the vmcb_write_mask command was successful.
@@ -35,9 +35,9 @@ syz_kvm_assert_syzos_kvm_exit$x86(r5, 0x5)
3535
# After resuming, L2 executes INVD. Exit reason is mapped to 0xe2e20002.
3636
#
3737
ioctl$KVM_RUN(r3, AUTO, 0x0)
38-
syz_kvm_assert_syzos_uexit$x86(r5, 0xe2e20002)
38+
syz_kvm_assert_syzos_uexit$x86(r3, r5, 0xe2e20002)
3939

4040
# guest_main should finish with guest_uexit(-1).
4141
#
4242
ioctl$KVM_RUN(r3, AUTO, 0x0)
43-
syz_kvm_assert_syzos_uexit$x86(r5, 0xffffffff)
43+
syz_kvm_assert_syzos_uexit$x86(r3, r5, 0xffffffff)

sys/linux/test/amd64-syz_kvm_nested_create_vm-hlt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,9 @@ r5 = mmap$KVM_VCPU(&(0x7f0000009000/0x1000)=nil, r4, 0x3, 0x1, r3, 0x0)
1515
# (0x1 is SYZOS_NESTED_EXIT_REASON_HLT).
1616
#
1717
ioctl$KVM_RUN(r3, AUTO, 0x0)
18-
syz_kvm_assert_syzos_uexit$x86(r5, 0xe2e20001)
18+
syz_kvm_assert_syzos_uexit$x86(r3, r5, 0xe2e20001)
1919

2020
# KVM_RUN should exit with KVM_EXIT_MMIO due to guest_uexit(-1).
2121
#
2222
ioctl$KVM_RUN(r3, AUTO, 0x0)
23-
syz_kvm_assert_syzos_uexit$x86(r5, 0xffffffff)
23+
syz_kvm_assert_syzos_uexit$x86(r3, r5, 0xffffffff)

sys/linux/test/amd64-syz_kvm_nested_intel_vmwrite_mask

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ r5 = mmap$KVM_VCPU(&(0x7f0000009000/0x1000)=nil, r4, 0x3, 0x1, r3, 0x0)
2020
# L2 VM executes HLT. Exit reason is mapped to 0xe2e20001.
2121
#
2222
ioctl$KVM_RUN(r3, AUTO, 0x0)
23-
syz_kvm_assert_syzos_uexit$x86(r5, 0xe2e20001)
23+
syz_kvm_assert_syzos_uexit$x86(r3, r5, 0xe2e20001)
2424

2525
# L1 disables HLT exiting and resumes L2. L2 resumes at HLT, and breaks out of KVM_RUN.
2626
# 0x05 is KVM_EXIT_HLT.
@@ -32,9 +32,9 @@ syz_kvm_assert_syzos_kvm_exit$x86(r5, 0x5)
3232
# After resuming, L2 executes INVD. Exit reason is mapped to 0xe2e20002.
3333
#
3434
ioctl$KVM_RUN(r3, AUTO, 0x0)
35-
syz_kvm_assert_syzos_uexit$x86(r5, 0xe2e20002)
35+
syz_kvm_assert_syzos_uexit$x86(r3, r5, 0xe2e20002)
3636

3737
# guest_main should finish with guest_uexit(-1).
3838
#
3939
ioctl$KVM_RUN(r3, AUTO, 0x0)
40-
syz_kvm_assert_syzos_uexit$x86(r5, 0xffffffff)
40+
syz_kvm_assert_syzos_uexit$x86(r3, r5, 0xffffffff)

sys/linux/test/amd64-syz_kvm_nested_vmresume

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,14 +16,14 @@ r5 = mmap$KVM_VCPU(&(0x7f0000009000/0x1000)=nil, r4, 0x3, 0x1, r3, 0x0)
1616
# L2 VM executes INVD. Exit reason is mapped to 0xe2e20002.
1717
#
1818
ioctl$KVM_RUN(r3, AUTO, 0x0)
19-
syz_kvm_assert_syzos_uexit$x86(r5, 0xe2e20002)
19+
syz_kvm_assert_syzos_uexit$x86(r3, r5, 0xe2e20002)
2020

2121
# L1 resumes L2, which executes HLT. Exit reason is mapped to 0xe2e20001.
2222
#
2323
ioctl$KVM_RUN(r3, AUTO, 0x0)
24-
syz_kvm_assert_syzos_uexit$x86(r5, 0xe2e20001)
24+
syz_kvm_assert_syzos_uexit$x86(r3, r5, 0xe2e20001)
2525

2626
# guest_main should finish with guest_uexit(-1).
2727
#
2828
ioctl$KVM_RUN(r3, AUTO, 0x0)
29-
syz_kvm_assert_syzos_uexit$x86(r5, 0xffffffff)
29+
syz_kvm_assert_syzos_uexit$x86(r3, r5, 0xffffffff)

sys/linux/test/amd64-syz_kvm_nested_vmresume-cpuid

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,14 +14,14 @@ r5 = mmap$KVM_VCPU(&(0x7f0000009000/0x1000)=nil, r4, 0x3, 0x1, r3, 0x0)
1414
# L2 VM executes CPUID. Exit reason is mapped to 0xe2e20003.
1515
#
1616
ioctl$KVM_RUN(r3, AUTO, 0x0)
17-
syz_kvm_assert_syzos_uexit$x86(r5, 0xe2e20003)
17+
syz_kvm_assert_syzos_uexit$x86(r3, r5, 0xe2e20003)
1818

1919
# L1 resumes L2, which executes HLT. Exit reason is mapped to 0xe2e20001.
2020
#
2121
ioctl$KVM_RUN(r3, AUTO, 0x0)
22-
syz_kvm_assert_syzos_uexit$x86(r5, 0xe2e20001)
22+
syz_kvm_assert_syzos_uexit$x86(r3, r5, 0xe2e20001)
2323

2424
# guest_main should finish with guest_uexit(-1).
2525
#
2626
ioctl$KVM_RUN(r3, AUTO, 0x0)
27-
syz_kvm_assert_syzos_uexit$x86(r5, 0xffffffff)
27+
syz_kvm_assert_syzos_uexit$x86(r3, r5, 0xffffffff)

sys/linux/test/amd64-syz_kvm_nested_vmresume-rdtsc

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,14 +14,14 @@ r5 = mmap$KVM_VCPU(&(0x7f0000009000/0x1000)=nil, r4, 0x3, 0x1, r3, 0x0)
1414
# L2 VM executes CPUID. Exit reason is mapped to 0xe2e20004.
1515
#
1616
ioctl$KVM_RUN(r3, AUTO, 0x0)
17-
syz_kvm_assert_syzos_uexit$x86(r5, 0xe2e20004)
17+
syz_kvm_assert_syzos_uexit$x86(r3, r5, 0xe2e20004)
1818

1919
# L1 resumes L2, which executes HLT. Exit reason is mapped to 0xe2e20001.
2020
#
2121
ioctl$KVM_RUN(r3, AUTO, 0x0)
22-
syz_kvm_assert_syzos_uexit$x86(r5, 0xe2e20001)
22+
syz_kvm_assert_syzos_uexit$x86(r3, r5, 0xe2e20001)
2323

2424
# guest_main should finish with guest_uexit(-1).
2525
#
2626
ioctl$KVM_RUN(r3, AUTO, 0x0)
27-
syz_kvm_assert_syzos_uexit$x86(r5, 0xffffffff)
27+
syz_kvm_assert_syzos_uexit$x86(r3, r5, 0xffffffff)

sys/linux/test/amd64-syz_kvm_nested_vmresume-rdtscp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,14 +14,14 @@ r5 = mmap$KVM_VCPU(&(0x7f0000009000/0x1000)=nil, r4, 0x3, 0x1, r3, 0x0)
1414
# L2 VM executes CPUID. Exit reason is mapped to 0xe2e20005.
1515
#
1616
ioctl$KVM_RUN(r3, AUTO, 0x0)
17-
syz_kvm_assert_syzos_uexit$x86(r5, 0xe2e20005)
17+
syz_kvm_assert_syzos_uexit$x86(r3, r5, 0xe2e20005)
1818

1919
# L1 resumes L2, which executes HLT. Exit reason is mapped to 0xe2e20001.
2020
#
2121
ioctl$KVM_RUN(r3, AUTO, 0x0)
22-
syz_kvm_assert_syzos_uexit$x86(r5, 0xe2e20001)
22+
syz_kvm_assert_syzos_uexit$x86(r3, r5, 0xe2e20001)
2323

2424
# guest_main should finish with guest_uexit(-1).
2525
#
2626
ioctl$KVM_RUN(r3, AUTO, 0x0)
27-
syz_kvm_assert_syzos_uexit$x86(r5, 0xffffffff)
27+
syz_kvm_assert_syzos_uexit$x86(r3, r5, 0xffffffff)

0 commit comments

Comments
 (0)