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

Re: [Xen-devel] [v5][PATCH 0/5] xen: add Intel IGD passthrough support

Hi, I've been working on IGD passthrough using native qemu and VFIO, (without any XEN components).

This work hasn't progressed in recent, but I am able to continue it again. Late last year I was in discussions with Allen Kay, Vikas Shivappa from Intel and Alex Williamson from Redhat, which resulted in successfully loading the i915 driver with opregion support which provided Intel frame buffer, but I did not get 2D or 3D acceleration working.Â

I did this using Q35.

The code is not without similar hacks that have been scrutinised here, and most intellectual parts of the code come from XEN (like the opregion location and size) - the code in parts should look similar. but Alex helped me convert it from XEN to QEMU.

with the disclaimer that this is code is immature, has been written to prove out the concept (not to be suggested as appropriate for upstream) and may not even patch correctly. but as some indication of the direction I was taking. please look here:Âhttps://github.com/UmbraMalison/qemu-igdvfio

I realise that this takes this conversation on yet another tangent, however my justification for doing is that many of the root discussions and potential flaws of cross xen implementation and use of piix are at least addressed.

Also, if there is potential for further help in completing this task that would be well received. I am still keen to complete this implementation and hope to find some missing pieces in Tiejun's work, currently I am re-basing on v2.0.0.



On 25 June 2014 03:17, Tiejun Chen <tiejun.chen@xxxxxxxxx> wrote:
V5 is generated just based on Paolo's some comments.


* Don't set that ISA class property, instead, just fake this ISA bridge
 with 00:1f.0.
* Don't pass vendor/device ids in igd_pci_read().
* Add to support offset 0x44/0x48.
* Just rebase.


* Fix some typos in the patch head description.
* Improve some comments.
* Given that xen_pt_register_vga_regions()/xen_pt_unregister_vga_regions()
 are called unconditionally, so we just return 0 there.
* Remove one spurious change.
* Remove some unnecessary "return" in void foo().
* Given that pci_create_pch() is called unconditionally, so we just return 0
 even if its failed to check xen_has_gfx_passthru.
* Use (xen_enabled() && xen_has_gfx_passthru) to make sure we only work
 in this scenario.


* In this case, as we discussed we will give priority to devices to
 reserve a specific devfn by passing
 "device_model_args_hvm = ['-device', 'xen-platform,addr=0x3']" and
 "vga=none", so withdraw patch #1, #2 and #4.
* Fix some typos.
* Add more comments to make that readable.
* To unmap igd_opregion when call xen_pt_unregister_vga_regions().
* Improve some return paths.
* Force to convert igd_guest/host_opoegion as an unsigned long type
 while calling xc_domain_memory_mapping().
* We need to map 3 pages for opregion as hvmloader set.


* rebase on current qemu tree.
* retrieve VGA bios from sysfs properly.
* redefine some function name.
* introduce bitmap to manage registe/runregister pci dev, and provide
 a common way to reserve some specific devfn.
* introduce is_igd_passthrough() to make sure we touch physical host
 bridge only in IGD case.
* We should return zero as an invalid address value while calling

Additionally, now its also not necessary to recompile seabios with some
extra steps like v1.

The following patches are ported partially from Xen Qemu-traditional
branch which are adding Intel IGD passthrough supporting to Qemu upstream.

To pass through IGD to guest, user need to add following lines in Xen
config file:

Now successfully boot Ubuntu 14.04/Windows 7 guests with IGD assigned in
Haswell desktop with Latest Xen + Qemu upstream.

Tiejun Chen (5):
   xen, gfx passthrough: basic graphics passthrough support
   xen, gfx passthrough: create pseudo intel isa bridge
   xen, gfx passthrough: support Intel IGD passthrough with VT-D
   xen, gfx passthrough: create host bridge to passthrough
   xen, gfx passthrough: add opregion mapping

Âhw/pci-host/piix.c      | Â56 +++++++++++++++-
Âhw/xen/Makefile.objs     |  2 +-
Âhw/xen/xen-host-pci-device.c | Â 5 ++
Âhw/xen/xen-host-pci-device.h | Â 1 +
Âhw/xen/xen_pt.c       Â| Â10 +++
Âhw/xen/xen_pt.h       Â| Â12 +++-
Âhw/xen/xen_pt_config_init.c Â| Â50 +++++++++++++-
Âhw/xen/xen_pt_graphics.c   | 513 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Âqemu-options.hx       Â|  9 +++
Âvl.c             | Â10 +++
Â10 files changed, 663 insertions(+), 5 deletion


Xen-devel mailing list

Xen-devel mailing list



Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.