qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] VFIO-VGA Issue
@ 2013-04-09 12:22 deniv
  2013-04-09 17:18 ` Alex Williamson
  0 siblings, 1 reply; 22+ messages in thread
From: deniv @ 2013-04-09 12:22 UTC (permalink / raw)
  To: qemu-devel

Hi!

I've tried passing through my ASUS Radeon HD7750, but qemu just hogs 100%
of one core and stops. Since the display didn't light up, I couldn't see
how far Win 7 boot went. For a Linux guest I tried redirecting kernel
messages to serial console, but there was nothing (qemu stops even before
kernel start?).

Also, this GPU is kinda troublesome: it doesn't work with the proprietary
driver if VT-d is enabled in BIOS (boot process stops with "dmar: DRHD:
handling fault status reg 3"). The GPU works with the FOSS driver, though.
Could this somehow be related to the passthrough issue?

Anyway, VT-d in pci-assign mode works for network adapters on this host.
It runs kernel 3.9.0-rc5 (with vfio-vga enabled), qemu git from yesterday,
and seabios 1.7.2. The host has no driver installed for the GPU. Before
assiging it to qemu I'd run "echo '1002 683f' >
/sys/bus/pci/drivers/vfio-pci/new_id" and the same for the associated HDMI
device. Command line:
qemu-kvm -machine q35,accel=kvm \
	 -cpu host -smp 4 -m 2G \
	 -vga none -display none \
	 -kernel /kvm/kernel-3.7.8 -append 'root=/dev/vda console=ttyS0' \
	 -drive
index=0,media=disk,cache=none,if=virtio,aio=native,file=/dev/vg3/gpu \
	 -device vfio-pci,host=01:00.0,x-vga=on \
	 -device vfio-pci,host=01:00.1 \
	 -serial telnet:127.0.0.1:52990,server

^ permalink raw reply	[flat|nested] 22+ messages in thread
* Re: [Qemu-devel] VFIO-VGA Issue
@ 2013-05-16 20:46 Maik Broemme
  2013-05-17 10:23 ` Paolo Bonzini
  0 siblings, 1 reply; 22+ messages in thread
From: Maik Broemme @ 2013-05-16 20:46 UTC (permalink / raw)
  To: Alex Williamson; +Cc: qemu-devel

Hi Alex,

> >  and what's the problem with q35/pc + vfio-pci (no
> > x-vga). If vfio-pci is the direct replacement for pci-assign it must be a
> > bug in vfio, huh?
>
> It's either a bug in vfio or the above configuration issue with the
> pcieport.  I'd appreciate if you could advise how you're configuring the
> group for use.  Thanks,

I would like to continue the discussion because I have exactly the same
issue now with kernel 3.9.2 and CONFIG_VFIO_PCI_VGA enabled. The used
qemu version is latest git from today. The configuration which works is
my old one without x-vga=on and with -M pc. The used VGA device (ATI
Radeon 7870) is the following:

02:00.0 VGA compatible controller: Advanced Micro Devices [AMD] nee ATI Pitcairn [Radeon HD 7800]
02:00.1 Audio device: Advanced Micro Devices [AMD] nee ATI Cape Verde/Pitcairn HDMI Audio [Radeon HD 7700/7800 Series]

I've created already a fresh install of Windows 7 (x64) and the result is
the following:

1) machine: q35 / kvm: yes / vga: none   / x-vga: on  = qemu freeze
2) machine: q35 / kvm: no  / vga: none   / x-vga: on  = qemu freeze (with errors below)
3) machine: q35 / kvm: yes / vga: none   / x-vga: off = qemu runs with 100% CPU due to no VGA init (no picture)
4) machine: q35 / kvm: yes / vga: cirrus / x-vga: off = qemu runs with BOSD on loading atikmpag.sys
5) machine: pc  / kvm: yes / vga: cirrus / x-vga: off = qemu runs fine

Regarding 2) it results in 100 messages like the following on the console
which runs qemu:

qemu-system-x86_64: vfio_vga_read(,0x3c3, 1) failed: Interrupted system call
qemu-system-x86_64: vfio_vga_read(,0x3c3, 1) failed: Interrupted system call
qemu-system-x86_64: vfio_vga_read(,0x3c3, 1) failed: Interrupted system call

Also the kernel produces some debug messages:

[ 4353.280592] WARNING: at lib/list_debug.c:36 __list_add+0x9c/0xd0()
[ 4353.280595] Hardware name: GA-990FXA-UD3
[ 4353.280598] list_add double add: new=ffff8803c53ede08, prev=ffffffff81ca3d58, next=ffff8803c53ede08.
[ 4353.280600] Modules linked in: vhost_net macvtap macvlan tun arc4 md4 nls_utf8 cifs dns_resolver fscache vfio_iommu_type1 vfio_pci vfio bridge stp llc ip6table_filter ip6_tables it87 hwmon_vid snd_hda_codec_hdmi nvidia(POF) snd_hda_codec_realtek acpi_cpufreq mperf kvm_amd snd_hda_intel kvm crc32_pclmul crc32c_intel snd_hda_codec snd_hwdep snd_seq ghash_clmulni_intel snd_seq_device snd_pcm microcode k10temp edac_core fam15h_power edac_mce_amd r8169 sp5100_tco mii i2c_piix4 snd_page_alloc snd_timer i2c_core snd soundcore firewire_ohci mxm_wmi firewire_core crc_itu_t wmi
[ 4353.280652] Pid: 9762, comm: qemu-system-x86 Tainted: PF       W  O 3.9.2-200.fc18.x86_64 #1
[ 4353.280654] Call Trace:
[ 4353.280661]  [<ffffffff8105f105>] warn_slowpath_common+0x75/0xa0
[ 4353.280667]  [<ffffffff8105f1e6>] warn_slowpath_fmt+0x46/0x50
[ 4353.280673]  [<ffffffff81316c0c>] __list_add+0x9c/0xd0
[ 4353.280678]  [<ffffffff810838fc>] add_wait_queue+0x3c/0x60
[ 4353.280685]  [<ffffffff813f20ed>] vga_get+0xdd/0x190
[ 4353.280690]  [<ffffffff81093e10>] ? try_to_wake_up+0x2d0/0x2d0
[ 4353.280698]  [<ffffffffa015b625>] vfio_pci_vga_rw+0xb5/0x230 [vfio_pci]
[ 4353.280704]  [<ffffffff8109780f>] ? __dequeue_entity+0x2f/0x50
[ 4353.280711]  [<ffffffffa0159279>] vfio_pci_rw+0x39/0x80 [vfio_pci]
[ 4353.280717]  [<ffffffffa015930c>] vfio_pci_read+0x1c/0x20 [vfio_pci]
[ 4353.280723]  [<ffffffffa011a0e3>] vfio_device_fops_read+0x23/0x30 [vfio]
[ 4353.280729]  [<ffffffff8119fed9>] vfs_read+0xa9/0x180
[ 4353.280734]  [<ffffffff811a02da>] sys_pread64+0x9a/0xb0
[ 4353.280740]  [<ffffffff81669a59>] system_call_fastpath+0x16/0x1b
[ 4353.280744] ---[ end trace 76b9d690c5d28216 ]---

So the only configuration which works so far is the old VFIO one without
the new patches for VGA passthrough using the following command line:

qemu-system-x86 \
	-machine pc \
	-cpu host \
	-smp cores=4,threads=1,sockets=1 \
	-m 8192 \
	-enable-kvm \
	-nodefaults \
	-vga none \
	-drive file=/dev/vg1/vm1,id=drive0,if=none,cache=none,aio=threads \
	-drive file=/dev/vg2/vm1,id=drive1,if=none,cache=none,aio=threads \
	-device virtio-blk-pci,drive=drive0,ioeventfd=on \
	-device virtio-blk-pci,drive=drive1,ioeventfd=on \
	-device vfio-pci,host=02:00.0,multifunction=on \
	-device vfio-pci,host=02:00.1 \

--Maik

^ permalink raw reply	[flat|nested] 22+ messages in thread

end of thread, other threads:[~2013-05-20  3:10 UTC | newest]

Thread overview: 22+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-04-09 12:22 [Qemu-devel] VFIO-VGA Issue deniv
2013-04-09 17:18 ` Alex Williamson
2013-04-09 22:17   ` Alex Williamson
2013-04-10  9:01     ` Gleb Natapov
2013-04-10 15:20       ` Alex Williamson
2013-04-10 15:22         ` Gleb Natapov
2013-04-10 17:36         ` Paolo Bonzini
2013-04-09 22:33   ` deniv
2013-04-09 22:53     ` Alex Williamson
2013-04-10  0:02       ` deniv
2013-04-10 15:37         ` Alex Williamson
2013-04-10 17:11           ` deniv
2013-04-10 18:30             ` Alex Williamson
2013-04-10 20:32               ` deniv
2013-04-10 20:42                 ` Alex Williamson
2013-04-11 17:59                   ` deniv
2013-04-15 18:48                     ` Alex Williamson
2013-04-25 18:15                       ` deniv
     [not found]                       ` <517915C5.3020309@lavabit.com>
     [not found]                         ` <1366915789.2918.794.camel@bling.home>
2013-04-26 12:02                           ` deniv
  -- strict thread matches above, loose matches on Subject: below --
2013-05-16 20:46 Maik Broemme
2013-05-17 10:23 ` Paolo Bonzini
2013-05-20  3:10   ` Alex Williamson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).