kvm hardware error 0xffffffff with vfio-pci VGA passthrough
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
qemu (Ubuntu) |
Expired
|
Undecided
|
Unassigned |
Bug Description
Hi,
Using smp 2 and cores=2 causes "KVM: entry failed, hardware error 0xffffffff". When this error occurs, qemu-monitor shows the guest has stopped. The error did not occur immediately, but at the point that the boot, running from an attached Ubuntu 14.04.1 iso, switched to graphical mode after text-mode startup, or after starting the Ubuntu guest install.
The root-cause was verified by changing smp to 1 and cores=1 which results in the guest working ok. Tested upto installing Ubuntu 14.04.1 and updating without any proprietary drivers.
The boot was from an Ubuntu iso, with the intention of installing an ubuntu guest on the attached ide-hd device. The guest was using a vfio-pci passthrough GPU connected to an external UHD monitor.
The commands used to create the disk images:
qemu-img create -f qcow2 /media/
qemu-img create -f raw /media/
The script vm1 was used to launch the guests with "sudo ./vm1", with the only difference between launches being the smp and cores settings. With smp 2 and cores=2 this resulted in the terminal below. The corresponding dmesg snippets are attached. There were two dmesg entries each time the error occurred.
The same problem occurred when using the latest packages from the ppa:jacob/
-------
Linux v2min 3.18.9-
/var/log/
Libvirt versions are these:
v2min@v2min:
ii libvirt-bin 1.2.2-0ubuntu13.1.9 amd64 programs for the libvirt library
rc libvirt-glib-1.0-0 0.1.6-1ubuntu2 amd64 libvirt glib mainloop integration
ii libvirt0 1.2.2-0ubuntu13.1.9 amd64 library for interfacing with different virtualization systems
ii python-libvirt 1.2.2-0ubuntu2 amd64 libvirt Python bindings
v2min@v2min:
ii ipxe-qemu 1.0.0+git-
ii qemu-keymaps 2.0.0+dfsg-
ii qemu-kvm 2.0.0+dfsg-
ii qemu-system-common 2.0.0+dfsg-
ii qemu-system-x86 2.0.0+dfsg-
ii qemu-utils 2.0.0+dfsg-
Passthrough GPU: Zotac GT 730 2GB.
Processor: AMD A10-5800K APU
Primary GPU: Radeon R9-290X
-------
#!/bin/bash
configfile=
vfiobind() {
dev="$1"
if [ -e /sys/bus/
fi
echo $vendor $device > /sys/bus/
}
modprobe vfio-pci
cat $configfile | while read line;do
echo $line | grep ^# >/dev/null 2>&1 && continue
vfiobind $line
done
sudo qemu-system-x86_64 -enable-kvm -M q35 -m 4096 -cpu host \
-smp 2,sockets=
-bios /usr/share/
-usb -device usb-host,
-device ioh3420,
-device vfio-pci,
-device vfio-pci,
-drive file=/media/
-drive file=/media/
-boot menu=on \
-boot d
exit 0
-------
v2min@v2min:~$ sudo ./vm1
[sudo] password for v2min:
KVM: entry failed, hardware error 0xffffffff
RAX=00000000000
RSI=00000000000
R8 =ffffffff81eaf3e0 R9 =000000000000ffff R10=00000000000
R12=ffff8801795
RIP=ffffffff810
ES =0000 0000000000000000 ffffffff 00800000
CS =0010 0000000000000000 ffffffff 00a09b00 DPL=0 CS64 [-RA]
SS =0018 0000000000000000 ffffffff 00c09300 DPL=0 DS [-WA]
DS =0000 0000000000000000 ffffffff 00800000
FS =0000 00007f51d8a96880 ffffffff 00800000
GS =0000 ffff88017fd00000 ffffffff 00800000
LDT=0000 0000000000000000 0000ffff 00000000
TR =0040 ffff88017fd11900 00002087 00008b00 DPL=0 TSS64-busy
GDT= ffff88017fd0a000 0000007f
IDT= ffffffffff576000 00000fff
CR0=8005003b CR2=00007f51d8a
DR0=00000000000
DR6=00000000fff
EFER=0000000000
Code=00 01 48 c7 c0 6a b0 00 00 31 db 0f b7 0c 01 b8 05 00 00 00 <0f> 01 c1 0f 1f 44 00 00 5b 41 5c 41 5d 41 5e 5d c3 89 f0 31 c9 f0 0f b0 0d 9b 06 e6 00 40
v2min@v2min:~$ sudo ./vm1
KVM: entry failed, hardware error 0xffffffff
RAX=00000000000
RSI=00000000000
R8 =ffffffff81eaf3e0 R9 =0000000000000000 R10=ffff88017b0
R12=ffff8801795
RIP=ffffffff810
ES =0000 0000000000000000 ffffffff 00800000
CS =0010 0000000000000000 ffffffff 00a09b00 DPL=0 CS64 [-RA]
SS =0018 0000000000000000 ffffffff 00c09300 DPL=0 DS [-WA]
DS =0000 0000000000000000 ffffffff 00800000
FS =0000 00007f49153a6740 ffffffff 00800000
GS =0000 ffff88017fd00000 ffffffff 00800000
LDT=0000 0000000000000000 0000ffff 00000000
TR =0040 ffff88017fd11900 00002087 00008b00 DPL=0 TSS64-busy
GDT= ffff88017fd0a000 0000007f
IDT= ffffffffff576000 00000fff
CR0=8005003b CR2=00007f4914e
DR0=00000000000
DR6=00000000fff
EFER=0000000000
Code=00 01 48 c7 c0 6a b0 00 00 31 db 0f b7 0c 01 b8 05 00 00 00 <0f> 01 c1 0f 1f 44 00 00 5b 41 5c 41 5d 41 5e 5d c3 89 f0 31 c9 f0 0f b0 0d 9b 06 e6 00 40
tags: | removed: gpu hardware kvm passthrough vfio-pci |
description: | updated |
summary: |
- qcow2 causing kvm hardware error 0xffffffff with vfio-pci VGA - passthrough + kvm hardware error 0xffffffff with vfio-pci VGA passthrough |
Changed in qemu: | |
assignee: | nobody → v2min (straussbd-lp) |
information type: | Public → Private |
Changed in qemu: | |
status: | New → Invalid |
affects: | qemu → qemu (Ubuntu) |
Your kernel is tainted with virtual box drivers, which are potentially incompatible with KVM. Remove and try again.