qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [QUESTION]: vhost-user-gpu: Unable to find a satisfying vhost-user-gpu
@ 2020-05-27  9:18 Jun Piao
  2020-05-27 12:29 ` Marc-André Lureau
  0 siblings, 1 reply; 3+ messages in thread
From: Jun Piao @ 2020-05-27  9:18 UTC (permalink / raw)
  To: marcandre.lureau; +Cc: qemu-devel

Hi Marc-André,

I encounter a problem when trying to use vhost-user-gpu as below. And
I'm not familiar to the libvirt code. Could you please help find out
the reason?

# virsh create snap1.xml
error: Failed to create domain from snap1.xml
error: operation failed: Unable to find a satisfying vhost-user-gpu

qemu-4.1.1:
  # ./vhost-user-gpu -v -s /home/vgpu.sock -r /dev/dri/renderD128

libvirt-5.8.0:
    <graphics type='spice' port='5901' tlsPort='5903' autoport='yes'>
      <listen type='socket' socket='/tmp/spice.socket1'/>
      <gl enable='yes' rendernode='/dev/dri/renderD128'/>
    </graphics>
    <video model='virtio'>
      <driver name='vhostuser'/>
      <acceleration accel3d='yes' rendernode='/dev/dri/renderD128'/>
    </video>

thanks,
Jun


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

* Re: [QUESTION]: vhost-user-gpu: Unable to find a satisfying vhost-user-gpu
  2020-05-27  9:18 [QUESTION]: vhost-user-gpu: Unable to find a satisfying vhost-user-gpu Jun Piao
@ 2020-05-27 12:29 ` Marc-André Lureau
  2020-05-28 13:12   ` Jun Piao
  0 siblings, 1 reply; 3+ messages in thread
From: Marc-André Lureau @ 2020-05-27 12:29 UTC (permalink / raw)
  To: Jun Piao; +Cc: QEMU

[-- Attachment #1: Type: text/plain, Size: 1312 bytes --]

Hi

On Wed, May 27, 2020 at 11:18 AM Jun Piao <piaojun@huawei.com> wrote:

> Hi Marc-André,
>
> I encounter a problem when trying to use vhost-user-gpu as below. And
> I'm not familiar to the libvirt code. Could you please help find out
> the reason?
>
> # virsh create snap1.xml
> error: Failed to create domain from snap1.xml
> error: operation failed: Unable to find a satisfying vhost-user-gpu
>
>
Libvirt implements the logic described in:
https://git.qemu.org/?p=qemu.git;a=blob;f=docs/interop/vhost-user.json;h=ef8ac5941f5c8d14402566a984a0a0876d768c19;hb=HEAD#l171

Check if you have  /usr/share/qemu/vhost-user/50-qemu-gpu.json and if the
binary location is correct.

If it fails after that, enable libvirt debugging for more details.

hope that helps

qemu-4.1.1:
>   # ./vhost-user-gpu -v -s /home/vgpu.sock -r /dev/dri/renderD128
>
> libvirt-5.8.0:
>     <graphics type='spice' port='5901' tlsPort='5903' autoport='yes'>
>       <listen type='socket' socket='/tmp/spice.socket1'/>
>       <gl enable='yes' rendernode='/dev/dri/renderD128'/>
>     </graphics>
>     <video model='virtio'>
>       <driver name='vhostuser'/>
>       <acceleration accel3d='yes' rendernode='/dev/dri/renderD128'/>
>     </video>
>
> thanks,
> Jun
>
>

-- 
Marc-André Lureau

[-- Attachment #2: Type: text/html, Size: 2282 bytes --]

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

* Re: [QUESTION]: vhost-user-gpu: Unable to find a satisfying vhost-user-gpu
  2020-05-27 12:29 ` Marc-André Lureau
@ 2020-05-28 13:12   ` Jun Piao
  0 siblings, 0 replies; 3+ messages in thread
From: Jun Piao @ 2020-05-28 13:12 UTC (permalink / raw)
  To: Marc-André Lureau; +Cc: QEMU



在 2020/5/27 20:29, Marc-André Lureau 写道:
> Hi
> 
> On Wed, May 27, 2020 at 11:18 AM Jun Piao <piaojun@huawei.com <mailto:piaojun@huawei.com>> wrote:
> 
>     Hi Marc-André,
> 
>     I encounter a problem when trying to use vhost-user-gpu as below. And
>     I'm not familiar to the libvirt code. Could you please help find out
>     the reason?
> 
>     # virsh create snap1.xml
>     error: Failed to create domain from snap1.xml
>     error: operation failed: Unable to find a satisfying vhost-user-gpu
> 
> 
> Libvirt implements the logic described in: https://git.qemu.org/?p=qemu.git;a=blob;f=docs/interop/vhost-user.json;h=ef8ac5941f5c8d14402566a984a0a0876d768c19;hb=HEAD#l171
> 
> Check if you have  /usr/share/qemu/vhost-user/50-qemu-gpu.json and if the binary location is correct.
> 
> If it fails after that, enable libvirt debugging for more details.
> 

Thanks for your reply, and I did as you said, but another error happend:

50-qemu-gpu.json:
{
  "description": "QEMU vhost-user-gpu",
  "type": "gpu",
  "binary": "/usr/local/libexec/vhost-user-gpu"
}

# virsh create /home/vm/snap1.xml
error: Failed to create domain from /home/vm/snap1.xml
error: internal error: Could not get process id of vhost-user-gpu

libvirt log:
----------------------------------------------------------------------
2020-05-28 13:10:48.345+0000: Starting external device: vhost-user-gpu
/usr/local/libexec/vhost-user-gpu
2020-05-28 13:10:48.374+0000: starting up libvirt version: 5.8.0, qemu version: 4.1.1, kernel: 4.18.0, hostname: localhost.localdomain
LC_ALL=C \
PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin \
HOME=/var/lib/libvirt/qemu/domain-1-snap1 \
XDG_DATA_HOME=/var/lib/libvirt/qemu/domain-1-snap1/.local/share \
XDG_CACHE_HOME=/var/lib/libvirt/qemu/domain-1-snap1/.cache \
XDG_CONFIG_HOME=/var/lib/libvirt/qemu/domain-1-snap1/.config \
QEMU_AUDIO_DRV=spice \
/home/code/qemu-4.1.1/aarch64-softmmu/qemu-system-aarch64 \
-name guest=snap1,debug-threads=on \
-S \
-object secret,id=masterKey0,format=raw,file=/var/lib/libvirt/qemu/domain-1-snap1/master-key.aes \
-machine virt-2.8,accel=kvm,usb=off,dump-guest-core=off,gic-version=3 \
-cpu host \
-drive file=/usr/share/edk2.git/aarch64/QEMU_EFI-pflash.raw,if=pflash,format=raw,unit=0,readonly=on \
-drive file=/var/lib/libvirt/qemu/nvram/euler_VARS.fd,if=pflash,format=raw,unit=1 \
-m 4096 \
-overcommit mem-lock=off \
-smp 4,sockets=4,cores=1,threads=1 \
-uuid 3eb97356-8642-4282-88de-8de0a36d3bc1 \
-smbios 'type=1,manufacturer=OpenStack Foundation,product=OpenStack Nova,version=13.0.1-517.11,family=Virtual Machine' \
-smbios 'type=3,manufacturer=Dell Inc.,version=2.12,serial=65X0XF2,asset=40000101,sku=Type3Sku1' \
-no-user-config \
-nodefaults \
-chardev socket,id=charmonitor,fd=34,server,nowait \
-mon chardev=charmonitor,id=monitor,mode=control \
-rtc base=2020-05-29T01:10:48,clock=vm,driftfix=slew \
-no-shutdown \
-no-acpi \
-boot strict=on \
-device pcie-root-port,port=0x8,chassis=1,id=pci.1,bus=pcie.0,multifunction=on,addr=0x1 \
-device pcie-pci-bridge,id=pci.2,bus=pci.1,addr=0x0 \
-device pcie-root-port,port=0x9,chassis=3,id=pci.3,bus=pcie.0,addr=0x1.0x1 \
-device pcie-root-port,port=0xa,chassis=4,id=pci.4,bus=pcie.0,addr=0x1.0x2 \
-device pcie-root-port,port=0xb,chassis=5,id=pci.5,bus=pcie.0,addr=0x1.0x3 \
-device usb-ehci,id=usb,bus=pci.2,addr=0x3 \
-device virtio-scsi-pci,id=scsi0,bus=pci.4,addr=0x0 \
-device ahci,id=sata0,bus=pci.2,addr=0x2 \
-device virtio-serial-pci,id=virtio-serial0,bus=pci.2,addr=0x4 \
-drive file=/home/vm/snap1.img,format=qcow2,if=none,id=drive-scsi0-0-0-0,cache=none,aio=native \
-device scsi-hd,bus=scsi0.0,channel=0,scsi-id=0,lun=0,device_id=drive-scsi0-0-0-0,drive=drive-scsi0-0-0-0,id=scsi0-0-0-0,bootindex=1,write-cache=on \
-netdev tap,fd=37,id=hostnet0,vhost=on,vhostfd=40 \
-device virtio-net-pci,netdev=hostnet0,id=net0,mac=52:54:00:69:17:b1,bus=pci.5,addr=0x0 \
-chardev pty,id=charserial0 \
-serial chardev:charserial0 \
-device usb-tablet,id=input0,bus=usb.0,port=1 \
-device usb-kbd,id=input1,bus=usb.0,port=2 \
-spice unix,addr=/tmp/spice.socket1,disable-ticketing,gl=on,rendernode=/dev/dri/renderD128,seamless-migration=on \
-chardev socket,id=chr-vu-video0,fd=36 \
-device vhost-user-gpu-pci,id=video0,max_outputs=1,chardev=chr-vu-video0,bus=pci.3,addr=0x0 \
-device virtio-balloon-pci,id=balloon0,bus=pci.2,addr=0x5 \
-msg timestamp=on
2020-05-28 13:10:48.374+0000: Domain id=1 is tainted: host-cpu
libvirt:  error : libvirtd quit during handshake: Input/output error
2020-05-28 13:10:48.389+0000: shutting down, reason=failed

thanks,
Jun


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

end of thread, other threads:[~2020-05-28 13:14 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-05-27  9:18 [QUESTION]: vhost-user-gpu: Unable to find a satisfying vhost-user-gpu Jun Piao
2020-05-27 12:29 ` Marc-André Lureau
2020-05-28 13:12   ` Jun Piao

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).