Date: Tue, 06 Sep 2016 14:29:40 -0700 From: John Baldwin <jhb@freebsd.org> To: src-committers@freebsd.org Cc: svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r305502 - in head: share/man/man9 sys/amd64/vmm/io sys/dev/pci Message-ID: <1571206.j1ezrSnmG7@ralph.baldwin.cx> In-Reply-To: <201609062115.u86LFZaU030916@repo.freebsd.org> References: <201609062115.u86LFZaU030916@repo.freebsd.org>
next in thread | previous in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?1571206.j1ezrSnmG7>