[PULL 00/52] virtio,pci,pc: features,fixes,cleanups

Michael S. Tsirkin posted 52 patches 2 years, 3 months ago
Test checkpatch passed
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/20220106131534.423671-1-mst@redhat.com
Maintainers: David Hildenbrand <david@redhat.com>, Marcel Apfelbaum <marcel.apfelbaum@gmail.com>, Eduardo Habkost <eduardo@habkost.net>, Jason Wang <jasowang@redhat.com>, Fam Zheng <fam@euphon.net>, "Marc-André Lureau" <marcandre.lureau@redhat.com>, Stefan Hajnoczi <stefanha@redhat.com>, Paolo Bonzini <pbonzini@redhat.com>, Igor Mammedov <imammedo@redhat.com>, Richard Henderson <richard.henderson@linaro.org>, Raphael Norwitz <raphael.norwitz@nutanix.com>, "Michael S. Tsirkin" <mst@redhat.com>, "Gonglei (Arei)" <arei.gonglei@huawei.com>, Hanna Reitz <hreitz@redhat.com>, Gerd Hoffmann <kraxel@redhat.com>, Kevin Wolf <kwolf@redhat.com>, Ani Sinha <ani@anisinha.ca>, Peter Xu <peterx@redhat.com>, "Dr. David Alan Gilbert" <dgilbert@redhat.com>
There is a newer version of this series
qapi/machine.json                                  |  12 +
hw/virtio/virtio-pci.h                             |   4 +-
include/hw/firmware/smbios.h                       |  10 +-
include/hw/i386/pc.h                               |   4 +
include/hw/pci/pci.h                               |   5 +
include/hw/virtio/vhost-backend.h                  |   3 +
include/hw/virtio/vhost.h                          |   4 +
include/hw/virtio/virtio-mem.h                     |  12 +
include/hw/virtio/virtio.h                         |   7 +
include/net/vhost_net.h                            |   2 +
include/qemu/osdep.h                               |   7 +
include/standard-headers/linux/virtio_mem.h        |   9 +-
chardev/char-socket.c                              |  17 +-
hw/acpi/core.c                                     |   4 +-
hw/acpi/pcihp.c                                    |  12 +-
hw/arm/virt.c                                      |   2 +-
hw/block/vhost-user-blk.c                          |   5 +-
hw/display/vhost-user-gpu.c                        |   6 +
hw/i386/acpi-build.c                               |   2 +
hw/i386/intel_iommu.c                              |  38 +-
hw/i386/pc.c                                       |  38 +-
hw/i386/pc_piix.c                                  |   2 +-
hw/i386/pc_q35.c                                   |   2 +-
hw/net/vhost_net.c                                 |   9 +
hw/net/virtio-net.c                                |  10 +-
hw/pci/pci.c                                       |   9 +-
hw/pci/pci_host.c                                  |   6 +-
hw/pci/pcie_aer.c                                  |   4 +-
hw/scsi/vhost-scsi.c                               |  15 +-
hw/smbios/smbios.c                                 |   8 +-
hw/virtio/vhost-backend.c                          |   4 +-
hw/virtio/vhost-user-fs.c                          |   6 +
hw/virtio/vhost-user.c                             | 401 ++++++++++++---------
hw/virtio/vhost-vdpa.c                             |  44 ++-
hw/virtio/vhost-vsock-common.c                     |   6 +
hw/virtio/vhost-vsock.c                            |  11 +-
hw/virtio/vhost.c                                  | 174 ++++++---
hw/virtio/virtio-crypto.c                          |   6 +
hw/virtio/virtio-mem.c                             | 105 +++++-
hw/virtio/virtio-mmio.c                            |  27 ++
hw/virtio/virtio-pci.c                             | 281 ++++++++++-----
hw/virtio/virtio.c                                 |  30 ++
softmmu/cpus.c                                     |   4 +
tests/qtest/bios-tables-test.c                     |  15 +
util/oslib-posix.c                                 | 233 +++++++++---
MAINTAINERS                                        |   8 +
docs/interop/index.rst                             |   1 +
.../virtio-balloon-stats.rst}                      |  58 +--
hw/pci/trace-events                                |   8 +-
hw/virtio/trace-events                             |   1 +
tests/data/acpi/q35/FACP.slic                      | Bin 0 -> 244 bytes
tests/data/acpi/q35/SLIC.slic                      | Bin 0 -> 36 bytes
52 files changed, 1191 insertions(+), 500 deletions(-)
rename docs/{virtio-balloon-stats.txt => interop/virtio-balloon-stats.rst} (66%)
create mode 100644 tests/data/acpi/q35/FACP.slic
create mode 100644 tests/data/acpi/q35/SLIC.slic
[PULL 00/52] virtio,pci,pc: features,fixes,cleanups
Posted by Michael S. Tsirkin 2 years, 3 months ago
Big changes that were tagged originally but did not make the cut:
- SRIOV/nvme (not sure they are my tree material anyway)
- TPM (blocked over Igor's compat concerns)
- ACPI ERST (some coding style violations)

The following changes since commit 7d4ae4d4978079d564d3b6354c90a949130409fe:

  Merge tag 'pull-request-2022-01-05' of https://gitlab.com/thuth/qemu into staging (2022-01-05 08:47:18 -0800)

are available in the Git repository at:

  git://git.kernel.org/pub/scm/virt/kvm/mst/qemu.git tags/for_upstream

for you to fetch changes up to 9399c26697e7c9658d082c6390e143319decaef5:

  virtio/vhost-vsock: don't double close vhostfd, remove redundant cleanup (2022-01-06 07:16:25 -0500)

----------------------------------------------------------------
virtio,pci,pc: features,fixes,cleanups

New virtio mem options.
A vhost-user cleanup.
Control over smbios entry point type.
Config interrupt support for vdpa.
Fixes, cleanups all over the place.

Signed-off-by: Michael S. Tsirkin <mst@redhat.com>

----------------------------------------------------------------
Andy Pei (1):
      hw/vhost-user-blk: turn on VIRTIO_BLK_F_SIZE_MAX feature for virtio blk device

Ani Sinha (2):
      MAINTAINERS: Add a separate entry for acpi/VIOT tables
      acpihp: simplify acpi_pcihp_disable_root_bus

Cindy Lu (10):
      virtio: introduce macro IRTIO_CONFIG_IRQ_IDX
      virtio-pci: decouple notifier from interrupt process
      virtio-pci: decouple the single vector from the interrupt process
      vhost: introduce new VhostOps vhost_set_config_call
      vhost-vdpa: add support for config interrupt
      virtio: add support for configure interrupt
      vhost: add support for configure interrupt
      virtio-net: add support for configure interrupt
      virtio-mmio: add support for configure interrupt
      virtio-pci: add support for configure interrupt

Daniil Tatianin (3):
      hw/scsi/vhost-scsi: don't leak vqs on error
      hw/scsi/vhost-scsi: don't double close vhostfd on error
      virtio/vhost-vsock: don't double close vhostfd, remove redundant cleanup

David Hildenbrand (12):
      virtio-mem: Don't skip alignment checks when warning about block size
      util/oslib-posix: Let touch_all_pages() return an error
      util/oslib-posix: Support MADV_POPULATE_WRITE for os_mem_prealloc()
      util/oslib-posix: Introduce and use MemsetContext for touch_all_pages()
      util/oslib-posix: Don't create too many threads with small memory or little pages
      util/oslib-posix: Avoid creating a single thread with MADV_POPULATE_WRITE
      util/oslib-posix: Support concurrent os_mem_prealloc() invocation
      util/oslib-posix: Forward SIGBUS to MCE handler under Linux
      virtio-mem: Support "prealloc=on" option
      linux-headers: sync VIRTIO_MEM_F_UNPLUGGED_INACCESSIBLE
      virtio-mem: Support VIRTIO_MEM_F_UNPLUGGED_INACCESSIBLE
      virtio-mem: Set "unplugged-inaccessible=auto" for the 7.0 machine on x86

Eduardo Habkost (3):
      smbios: Rename SMBIOS_ENTRY_POINT_* enums
      hw/smbios: Use qapi for SmbiosEntryPointType
      hw/i386: expose a "smbios-entry-point-type" PC machine property

Frederic Barrat (2):
      pci: Export the pci_intx() function
      pcie_aer: Don't trigger a LSI if none are defined

Igor Mammedov (4):
      acpi: fix QEMU crash when started with SLIC table
      tests: acpi: whitelist expected blobs before changing them
      tests: acpi: add SLIC table test
      tests: acpi: SLIC: update expected blobs

Jason Wang (1):
      intel-iommu: correctly check passthrough during translation

Laurent Vivier (1):
      trace-events,pci: unify trace events format

Michael S. Tsirkin (1):
      acpi: validate hotplug selector on access

Roman Kagan (9):
      vhost-user-blk: reconnect on any error during realize
      chardev/char-socket: tcp_chr_recv: don't clobber errno
      chardev/char-socket: tcp_chr_sync_read: don't clobber errno
      vhost-backend: avoid overflow on memslots_limit
      vhost-backend: stick to -errno error return convention
      vhost-vdpa: stick to -errno error return convention
      vhost-user: stick to -errno error return convention
      vhost: stick to -errno error return convention
      vhost-user-blk: propagate error return from generic vhost

Stefan Hajnoczi (1):
      virtio: signal after wrapping packed used_idx

Thomas Huth (2):
      hw/i386/pc: Add missing property descriptions
      docs: reSTify virtio-balloon-stats documentation and move to docs/interop

 qapi/machine.json                                  |  12 +
 hw/virtio/virtio-pci.h                             |   4 +-
 include/hw/firmware/smbios.h                       |  10 +-
 include/hw/i386/pc.h                               |   4 +
 include/hw/pci/pci.h                               |   5 +
 include/hw/virtio/vhost-backend.h                  |   3 +
 include/hw/virtio/vhost.h                          |   4 +
 include/hw/virtio/virtio-mem.h                     |  12 +
 include/hw/virtio/virtio.h                         |   7 +
 include/net/vhost_net.h                            |   2 +
 include/qemu/osdep.h                               |   7 +
 include/standard-headers/linux/virtio_mem.h        |   9 +-
 chardev/char-socket.c                              |  17 +-
 hw/acpi/core.c                                     |   4 +-
 hw/acpi/pcihp.c                                    |  12 +-
 hw/arm/virt.c                                      |   2 +-
 hw/block/vhost-user-blk.c                          |   5 +-
 hw/display/vhost-user-gpu.c                        |   6 +
 hw/i386/acpi-build.c                               |   2 +
 hw/i386/intel_iommu.c                              |  38 +-
 hw/i386/pc.c                                       |  38 +-
 hw/i386/pc_piix.c                                  |   2 +-
 hw/i386/pc_q35.c                                   |   2 +-
 hw/net/vhost_net.c                                 |   9 +
 hw/net/virtio-net.c                                |  10 +-
 hw/pci/pci.c                                       |   9 +-
 hw/pci/pci_host.c                                  |   6 +-
 hw/pci/pcie_aer.c                                  |   4 +-
 hw/scsi/vhost-scsi.c                               |  15 +-
 hw/smbios/smbios.c                                 |   8 +-
 hw/virtio/vhost-backend.c                          |   4 +-
 hw/virtio/vhost-user-fs.c                          |   6 +
 hw/virtio/vhost-user.c                             | 401 ++++++++++++---------
 hw/virtio/vhost-vdpa.c                             |  44 ++-
 hw/virtio/vhost-vsock-common.c                     |   6 +
 hw/virtio/vhost-vsock.c                            |  11 +-
 hw/virtio/vhost.c                                  | 174 ++++++---
 hw/virtio/virtio-crypto.c                          |   6 +
 hw/virtio/virtio-mem.c                             | 105 +++++-
 hw/virtio/virtio-mmio.c                            |  27 ++
 hw/virtio/virtio-pci.c                             | 281 ++++++++++-----
 hw/virtio/virtio.c                                 |  30 ++
 softmmu/cpus.c                                     |   4 +
 tests/qtest/bios-tables-test.c                     |  15 +
 util/oslib-posix.c                                 | 233 +++++++++---
 MAINTAINERS                                        |   8 +
 docs/interop/index.rst                             |   1 +
 .../virtio-balloon-stats.rst}                      |  58 +--
 hw/pci/trace-events                                |   8 +-
 hw/virtio/trace-events                             |   1 +
 tests/data/acpi/q35/FACP.slic                      | Bin 0 -> 244 bytes
 tests/data/acpi/q35/SLIC.slic                      | Bin 0 -> 36 bytes
 52 files changed, 1191 insertions(+), 500 deletions(-)
 rename docs/{virtio-balloon-stats.txt => interop/virtio-balloon-stats.rst} (66%)
 create mode 100644 tests/data/acpi/q35/FACP.slic
 create mode 100644 tests/data/acpi/q35/SLIC.slic


Re: [PULL 00/52] virtio,pci,pc: features,fixes,cleanups
Posted by Richard Henderson 2 years, 3 months ago
On 1/6/22 5:16 AM, Michael S. Tsirkin wrote:
> Big changes that were tagged originally but did not make the cut:
> - SRIOV/nvme (not sure they are my tree material anyway)
> - TPM (blocked over Igor's compat concerns)
> - ACPI ERST (some coding style violations)
> 
> The following changes since commit 7d4ae4d4978079d564d3b6354c90a949130409fe:
> 
>    Merge tag 'pull-request-2022-01-05' of https://gitlab.com/thuth/qemu into staging (2022-01-05 08:47:18 -0800)
> 
> are available in the Git repository at:
> 
>    git://git.kernel.org/pub/scm/virt/kvm/mst/qemu.git tags/for_upstream
> 
> for you to fetch changes up to 9399c26697e7c9658d082c6390e143319decaef5:
> 
>    virtio/vhost-vsock: don't double close vhostfd, remove redundant cleanup (2022-01-06 07:16:25 -0500)
> 
> ----------------------------------------------------------------
> virtio,pci,pc: features,fixes,cleanups
> 
> New virtio mem options.
> A vhost-user cleanup.
> Control over smbios entry point type.
> Config interrupt support for vdpa.
> Fixes, cleanups all over the place.
> 
> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
> 
> ----------------------------------------------------------------
> Andy Pei (1):
>        hw/vhost-user-blk: turn on VIRTIO_BLK_F_SIZE_MAX feature for virtio blk device
> 
> Ani Sinha (2):
>        MAINTAINERS: Add a separate entry for acpi/VIOT tables
>        acpihp: simplify acpi_pcihp_disable_root_bus
> 
> Cindy Lu (10):
>        virtio: introduce macro IRTIO_CONFIG_IRQ_IDX
>        virtio-pci: decouple notifier from interrupt process
>        virtio-pci: decouple the single vector from the interrupt process
>        vhost: introduce new VhostOps vhost_set_config_call
>        vhost-vdpa: add support for config interrupt
>        virtio: add support for configure interrupt
>        vhost: add support for configure interrupt
>        virtio-net: add support for configure interrupt
>        virtio-mmio: add support for configure interrupt
>        virtio-pci: add support for configure interrupt
> 
> Daniil Tatianin (3):
>        hw/scsi/vhost-scsi: don't leak vqs on error
>        hw/scsi/vhost-scsi: don't double close vhostfd on error
>        virtio/vhost-vsock: don't double close vhostfd, remove redundant cleanup
> 
> David Hildenbrand (12):
>        virtio-mem: Don't skip alignment checks when warning about block size
>        util/oslib-posix: Let touch_all_pages() return an error
>        util/oslib-posix: Support MADV_POPULATE_WRITE for os_mem_prealloc()
>        util/oslib-posix: Introduce and use MemsetContext for touch_all_pages()
>        util/oslib-posix: Don't create too many threads with small memory or little pages
>        util/oslib-posix: Avoid creating a single thread with MADV_POPULATE_WRITE
>        util/oslib-posix: Support concurrent os_mem_prealloc() invocation
>        util/oslib-posix: Forward SIGBUS to MCE handler under Linux
>        virtio-mem: Support "prealloc=on" option
>        linux-headers: sync VIRTIO_MEM_F_UNPLUGGED_INACCESSIBLE
>        virtio-mem: Support VIRTIO_MEM_F_UNPLUGGED_INACCESSIBLE
>        virtio-mem: Set "unplugged-inaccessible=auto" for the 7.0 machine on x86
> 
> Eduardo Habkost (3):
>        smbios: Rename SMBIOS_ENTRY_POINT_* enums
>        hw/smbios: Use qapi for SmbiosEntryPointType
>        hw/i386: expose a "smbios-entry-point-type" PC machine property
> 
> Frederic Barrat (2):
>        pci: Export the pci_intx() function
>        pcie_aer: Don't trigger a LSI if none are defined
> 
> Igor Mammedov (4):
>        acpi: fix QEMU crash when started with SLIC table
>        tests: acpi: whitelist expected blobs before changing them
>        tests: acpi: add SLIC table test
>        tests: acpi: SLIC: update expected blobs
> 
> Jason Wang (1):
>        intel-iommu: correctly check passthrough during translation
> 
> Laurent Vivier (1):
>        trace-events,pci: unify trace events format
> 
> Michael S. Tsirkin (1):
>        acpi: validate hotplug selector on access
> 
> Roman Kagan (9):
>        vhost-user-blk: reconnect on any error during realize
>        chardev/char-socket: tcp_chr_recv: don't clobber errno
>        chardev/char-socket: tcp_chr_sync_read: don't clobber errno
>        vhost-backend: avoid overflow on memslots_limit
>        vhost-backend: stick to -errno error return convention
>        vhost-vdpa: stick to -errno error return convention
>        vhost-user: stick to -errno error return convention
>        vhost: stick to -errno error return convention
>        vhost-user-blk: propagate error return from generic vhost
> 
> Stefan Hajnoczi (1):
>        virtio: signal after wrapping packed used_idx
> 
> Thomas Huth (2):
>        hw/i386/pc: Add missing property descriptions
>        docs: reSTify virtio-balloon-stats documentation and move to docs/interop
> 
>   qapi/machine.json                                  |  12 +
>   hw/virtio/virtio-pci.h                             |   4 +-
>   include/hw/firmware/smbios.h                       |  10 +-
>   include/hw/i386/pc.h                               |   4 +
>   include/hw/pci/pci.h                               |   5 +
>   include/hw/virtio/vhost-backend.h                  |   3 +
>   include/hw/virtio/vhost.h                          |   4 +
>   include/hw/virtio/virtio-mem.h                     |  12 +
>   include/hw/virtio/virtio.h                         |   7 +
>   include/net/vhost_net.h                            |   2 +
>   include/qemu/osdep.h                               |   7 +
>   include/standard-headers/linux/virtio_mem.h        |   9 +-
>   chardev/char-socket.c                              |  17 +-
>   hw/acpi/core.c                                     |   4 +-
>   hw/acpi/pcihp.c                                    |  12 +-
>   hw/arm/virt.c                                      |   2 +-
>   hw/block/vhost-user-blk.c                          |   5 +-
>   hw/display/vhost-user-gpu.c                        |   6 +
>   hw/i386/acpi-build.c                               |   2 +
>   hw/i386/intel_iommu.c                              |  38 +-
>   hw/i386/pc.c                                       |  38 +-
>   hw/i386/pc_piix.c                                  |   2 +-
>   hw/i386/pc_q35.c                                   |   2 +-
>   hw/net/vhost_net.c                                 |   9 +
>   hw/net/virtio-net.c                                |  10 +-
>   hw/pci/pci.c                                       |   9 +-
>   hw/pci/pci_host.c                                  |   6 +-
>   hw/pci/pcie_aer.c                                  |   4 +-
>   hw/scsi/vhost-scsi.c                               |  15 +-
>   hw/smbios/smbios.c                                 |   8 +-
>   hw/virtio/vhost-backend.c                          |   4 +-
>   hw/virtio/vhost-user-fs.c                          |   6 +
>   hw/virtio/vhost-user.c                             | 401 ++++++++++++---------
>   hw/virtio/vhost-vdpa.c                             |  44 ++-
>   hw/virtio/vhost-vsock-common.c                     |   6 +
>   hw/virtio/vhost-vsock.c                            |  11 +-
>   hw/virtio/vhost.c                                  | 174 ++++++---
>   hw/virtio/virtio-crypto.c                          |   6 +
>   hw/virtio/virtio-mem.c                             | 105 +++++-
>   hw/virtio/virtio-mmio.c                            |  27 ++
>   hw/virtio/virtio-pci.c                             | 281 ++++++++++-----
>   hw/virtio/virtio.c                                 |  30 ++
>   softmmu/cpus.c                                     |   4 +
>   tests/qtest/bios-tables-test.c                     |  15 +
>   util/oslib-posix.c                                 | 233 +++++++++---
>   MAINTAINERS                                        |   8 +
>   docs/interop/index.rst                             |   1 +
>   .../virtio-balloon-stats.rst}                      |  58 +--
>   hw/pci/trace-events                                |   8 +-
>   hw/virtio/trace-events                             |   1 +
>   tests/data/acpi/q35/FACP.slic                      | Bin 0 -> 244 bytes
>   tests/data/acpi/q35/SLIC.slic                      | Bin 0 -> 36 bytes
>   52 files changed, 1191 insertions(+), 500 deletions(-)
>   rename docs/{virtio-balloon-stats.txt => interop/virtio-balloon-stats.rst} (66%)
>   create mode 100644 tests/data/acpi/q35/FACP.slic
>   create mode 100644 tests/data/acpi/q35/SLIC.slic

Two classes of failures:

https://gitlab.com/qemu-project/qemu/-/jobs/1949636950

../util/oslib-posix.c:486:5: error: implicit declaration of function 'warn_report' 
[-Werror=implicit-function-declaration]
   486 |     warn_report("os_mem_prealloc: unrelated SIGBUS detected and ignored");
       |     ^~~~~~~~~~~
../util/oslib-posix.c:486:5: error: nested extern declaration of 'warn_report' 
[-Werror=nested-externs]

https://gitlab.com/qemu-project/qemu/-/jobs/1949636980

C:/GitLab-Runner/builds/qemu-project/qemu/msys64/mingw32/bin/../lib/gcc/i686-w64-mingw32/11.2.0/../../../../i686-w64-mingw32/bin/ld.exe: 
libqemu-ppc64-softmmu.fa.p/hw_net_virtio-net.c.obj: in function 
`virtio_net_guest_notifier_pending':
C:\GitLab-Runner\builds\qemu-project\qemu\output/../hw/net/virtio-net.c:3172: undefined 
reference to `vhost_net_config_pending'
C:/GitLab-Runner/builds/qemu-project/qemu/msys64/mingw32/bin/../lib/gcc/i686-w64-mingw32/11.2.0/../../../../i686-w64-mingw32/bin/ld.exe: 
libqemu-ppc64-softmmu.fa.p/hw_net_virtio-net.c.obj: in function 
`virtio_net_guest_notifier_mask':
C:\GitLab-Runner\builds\qemu-project\qemu\output/../hw/net/virtio-net.c:3184: undefined 
reference to `vhost_net_config_mask'

with 11 instances.


r~