From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1LWepC-0003th-9A for qemu-devel@nongnu.org; Mon, 09 Feb 2009 17:41:58 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1LWepB-0003sH-7R for qemu-devel@nongnu.org; Mon, 09 Feb 2009 17:41:57 -0500 Received: from [199.232.76.173] (port=45743 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LWepB-0003s5-2g for qemu-devel@nongnu.org; Mon, 09 Feb 2009 17:41:57 -0500 Received: from mx2.redhat.com ([66.187.237.31]:53039) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1LWepA-0005WS-AX for qemu-devel@nongnu.org; Mon, 09 Feb 2009 17:41:56 -0500 Received: from int-mx2.corp.redhat.com (int-mx2.corp.redhat.com [172.16.27.26]) by mx2.redhat.com (8.13.8/8.13.8) with ESMTP id n19Mfs2M013432 for ; Mon, 9 Feb 2009 17:41:54 -0500 Date: Mon, 9 Feb 2009 20:41:25 -0200 From: Marcelo Tosatti Subject: Re: [Qemu-devel] [patch 2/2] qemu: PCI device, disk and host network hot-add / hot-remove Message-ID: <20090209224125.GA11520@amt.cnet> References: <20090206174406.589893548@amt.cnet> <20090206174840.681967121@amt.cnet> <498EAF22.1030902@redhat.com> <20090208172844.GA3854@amt.cnet> <20090209084139.GA20629@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20090209084139.GA20629@redhat.com> Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: "Daniel P. Berrange" Cc: Markus Armbruster , Avi Kivity , qemu-devel@nongnu.org On Mon, Feb 09, 2009 at 08:41:39AM +0000, Daniel P. Berrange wrote: > On Sun, Feb 08, 2009 at 03:28:45PM -0200, Marcelo Tosatti wrote: > > On Sun, Feb 08, 2009 at 12:08:34PM +0200, Avi Kivity wrote: > > > Marcelo Tosatti wrote: > > >> Add monitor command to hot-add PCI devices (nic and storage). > > >> Syntax is: > > >> pci_add pci_addr=[[:]:] nic|storage params > > >> It returns the domain, bus and slot for the newly added device on > > >> success > > > > > > Instead of returning something, how about > > > > > > pci_add pci_addr=...,name=blah > > > > > > and then > > > > > > pci_del blah > > > > > > 'info pci' could also output the name so that it could be associated > > > with the bus address. > > > > Sure that can be done. Like an alias. So you identify > > with a name. I can see it simplifies direct management of hotplug on the > > monitor. > > Also bear in mind that we need the ability to hot unplug devices which > were specified on the command line argv. For these we currently have > neither the pci , nor are given any 'name'. Any reason you can't discover from "info pci" ? (domain/bus are always zero at the moment). > Markus has previously suggested allowing to be > specified on the cli which would let us manually assign & use that > info for unplug. > A device type specific unique naming would be useful too though. In > changeset r6220, Mark McLoughlin provided the ability to give every > single NIC a unique name. I'd like to be able to use that name for > unplug. The NIC identifiers are not specific to PCI. So if you specify a non-PCI nic with the cli, you should not expect "pci_del name" to work. Now I see where you're getting at with the private discussion around "dev_add/dev_add". Ok, simply adding a PCI specific identifier can be messy (since it will clash with net identifier, for example). So what is needed is, perhaps, a unique identifier across all devices in the system? (hum, QEMUDevice from http://bellard.org/qemu/patches/qemu-config2.diff). > For disks, meanwhile we generally know the logic bus,unit,index info as > provided to -drive / pci_add disk, which can be used to unplug. > > So, I'd suggest that pci_del allow either a It does. > or some form of unique name, or device type specific unique > identifier. Ideally so we can still just as easily use unplug for > devices added on the cli, as for those added via the monitor. info pci should work. Thanks.