From mboxrd@z Thu Jan 1 00:00:00 1970 From: Avi Kivity Subject: Re: [patch 23/23] QEMU/KVM: device hot-remove Date: Wed, 05 Mar 2008 07:46:39 +0200 Message-ID: <47CE33BF.7090206@qumranet.com> References: <20080304183419.187172133@localhost.localdomain> <20080304183904.138632390@localhost.localdomain> <20080304191843.GM6713@redhat.com> <47CDA3C6.6080407@codemonkey.ws> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Cc: kvm-devel@lists.sourceforge.net, Marcelo Tosatti , Glauber Costa To: Anthony Liguori Return-path: In-Reply-To: <47CDA3C6.6080407@codemonkey.ws> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: kvm-devel-bounces@lists.sourceforge.net Errors-To: kvm-devel-bounces@lists.sourceforge.net List-Id: kvm.vger.kernel.org Anthony Liguori wrote: > Daniel P. Berrange wrote: >> Removing based on pci device number is very un-pleasant, since its >> not something >> the user of the monitor cares about. Nor do they even know what the >> PCI device number >> assigned by 'pci_add' is. >> >> As with addition, I'd like separate commands for NIC vs Drive, and >> for the removal >> key to be based upon the same data used for addition. eg so one can >> remove the >> NIC based on its MAC address, or remove the drive based on the >> (if,bus,unit,filename) >> data items. >> >> nic_remove [vlan=n][,macaddr=addr][,model=type] >> drive_remove >> [[file=file][,if=type][,bus=n][,unit=m][,media=d][index=i]] >> >> Though, perhaps still allow removal based on the PCI device ID as an >> alternative >> for those who happen to have that data available. >> > > pci_remove is consistent with usb_del and things like stopcapture. > The thing to add would be an "info pci" that let a user associate the > slot number with higher level information about the device. > pci_add should return the slot information, which can later be used as an identifier for pci_remove. It would also be nice to be able to specify the slot in pci_add, though I hardly have a compelling use case for that. -- Do not meddle in the internals of kernels, for they are subtle and quick to panic. ------------------------------------------------------------------------- This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/