On Tue, Mar 04, 2008 at 03:34:42PM -0300, Marcelo Tosatti wrote:
> Add monitor command to hot-remove devices.
> 
> Remove device data on _EJ0 notification.
> 
> Signed-off-by: Marcelo Tosatti <[EMAIL PROTECTED]>
> 
> Index: kvm-userspace.hotplug/qemu/monitor.c
> ===================================================================
> --- kvm-userspace.hotplug.orig/qemu/monitor.c
> +++ kvm-userspace.hotplug/qemu/monitor.c
> @@ -1355,6 +1355,7 @@ static term_cmd_t term_cmds[] = {
>        "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" },
> +    { "pci_remove", "i", device_hot_remove, "slot number", "hot remove PCI 
> device" },
>      { NULL, NULL, },

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.

Regards,
Dan.
-- 
|=- Red Hat, Engineering, Emerging Technologies, Boston.  +1 978 392 2496 -=|
|=-           Perl modules: http://search.cpan.org/~danberr/              -=|
|=-               Projects: http://freshmeat.net/~danielpb/               -=|
|=-  GnuPG: 7D3B9505   F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742 7D3B 9505  -=| 

-------------------------------------------------------------------------
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/
_______________________________________________
kvm-devel mailing list
kvm-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/kvm-devel

Reply via email to