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

Re: [Xen-devel] standalone PCI passthrough emulator



> -----Original Message-----
> From: Tian, Kevin [mailto:kevin.tian@xxxxxxxxx]
> Sent: 04 March 2019 03:01
> To: Paul Durrant <Paul.Durrant@xxxxxxxxxx>; xen-devel 
> (xen-devel@xxxxxxxxxxxxxxxxxxxx) <xen-
> devel@xxxxxxxxxxxxxxxxxxxx>
> Subject: RE: standalone PCI passthrough emulator
> 
> > From: Paul Durrant
> > Sent: Saturday, March 2, 2019 12:41 AM
> >
> > Hi,
> >
> >   As the basis of some future development work I've put together a simple
> > standalone emulator to pass through a single type 0 PCI function to a guest 
> > so
> > I'm posting here in case anyone else would like a give it a try. So far 
> > I've tested
> > with AMD FirePro S7150 and NVIDIA K1 GPUs and a Windows 10 guest, so it
> > hasn't had that much debugging.
> 
> How is it different from existing PCI passthrough support in Xen? What is
> exactly emulated here?
> 

Essentially it does no more than the current code in QEMU, but that code has 
become very complex and hard to follow over the years. It's full of magic mask 
values and I've found at least two pieces of completely dead code whilst 
looking at it. So, I started this work to provide a small simple base on which 
to experiment with using VFIO, rather than the existent sysfs node accesses and 
xenctrl calls.
To answer your other question... It's config space that is emulated, as it has 
to be to deal with BAR address and interrupt translation. Note, there is also a 
slight advantage in using multiple discreet emulators; emulated I/O can proceed 
in parallel for multiple vcpus... emulation on behalf of Xen by QEMU is still 
restricted by a single poll/select loop for all vcpus.

  Paul

> >
> >   NOTE: there is a known issue where domains are left in zombie state on
> > shutdown. This is likely due to Xen not properly cleaning up MSI mappings,
> > but I'm not yet sure of that.
> >
> >   Things that are missing:
> >
> > - Decent error paths (it won't cope well if IO/memory mapping hypercalls 
> > fail)
> > - MSI-X support
> > - Extended config space
> >
> >   Hopefully I'll start to address these soon :-)
> >
> 

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/xen-devel

 


Rackspace

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