qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH v8 0/9] vfio: add display support


From: Gerd Hoffmann
Subject: Re: [Qemu-devel] [PATCH v8 0/9] vfio: add display support
Date: Tue, 6 Mar 2018 15:53:31 +0100
User-agent: NeoMutt/20180223

On Tue, Mar 06, 2018 at 12:34:33PM +0100, Gerd Hoffmann wrote:
> This series adds support for a vgpu display to the qemu vfio code.

Ok, for anyone who wants play with this, the requirements:

qemu
====

The repo at git://git.kraxel.org/qemu has a sirius/dmabufs-merge branch
with this series and spice patches and gtk patches merged.

The traditional work/intel-vgpu branch has been updated too (it is the
same as sirius/dmabufs-merge plus some work-in-progress patches).

host kernel
===========

You need a 4.16-rc kernel.  The intel graphics driver comes with mdev
support.  Needs gen5+ hardware (broadwell, skylake, kaby-lake).  Not
sure about nvidia.

Pure software drivers are available from 
   git://git.kraxel.org/cgit/linux vfio-sample-display

There are three kernel modules in samples/vfio-mdev:

  (1) mdpy.ko.  Very simple display device.  Fixed framebuffer and
      resolution.  Uses the region-based vfio display interface.
  (2) mbochs.ko.  Mimics qemu vga with bochs dispi vbe interface.
      Doesn't emulate any legacy vga.  But good enough to make the
      bochs-drm.ko driver happy.  Uses the dmabuf-based vfio display
      interface.  Zero-copy display updates.
  (3) mdpy-fb.ko.  Guest framebuffer driver for (1).

guest kernel
============

intel-gvt: 4.9+ I think.
nvidia:    dunno.
mbochs:    3.14+ should work.
mdpy:      The vfio-sample-display branch above if you want see guest
           display updates.  Without that you'll see a static test
           pattern.

booting the guest
=================

Create mdev devices and use "-device vfio-pci,..." as usual, see
https://www.kernel.org/doc/Documentation/vfio-mediated-device.txt

For mdev devices using dmabufs you need opengl support.
So start qemu with spice or gtk ui and opengl enabled:

  qemu -display gtk,gl=on
  qemu -spice gl=on,$otherargs

When using a display without opengl support you can use egl-headless to
handle the opengl rendering and texture readout (which of course adds
some overhead):

  qemu -display egl-headless -vga $display
  qemu -display egl-headless -spice gl=off,$otherargs

enjoy,
  Gerd




reply via email to

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