[Libosinfo] [PATCH] Add missing virtio PCI devices

Daniel P. Berrange berrange at redhat.com
Thu Jul 7 08:57:53 UTC 2016


On Wed, Jul 06, 2016 at 12:32:18PM +0200, Marc-André Lureau wrote:
> Hi
> 
> On Tue, Jul 5, 2016 at 2:48 PM, Daniel P. Berrange <berrange at redhat.com> wrote:
> > We were missing virtio-rng and virtio-scsi, as well as
> > all the virtio 1.0 device variants, which have different
> > PCI IDS
> >
> > The pci.ids file lists the following known devices
> >
> >         1000  Virtio network device
> >         1001  Virtio block device
> >         1002  Virtio memory balloon
> >         1003  Virtio console
> >         1004  Virtio SCSI
> >         1005  Virtio RNG
> >         1009  Virtio filesystem
> >         1041  Virtio network device
> >         1042  Virtio block device
> >         1043  Virtio console
> >         1044  Virtio RNG
> >         1045  Virtio memory balloon
> >         1048  Virtio SCSI
> >         1049  Virtio filesystem
> >         1050  Virtio GPU
> >         1052  Virtio input
> >
> > Of which, only 1001, 1001, 1002 and 1009 were recorded in
> > libosinfo. They would have appeared via pci.ids file loading,
> > but they would have lacked friendly names.
> >
> > Signed-off-by: Daniel P. Berrange <berrange at redhat.com>
> > ---
> >  configure.ac                                        | 11 +++++++++++
> >  data/device/pcisig.com/Makefile.am                  | 11 +++++++++++
> >  data/device/pcisig.com/pci-1af4-1004.d/Makefile.am  |  1 +
> >  data/device/pcisig.com/pci-1af4-1004.d/class.xml.in |  6 ++++++
> >  data/device/pcisig.com/pci-1af4-1005.d/Makefile.am  |  1 +
> >  data/device/pcisig.com/pci-1af4-1005.d/class.xml.in |  6 ++++++
> >  data/device/pcisig.com/pci-1af4-1041.d/Makefile.am  |  1 +
> >  data/device/pcisig.com/pci-1af4-1041.d/class.xml.in |  6 ++++++
> >  data/device/pcisig.com/pci-1af4-1042.d/Makefile.am  |  1 +
> >  data/device/pcisig.com/pci-1af4-1042.d/class.xml.in |  6 ++++++
> >  data/device/pcisig.com/pci-1af4-1043.d/Makefile.am  |  1 +
> >  data/device/pcisig.com/pci-1af4-1043.d/class.xml.in |  6 ++++++
> >  data/device/pcisig.com/pci-1af4-1044.d/Makefile.am  |  1 +
> >  data/device/pcisig.com/pci-1af4-1044.d/class.xml.in |  6 ++++++
> >  data/device/pcisig.com/pci-1af4-1045.d/Makefile.am  |  1 +
> >  data/device/pcisig.com/pci-1af4-1045.d/class.xml.in |  6 ++++++
> >  data/device/pcisig.com/pci-1af4-1048.d/Makefile.am  |  1 +
> >  data/device/pcisig.com/pci-1af4-1048.d/class.xml.in |  6 ++++++
> >  data/device/pcisig.com/pci-1af4-1049.d/Makefile.am  |  1 +
> >  data/device/pcisig.com/pci-1af4-1049.d/class.xml.in |  6 ++++++
> >  data/device/pcisig.com/pci-1af4-1050.d/Makefile.am  |  1 +
> >  data/device/pcisig.com/pci-1af4-1050.d/class.xml.in |  6 ++++++
> >  data/device/pcisig.com/pci-1af4-1052.d/Makefile.am  |  1 +
> >  data/device/pcisig.com/pci-1af4-1052.d/class.xml.in |  6 ++++++
> >  24 files changed, 99 insertions(+)
> >  create mode 100644 data/device/pcisig.com/pci-1af4-1004.d/Makefile.am
> >  create mode 100644 data/device/pcisig.com/pci-1af4-1004.d/class.xml.in
> >  create mode 100644 data/device/pcisig.com/pci-1af4-1005.d/Makefile.am
> >  create mode 100644 data/device/pcisig.com/pci-1af4-1005.d/class.xml.in
> >  create mode 100644 data/device/pcisig.com/pci-1af4-1041.d/Makefile.am
> >  create mode 100644 data/device/pcisig.com/pci-1af4-1041.d/class.xml.in
> >  create mode 100644 data/device/pcisig.com/pci-1af4-1042.d/Makefile.am
> >  create mode 100644 data/device/pcisig.com/pci-1af4-1042.d/class.xml.in
> >  create mode 100644 data/device/pcisig.com/pci-1af4-1043.d/Makefile.am
> >  create mode 100644 data/device/pcisig.com/pci-1af4-1043.d/class.xml.in
> >  create mode 100644 data/device/pcisig.com/pci-1af4-1044.d/Makefile.am
> >  create mode 100644 data/device/pcisig.com/pci-1af4-1044.d/class.xml.in
> >  create mode 100644 data/device/pcisig.com/pci-1af4-1045.d/Makefile.am
> >  create mode 100644 data/device/pcisig.com/pci-1af4-1045.d/class.xml.in
> >  create mode 100644 data/device/pcisig.com/pci-1af4-1048.d/Makefile.am
> >  create mode 100644 data/device/pcisig.com/pci-1af4-1048.d/class.xml.in
> >  create mode 100644 data/device/pcisig.com/pci-1af4-1049.d/Makefile.am
> >  create mode 100644 data/device/pcisig.com/pci-1af4-1049.d/class.xml.in
> >  create mode 100644 data/device/pcisig.com/pci-1af4-1050.d/Makefile.am
> >  create mode 100644 data/device/pcisig.com/pci-1af4-1050.d/class.xml.in
> >  create mode 100644 data/device/pcisig.com/pci-1af4-1052.d/Makefile.am
> >  create mode 100644 data/device/pcisig.com/pci-1af4-1052.d/class.xml.in
> >
> 
> make check fails, it can be fixed with the following (not sure if it's
> the best solution though):

Sigh, yes, you're right. The changes you suggest look just fine to me.

> diff --git a/data/device/pcisig.com/pci-1af4-1004.d/class.xml.in
> b/data/device/pcisig.com/pci-1af4-1004.d/class.xml.in
> index bebf98c..c9857ec 100644
> --- a/data/device/pcisig.com/pci-1af4-1004.d/class.xml.in
> +++ b/data/device/pcisig.com/pci-1af4-1004.d/class.xml.in
> @@ -1,6 +1,6 @@
>  <libosinfo version="0.0.1">
>    <device id="http://pcisig.com/pci/1af4/1004">
>      <name>virtio-scsi</name>
> -    <class>scsi</class>
> +    <class>block</class>
>    </device>
>  </libosinfo>
> diff --git a/data/device/pcisig.com/pci-1af4-1048.d/class.xml.in
> b/data/device/pcisig.com/pci-1af4-1048.d/class.xml.in
> index 096da30..1eb92ef 100644
> --- a/data/device/pcisig.com/pci-1af4-1048.d/class.xml.in
> +++ b/data/device/pcisig.com/pci-1af4-1048.d/class.xml.in
> @@ -1,6 +1,6 @@
>  <libosinfo version="0.0.1">
>    <device id="http://pcisig.com/pci/1af4/1048">
>      <name>virtio1.0-scsi</name>
> -    <class>scsi</class>
> +    <class>block</class>
>    </device>
>  </libosinfo>
> diff --git a/data/device/pcisig.com/pci-1af4-1050.d/class.xml.in
> b/data/device/pcisig.com/pci-1af4-1050.d/class.xml.in
> index e8ce9d9..40e4b32 100644
> --- a/data/device/pcisig.com/pci-1af4-1050.d/class.xml.in
> +++ b/data/device/pcisig.com/pci-1af4-1050.d/class.xml.in
> @@ -1,6 +1,6 @@
>  <libosinfo version="0.0.1">
>    <device id="http://pcisig.com/pci/1af4/1050">
>      <name>virtio1.0-gpu</name>
> -    <class>gpu</class>
> +    <class>video</class>
>    </device>
>  </libosinfo>
> diff --git a/data/schemas/libosinfo.rng b/data/schemas/libosinfo.rng
> index 6149f14..40a0ba1 100644
> --- a/data/schemas/libosinfo.rng
> +++ b/data/schemas/libosinfo.rng
> @@ -81,6 +81,7 @@
>                <value>net</value>
>                <value>video</value>
>                <value>watchdog</value>
> +              <value>rng</value>
>              </choice>
>            </element>
>          </optional>
> 
> Otherwise, looks good to me

Regards,
Daniel
-- 
|: http://berrange.com      -o-    http://www.flickr.com/photos/dberrange/ :|
|: http://libvirt.org              -o-             http://virt-manager.org :|
|: http://autobuild.org       -o-         http://search.cpan.org/~danberr/ :|
|: http://entangle-photo.org       -o-       http://live.gnome.org/gtk-vnc :|




More information about the Libosinfo mailing list