From mboxrd@z Thu Jan 1 00:00:00 1970 From: Anthony Liguori Subject: Re: [patch 14/23] QEMU/KVM: device hot-add Date: Tue, 04 Mar 2008 13:30:42 -0600 Message-ID: <47CDA362.6030903@codemonkey.ws> References: <20080304183419.187172133@localhost.localdomain> <20080304183903.567712544@localhost.localdomain> <20080304191434.GL6713@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Cc: kvm-devel@lists.sourceforge.net, Marcelo Tosatti , Avi Kivity , Glauber Costa To: "Daniel P. Berrange" Return-path: In-Reply-To: <20080304191434.GL6713@redhat.com> 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 Daniel P. Berrange wrote: > On Tue, Mar 04, 2008 at 03:34:33PM -0300, Marcelo Tosatti wrote: > >> Add monitor command to hot-add PCI devices (nic and drive). >> > > [snip] > > >> Index: kvm-userspace.hotplug/qemu/monitor.c >> =================================================================== >> --- kvm-userspace.hotplug.orig/qemu/monitor.c >> +++ kvm-userspace.hotplug/qemu/monitor.c >> @@ -1354,6 +1354,7 @@ static term_cmd_t term_cmds[] = { >> { "migrate_set_speed", "s", do_migrate_set_speed, >> "value", "set maximum speed (in bytes) for migrations" }, >> { "cpu_set", "is", do_cpu_set_nr, "cpu [online|offline]", "change cpu state" }, >> + { "pci_add", "ss", device_hot_add, "nic|drive [vlan=n][,macaddr=addr][,model=type] [[file=file][,if=type][,bus=n][,unit=m][,media=d][index=i]]", "hotadd PCI device" }, >> > > This syntax is not very nice IMHO. We should have explicit commands > for the different types of device, > > ie > > nic_add [vlan=n][,macaddr=addr][,model=type] > drive_add [[file=file][,if=type][,bus=n][,unit=m][,media=d][index=i]] > > ie, follow naming of the command line args -nic, and -drive. > > This also keeps 'pci_add' as a command name available for future use to > do generic host->guest pci device pass-through. > There is symmetry with pci_add and usb_add since usb_add takes either a USB device identifier or the name of an emulated device along with parameters. So I prefer the pci_add syntax just to maintain consistency with the rest of QEMU. Regards, Anthony Liguori > Regards, > Dan. > ------------------------------------------------------------------------- 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/