VMs running under qemu+kvm can't use xsaves processor feature
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
linux (Ubuntu) |
Confirmed
|
Undecided
|
Unassigned | ||
qemu (Ubuntu) |
Invalid
|
Undecided
|
Unassigned |
Bug Description
Virtual machines running under qemu using KVM acceleration run with `-cpu host` can't use the xsaves feature of the processor. An example guest dmesg log is attached, see errors about "unchecked MSR access error". Using a `-cpu` model that doesn't advertise xsaves such as `EPYC` fixes the problem on the guest. The host cpu does support xsaves and Ubuntu doesn't seem to have any issues with it.
The guest dmesg provided is running linux mainline 5.15, but the issue happens with every kernel version I've tried, including centos on 4.18.0.
The host cpu is a Ryzen 5 3600
nested guests have trouble running in a guest with `-cpu host` or even `-cpu EPYC`. They tend to run, but freeze before they finish booting at random times. Not sure if it's related. Nested guests do seem to be able to run with `-cpu kvm64`. There are no dmesg errors when a nested guest freezes.
The Ubuntu host version:
Description: Ubuntu 20.04.3 LTS
Release: 20.04
# apt-cache policy qemu-system-x86
qemu-system-x86:
Installed: 1:4.2-3ubuntu6.18
Candidate: 1:4.2-3ubuntu6.18
Version table:
*** 1:4.2-3ubuntu6.18 500
500 http://
100 /var/lib/
1:
500 http://
1:4.2-3ubuntu6 500
500 http://
ProblemType: Bug
DistroRelease: Ubuntu 20.04
Package: qemu (not installed)
ProcVersionSign
Uname: Linux 5.4.0-89-generic x86_64
NonfreeKernelMo
ApportVersion: 2.20.11-
Architecture: amd64
CasperMD5CheckR
Date: Fri Nov 12 00:19:10 2021
InstallationDate: Installed on 2021-10-20 (22 days ago)
InstallationMedia: Ubuntu-Server 20.04.3 LTS "Focal Fossa" - Release amd64 (20210824)
MachineType: System manufacturer System Product Name
ProcEnviron:
SHELL=/bin/bash
LANG=en_US.UTF-8
TERM=screen-
XDG_RUNTIME_
PATH=(custom, no user)
ProcKernelCmdLine: BOOT_IMAGE=
SourcePackage: qemu
UpgradeStatus: No upgrade log present (probably fresh install)
dmi.bios.date: 06/15/2021
dmi.bios.vendor: American Megatrends Inc.
dmi.bios.version: 4002
dmi.board.
dmi.board.name: PRIME X570-P
dmi.board.vendor: ASUSTeK COMPUTER INC.
dmi.board.version: Rev X.0x
dmi.chassis.
dmi.chassis.type: 3
dmi.chassis.vendor: Default string
dmi.chassis.
dmi.modalias: dmi:bvnAmerican
dmi.product.family: To be filled by O.E.M.
dmi.product.name: System Product Name
dmi.product.sku: SKU
dmi.product.
dmi.sys.vendor: System manufacturer
I upgraded to 21.04 to see if it's fixed there, and it is. So this may just need to be closed considering the imminent retiring of 20.04