vhost-device-gpu - Man Page

vhost-user backend for a VirtIO GPU device

Synopsis

vhost-device-gpu --socket-path <path> --gpu-mode <GPU_MODE>

Description

A virtio-gpu device using the vhost-user protocol.

Options

vhost-user Unix domain socket.

The mode specifies which backend implementation to use.

Possible values:

  • virglrenderer: OpenGL implementation, superseded by Virgl2.
  • gfxstream: Vulkan implementation (partial support only).

Comma-separated list of enabled capsets.

Possible values:

  • virgl: OpenGL implementation, superseded by Virgl2.
  • virgl2: OpenGL implementation.
  • gfxstream-vulkan: Vulkan implementation (partial support only).

NOTE: Can only be used for 2D display output for now, no hardware acceleration yet.

  • gfxstream-gles: OpenGL ES implementation (partial support only).

NOTE: Can only be used for 2D display output for now, no hardware acceleration yet.

Enable backend to use EGL.

Default: true

Possible values: true, false

Enable backend to use GLX.

Default: false

Possible values: true, false

Enable backend to use GLES.

Default: true

Possible values: true, false

Enable surfaceless backend option.

Default: true

Possible values: true, false

Print help and usage information.

Print version information.

Limitations

Features

The device leverages the rutabaga_gfx\c  crate to provide rendering with virglrenderer and gfxstream.

Examples

Start the daemon on the host machine using either GPU mode:

  1. Virglrenderer
  2. Gfxstream (if the crate has been compiled with the gfxstream feature)

    host# vhost-device-gpu --socket-path /tmp/gpu.socket --gpu-mode virglrenderer

With QEMU, two device frontends can be used:

  1. vhost-user-gpu-pci
  2. vhost-user-vga (also implements VGA, allowing visibility of boot messages before GPU initialization)

By default, QEMU adds another VGA output. Disable it using -vga none.

Using vhost-user-gpu-pci

qemu-system-x86_64 \
  -chardev socket,id=vgpu,path=/tmp/gpu.socket \
  -device vhost-user-gpu-pci,chardev=vgpu,id=vgpu \
  -object memory-backend-memfd,share=on,id=mem0,size=4G \
  -machine q35,memory-backend=mem0,accel=kvm \
  -display gtk,gl=on,show-cursor=on \
  -vga none

Using vhost-user-vga

qemu-system-x86_64 \
  -chardev socket,id=vgpu,path=/tmp/gpu.socket \
  -device vhost-user-vga,chardev=vgpu,id=vgpu \
  -object memory-backend-memfd,share=on,id=mem0,size=4G \
  -machine q35,memory-backend=mem0,accel=kvm \
  -display gtk,gl=on,show-cursor=on \
  -vga none

Environment

RUST_LOG

Logging level. Set to debug for maximum output.

Bugs

See GitHub Issues: https://github.com/rust-vmm/vhost-device/issues\c

Authors

Dorinda Bassey dbassey@redhat.com\c

Matej Hrica mhrica@redhat.com\c

See Also

qemu(1)

Info

Version 0.1.0 rust-vmm/vhost-device