[Top][All Lists]

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

[Qemu-discuss] Guest display output in host window with vga passthrough

From: Johannes Uhlemann
Subject: [Qemu-discuss] Guest display output in host window with vga passthrough
Date: Thu, 17 Nov 2016 11:34:54 +0100

Hello everyone!

In short: It would be a very nice feature to be able to display the output of a 
bare metal vga
device in a window under the host's display system. I'm well aware that some 
support for this is
required by the guest.

The long story:

Passing real hardware to qemu has become a working scenario in the past years, 
support for it is
constantly growing. Especially vfio-pci in the linux kernel makes this task 
relatively easy. So
besides doing full virtualization with migration etc. it's now also possible to 
do hardware

One popular approach is to pass through a real hardware gpu to a windows guest 
so it gains full 3d
acceleration. This is a topic where all virtualization environments like 
vmware, virtual box,
xen and also qemu lack behind bare metal. 
There have been recent approaches to this like vfio-gpu, but it's obvious that 
they are very
limited in what they can do. (It's not possible to virtualize directx from a 
host, but windows relies on it for it's GUI, etc.) 

Where in the good old days this was not a real problem, it is nowadays 
especially with windows
guests. For example I'm forced to use visual studio for work development, and 
it always has been a
pain to use under linux as it's wpf based and requires hardware acceleration to 
run smooth. 
Currently vmware delivers best performance for this (having a 4k display 
doesn't makes it faster). 

The downside of gpu passthrough is that you loose all the nice features of 
having the output in a
window. No shared clipboard, no mouse enter/leave, no ability to use the host 
as long as you're in
the guest etc. 

How it could be done:

My knowledge to vga devices is a bit outdated, but it's no secret that modern 
gpus can render more
or less any content into textures. So a possible technical solution could look 
like this: 

- Host viewer application allocates an overlay with opengl, xvideo or whatever 
technique. Address of
  this surface is passed to qemu. 
- Qemu maps address of this overlay into the guest memory. 
- Helper application/driver running in the guest makes the guest gpu to render 
screen content into
  that surface. 
- As it's backed by a gpu texture on the host, it's content is automatically 
shown inside host
  viewer window. 

Of course there's some fiddling with resolution switching etc. (the guest would 
initially need to
tell the host the size of the surface etc.) but this approach should allow for 
real 3d

What do you think?


reply via email to

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