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

Re: [Xen-devel] standalone PCI passthrough emulator



On Fri, Mar 01, 2019 at 04:41:25PM +0000, Paul Durrant wrote:
> 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.
> 
>   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 :-)

Thanks, this is very interesting.

I've been wondering whether it would be possible to unify this code
together with the current vPCI code in Xen, by creating a
common/libvpci library that would have the PCI emulation and likely a
set of hooks to interact with the real PCI config space and with the
guest p2m. Those hooks will obviously be different between the in-Xen
version and the user-space Linux version which could use sysfs or VFIO.

I think both code bases are small enough at this point to perform such
unification, and leaving this for later is just going to cause more
pain.

I'm willing to work on this in a month, since right now I don't have
the time. Would you be OK with that?

Roger.

_______________________________________________
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®.