From mboxrd@z Thu Jan 1 00:00:00 1970 From: Greg KH Subject: Re: KVM PCI device assignment issues Date: Fri, 13 Feb 2009 08:56:15 -0800 Message-ID: <20090213165615.GA31338@kroah.com> References: <1234542767.23746.81.camel@blaa> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: kvm , "linux-pci@vger.kernel.org" , Chris Wright , "Dugger, Donald D" , "Kay, Allen M" To: Mark McLoughlin Return-path: Content-Disposition: inline In-Reply-To: <1234542767.23746.81.camel@blaa> Sender: linux-pci-owner@vger.kernel.org List-Id: kvm.vger.kernel.org On Fri, Feb 13, 2009 at 04:32:47PM +0000, Mark McLoughlin wrote: > Driver Unbinding > ================ > > Before a device is assigned to a guest, we should make sure that no host > device driver is currently bound to the device. > > We can do that with e.g. > > $> echo -n "8086 10de" > /sys/bus/pci/drivers/pci-stub/new_id > $> echo -n 0000:00:19.0 > /sys/bus/pci/drivers/e1000e/unbind > $> echo -n 0000:00:19.0 > /sys/bus/pci/drivers/pci-stub/bind > > One minor problem with this scheme is that at this point you can't > unbind from pci-stub and trigger a re-probe and have e1000e bind to it. Are you sure? It should work if you manually tell the e1000e driver to bind to it, after unbinding it from the pci-stub driver. > In order to support that, we need a "remove_id" interface to remove the > dynamic ID. Why? > What we don't support is a way to unbind permanently. Xen has a > pciback.hide module param which tries to achieve this, but you end up > with the inevitable issues around making sure pciback is loaded before > the device driver etc. What do you mean, unbind "permanently"? For every reboot? Or just within the same boot time? thanks, greg k-h