Skip to contentSkip to conversation

next-20230809: kvm unittest fail: emulator

DISCUSSION Aithal, Srikanth 2 participants 4 messages Aug 10, 2023 – Aug 11, 2023

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

Hello,

On linux-next 20230809 build kvm emulator unittest failed.

===================
Recreation steps:
===================

1. git clone https://gitlab.com/kvm-unit-tests/kvm-unit-tests.git
2. export QEMU=<location of QEMU binary> I used v8.0.2
3. cd kvm-unit-tests/;./configure;make standalone;tests/emulator

Debug log:

[stdout] BUILD_HEAD=023002d2
[stdout] timeout -k 1s --foreground 90s /home/VT_BUILD/qemu/build/x86_64-softmmu/qemu-system-x86_64 --no-reboot -nodefaults -device pc-testdev -device isa-debug-exit,iobase=0xf4,iosize=0x4 -vnc none -serial stdio -device pci-testdev -machine accel=kvm -kernel /tmp/tmp.AFoESgjELO -smp 1 # -initrd /tmp/tmp.CGpwyvgHI4 [stdout] enabling apic
[stdout] smp: waiting for 0 APs
[stdout] SKIP: Skipping tests the require forced emulation, use kvm.force_emulation_prefix=1 to enable
[stdout] paging enabled
[stdout] cr0 = 80010011
[stdout] cr3 = 1007000
[stdout] cr4 = 20
[stdout] PASS: mov reg, r/m (1)
[stdout] FAIL: or
[stdout] FAIL: add
[stdout] FAIL: xor
[stdout] FAIL: sub
[stdout] FAIL: adc(0)
[stdout] FAIL: adc(0)
[stdout] FAIL: sbb(0)
[stdout] FAIL: sbb(1)
[stdout] FAIL: and
[stdout] FAIL: test
[stdout] FAIL: repe/cmpsb (1)
[stdout] FAIL: repe cmpsb (1.zf)
[stdout] FAIL: repe cmpsw (1)
[stdout] FAIL: repe cmpll (1)
[stdout] FAIL: repe cmpsq (1)
[stdout] FAIL: repe cmpsb (2)
[stdout] FAIL: repe cmpsw (2)
[stdout] FAIL: repe cmpll (2)
[stdout] FAIL: repe cmpsq (2)
[stdout] FAIL: repe/cmpsb (1)
[stdout] FAIL: repe cmpsb (1.zf)
[stdout] FAIL: repe cmpsw (1)
[stdout] FAIL: repe cmpll (1)
[stdout] FAIL: repe cmpsq (1)
[stdout] FAIL: repe cmpsb (2)
[stdout] FAIL: repe cmpsw (2)
[stdout] FAIL: repe cmpll (2)
[stdout] FAIL: repe cmpsq (2)
[stdout] FAIL: scasb match
[stdout] PASS: scasb mismatch
[stdout] FAIL: scasw match
[stdout] PASS: scasw mismatch
[stdout] FAIL: scasd match
[stdout] PASS: scasd mismatch
[stdout] FAIL: scasq match
[stdout] PASS: scasq mismatch
[stdout] PASS: smsw (1)
[stdout] PASS: smsw (2)
[stdout] PASS: smsw (3)
[stdout] before 80010011 after 80010019
[stdout] PASS: lmsw (1)
[stdout] before 80010011 after 80010011
[stdout] PASS: lmsw (2)
[stdout] PASS: lmsw (3)
[stdout] PASS: outsb up
[stdout] PASS: outsb down
[stdout] FAIL: incl
[stdout] FAIL: decl
[stdout] FAIL: incb
[stdout] FAIL: decb
[stdout] FAIL: lock incl
[stdout] FAIL: lock decl
[stdout] FAIL: lock incb
[stdout] FAIL: lock decb
[stdout] FAIL: lock negl
[stdout] FAIL: lock notl
[stdout] FAIL: lock negb
[stdout] FAIL: lock notb
[stdout] FAIL: btcl imm8, r/m
[stdout] FAIL: btcl reg, r/m
[stdout] FAIL: btcq reg, r/m
[stdout] PASS: bsfw r/m, reg
[stdout] PASS: bsfl r/m, reg
[stdout] PASS: bsfq r/m, reg
[stdout] FAIL: bsfq r/m, reg
[stdout] PASS: bsrw r/m, reg
[stdout] PASS: bsrl r/m, reg
[stdout] PASS: bsrq r/m, reg
[stdout] FAIL: bsrq r/m, reg
[stdout] PASS: imul ax, mem
[stdout] PASS: imul eax, mem
[stdout] PASS: imul ax, mem, imm8
[stdout] PASS: imul eax, mem, imm8
[stdout] PASS: imul ax, mem, imm
[stdout] PASS: imul eax, mem, imm
[stdout] PASS: imul rax, mem
[stdout] PASS: imul rax, mem, imm8
[stdout] PASS: imul rax, mem, imm
[stdout] PASS: movdqu (read)
[stdout] PASS: movdqu (write)
[stdout] PASS: movaps (read)
[stdout] PASS: movaps (write)
[stdout] PASS: movapd (read)
[stdout] PASS: movapd (write)
[stdout] PASS: movups (read)
[stdout] PASS: movups (write)
[stdout] PASS: movupd (read)
[stdout] PASS: movupd (write)
[stdout] PASS: movups unaligned
[stdout] PASS: movupd unaligned
[stdout] PASS: unaligned movaps exception
[stdout] PASS: movups unaligned crosspage
[stdout] PASS: movups crosspage exception
[stdout] FAIL: shld (cl)
[stdout] FAIL: shrd (cl)
[stdout] PASS: ltr
[stdout] PASS: cross-page mmio read
[stdout] PASS: cross-page mmio write
[stdout] PASS: string_io_mmio
[stdout] SKIP: MOVBE unsupported by CPU
[stdout] PASS: no fep: #DB occurred after MOV SS
[stdout] FAIL: push $imm8
[stdout] FAIL: push %reg
[stdout] FAIL: push mem
[stdout] FAIL: push $imm
[stdout] FAIL: pop mem
[stdout] PASS: pop mem (2)
[stdout] PASS: pop reg
[stdout] PASS: ret
[stdout] PASS: leave
[stdout] FAIL: enter
[stdout] FAIL: xchg reg, r/m (1)
[stdout] FAIL: xchg reg, r/m (2)
[stdout] FAIL: xchg reg, r/m (3)
[stdout] FAIL: xchg reg, r/m (4)
[stdout] FAIL: xadd reg, r/m (1)
[stdout] FAIL: xadd reg, r/m (2)
[stdout] FAIL: xadd reg, r/m (3)
[stdout] FAIL: xadd reg, r/m (4)
[stdout] PASS: mov %cr8
[stdout] PASS: ljmp
[stdout] PASS: divq (fault)
[stdout] PASS: divq (1)
[stdout] PASS: mulb mem
[stdout] PASS: mulw mem
[stdout] PASS: mull mem
[stdout] PASS: mulq mem
[stdout] FAIL: movq (mmx, read)
[stdout] PASS: movq (mmx, write)
[stdout] FAIL: movb $imm, 0(%rip)
[stdout] PASS: Test ret/iret with a nullified segment
[stdout] PASS: mov null, %ss
[stdout] PASS: mov null, %ss (with ss.rpl != cpl)
[stdout] FAIL: cmovnel
[stdout] PASS: push16
[stdout] PASS: jump to non-canonical address
[stdout] SUMMARY: 136 tests, 68 unexpected failures, 2 skipped
[stdout] FAIL emulator (136 tests, 68 unexpected failures, 2 skipped)

#1 lore raw
Quoted 11 lines · Srikanth Aithal

Hello,

On linux-next 20230809 build kvm emulator unittest failed.

===================
Recreation steps:
===================

1. git clone https://gitlab.com/kvm-unit-tests/kvm-unit-tests.git
2. export QEMU=<location of QEMU binary> I used v8.0.2
3. cd kvm-unit-tests/;./configure;make standalone;tests/emulator

What hardware are you running on? I've tested on a variety of hardware, Intel and AMD, and haven't observed any problems.

#2 lore raw
Quoted 9 lines · Sean Christopherson
Quoted 8 lines · Srikanth Aithal

Hello,

On linux-next 20230809 build kvm emulator unittest failed.

===================
Recreation steps:
===================

Quoted 6 lines
Quoted 3 lines

1. git clone https://gitlab.com/kvm-unit-tests/kvm-unit-tests.git
2. export QEMU=<location of QEMU binary> I used v8.0.2
3. cd kvm-unit-tests/;./configure;make standalone;tests/emulator

What hardware are you running on? I've tested on a variety of hardware, Intel and AMD, and haven't observed any problems.

I am running it on Dell PowerEdge r6515. Same tests were passing till next-20230808.

#3 lore raw
Quoted 10 lines · Srikanth Aithal
Quoted 9 lines · Sean Christopherson
Quoted 8 lines · Srikanth Aithal

Hello,

On linux-next 20230809 build kvm emulator unittest failed.

===================
Recreation steps:
===================

Quoted 8 lines
Quoted 6 lines
Quoted 3 lines

1. git clone https://gitlab.com/kvm-unit-tests/kvm-unit-tests.git
2. export QEMU=<location of QEMU binary> I used v8.0.2
3. cd kvm-unit-tests/;./configure;make standalone;tests/emulator

What hardware are you running on? I've tested on a variety of hardware, Intel and AMD, and haven't observed any problems.

I am running it on Dell PowerEdge r6515. Same tests were passing till next-20230808.

Ah, let me try an actual linux-next build (once I get the darn thing to compile). I was assuming I broke something in kvm-x86/next and so was testing that. But I haven't pushed to kvm-x86/next since 08/03, so presumably the bug came in from somewhere else.

Ugh, it's probably one of the recent mitigations. Those things always break stuff due to getting thrown in without going through the usual channels.

<time passes>

*sigh* Yep. Everything is hunky dory until I turn on CONFIG_CPU_SRSO. I'll dig into it today.