On 5/6/21 9:33 PM, Laurent Vivier wrote: > Add "lsvirtio" that lists all virtio devices in a system > the same way lspci does for the PCI cards. > > For instance: > > $ ./lsvirtio > 0000:01:00.0 virtio0 Red Hat, Inc. (PCI) Virtio Network Card > Subsystem: virtio > Modalias: virtio:d00000001v00001AF4
"ModAlias" maybe? > Status: ACKNOWLEDGE DRIVER_OK DRIVER FEATURES_OK > Feature: CSUM > Feature: GUEST_CSUM > Feature: CTRL_GUEST_OFFLOADS > Feature: MAC > Feature: GUEST_TSO4 > Feature: GUEST_TSO6 > Feature: GUEST_ECN > Feature: GUEST_UFO > Feature: HOST_TSO4 > Feature: HOST_TSO6 > Feature: HOST_ECN > Feature: HOST_UFO > Feature: MRG_RXBUF > Feature: STATUS > Feature: CTRL_VQ > Feature: CTRL_RX > Feature: CTRL_VLAN > Feature: GUEST_ANNOUNCE > Feature: CTRL_MAC_ADDR > Feature: RING_INDIRECT_DESC > Feature: RING_EVENT_IDX > Feature: VERSION_1 > Kernel driver in use: virtio_net > Interfaces: enp1s0 > > 0000:03:00.0 virtio1 Red Hat, Inc. (PCI) Virtio Console > Subsystem: virtio > Modalias: virtio:d00000003v00001AF4 > Status: ACKNOWLEDGE DRIVER_OK DRIVER FEATURES_OK > Feature: MULTIPORT > Feature: RING_INDIRECT_DESC > Feature: RING_EVENT_IDX > Feature: VERSION_1 > Kernel driver in use: virtio_console > Interfaces: vport1p1 > ... > > This is useful to have the list of virtio devices when they are not > mapped by a PCI card: > > $ ./lsvirtio > virtio-mmio.121 virtio0 Virt (MMIO) Virtio 9P transport > Subsystem: virtio > Modalias: virtio:d00000009v554D4551 > Status: FEATURES_OK ACKNOWLEDGE DRIVER DRIVER_OK > Feature: MOUNT_TAG > Feature: RING_INDIRECT_DESC > Feature: RING_EVENT_IDX > Feature: VERSION_1 > Kernel driver in use: 9pnet_virtio > Interfaces: home0 > > virtio-mmio.122 virtio1 Virt (MMIO) Virtio GPU Device > Subsystem: virtio > Modalias: virtio:d00000010v554D4551 > Status: FEATURES_OK ACKNOWLEDGE DRIVER DRIVER_OK > Feature: EDID > Feature: RING_INDIRECT_DESC > Feature: RING_EVENT_IDX > Feature: VERSION_1 > Kernel driver in use: virtio_gpu > Interfaces: fb0 > ... > > Signed-off-by: Laurent Vivier <lviv...@redhat.com> > --- > scripts/lsvirtio | 317 +++++++++++++++++++++++++++++++++++++++++++++++ > 1 file changed, 317 insertions(+) > create mode 100755 scripts/lsvirtio Can you add an entry for the file in MAINTAINERS? Otherwise: Reviewed-by: Philippe Mathieu-Daudé <phi...@redhat.com>