Skip to contentSkip to conversation

x86/svm: regression on AMD+KVM after 8d37abbf (3 subtests fail)

kvm-unit-tests Aithal, Srikanth 1 participant 1 message May 25 KVM

lore
Share & tools
lore
#0 lore raw

Hello,

Reporting a regression in kvm-unit-tests on an AMD EPYC host running KVM. The ./svm test fails on current master (from 8d37abbf onward) with the same host kernel and QEMU that pass when the suite is pinned to an older revision.

Recreation steps:

git clone --depth 1 -b master https://gitlab.com/kvm-unit-tests/kvm-unit-tests.git
cd kvm-unit-tests
./configure --arch=x86_64
make standalone
export QEMU=/path/to/qemu-system-x86_64   # KVM enabled
./x86-run ./x86/svm.flat -smp 2 -append -pause_filter_test -cpu max,+svm -m 4g

Result (fails on current master, or 8d37abbf and later)

FAIL: V_IRQ did not fire
FAIL: virq_inject_within_shadow
FAIL: Test EFLAGS.TF on VMRUN: trap expected after completion of first guest instruction
SUMMARY: 331 tests, 3 unexpected failures, 4 skipped

Attaching full run log here.

Happy to provide any further logs/information if required.

Thanks,

Srikanth Aithal

kvm-unit-tests# ./x86-run ./x86/svm.flat -smp 2 -append -pause_filter_test -cpu max,+svm -m 4g
/usr/local/bin/qemu-system-x86_64 --no-reboot -nodefaults -global kvm-pit.lost_tick_policy=discard -device pc-testdev -device isa-debug-exit,iobase=0xf4,iosize=0x4 -display none -serial stdio -device pci-testdev -machine accel=kvm -kernel ./x86/svm.flat -smp 2 -append -pause_filter_test -cpu max,+svm -m 4g # -initrd /tmp/tmp.bOrnbJSsRQ enabling apic
smp: waiting for 1 APs
enabling apic
setup: CPU 1 online
paging enabled
cr0 = 80010011
cr3 = 1125000
cr4 = 20
NPT detected - running all tests with NPT enabled
SVM test: null
PASS: null
SVM test: vmrun
PASS: vmrun
SVM test: ioio
PASS: ioio
SVM test: vmrun intercept check
PASS: vmrun intercept check
SVM test: rsm
PASS: rsm
SVM test: sel cr0 write intercept
PASS: sel cr0 write intercept
SKIP: sel cr0 write intercept emulate (not supported)
SVM test: sel cr0 write intercept priority
PASS: sel cr0 write intercept priority
SKIP: sel cr0 write intercept priority emulate (not supported)
SVM test: sel cr0 write nointercept
PASS: sel cr0 write nointercept
SKIP: sel cr0 write nointercept emulate (not supported)
SVM test: sel cr0 lmsw intercept
PASS: sel cr0 lmsw intercept
SKIP: sel cr0 lmsw intercept emulate (not supported)
SVM test: cr3 read intercept
PASS: cr3 read intercept
SVM test: cr3 read nointercept
PASS: cr3 read nointercept
SVM test: cr3 read intercept emulate
PASS: cr3 read intercept emulate
SVM test: dr intercept check
PASS: dr intercept check
SVM test: next_rip
PASS: next_rip
SVM test: msr intercept check
PASS: MSR 0x2000 not covered by an MSRPM range
PASS: MSR 0xbfffffff not covered by an MSRPM range
PASS: MSR 0xc0002000 not covered by an MSRPM range
PASS: MSR 0xc000ffff not covered by an MSRPM range
PASS: MSR 0xc0012000 not covered by an MSRPM range
PASS: MSR 0x2000 not covered by an MSRPM range
PASS: MSR 0xbfffffff not covered by an MSRPM range
PASS: MSR 0xc0002000 not covered by an MSRPM range
PASS: MSR 0xc000ffff not covered by an MSRPM range
PASS: MSR 0xc0012000 not covered by an MSRPM range
PASS: msr intercept check
SVM test: mode_switch
PASS: mode_switch
SVM test: asid_zero
PASS: asid_zero
SVM test: tsc_adjust
PASS: tsc_adjust
SVM test: latency_run_exit

    Latency VMRUN : max: 462368 min: 9728 avg: 9817
    Latency VMEXIT: max: 243776 min: 4288 avg: 4350
PASS: latency_run_exit
SVM test: latency_run_exit_clean
    Latency VMRUN : max: 854496 min: 9951 avg: 10092
    Latency VMEXIT: max: 848192 min: 4288 avg: 4378
PASS: latency_run_exit_clean
SVM test: latency_svm_insn
    Latency VMLOAD: max: 172128 min: 512 avg: 529
    Latency VMSAVE: max: 148000 min: 512 avg: 532
    Latency STGI:   max: 13344 min: 32 avg: 56
    Latency CLGI:   max: 18176 min: 32 avg: 56

PASS: latency_svm_insn
SVM test: exc_inject
PASS: exception with vector 2 not injected
PASS: divide overflow exception injected
PASS: eventinj.VALID cleared
PASS: exc_inject
SVM test: pending_event
PASS: pending_event
SVM test: pending_event_cli
PASS: pending_event_cli
SVM test: interrupt
PASS: IRQ arrived after expected delay
PASS: IRQ arrived after expected delay
PASS: interrupt
SVM test: nmi
PASS: NMI intercept while running guest
PASS: nmi
SVM test: nmi_hlt
PASS: direct NMI after expected delay
PASS: NMI intercept while running guest
PASS: intercepted NMI after expected delay
PASS: nmi_hlt
SVM test: vnmi
PASS: vNMI enabled but NMI_INTERCEPT unset!
PASS: vNMI with vector 2 not injected
PASS: VNMI serviced
PASS: vnmi
SVM test: virq_inject
PASS: virq_inject
SVM test: virq_inject_within_shadow
FAIL: V_IRQ did not fire
FAIL: virq_inject_within_shadow
SVM test: reg_corruption
PASS: No RIP corruption detected after 10000 timer interrupts
PASS: reg_corruption
SVM test: svm_init_startup_test
enabling apic
setup: CPU 1 online
PASS: svm_init_startup_test
SVM test: svm_init_intercept_test
SVM test: host_rflags
PASS: host_rflags
SVM test: vgif
PASS: STGI set VGIF bit.
PASS: CLGI cleared VGIF bit.
PASS: vgif
SVM test: svm_cr4_osxsave_test
PASS: CPUID.01H:ECX.XSAVE set before VMRUN
PASS: svm_cr4_osxsave_test_guest finished with VMMCALL
PASS: CPUID.01H:ECX.XSAVE set after VMRUN
SVM test: svm_guest_state_test
PASS: EFER.SVME: 1500
PASS: EFER.SVME: 500
PASS: Test EFER 9:8: 1700
PASS: Test EFER 63:16: 11500
PASS: Test EFER 63:16: 101500
PASS: Test EFER 63:16: 1001500
PASS: Test EFER 63:16: 10001500
PASS: Test EFER 63:16: 100001500
PASS: Test EFER 63:16: 1000001500
PASS: Test EFER 63:16: 10000001500
PASS: Test EFER 63:16: 100000001500
PASS: Test EFER 63:16: 1000000001500
PASS: Test EFER 63:16: 10000000001500
PASS: Test EFER 63:16: 100000000001500
PASS: Test EFER 63:16: 1000000000001500
PASS: EFER.LME=1 (1500), CR0.PG=1 (80010011) and CR4.PAE=0 (40000)
PASS: EFER.LME=1 (1500), CR0.PG=1 and CR0.PE=0 (80010010)
PASS: EFER.LME=1 (1500), CR0.PG=1 (80010011), CR4.PAE=1 (40020), CS.L=1 and CS.D=1 (699)
PASS: Test CR0 CD=1,NW=0: c0010011
PASS: Test CR0 CD=1,NW=1: e0010011
PASS: Test CR0 CD=0,NW=0: 80010011
PASS: Test CR0 CD=0,NW=1: a0010011
PASS: Test CR0 63:32: 180010011
PASS: Test CR0 63:32: 1080010011
PASS: Test CR0 63:32: 10080010011
PASS: Test CR0 63:32: 100080010011
PASS: Test CR0 63:32: 1000080010011
PASS: Test CR0 63:32: 10000080010011
PASS: Test CR0 63:32: 100000080010011
PASS: Test CR0 63:32: 1000000080010011
PASS: Test CR3 63:0: 10000001125000, wanted exit 0xffffffff, got 0xffffffff
PASS: Test CR3 63:0: 20000001125000, wanted exit 0xffffffff, got 0xffffffff
PASS: Test CR3 63:0: 40000001125000, wanted exit 0xffffffff, got 0xffffffff
PASS: Test CR3 63:0: 80000001125000, wanted exit 0xffffffff, got 0xffffffff
PASS: Test CR3 63:0: 100000001125000, wanted exit 0xffffffff, got 0xffffffff
PASS: Test CR3 63:0: 200000001125000, wanted exit 0xffffffff, got 0xffffffff
PASS: Test CR3 63:0: 400000001125000, wanted exit 0xffffffff, got 0xffffffff
PASS: Test CR3 63:0: 800000001125000, wanted exit 0xffffffff, got 0xffffffff
PASS: Test CR3 63:0: 1000000001125000, wanted exit 0xffffffff, got 0xffffffff
PASS: Test CR3 63:0: 2000000001125000, wanted exit 0xffffffff, got 0xffffffff
PASS: Test CR3 63:0: 4000000001125000, wanted exit 0xffffffff, got 0xffffffff
PASS: Test CR3 63:0: 8000000001125000, wanted exit 0xffffffff, got 0xffffffff
PASS: Test CR3 63:0: 1125000
PASS: Test CR3 (PCIDE=1) 11:0: 1125001, wanted exit 0x81, got 0x81
PASS: Test CR3 (PCIDE=1) 11:0: 1125002, wanted exit 0x81, got 0x81
PASS: Test CR3 (PCIDE=1) 11:0: 1125004, wanted exit 0x81, got 0x81
PASS: Test CR3 (PCIDE=1) 11:0: 1125020, wanted exit 0x81, got 0x81
PASS: Test CR3 (PCIDE=1) 11:0: 1125040, wanted exit 0x81, got 0x81
PASS: Test CR3 (PCIDE=1) 11:0: 1125080, wanted exit 0x81, got 0x81
PASS: Test CR3 (PCIDE=1) 11:0: 1125100, wanted exit 0x81, got 0x81
PASS: Test CR3 (PCIDE=1) 11:0: 1125200, wanted exit 0x81, got 0x81
PASS: Test CR3 (PCIDE=1) 11:0: 1125400, wanted exit 0x81, got 0x81
PASS: Test CR3 (PCIDE=1) 11:0: 1125800, wanted exit 0x81, got 0x81
PASS: Test CR3 63:0: 1125000
PASS: Test CR3 (PCIDE=0) 11:0: 1125001, wanted exit 0x400, got 0x400
PASS: Test CR3 (PCIDE=0) 11:0: 1125002, wanted exit 0x400, got 0x400
PASS: Test CR3 (PCIDE=0) 11:0: 1125004, wanted exit 0x400, got 0x400
PASS: Test CR3 (PCIDE=0) 11:0: 1125020, wanted exit 0x400, got 0x400
PASS: Test CR3 (PCIDE=0) 11:0: 1125040, wanted exit 0x400, got 0x400
PASS: Test CR3 (PCIDE=0) 11:0: 1125080, wanted exit 0x400, got 0x400
PASS: Test CR3 (PCIDE=0) 11:0: 1125100, wanted exit 0x400, got 0x400
PASS: Test CR3 (PCIDE=0) 11:0: 1125200, wanted exit 0x400, got 0x400
PASS: Test CR3 (PCIDE=0) 11:0: 1125400, wanted exit 0x400, got 0x400
PASS: Test CR3 (PCIDE=0) 11:0: 1125800, wanted exit 0x400, got 0x400
PASS: Test CR3 (PAE) 2:0: 1125001, wanted exit 0x400, got 0x400
PASS: Test CR3 (PAE) 2:0: 1125002, wanted exit 0x400, got 0x400
PASS: Test CR3 (PAE) 2:0: 1125004, wanted exit 0x400, got 0x400
PASS: Test CR4 31:12: 42020, wanted exit 0xffffffff, got 0xffffffff
PASS: Test CR4 31:12: 44020, wanted exit 0xffffffff, got 0xffffffff
PASS: Test CR4 31:12: 48020, wanted exit 0xffffffff, got 0xffffffff
PASS: Test CR4 31:12: c0020, wanted exit 0xffffffff, got 0xffffffff
PASS: Test CR4 31:12: 2040020, wanted exit 0xffffffff, got 0xffffffff
PASS: Test CR4 31:12: 4040020, wanted exit 0xffffffff, got 0xffffffff
PASS: Test CR4 31:12: 8040020, wanted exit 0xffffffff, got 0xffffffff
PASS: Test CR4 31:12: 10040020, wanted exit 0xffffffff, got 0xffffffff
PASS: Test CR4 31:12: 20040020, wanted exit 0xffffffff, got 0xffffffff
PASS: Test CR4 31:12: 40040020, wanted exit 0xffffffff, got 0xffffffff
PASS: Test CR4 31:12: 80040020, wanted exit 0xffffffff, got 0xffffffff
PASS: Test CR4 31:12: 42020, wanted exit 0xffffffff, got 0xffffffff
PASS: Test CR4 31:12: 44020, wanted exit 0xffffffff, got 0xffffffff
PASS: Test CR4 31:12: 48020, wanted exit 0xffffffff, got 0xffffffff
PASS: Test CR4 31:12: c0020, wanted exit 0xffffffff, got 0xffffffff
PASS: Test CR4 31:12: 2040020, wanted exit 0xffffffff, got 0xffffffff
PASS: Test CR4 31:12: 4040020, wanted exit 0xffffffff, got 0xffffffff
PASS: Test CR4 31:12: 8040020, wanted exit 0xffffffff, got 0xffffffff
PASS: Test CR4 31:12: 10040020, wanted exit 0xffffffff, got 0xffffffff
PASS: Test CR4 31:12: 20040020, wanted exit 0xffffffff, got 0xffffffff
PASS: Test CR4 31:12: 40040020, wanted exit 0xffffffff, got 0xffffffff
PASS: Test CR4 31:12: 80040020, wanted exit 0xffffffff, got 0xffffffff
PASS: Test CR4 63:32: 100040020, wanted exit 0xffffffff, got 0xffffffff
PASS: Test CR4 63:32: 1000040020, wanted exit 0xffffffff, got 0xffffffff
PASS: Test CR4 63:32: 10000040020, wanted exit 0xffffffff, got 0xffffffff
PASS: Test CR4 63:32: 100000040020, wanted exit 0xffffffff, got 0xffffffff
PASS: Test CR4 63:32: 1000000040020, wanted exit 0xffffffff, got 0xffffffff
PASS: Test CR4 63:32: 10000000040020, wanted exit 0xffffffff, got 0xffffffff
PASS: Test CR4 63:32: 100000000040020, wanted exit 0xffffffff, got 0xffffffff
PASS: Test CR4 63:32: 1000000000040020, wanted exit 0xffffffff, got 0xffffffff
PASS: Test DR6 63:32: 1ffff0ff0
PASS: Test DR6 63:32: 10ffff0ff0
PASS: Test DR6 63:32: 100ffff0ff0
PASS: Test DR6 63:32: 1000ffff0ff0
PASS: Test DR6 63:32: 10000ffff0ff0
PASS: Test DR6 63:32: 100000ffff0ff0
PASS: Test DR6 63:32: 1000000ffff0ff0
PASS: Test DR6 63:32: 10000000ffff0ff0
PASS: Test DR7 63:32: 100000400
PASS: Test DR7 63:32: 1000000400
PASS: Test DR7 63:32: 10000000400
PASS: Test DR7 63:32: 100000000400
PASS: Test DR7 63:32: 1000000000400
PASS: Test DR7 63:32: 10000000000400
PASS: Test DR7 63:32: 100000000000400
PASS: Test DR7 63:32: 1000000000000400
PASS: Test MSRPM address: fffffffffe000
PASS: Test MSRPM address: fffffffffe001
PASS: Test MSRPM address: ffffffffff000
PASS: Test MSRPM address: 438000
PASS: Test MSRPM address: 438fff
PASS: Test IOPM address: fffffffffc000
PASS: Test IOPM address: fffffffffd000
PASS: Test IOPM address: fffffffffdffe
PASS: Test IOPM address: fffffffffe000
PASS: Test IOPM address: ffffffffff000
PASS: Test IOPM address: 43b000
PASS: Test IOPM address: 43bfff
PASS: Test FS.base for canonical form: 0
PASS: Test GS.base for canonical form: 103c000
PASS: Test LDTR.base for canonical form: 0
PASS: Test TR.base for canonical form: 1049060
PASS: Test KERNEL GS.base for canonical form: 0
PASS: Successful VMRUN with noncanonical ES.base
PASS: Successful VMRUN with noncanonical CS.base
PASS: Successful VMRUN with noncanonical SS.base
PASS: Successful VMRUN with noncanonical DS.base
PASS: Successful VMRUN with noncanonical GDTR.base
PASS: Successful VMRUN with noncanonical IDTR.base
SVM test: svm_vmrun_errata_test
PASS: All guest memory tested, no bug found
SVM test: svm_vmload_vmsave
PASS: Test VMLOAD/VMSAVE intercept: Expected VMMCALL #VMEXIT
PASS: Test VMLOAD/VMSAVE intercept: Expected VMLOAD #VMEXIT
PASS: Test VMLOAD/VMSAVE intercept: Expected VMSAVE #VMEXIT
PASS: Test VMLOAD/VMSAVE intercept: Expected VMMCALL #VMEXIT
PASS: Test VMLOAD/VMSAVE intercept: Expected VMLOAD #VMEXIT
PASS: Test VMLOAD/VMSAVE intercept: Expected VMMCALL #VMEXIT
PASS: Test VMLOAD/VMSAVE intercept: Expected VMSAVE #VMEXIT
PASS: Test VMLOAD/VMSAVE intercept: Expected VMMCALL #VMEXIT
SVM test: svm_test_singlestep
FAIL: Test EFLAGS.TF on VMRUN: trap expected after completion of first guest instruction
PASS: Test EFLAGS.TF on VMRUN: trap not expected
PASS: Test EFLAGS.TF on VMRUN: guest execution completion
SVM test: svm_no_nm_test
PASS: fnop with CR0.TS and CR0.EM unset no #NM exception
SVM test: svm_exception_test
PASS: Handling #GP in L2's exception handler
PASS: #GP handled by L2
PASS: #GP handled by L1
PASS: Handling #UD in L2's exception handler
PASS: #UD handled by L2
PASS: #UD handled by L1
PASS: Handling #DE in L2's exception handler
PASS: #DE handled by L2
PASS: #DE handled by L1
PASS: Handling #DB in L2's exception handler
PASS: #DB handled by L2
PASS: #DB handled by L1
PASS: Handling #BP in L2's exception handler
PASS: #BP handled by L2
PASS: #BP handled by L1
PASS: Usermode #AC handled in L2
PASS: #AC handled by L2
PASS: #AC handled by L1
PASS: Handling #OF in L2's exception handler
PASS: #OF handled by L2
PASS: #OF handled by L1
PASS: Handling #NM in L2's exception handler
PASS: #NM handled by L2
PASS: #NM handled by L1
PASS: Handling #NM in L2's exception handler
PASS: #NM handled by L2
PASS: #NM handled by L1
SVM test: svm_lbrv_test0
SVM test: svm_lbrv_test1
SVM test: svm_lbrv_test2
SVM test: svm_lbrv_test3
SVM test: svm_lbrv_nested_test1
SVM test: svm_lbrv_nested_test2
SVM test: svm_lbrv_nested_test3
SVM test: svm_intr_intercept_mix_if
PASS: No interrupt expected
PASS: No interrupt expected
PASS: Interrupt is expected
PASS: Wanted VM-Exit reason 0x60, got 0x60
PASS: Guest should have EFLAGS.IF set now
SVM test: svm_intr_intercept_mix_gif
PASS: No interrupt expected
PASS: Interrupt is expected
PASS: Wanted VM-Exit reason 0x60, got 0x60
PASS: Guest should have EFLAGS.IF set now
SVM test: svm_intr_intercept_mix_gif2
PASS: No interrupt expected
PASS: No interrupt expected
PASS: No interrupt expected
PASS: Interrupt is expected
PASS: Wanted VM-Exit reason 0x60, got 0x60
PASS: Guest should have EFLAGS.IF set now
SVM test: svm_intr_intercept_mix_nmi
PASS: No NMI expected
PASS: No NMI expected
PASS: No interrupt expected
PASS: Interrupt is expected
PASS: Wanted VM-Exit reason 0x61, got 0x61
PASS: Guest should have EFLAGS.IF set now
SVM test: svm_intr_intercept_mix_smi
PASS: Wanted VM-Exit reason 0x62, got 0x62
PASS: Guest should have EFLAGS.IF set now
SVM test: svm_tsc_scale_test
PASS: initial TSC scale ratio
INFO: duration=19, tsc_scale=810, tsc_offset=-4271808563583536625
PASS: tsc delay (expected: 19, actual: 19)
INFO: duration=29, tsc_scale=590, tsc_offset=-4682697171250726395
PASS: tsc delay (expected: 29, actual: 29)
INFO: duration=43, tsc_scale=870, tsc_offset=-4442584870113600308
PASS: tsc delay (expected: 43, actual: 43)
INFO: duration=2, tsc_scale=570, tsc_offset=440089317597426414
PASS: tsc delay (expected: 2, actual: 2)
INFO: duration=7, tsc_scale=50, tsc_offset=2964628066666912600
PASS: tsc delay (expected: 7, actual: 7)
INFO: duration=36, tsc_scale=440, tsc_offset=-1550978008624289412
PASS: tsc delay (expected: 36, actual: 36)
INFO: duration=6, tsc_scale=800, tsc_offset=5434493705420976645
PASS: tsc delay (expected: 6, actual: 6)
INFO: duration=22, tsc_scale=560, tsc_offset=-3474933728322319531
PASS: tsc delay (expected: 22, actual: 22)
INFO: duration=20, tsc_scale=800, tsc_offset=6239613296160731752
PASS: tsc delay (expected: 20, actual: 20)
INFO: duration=4, tsc_scale=450, tsc_offset=7919753113262306468
PASS: tsc delay (expected: 4, actual: 4)
PASS: tsc delay (expected: 50, actual: 50)
PASS: tsc delay (expected: 50, actual: 50)
SVM test: svm_shutdown_intercept_test
PASS: shutdown test passed
SUMMARY: 331 tests, 3 unexpected failures, 4 skipped