[PATCH 0/7] libqos: add VIRTIO PCI 1.0 support

Stefan Hajnoczi posted 7 patches 4 years, 7 months ago
Test asan passed
Test checkpatch failed
Test docker-mingw@fedora passed
Test docker-clang@ubuntu failed
Test docker-quick@centos7 passed
Test FreeBSD passed
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/20191010155853.4325-1-stefanha@redhat.com
Maintainers: Laurent Vivier <lvivier@redhat.com>, Paolo Bonzini <pbonzini@redhat.com>, Thomas Huth <thuth@redhat.com>
There is a newer version of this series
tests/Makefile.include           |   1 +
tests/libqos/pci.h               |   2 +-
tests/libqos/virtio-pci-modern.h |  17 ++
tests/libqos/virtio-pci.h        |  34 ++-
tests/libqos/virtio.h            |   2 +-
tests/libqos/pci.c               |  18 +-
tests/libqos/virtio-mmio.c       |   6 +-
tests/libqos/virtio-pci-modern.c | 405 +++++++++++++++++++++++++++++++
tests/libqos/virtio-pci.c        |  91 ++++---
9 files changed, 529 insertions(+), 47 deletions(-)
create mode 100644 tests/libqos/virtio-pci-modern.h
create mode 100644 tests/libqos/virtio-pci-modern.c
[PATCH 0/7] libqos: add VIRTIO PCI 1.0 support
Posted by Stefan Hajnoczi 4 years, 7 months ago
New VIRTIO devices are Non-Transitional.  This means they only expose the
VIRTIO 1.0 PCI register interface.

The libqos virtio-pci.c code only supports Legacy and Transitional devices (in
Legacy mode).  This patch series add VIRTIO PCI 1.0 support so that tests can
run against Non-Transitional devices too.

Note that this does not actually add VIRTIO 1.0 support to our tests.  That
would require extending feature negotiation (VIRTIO_F_VERSION_1).  I will look
at this as a separate step but the most pressing issue is getting libqos to
work with Non-Transitional virtio-pci devices.

Stefan Hajnoczi (7):
  libqos: extract Legacy virtio-pci.c code
  libqos: add iteration support to qpci_find_capability()
  libqos: pass full QVirtQueue to set_queue_address()
  libqos: add MSI-X callbacks to QVirtioPCIDevice
  libqos: expose common virtqueue setup/cleanup functions
  libqos: make the virtio-pci BAR index configurable
  libqos: add VIRTIO PCI 1.0 support

 tests/Makefile.include           |   1 +
 tests/libqos/pci.h               |   2 +-
 tests/libqos/virtio-pci-modern.h |  17 ++
 tests/libqos/virtio-pci.h        |  34 ++-
 tests/libqos/virtio.h            |   2 +-
 tests/libqos/pci.c               |  18 +-
 tests/libqos/virtio-mmio.c       |   6 +-
 tests/libqos/virtio-pci-modern.c | 405 +++++++++++++++++++++++++++++++
 tests/libqos/virtio-pci.c        |  91 ++++---
 9 files changed, 529 insertions(+), 47 deletions(-)
 create mode 100644 tests/libqos/virtio-pci-modern.h
 create mode 100644 tests/libqos/virtio-pci-modern.c

-- 
2.21.0


Re: [PATCH 0/7] libqos: add VIRTIO PCI 1.0 support
Posted by no-reply@patchew.org 4 years, 7 months ago
Patchew URL: https://patchew.org/QEMU/20191010155853.4325-1-stefanha@redhat.com/



Hi,

This series seems to have some coding style problems. See output below for
more information:

Subject: [PATCH 0/7] libqos: add VIRTIO PCI 1.0 support
Type: series
Message-id: 20191010155853.4325-1-stefanha@redhat.com

=== TEST SCRIPT BEGIN ===
#!/bin/bash
git rev-parse base > /dev/null || exit 0
git config --local diff.renamelimit 0
git config --local diff.renames True
git config --local diff.algorithm histogram
./scripts/checkpatch.pl --mailback base..
=== TEST SCRIPT END ===

Switched to a new branch 'test'
f7c9309 libqos: add VIRTIO PCI 1.0 support
f382525 libqos: make the virtio-pci BAR index configurable
e0aeef1 libqos: expose common virtqueue setup/cleanup functions
e3477ab libqos: add MSI-X callbacks to QVirtioPCIDevice
0042dff libqos: pass full QVirtQueue to set_queue_address()
631d620 libqos: add iteration support to qpci_find_capability()
29a23f9 libqos: extract Legacy virtio-pci.c code

=== OUTPUT BEGIN ===
1/7 Checking commit 29a23f95d7cf (libqos: extract Legacy virtio-pci.c code)
2/7 Checking commit 631d6200075a (libqos: add iteration support to qpci_find_capability())
3/7 Checking commit 0042dff221ea (libqos: pass full QVirtQueue to set_queue_address())
4/7 Checking commit e3477ab2dc8e (libqos: add MSI-X callbacks to QVirtioPCIDevice)
ERROR: line over 90 characters
#31: FILE: tests/libqos/virtio-pci.c:283:
+static void qvirtio_pci_set_queue_vector(QVirtioPCIDevice *d, uint16_t vq_idx, uint16_t entry)

total: 1 errors, 0 warnings, 99 lines checked

Patch 4/7 has style problems, please review.  If any of these errors
are false positives report them to the maintainer, see
CHECKPATCH in MAINTAINERS.

5/7 Checking commit e0aeef123dc1 (libqos: expose common virtqueue setup/cleanup functions)
6/7 Checking commit f382525d6da2 (libqos: make the virtio-pci BAR index configurable)
7/7 Checking commit f7c93099d7df (libqos: add VIRTIO PCI 1.0 support)
WARNING: added, moved or deleted file(s), does MAINTAINERS need updating?
#33: 
new file mode 100644

ERROR: line over 90 characters
#235: FILE: tests/libqos/virtio-pci-modern.c:198:
+static QVirtQueue *virtqueue_setup(QVirtioDevice *d, QGuestAllocator *alloc, uint16_t index)

WARNING: line over 80 characters
#298: FILE: tests/libqos/virtio-pci-modern.c:261:
+static void set_queue_vector(QVirtioPCIDevice *d, uint16_t vq_idx, uint16_t entry)

WARNING: Block comments use a leading /* on a separate line
#328: FILE: tests/libqos/virtio-pci-modern.c:291:
+    /* "Any PCI device with ... PCI Device ID 0x1000 through 0x107F inclusive

WARNING: Block comments use a leading /* on a separate line
#336: FILE: tests/libqos/virtio-pci-modern.c:299:
+    /* "Devices MAY utilize a Transitional PCI Device ID range, 0x1000 to

WARNING: Block comments use a leading /* on a separate line
#340: FILE: tests/libqos/virtio-pci-modern.c:303:
+        /* "Transitional devices MUST have the PCI Subsystem Device ID matching

WARNING: Block comments use a leading /* on a separate line
#345: FILE: tests/libqos/virtio-pci-modern.c:308:
+        /* "The PCI Device ID is calculated by adding 0x1040 to the Virtio

WARNING: Block comments use a leading /* on a separate line
#393: FILE: tests/libqos/virtio-pci-modern.c:356:
+    /* Due to the qpci_iomap() API we only support devices that put all

total: 1 errors, 7 warnings, 469 lines checked

Patch 7/7 has style problems, please review.  If any of these errors
are false positives report them to the maintainer, see
CHECKPATCH in MAINTAINERS.

=== OUTPUT END ===

Test command exited with code: 1


The full log is available at
http://patchew.org/logs/20191010155853.4325-1-stefanha@redhat.com/testing.checkpatch/?type=message.
---
Email generated automatically by Patchew [https://patchew.org/].
Please send your feedback to patchew-devel@redhat.com
Re: [PATCH 0/7] libqos: add VIRTIO PCI 1.0 support
Posted by Stefan Hajnoczi 4 years, 7 months ago
On Thu, Oct 10, 2019 at 02:12:00PM -0700, no-reply@patchew.org wrote:
> 4/7 Checking commit e3477ab2dc8e (libqos: add MSI-X callbacks to QVirtioPCIDevice)
> ERROR: line over 90 characters
> #31: FILE: tests/libqos/virtio-pci.c:283:
> +static void qvirtio_pci_set_queue_vector(QVirtioPCIDevice *d, uint16_t vq_idx, uint16_t entry)
[...]
> 7/7 Checking commit f7c93099d7df (libqos: add VIRTIO PCI 1.0 support)
> WARNING: added, moved or deleted file(s), does MAINTAINERS need updating?
[...]
> ERROR: line over 90 characters
> #235: FILE: tests/libqos/virtio-pci-modern.c:198:
> +static QVirtQueue *virtqueue_setup(QVirtioDevice *d, QGuestAllocator *alloc, uint16_t index)
> 
> WARNING: line over 80 characters
> #298: FILE: tests/libqos/virtio-pci-modern.c:261:
> +static void set_queue_vector(QVirtioPCIDevice *d, uint16_t vq_idx, uint16_t entry)
> 
> WARNING: Block comments use a leading /* on a separate line
> #328: FILE: tests/libqos/virtio-pci-modern.c:291:
> +    /* "Any PCI device with ... PCI Device ID 0x1000 through 0x107F inclusive
> 
> WARNING: Block comments use a leading /* on a separate line
> #336: FILE: tests/libqos/virtio-pci-modern.c:299:
> +    /* "Devices MAY utilize a Transitional PCI Device ID range, 0x1000 to
> 
> WARNING: Block comments use a leading /* on a separate line
> #340: FILE: tests/libqos/virtio-pci-modern.c:303:
> +        /* "Transitional devices MUST have the PCI Subsystem Device ID matching
> 
> WARNING: Block comments use a leading /* on a separate line
> #345: FILE: tests/libqos/virtio-pci-modern.c:308:
> +        /* "The PCI Device ID is calculated by adding 0x1040 to the Virtio
> 
> WARNING: Block comments use a leading /* on a separate line
> #393: FILE: tests/libqos/virtio-pci-modern.c:356:
> +    /* Due to the qpci_iomap() API we only support devices that put all

Will fix these in v2.