All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Michael S. Tsirkin" <mst@redhat.com>
To: Laurent Vivier <lvivier@redhat.com>
Cc: "Philippe Mathieu-Daudé" <philmd@redhat.com>,
	qemu-devel@nongnu.org, "Eduardo Habkost" <ehabkost@redhat.com>,
	"Cleber Rosa" <crosa@redhat.com>
Subject: Re: [PATCH] scripts: add a script to list virtio devices in a system
Date: Tue, 11 May 2021 04:33:00 -0400	[thread overview]
Message-ID: <20210511043002-mutt-send-email-mst@kernel.org> (raw)
In-Reply-To: <51a6753f-2d98-2aee-4d88-0c49e87e0cea@redhat.com>

On Fri, May 07, 2021 at 08:17:33AM +0200, Laurent Vivier wrote:
> On 06/05/2021 21:50, Philippe Mathieu-Daudé wrote:
> > 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 <lvivier@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?
> 
> Yes, but where?
> 
> It would go under virtio section, but I'm not sure Michael wants to maintain it.

I don't have a problem with getting patches for it.

> Perhaps "Python scripts" section?
> 
> > Otherwise:
> > Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
> > 
> 
> Thanks,
> Laurent



  reply	other threads:[~2021-05-11  9:13 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-05-06 19:33 [PATCH] scripts: add a script to list virtio devices in a system Laurent Vivier
2021-05-06 19:50 ` Philippe Mathieu-Daudé
2021-05-07  6:17   ` Laurent Vivier
2021-05-11  8:33     ` Michael S. Tsirkin [this message]
2021-05-11  8:32 ` Michael S. Tsirkin
2021-05-11  9:17 ` Peter Maydell
2021-05-12  7:44   ` Laurent Vivier

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210511043002-mutt-send-email-mst@kernel.org \
    --to=mst@redhat.com \
    --cc=crosa@redhat.com \
    --cc=ehabkost@redhat.com \
    --cc=lvivier@redhat.com \
    --cc=philmd@redhat.com \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.