On Tuesday, September 06, 2016 09:15:35 PM John Baldwin wrote: > Author: jhb > Date: Tue Sep 6 21:15:35 2016 > New Revision: 305502 > URL: https://svnweb.freebsd.org/changeset/base/305502 > > Log: > Reset PCI pass through devices via PCI-e FLR during VM start and end. > > Add routines to trigger a function level reset (FLR) of a PCI-express > device via the PCI-express device control register. This also includes > support routines to wait for pending transactions to complete as well > as calculating the maximum completion timeout permitted by a device. > > Change the ppt(4) driver to reset pass through devices before attaching > to a VM during startup and before detaching from a VM during shutdown.
With the recent fixes, it should (in theory) be safe to do something like: kldload vmm iovctl -C -f /path/to/iovctl.conf devctl set driver ppt <location> vmrun.sh -p <location> <other args> And have it work correctly, including if you hotplug or create new VFs after an initial VM is running/has run, or you delete a VF, etc. FLR should (in theory) make VMs with pass through devices a bit more robust if they do not cleanly shutdown the device hardware. I also have some thoughts (still kicking around in my head) about adding a 'devctl reset' command. In particular the trickier case is what to do for attached devices (I think we suspend / resume devices around reset perhaps). Also, there are different ways you can trigger a PCI reset that we should eventually support. -- John Baldwin _______________________________________________ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"