QEMU might fail to start on AMD CPUs when 'host-passthrough' is used
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
qemu (Ubuntu) |
Fix Released
|
Undecided
|
Rafael David Tinoco | ||
Xenial |
Fix Released
|
Undecided
|
Rafael David Tinoco |
Bug Description
[Impact]
* QEMU does not work in some AMD hardware when using host-passthrough as cpu-mode (usually to allow nested KVM to work).
[Test Case]
* to use Xenial qemu (1:2.5+
* to use the following XML file: https:/
* to have AMD FX(tm)-8350 Eight-Core Processor CPU or similar
[Regression Potential]
* initial qemu code could be affected, disallowing other guests, in other architectures, to be started
* suggested patch is simple, being a positional change only
* patch is upstream based and identifies the issue and is reported to be a fix for the described issue
[Other Info]
* INITIAL CASE DESCRIPTION:
When using latest QEMU (-proposed) in Xenial you might encounter the following problem when trying to initialize your guests:
----
(c)inaddy@
qemu-system-x86:
Installed: 1:2.5+dfsg-
Candidate: 1:2.5+dfsg-
Version table:
*** 1:2.5+dfsg-
500 http://
100 /var/lib/
1:
500 http://
1:
500 http://
----
(c)inaddy@
Id Name State
-------
- kdebian shut off
- kguest shut off
(c)inaddy@
error: Failed to start domain kguest
error: internal error: process exited while connecting to monitor: warning: host doesn't support requested feature: CPUID.80000001H:EDX [bit 0]
warning: host doesn't support requested feature: CPUID.80000001H:EDX [bit 1]
warning: host doesn't support requested feature: CPUID.80000001H:EDX [bit 2]
warning: host doesn't support requested feature: CPUID.80000001H:EDX [bit 3]
warning: host doesn't support requested feature: CPUID.80000001H:EDX [bit 4]
warning: host doesn't support requested feature: CPUID.80000001H:EDX [bit 5]
warning: host doesn't support requested feature: CPUID.80000001H:EDX [bit 6]
warning: host doesn't support requested feature: CPUID.80000001H:EDX [bit 7]
warning: host doesn't support requested feature: CPUID.80000001H:EDX [bit 8]
warning: host doesn't support requested feature: CPUID.80000001H:EDX [bit 9]
warning: host doesn't support requested feature: CPUID.80000001H:EDX [bit 12]
warning: host doesn't support requested feature: CPUID.80000001H:EDX [bit 13]
warning: host doesn't support requested feature: CPU
----
This happens because x86_cpu_
Cherry-picking commit and re-building the package makes it to work:
----
(c)inaddy@
Domain kguest started
Connected to domain kguest
Escape character is ^]
[ 0.000000] Linux version 4.19.0-4-amd64 (<email address hidden>) (gcc version 8.3.0 (Debian 8.3.0-2)) #1
SMP Debian 4.19.28-2 (2019-03-15)
[ 0.000000] Command line: root=/dev/vda noresume console=tty0 console=
[ 0.000000] random: get_random_u32 called from bsp_init_
[ 0.000000] x86/fpu: Supporting XSAVE feature 0x001: 'x87 floating point registers'
[ 0.000000] x86/fpu: Supporting XSAVE feature 0x002: 'SSE registers'
[ 0.000000] x86/fpu: Supporting XSAVE feature 0x004: 'AVX registers'
[ 0.000000] x86/fpu: xstate_offset[2]: 576, xstate_sizes[2]: 256
[ 0.000000] x86/fpu: Enabled xstate features 0x7, context size is 832 bytes, using 'standard' format.
...
Related branches
- Rafael David Tinoco (community): Approve (tested package and reviewed code.)
- Dan Streetman (community): Approve
- Canonical Server: Pending requested
- Christian Ehrhardt : Pending requested
- git-ubuntu developers: Pending requested
-
Diff: 137 lines (+104/-2)4 files modifieddebian/changelog (+16/-0)
debian/patches/lp1823458/lp1829380.patch (+20/-0)
debian/patches/lp1828288/target-i386-Set-AMD-alias-bits-after-filtering-CPUID.patch (+64/-0)
debian/patches/series (+4/-2)
Changed in qemu (Ubuntu): | |
assignee: | nobody → Rafael David Tinoco (inaddy) |
status: | New → Incomplete |
status: | Incomplete → In Progress |
description: | updated |
description: | updated |
Changed in qemu (Ubuntu Xenial): | |
status: | New → In Progress |
Changed in qemu (Ubuntu): | |
status: | In Progress → Fix Released |
Changed in qemu (Ubuntu Xenial): | |
assignee: | nobody → Rafael David Tinoco (rafaeldtinoco) |
Upstream discussion regarding the topic can be found here:
http:// lists.nongnu. org/archive/ html/qemu- devel/2016- 04/msg02597. html
And it is well documented in the .patch inside debdiff.
Thank you for considering this fix.
Best,
Rafael