info qtree
This awesome QEMU monitor command shows a nice tree view of how all the QEMU devices are placed.
You can get a QEMU monitor prompt either via:
- Ctrl + A C on
-nographic
- Ctrl + Alt + ?, where
?
is either 1, 2, 3, etc. in a graphic QEMU window
-monitor telnet::45454,server,nowait
and then connect to it with telnet 45454
Then for example, I can see my network device as:
dev: rtl8139, id ""
mac = "52:54:00:12:34:56"
vlan = <null>
netdev = "net0"
addr = 03.0
romfile = "efi-rtl8139.rom"
rombar = 1 (0x1)
multifunction = false
command_serr_enable = true
x-pcie-lnksta-dllla = true
x-pcie-extcap-init = true
class Ethernet controller, addr 00:03.0, pci id 10ec:8139 (sub 1af4:1100)
bar 0: i/o at 0xc000 [0xc0ff]
bar 1: mem at 0xfeb51000 [0xfeb510ff]
bar 6: mem at 0xffffffffffffffff [0x3fffe]
and my storage device as:
bus: virtio-bus
type virtio-pci-bus
dev: virtio-blk-device, id ""
drive = "virtio0"
logical_block_size = 512 (0x200)
physical_block_size = 512 (0x200)
min_io_size = 0 (0x0)
opt_io_size = 0 (0x0)
discard_granularity = 4294967295 (0xffffffff)
write-cache = "auto"
share-rw = false
rerror = "auto"
werror = "auto"
cyls = 1040 (0x410)
heads = 16 (0x10)
secs = 63 (0x3f)
serial = ""
config-wce = true
scsi = false
request-merging = true
num-queues = 1 (0x1)
queue-size = 128 (0x80)
iothread = ""
indirect_desc = true
event_idx = true
notify_on_empty = true
any_layout = true
iommu_platform = false
and other PCI devices as:
dev: edu, id ""
addr = 06.0
romfile = ""
rombar = 1 (0x1)
multifunction = false
command_serr_enable = true
x-pcie-lnksta-dllla = true
x-pcie-extcap-init = true
class Class 00ff, addr 00:06.0, pci id 1234:11e8 (sub 1af4:1100)
bar 0: mem at 0xfea00000 [0xfeafffff]
Tested in QEMU v2.12.