qemu-discuss
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-discuss] qemu and vhost-user-gpu


From: Marc-André Lureau
Subject: Re: [Qemu-discuss] qemu and vhost-user-gpu
Date: Tue, 11 Jun 2019 01:29:01 +0200

Hi

On Fri, Jun 7, 2019 at 5:39 PM Gert Wollny <address@hidden> wrote:
>
> Hello all,
>
> now that the vhost-user-gpu patches landed I wanted to try it out but I
> got an error message:
>
> "qemu-system-x86_64: -object vhost-user-
> backend,id=vug,cmd=/opt/local/libexec/vhost-user-gpu: object type
> 'vhost-user-backend' isn't supported by object-add"
>
> The full command line to run qemu is given below, the chunk for vhost-
> user-gpu is taken directly from the commit message (only the command
> changed to point to the actual executable, but that doesn't seem to
> make a difference)
>
> >>>
> VHOST_GPU=/opt/local/libexec/vhost-user-gpu
>
> /opt/local/bin/qemu-system-x86_64 -enable-kvm \
>    -smp 5 -M q35 -m 8G \
>    -drive format=raw,file=ubuntu-19.04.raw,if=virtio
>    -net nic,model=virtio -net user,hostfwd=tcp::2222-:22 \
>    -soundhw hda
>    -object vhost-user-backend,id=vug,cmd=$VHOST_GPU\
>    -device vhost-user-vga,vhost-user=vug
>    -fsdev local,id=test_dev,path=$LOCALSHARE,security_model=none \
>    -device virtio-9p-pci,fsdev=test_dev,mount_tag=test_mount \
>    -display sdl,gl=on
> <<<
>

There is no longer a vhost-user-backend, it was dropped in some
revisions. You have to specify a chardev:

Start /opt/local/libexec/vhost-user-gpu -s $VHOST_GPU

And qemu with:
-chardev socket,id=vg,path=$VHOST_GPU
-device vhost-user-vga,chardev=vg

> Qemu was compiled with
>
> >>>
> ./configure --disable-git-update \
>   --prefix=/opt/local/ \
>   --target-list=x86_64-softmmu \
>   --enable-kvm \
>   --disable-werror \
>   --enable-virglrenderer \
>   --enable-sdl \
>   --enable-attr \
>   --enable-membarrier \
>   --enable-virtfs \
>   --enable-vhost-user
> <<<
>
> Before, with version 6 or 7 of the patches I got it somehow running
> with spice, but since this was rather cumbersome I hoped that this
> would no longer be needed - also I want to be able to switch between
> the GLES backend and the GL backend.
>
> Now my questions are:
>
> Is it at all possible to use the SDL backend with vhost-user-gpu or is
> spice a requirement?
>
> If SDL is possible - what could be wrong with my setup?
>
> If SDL is not possible - how can I force a certain GL context type (GL
> vs. GLES) or is this not (yet) possible?

I haven't tried with SDL, but GTK & local spice should work.

Hopefully, it will become easier to setup and manage once "[libvirt]
[PATCH 00/19] Add vhost-user-gpu support" lands.

(I regularly start VMs with 3-4 helpers, managing things by hands
quickly become tedious)

-- 
Marc-André Lureau



reply via email to

[Prev in Thread] Current Thread [Next in Thread]