From owner-svn-src-head@freebsd.org Mon Aug 29 22:57:38 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5717AB79DA8; Mon, 29 Aug 2016 22:57:38 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from bigwig.baldwin.cx (bigwig.baldwin.cx [IPv6:2001:470:1f11:75::1]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 38822B09; Mon, 29 Aug 2016 22:57:38 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from ralph.baldwin.cx (c-73-231-226-104.hsd1.ca.comcast.net [73.231.226.104]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id 402D8B93A; Mon, 29 Aug 2016 18:57:37 -0400 (EDT) From: John Baldwin To: src-committers@freebsd.org Cc: svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r305034 - in head: lib/libdevctl sys/kern sys/sys usr.sbin/devctl Date: Mon, 29 Aug 2016 15:57:14 -0700 Message-ID: <8074036.gWSGr9DhZh@ralph.baldwin.cx> User-Agent: KMail/4.14.3 (FreeBSD/10.3-STABLE; KDE/4.14.3; amd64; ; ) In-Reply-To: <201608292248.u7TMmaEe050646@repo.freebsd.org> References: <201608292248.u7TMmaEe050646@repo.freebsd.org> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7 (bigwig.baldwin.cx); Mon, 29 Aug 2016 18:57:37 -0400 (EDT) X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 29 Aug 2016 22:57:38 -0000 On Monday, August 29, 2016 10:48:36 PM John Baldwin wrote: > Author: jhb > Date: Mon Aug 29 22:48:36 2016 > New Revision: 305034 > URL: https://svnweb.freebsd.org/changeset/base/305034 > > Log: > Implement 'devctl clear driver' to undo a previous 'devctl set driver'. > > Add a new 'clear driver' command for devctl along with the accompanying > ioctl and devctl_clear_driver() library routine to reset a device to > use a wildcard devclass instead of a fixed devclass. This can be used > to undo a previous 'set driver' command. After the device's name has > been reset to permit wildcard names, it is reprobed so that it can > attach to newly-available (to it) device drivers. > > MFC after: 1 month > Sponsored by: Chelsio Communications In particular, you can now do 'devctl set driver pciX:Y:Z ppt' to flip a device into pass through mode for bhyve and then use 'devctl clear driver pciX:Y:Z' to revert back to the host driver. Though for bhyve/ppt(4) in particular you need some additional changes currently under review so that the device ends up back in the proper I/O MMU domain so it can do DMA in the host. -- John Baldwin