Skip to contentSkip to conversation

gfx card passthrough broken with latest head

DISCUSSION André Weidemann 2 participants 3 messages Aug 13, 2011 – Aug 23, 2011 KVM

lore
Share & tools
lore
#0 lore raw

Hi,
I pulled latest git yesterday and noticed that graphics card pass through does not work anymore. The VM hangs (probably when initializing the gfx card) when passing a graphics card to the VM.

I started to do a git bisect but device assignment does not work at all when doing it.

I started like this:

cd /usr/local/src
git clone git://git.kernel.org/pub/scm/virt/kvm/qemu-kvm.git qemu-kvm-2011-08-12 cd qemu-kvm-2011-08-12
git bisect start
git bisect good fda19064e889d4419dd3dc69ca8e6e7a1535fdf5
git bisect bad 44755ea36fee3f0b1093ef27404def8857602274

Bisecting: 229 revisions left to test after this [55c0975c5b358e948b9ae7bd7b07eff92508e756] Do constant folding for shift operations.

./configure --audio-drv-list=alsa --target-list=x86_64-softmmu --enable-kvm-device-assignment

ERROR: unknown option --enable-kvm-device-assignment

What am I doing wrong?

Regards
André

#1 lore raw

Hi,

Quoted 22 lines · André Weidemann

Hi,
I pulled latest git yesterday and noticed that graphics card pass through does not work anymore. The VM hangs (probably when initializing the gfx card) when passing a graphics card to the VM.

I started to do a git bisect but device assignment does not work at all when doing it.

I started like this:

cd /usr/local/src
git clone git://git.kernel.org/pub/scm/virt/kvm/qemu-kvm.git
qemu-kvm-2011-08-12
cd qemu-kvm-2011-08-12
git bisect start
git bisect good fda19064e889d4419dd3dc69ca8e6e7a1535fdf5 git bisect bad 44755ea36fee3f0b1093ef27404def8857602274

Bisecting: 229 revisions left to test after this [55c0975c5b358e948b9ae7bd7b07eff92508e756] Do constant folding for shift operations.

Quoted 6 lines

./configure --audio-drv-list=alsa --target-list=x86_64-softmmu --enable-kvm-device-assignment

ERROR: unknown option --enable-kvm-device-assignment

What am I doing wrong?

I continued with "git bisect bad" from this point on, but up to where I started, no revision supported device assignment.

I then did a "git bisect reset" and started over again. Now I continued with a few "git bisect good" until a revision came up that supported device assignment, but then after compiling and running qemu-system-x86_64, it exited with a segmentation fault. I continued with "git bisect good" until the end but all revision supporting device assignment existed with a segmentation fault.

How come so many revision do not support device assignment? Is there a trick to enable it?

Any help in this matter is greatly appreciated.

Regards
André

#2 lore raw

* André Weidemann ([email protected]) wrote:
<snip>

Quoted 1 line
Quoted 1 line

git clone git://git.kernel.org/pub/scm/virt/kvm/qemu-kvm.git

<snip>

Quoted 4 lines
Quoted 4 lines

./configure --audio-drv-list=alsa --target-list=x86_64-softmmu --enable-kvm-device-assignment

ERROR: unknown option --enable-kvm-device-assignment

<snip>

Quoted 2 lines

How come so many revision do not support device assignment? Is there a trick to enable it?

Bisection qemu-kvm userspace is tricky. The upstream qemu repo
(git://git.qemu.org/qemu.git) does not have PCI device assignment support. The qemu-kvm repo does regular merges w/ the upstream qemu repo. As you bisect through the qemu-kvm repo history, you are likely to land on a commit that is from upstream (meaning a tree w/out downstream qemu-kvm additions, like device assignment).

Depending on where you suspect the issue is coming from, you can be careful to bisect only through the qemu-kvm tree (by skipping back to a merge point), or you can remerge the qemu-kvm tree to the qemu tree when you bisect into the qemu tree.

Note...gfx assignment has many issues associated w/ it and often does not work. You can check out Allen Kay's presentation at the recent KVM Forum for some examples: http://goo.gl/Hyk13

thanks,
-chris