On Tue, Mar 04, 2008 at 05:00:09PM -0300, Marcelo Tosatti wrote: > On Tue, Mar 04, 2008 at 01:32:22PM -0600, Anthony Liguori wrote: > > Daniel P. Berrange wrote: > > > > > > 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
This is utterly horrible for a human to parse & use if they're using the QEMU monitor, let alone something that libvirt could parse. In fact this doesn't let you map between the network device & pci device if there is more than one device added because 'info pci' doesn't show the MAC address info, and 'info network' does not show any PCI device number info - the same for disks. > 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. Yes, getting PCI (bus,slot,func) triple reported against each line in the 'info block' and 'info network' data would at least let you reliably map from NIC -> PCI devs. 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