From: Chris Wright Subject: Re: [PATCH 2/2 v2] PCI: add remove_id sysfs entry Date: Thu, 26 Feb 2009 16:27:27 -0800 Message-ID: <20090227002727.GQ7436@sequoia.sous-sol.org> References: <1234542767.23746.81.camel@blaa> <20090214021244.GW27684@sequoia.sous-sol.org> <20090214033319.GA4591@kroah.com> <20090224012625.GA7436@sequoia.sous-sol.org> <20090224055035.GF7436@sequoia.sous-sol.org> <20090224055223.GG7436@sequoia.sous-sol.org> <715D42877B251141A38726ABF5CABF2C0195A7B803@pdsmsx503.ccr.corp.intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: "'Chris Wright'" , "'Jesse Barnes'" , "'Greg KH'" , "'Mark McLoughlin'" , "'kvm'" , "'linux-pci@vger.kernel.org'" , "'Chris Wright'" , "Dugger, Donald D" , "Kay, Allen M" To: "Han, Weidong" Return-path: Content-Disposition: inline In-Reply-To: <715D42877B251141A38726ABF5CABF2C0195A7B803@pdsmsx503.ccr.corp.intel.com> Sender: linux-pci-owner@vger.kernel.org List-Id: kvm.vger.kernel.org * Han, Weidong (weidong.han@intel.com) wrote: > Chris Wright wrote: > > This adds a remove_id sysfs entry to allow users of new_id to later > > remove the added dynid. One use case is management tools that want to > > dynamically bind/unbind devices to pci-stub driver while devices are > > assigned to KVM guests. Rather than having to track which driver was > > originally bound to the driver, a mangement tool can simply: > > > > # echo "8086 10f5" > /sys/bus/pci/drivers/pci-stub/new_id > > # echo 0000:00:19.0 > /sys/bus/pci/devices/0000:00:19.0/driver/unbind > > # echo 0000:00:19.0 > /sys/bus/pci/drivers/pci-stub/bind > > > > Guest uses device > > > > # echo "8086 10f5" > /sys/bus/pci/drivers/pci-stub/remove_id > > # echo 0000:00:19.0 > /sys/bus/pci/drivers_probe > > After above two commands, I found device 00:19.0 was still bound to pci-stub, and doesn't work. I found it needs following unbind command between remove_id and drivers_probe to make it work with original driver: > # echo "8086 10f5" > /sys/bus/pci/drivers/pci-stub/unbind > > Chris, did it also happen on your side? or did I miss something? You're right. I just forgot to put that in the changelog. thanks, -chris