Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1276390

Re: [Intel-gfx] [Announcement] 2015-Q3 release of XenGT - a Mediated Graphics Passthrough Solution from Intel

From Gerd Hoffmann <kraxel@redhat.com>
Newsgroups linux.kernel
Subject Re: [Intel-gfx] [Announcement] 2015-Q3 release of XenGT - a Mediated Graphics Passthrough Solution from Intel
Date 2015-11-24 13:40 +0100
Message-ID <qyl34-86O-13@gated-at.bofh.it> (permalink)
References (5 earlier) <qo8Tv-3we-15@gated-at.bofh.it> <qwfuP-6xU-15@gated-at.bofh.it> <qwoHL-4kt-9@gated-at.bofh.it> <qwDGN-5Ex-15@gated-at.bofh.it> <qyjND-7oT-9@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


  Hi,

> > Yes, vGPU may have additional features, like a framebuffer area, that
> > aren't present or optional for direct assignment.  Obviously we support
> > direct assignment of GPUs for some vendors already without this feature.
> 
> For exposing framebuffers for spice/vnc I highly recommend against
> anything that looks like a bar/fixed mmio range mapping. First this means
> the kernel driver needs to internally fake remapping, which isn't fun.

Sure.  I don't think we should remap here.  More below.

> My recoomendation is to build the actual memory access for underlying
> framebuffers on top of dma-buf, so that it can be vacuumed up by e.g. the
> host gpu driver again for rendering.

We want that too ;)

Some more background:

OpenGL support in qemu is still young and emerging, and we are actually
building on dma-bufs here.  There are a bunch of different ways how
guest display output is handled.  At the end of the day it boils down to
only two fundamental cases though:

  (a) Where qemu doesn't need access to the guest framebuffer
      - qemu directly renders via opengl (works today with virtio-gpu
        and will be in the qemu 2.5 release)
      - qemu passed on the dma-buf to spice client for local display
        (experimental code exists).
      - qemu feeds the guest display into gpu-assisted video encoder
        to send a stream over the network (no code yet).

  (b) Where qemu must read the guest framebuffer.
      - qemu's builtin vnc server.
      - qemu writing screenshots to file.
      - (non-opengl legacy code paths for local display, will
         hopefully disappear long-term though ...)

So, the question is how to support (b) best.  Even with OpenGL support
in qemu improving over time I don't expect this going away completely
anytime soon.

I think it makes sense to have a special vfio region for that.  I don't
think remapping makes sense there.  It doesn't need to be "live", it
doesn't need support high refresh rates.  Placing a copy of the guest
framebuffer there on request (and convert from tiled to linear while
being at it) is perfectly fine.  qemu has a adaptive update rate and
will stop doing frequent update requests when the vnc client
disconnects, so there will be nothing to do if nobody wants actually see
the guest display.

Possible alternative approach would be to import a dma-buf, then use
glReadPixels().  I suspect when doing the copy in the kernel the driver
could ask just the gpu to blit the guest framebuffer.  Don't know gfx
hardware good enough to be sure though, comments are welcome.

cheers,
  Gerd


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

Re: [Intel-gfx] [Announcement] 2015-Q3 release of XenGT - a  Mediated Graphics Passthrough Solution from Intel Alex Williamson <alex.williamson@redhat.com> - 2015-11-18 19:20 +0100
  RE: [Intel-gfx] [Announcement] 2015-Q3 release of XenGT - a  Mediated Graphics Passthrough Solution from Intel "Tian, Kevin" <kevin.tian@intel.com> - 2015-11-19 05:10 +0100
    Re: [Intel-gfx] [Announcement] 2015-Q3 release of XenGT - a Mediated  Graphics Passthrough Solution from Intel Jike Song <jike.song@intel.com> - 2015-11-19 08:30 +0100
      Re: [Intel-gfx] [Announcement] 2015-Q3 release of XenGT - a Mediated  Graphics Passthrough Solution from Intel Stefano Stabellini <stefano.stabellini@eu.citrix.com> - 2015-11-19 16:40 +0100
        Re: [Intel-gfx] [Announcement] 2015-Q3 release of XenGT - a  Mediated Graphics Passthrough Solution from Intel Alex Williamson <alex.williamson@redhat.com> - 2015-11-19 17:00 +0100
          Re: [Intel-gfx] [Announcement] 2015-Q3 release of XenGT - a Mediated  Graphics Passthrough Solution from Intel Jike Song <jike.song@intel.com> - 2015-11-20 04:00 +0100
            Re: [Intel-gfx] [Announcement] 2015-Q3 release of XenGT - a  Mediated Graphics Passthrough Solution from Intel Alex Williamson <alex.williamson@redhat.com> - 2015-11-20 05:30 +0100
              Re: [Intel-gfx] [Announcement] 2015-Q3 release of XenGT - a Mediated  Graphics Passthrough Solution from Intel Jike Song <jike.song@intel.com> - 2015-11-20 07:00 +0100
                RE: [Intel-gfx] [Announcement] 2015-Q3 release of XenGT - a  Mediated Graphics Passthrough Solution from Intel "Tian, Kevin" <kevin.tian@intel.com> - 2015-11-20 07:10 +0100
                Re: [Intel-gfx] [Announcement] 2015-Q3 release of XenGT - a  Mediated Graphics Passthrough Solution from Intel Alex Williamson <alex.williamson@redhat.com> - 2015-11-20 17:50 +0100
                Re: [Qemu-devel] [Intel-gfx] [Announcement] 2015-Q3 release of XenGT  - a Mediated Graphics Passthrough Solution from Intel Jike Song <jike.song@intel.com> - 2015-11-23 06:00 +0100
        Re: [Intel-gfx] [Announcement] 2015-Q3 release of XenGT - a Mediated  Graphics Passthrough Solution from Intel Paolo Bonzini <pbonzini@redhat.com> - 2015-11-19 17:00 +0100
          Re: [Intel-gfx] [Announcement] 2015-Q3 release of XenGT - a Mediated  Graphics Passthrough Solution from Intel Stefano Stabellini <stefano.stabellini@eu.citrix.com> - 2015-11-19 17:20 +0100
    Re: [Intel-gfx] [Announcement] 2015-Q3 release of XenGT - a  Mediated Graphics Passthrough Solution from Intel Gerd Hoffmann <kraxel@redhat.com> - 2015-11-19 09:50 +0100
      Re: [Intel-gfx] [Announcement] 2015-Q3 release of XenGT - a Mediated  Graphics Passthrough Solution from Intel Paolo Bonzini <pbonzini@redhat.com> - 2015-11-19 12:10 +0100
        Re: [Intel-gfx] [Announcement] 2015-Q3 release of XenGT - a Mediated  Graphics Passthrough Solution from Intel Jike Song <jike.song@intel.com> - 2015-11-20 03:50 +0100
      RE: [Intel-gfx] [Announcement] 2015-Q3 release of XenGT - a  Mediated Graphics Passthrough Solution from Intel "Tian, Kevin" <kevin.tian@intel.com> - 2015-11-20 07:20 +0100
        Re: [Intel-gfx] [Announcement] 2015-Q3 release of XenGT - a  Mediated Graphics Passthrough Solution from Intel Gerd Hoffmann <kraxel@redhat.com> - 2015-11-20 09:30 +0100
          RE: [Intel-gfx] [Announcement] 2015-Q3 release of XenGT - a  Mediated Graphics Passthrough Solution from Intel "Tian, Kevin" <kevin.tian@intel.com> - 2015-11-20 09:40 +0100
            Re: [Intel-gfx] [Announcement] 2015-Q3 release of XenGT - a Mediated  Graphics Passthrough Solution from Intel Zhiyuan Lv <zhiyuan.lv@intel.com> - 2015-11-20 10:00 +0100
    Re: [Intel-gfx] [Announcement] 2015-Q3 release of XenGT - a  Mediated Graphics Passthrough Solution from Intel Alex Williamson <alex.williamson@redhat.com> - 2015-11-19 21:10 +0100
      RE: [Intel-gfx] [Announcement] 2015-Q3 release of XenGT - a  Mediated Graphics Passthrough Solution from Intel "Tian, Kevin" <kevin.tian@intel.com> - 2015-11-20 08:20 +0100
        Re: [Intel-gfx] [Announcement] 2015-Q3 release of XenGT - a  Mediated Graphics Passthrough Solution from Intel Alex Williamson <alex.williamson@redhat.com> - 2015-11-20 18:10 +0100
      RE: [Intel-gfx] [Announcement] 2015-Q3 release of XenGT - a  Mediated Graphics Passthrough Solution from Intel "Tian, Kevin" <kevin.tian@intel.com> - 2015-11-20 09:20 +0100
        Re: [Intel-gfx] [Announcement] 2015-Q3 release of XenGT - a  Mediated Graphics Passthrough Solution from Intel Alex Williamson <alex.williamson@redhat.com> - 2015-11-20 18:30 +0100
          Re: [Intel-gfx] [Announcement] 2015-Q3 release of XenGT - a Mediated  Graphics Passthrough Solution from Intel Jike Song <jike.song@intel.com> - 2015-11-23 06:10 +0100
      Re: [Intel-gfx] [Announcement] 2015-Q3 release of XenGT - a Mediated  Graphics Passthrough Solution from Intel Daniel Vetter <daniel@ffwll.ch> - 2015-11-24 12:20 +0100
        Re: [Intel-gfx] [Announcement] 2015-Q3 release of XenGT - a Mediated  Graphics Passthrough Solution from Intel Chris Wilson <chris@chris-wilson.co.uk> - 2015-11-24 13:00 +0100
        Re: [Intel-gfx] [Announcement] 2015-Q3 release of XenGT - a  Mediated Graphics Passthrough Solution from Intel Gerd Hoffmann <kraxel@redhat.com> - 2015-11-24 13:40 +0100
          Re: [Intel-gfx] [Announcement] 2015-Q3 release of XenGT - a Mediated  Graphics Passthrough Solution from Intel Daniel Vetter <daniel@ffwll.ch> - 2015-11-24 14:40 +0100
            Re: [Intel-gfx] [Announcement] 2015-Q3 release of XenGT - a  Mediated Graphics Passthrough Solution from Intel Gerd Hoffmann <kraxel@redhat.com> - 2015-11-24 15:20 +0100
              Re: [Intel-gfx] [Announcement] 2015-Q3 release of XenGT - a Mediated  Graphics Passthrough Solution from Intel Daniel Vetter <daniel@ffwll.ch> - 2015-11-24 15:20 +0100

csiph-web