kvm_unit_tests: emulator test fails on 4.4 / 4.15 kernel, timeout
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
ubuntu-kernel-tests |
Confirmed
|
Medium
|
Unassigned | ||
linux (Ubuntu) |
Fix Released
|
Medium
|
Unassigned | ||
Xenial |
Confirmed
|
Undecided
|
Unassigned | ||
Bionic |
Fix Released
|
Medium
|
Po-Hsu Lin |
Bug Description
[Impact]
Our Bionic 4.15 kernel lacks of movups/movupd emulation support.
With the following commit added into the emulator test in
ubuntu_
commit 8726f9771911d67
Author: Jacob Xu <email address hidden>
Date: Wed Apr 21 16:12:57 2021 -0700
x86: add movups/movupd sse testcases to emulator.c
Here we add movups/movupd tests corresponding to functionality
introduced in commit 29916968c486 ("kvm: Add emulation for movups/movupd").
Signed-
Message-Id: <email address hidden>
Signed-
It will cause the emulator test in ubuntu_
...
PASS: movdqu (read)
PASS: movdqu (write)
PASS: movaps (read)
PASS: movaps (write)
PASS: movapd (read)
PASS: movapd (write)
KVM internal error. Suberror: 1
emulation failure
RAX=000000000
RSI=000000000
R8 =000000000000000a R9 =00000000000003f8 R10=00000000000
R12=fffffffff
RIP=000000000
ES =0010 0000000000000000 ffffffff 00c09300 DPL=0 DS [-WA]
CS =0008 0000000000000000 ffffffff 00a09b00 DPL=0 CS64 [-RA]
SS =0010 0000000000000000 ffffffff 00c09300 DPL=0 DS [-WA]
DS =0010 0000000000000000 ffffffff 00c09300 DPL=0 DS [-WA]
FS =0010 0000000000000000 ffffffff 00c09300 DPL=0 DS [-WA]
GS =0010 000000000051a510 ffffffff 00c09300 DPL=0 DS [-WA]
LDT=0000 0000000000000000 0000ffff 00008200 DPL=0 LDT
TR =0080 000000000041207a 0000ffff 00008b00 DPL=0 TSS64-busy
GDT= 000000000041100a 0000106f
IDT= 0000000000410000 00000fff
CR0=80010011 CR2=00000000000
DR0=000000000
DR6=00000000f
EFER=
Code=00 c7 45 e8 03 00 00 00 c7 45 ec 04 00 00 00 66 0f 6f 45 e0 <0f> 11 03 48 89 de 48 8d 7d e0 e8 e5 f9 ff ff 0f b6 f8 be a1 8f 41 00 b8 00 00 00 00 e8 07
qemu-
FAIL emulator (timeout; duration=90s)
[Fix]
* 29916968c48691 kvm: Add emulation for movups/movupd
This patch can be cherry-picked into Bionic.
It can fix our test failure plus, as mentioned in the commit message,
emulation failures with openbsd as guest and with Windows 10 with
intel HD graphics pass through.
[Test]
Test kernel can be found here:
https:/
Run the emulator test from ubuntu_
applied it will pass without any issue:
...
PASS: movdqu (read)
PASS: movdqu (write)
PASS: movaps (read)
PASS: movaps (write)
PASS: movapd (read)
PASS: movapd (write)
PASS: movups (read)
PASS: movups (write)
PASS: movupd (read)
PASS: movupd (write)
PASS: movups unaligned
PASS: movupd unaligned
PASS: unaligned movaps exception
PASS: movups unaligned crosspage
PASS: movups crosspage exception
PASS: movq (mmx, read)
PASS: movq (mmx, write)
PASS: movb $imm, 0(%rip)
PASS: shld (cl)
PASS: shrd (cl)
PASS: mov null, %ss
PASS: mov null, %ss (with ss.rpl != cpl)
PASS: Test ret/iret with a nullified segment
PASS: ltr
PASS: cmovnel
SKIP: skipping register-only tests, use kvm.force_
PASS: push16
PASS: cross-page mmio read
PASS: cross-page mmio write
PASS: string_io_mmio
PASS: jump to non-canonical address
SKIP: illegal movbe
SUMMARY: 135 tests, 2 skipped
PASS emulator (135 tests, 2 skipped)
[Where problems could occur]
I didn't see any other patch that claims to be a fix of this one in
the upstream tree. The problem I think of for the moment is that we
might see other failures when using this in the future.
[Original Bug Report]
Found this on B/KVM, current cycle (sru-20210531):
18:27:11 DEBUG| [stdout] PASS: movapd (write)^M
18:27:11 DEBUG| [stderr] KVM internal error. Suberror: 1
18:27:11 DEBUG| [stderr] emulation failure
18:27:11 DEBUG| [stderr] RAX=00000000000
18:27:11 DEBUG| [stderr] RSI=00000000004
18:27:11 DEBUG| [stderr] R8 =000000000000000a R9 =00000000000003f8 R10=00000000000
18:27:11 DEBUG| [stderr] R12=fffffffffff
18:27:11 DEBUG| [stderr] RIP=00000000004
18:27:11 DEBUG| [stderr] ES =0010 0000000000000000 ffffffff 00c09300 DPL=0 DS [-WA]
18:27:11 DEBUG| [stderr] CS =0008 0000000000000000 ffffffff 00a09b00 DPL=0 CS64 [-RA]
18:27:11 DEBUG| [stderr] SS =0010 0000000000000000 ffffffff 00c09300 DPL=0 DS [-WA]
18:27:11 DEBUG| [stderr] DS =0010 0000000000000000 ffffffff 00c09300 DPL=0 DS [-WA]
18:27:11 DEBUG| [stderr] FS =0010 0000000000000000 ffffffff 00c09300 DPL=0 DS [-WA]
18:27:11 DEBUG| [stderr] GS =0010 000000000051a4d0 ffffffff 00c09300 DPL=0 DS [-WA]
18:27:11 DEBUG| [stderr] LDT=0000 0000000000000000 0000ffff 00008200 DPL=0 LDT
18:27:11 DEBUG| [stderr] TR =0080 000000000041207a 0000ffff 00008b00 DPL=0 TSS64-busy
18:27:11 DEBUG| [stderr] GDT= 000000000041100a 0000106f
18:27:11 DEBUG| [stderr] IDT= 0000000000410000 00000fff
18:27:11 DEBUG| [stderr] CR0=80010011 CR2=00000000000
18:27:11 DEBUG| [stderr] DR0=00000000000
18:27:11 DEBUG| [stderr] DR6=00000000fff
18:27:11 DEBUG| [stderr] EFER=0000000000
18:27:11 DEBUG| [stderr] Code=00 c7 45 e8 03 00 00 00 c7 45 ec 04 00 00 00 66 0f 6f 45 e0 <0f> 11 03 48 89 de 48 8d 7d e0 e8 f8 f9 ff ff 0f b6 f8 be a1 8f 41 00 b8 00 00 00 00 e8 05
18:28:40 DEBUG| [stderr] qemu-system-x86_64: terminating on signal 15 from pid 13634 (timeout)
18:28:40 DEBUG| [stdout] FAIL emulator (timeout; duration=90s)
[...]
TestError: Test failed for emulator
18:28:40 ERROR| child process failed
18:28:40 DEBUG| Traceback (most recent call last):
18:28:40 DEBUG| File "/home/
18:28:40 DEBUG| l()
18:28:40 DEBUG| File "/home/
18:28:40 DEBUG| l = lambda: test.runtest(self, url, tag, args, dargs)
18:28:40 DEBUG| File "/home/
18:28:40 DEBUG| job.sysinfo.
18:28:40 DEBUG| File "/home/
18:28:40 DEBUG| mytest._exec(args, dargs)
18:28:40 DEBUG| File "/home/
18:28:40 DEBUG| _call_test_
18:28:40 DEBUG| File "/home/
18:28:40 DEBUG| return func(*args, **dargs)
18:28:40 DEBUG| File "/home/
18:28:40 DEBUG| postprocess_
18:28:40 DEBUG| File "/home/
18:28:40 DEBUG| self.run_
18:28:40 DEBUG| File "/home/
18:28:40 DEBUG| raise error.TestError
18:28:40 DEBUG| TestError: Test failed for emulator
18:28:41 INFO | ERROR ubuntu_
18:28:41 INFO | END ERROR ubuntu_
Changed in linux-kvm (Ubuntu): | |
status: | New → Confirmed |
Changed in linux-kvm (Ubuntu Bionic): | |
status: | New → Confirmed |
Changed in linux-kvm (Ubuntu): | |
importance: | Undecided → Medium |
Changed in linux-kvm (Ubuntu Bionic): | |
importance: | Undecided → Medium |
assignee: | nobody → Guilherme G. Piccoli (gpiccoli) |
Changed in linux-kvm (Ubuntu): | |
assignee: | nobody → Guilherme G. Piccoli (gpiccoli) |
tags: | added: hinted |
Changed in ubuntu-kernel-tests: | |
assignee: | Guilherme G. Piccoli (gpiccoli) → nobody |
Changed in linux-kvm (Ubuntu Bionic): | |
assignee: | Guilherme G. Piccoli (gpiccoli) → nobody |
Changed in linux-kvm (Ubuntu): | |
assignee: | Guilherme G. Piccoli (gpiccoli) → nobody |
affects: | linux-kvm (Ubuntu) → linux (Ubuntu) |
Changed in ubuntu-kernel-tests: | |
assignee: | nobody → Po-Hsu Lin (cypressyew) |
Changed in linux (Ubuntu Bionic): | |
assignee: | nobody → Po-Hsu Lin (cypressyew) |
Changed in ubuntu-kernel-tests: | |
status: | Confirmed → In Progress |
Changed in linux (Ubuntu Bionic): | |
status: | Confirmed → In Progress |
description: | updated |
Changed in linux (Ubuntu): | |
status: | Confirmed → Fix Released |
description: | updated |
description: | updated |
description: | updated |
description: | updated |
description: | updated |
description: | updated |
description: | updated |
summary: |
- kvm_unit_tests: emulator test fails on 4.15 kernel, timeout + kvm_unit_tests: emulator test fails on 4.4 / 4.15 kernel, timeout |
Changed in linux (Ubuntu Bionic): | |
status: | In Progress → Fix Committed |
While debugging this please use hirsute-WIP branch in our own kvm-unit-tests (don't use disco branch)
Thanks!