On Tue, Mar 04, 2008 at 01:32:22PM -0600, 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.
Its there already:
(qemu) info pci
Bus 0, device 0, function 0:
Host bridge: PCI device 8086:1237
Bus 0, device 1, function 0:
ISA bridge: PCI device 8086:7000
Bus 0, device 1, function 1:
IDE controller: PCI device 8086:7010
BAR4: I/O at 0xc000 [0xc00f].
Bus 0, device 1, function 3:
Bridge: PCI device 8086:7113
IRQ 9.
Bus 0, device 2, function 0:
VGA controller: PCI device 1013:00b8
BAR0: 32 bit memory at 0xf0000000 [0xf1ffffff].
BAR1: 32 bit memory at 0xf2000000 [0xf2000fff].
Bus 0, device 3, function 0:
Ethernet controller: PCI device 10ec:8139
IRQ 11.
BAR0: I/O at 0xc100 [0xc1ff].
BAR1: 32 bit memory at 0xf2001000 [0xf20010ff].
And block,network:
(qemu) info block
ide0-hd0: type=hd removable=0 file=/root/images/marcelo5.img ro=0 drv=raw
ide1-cd0: type=cdrom removable=1 locked=0 [not inserted]
floppy0: type=floppy removable=1 locked=0 [not inserted]
sd0: type=floppy removable=1 locked=0 [not inserted]
scsi0-hd0: type=hd removable=0 file=/tmp/bigfile ro=0 drv=raw
scsi0-hd1: type=hd removable=0 file=/tmp/bigfile.2 ro=0 drv=raw
(qemu) info network
VLAN 0 devices:
tap: ifname=tap0 setup_script=qemu-ifup-tap0
rtl8139 pci macaddr=52:54:00:12:34:56
Perhaps reporting the <bus,slot> pair for PCI devices on block and
network info provides the necessary information that you need Dan?
Oh, and unit,bus,media for block too.
-------------------------------------------------------------------------
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
[email protected]
https://lists.sourceforge.net/lists/listinfo/kvm-devel