mbox

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

Message ID 1516077852-7974-1-git-send-email-mst@redhat.com
State New
Headers show

Pull-request

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

Message

Michael S. Tsirkin Jan. 16, 2018, 4:46 a.m. UTC
A large pull due to patch buildup over the holiday period.
Most notable here is probably the addition of vhost-user-blk.

The following changes since commit f521eeee3bd060b460c99e605472b7e03967db43:

  Merge remote-tracking branch 'remotes/juanquintela/tags/migration/20180115' into staging (2018-01-15 13:17:47 +0000)

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 631ae6adb1fcea786e0db8c6f1b19570bad0f90c:

  vhost: remove assertion to prevent crash (2018-01-16 06:36:19 +0200)

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

A bunch of fixes, cleanus and new features all over the place.

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

----------------------------------------------------------------
Changpeng Liu (4):
      vhost-user: add new vhost user messages to support virtio config space
      vhost-user-blk: introduce a new vhost-user-blk host device
      contrib/libvhost-user: enable virtio config space messages
      contrib/vhost-user-blk: introduce a vhost-user-blk sample application

Dou Liyang (2):
      ACPI/unit-test: Add a testcase for RAM allocation in numa node
      hw/acpi-build: Make next_base easy to follow

Dr. David Alan Gilbert (4):
      vhost: Build temporary section list and deref after commit
      vhost: Move log_dirty check
      vhost: Simplify ring verification checks
      vhost: Merge sections added to temporary list

Gal Hammer (3):
      qemu: add a cleanup callback function to EventNotifier
      virtio: postpone the execution of event_notifier_cleanup function
      virtio: improve virtio devices initialization time

Igor Mammedov (4):
      tests: acpi: move tested tables array allocation outside of test_acpi_dsdt_table()
      tests: acpi: init table descriptor in test_dst_table()
      tests: acpi: rename test_acpi_tables()/test_dst_table() to reflect its usage
      tests: acpi: add comments to fetch_rsdt_referenced_tables/data->tables usage

Jay Zhou (1):
      vhost: remove assertion to prevent crash

Marcel Apfelbaum (2):
      MAINTAINERS: Add myself as maintainer to X86 machines
      hw/pci-bridge: fix QEMU crash because of pcie-root-port

Maxime Coquelin (6):
      vhost-user: fix multiple queue specification
      vhost-user-test: fix features mask
      vhost-user-test: extract read-guest-mem test from main loop
      vhost-user-test: setup virtqueues in all tests
      vhost-user-test: make features mask an init_virtio_dev() argument
      vhost-user-test: use init_virtio_dev in multiqueue test

Michael S. Tsirkin (2):
      vhost-user: factor out msg head and payload
      vhost-user: fix misaligned access to payload

Mohammed Gamal (2):
      x86_iommu: Move machine check to x86_iommu_realize()
      x86_iommu: check if machine has PCI bus

Prasad Singamsetty (2):
      intel-iommu: Redefine macros to enable supporting 48 bit address width
      intel-iommu: Extend address width to 48 bits

Yuval Shaia (1):
      pci/shpc: Move function to generic header file

 docs/interop/vhost-user.txt             |  61 +++-
 Makefile                                |   3 +
 default-configs/pci.mak                 |   1 +
 contrib/libvhost-user/libvhost-user.h   |  33 ++
 hw/i386/intel_iommu_internal.h          |  43 ++-
 hw/virtio/virtio-pci.h                  |  18 ++
 include/hw/i386/intel_iommu.h           |   7 +-
 include/hw/virtio/vhost-backend.h       |  12 +
 include/hw/virtio/vhost-user-blk.h      |  41 +++
 include/hw/virtio/vhost.h               |  17 +
 include/qemu/event_notifier.h           |   1 +
 include/qemu/host-utils.h               |  10 +
 accel/kvm/kvm-all.c                     |   4 +
 contrib/libvhost-user/libvhost-user.c   |  42 +++
 contrib/vhost-user-blk/vhost-user-blk.c | 545 ++++++++++++++++++++++++++++++++
 hw/block/vhost-user-blk.c               | 359 +++++++++++++++++++++
 hw/i386/acpi-build.c                    |   5 +-
 hw/i386/amd_iommu.c                     |  13 +-
 hw/i386/intel_iommu.c                   | 136 ++++----
 hw/i386/x86-iommu.c                     |  13 +
 hw/pci-bridge/gen_pcie_root_port.c      |   7 +-
 hw/pci/shpc.c                           |  13 +-
 hw/virtio/vhost-user.c                  | 318 +++++++++++++------
 hw/virtio/vhost.c                       | 250 +++++++++++----
 hw/virtio/virtio-bus.c                  |  19 +-
 hw/virtio/virtio-pci.c                  |  55 ++++
 hw/virtio/virtio.c                      |   5 +
 tests/bios-tables-test.c                |  50 ++-
 tests/vhost-user-test.c                 | 171 +++++-----
 util/event_notifier-posix.c             |   5 +-
 util/event_notifier-win32.c             |   2 +
 .gitignore                              |   1 +
 MAINTAINERS                             |   1 +
 Makefile.objs                           |   1 +
 contrib/vhost-user-blk/Makefile.objs    |   1 +
 hw/block/Makefile.objs                  |   3 +
 hw/virtio/trace-events                  |   5 +
 tests/acpi-test-data/pc/DSDT.numamem    | Bin 0 -> 5150 bytes
 tests/acpi-test-data/pc/SRAT.numamem    | Bin 0 -> 224 bytes
 tests/acpi-test-data/q35/DSDT.numamem   | Bin 0 -> 7834 bytes
 tests/acpi-test-data/q35/SRAT.numamem   | Bin 0 -> 224 bytes
 41 files changed, 1897 insertions(+), 374 deletions(-)
 create mode 100644 include/hw/virtio/vhost-user-blk.h
 create mode 100644 contrib/vhost-user-blk/vhost-user-blk.c
 create mode 100644 hw/block/vhost-user-blk.c
 create mode 100644 contrib/vhost-user-blk/Makefile.objs
 create mode 100644 tests/acpi-test-data/pc/DSDT.numamem
 create mode 100644 tests/acpi-test-data/pc/SRAT.numamem
 create mode 100644 tests/acpi-test-data/q35/DSDT.numamem
 create mode 100644 tests/acpi-test-data/q35/SRAT.numamem

Comments

Peter Maydell Jan. 16, 2018, 12:24 p.m. UTC | #1
On 16 January 2018 at 04:46, Michael S. Tsirkin <mst@redhat.com> wrote:
> A large pull due to patch buildup over the holiday period.
> Most notable here is probably the addition of vhost-user-blk.
>
> The following changes since commit f521eeee3bd060b460c99e605472b7e03967db43:
>
>   Merge remote-tracking branch 'remotes/juanquintela/tags/migration/20180115' into staging (2018-01-15 13:17:47 +0000)
>
> 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 631ae6adb1fcea786e0db8c6f1b19570bad0f90c:
>
>   vhost: remove assertion to prevent crash (2018-01-16 06:36:19 +0200)
>
> ----------------------------------------------------------------
> pc, pci, virtio: features, fixes, cleanups
>
> A bunch of fixes, cleanus and new features all over the place.
>
> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
>

Build failure, 32 bit:

/home/peter.maydell/qemu/hw/virtio/vhost.c: In function 'vhost_commit':
/home/peter.maydell/qemu/hw/virtio/vhost.c:666:28: error: cast to
pointer from integer of different size [-Werror=int-to-pointer-cast]
                            (void *)dev->mem->regions[i].userspace_addr,
                            ^

Test failures, ppc64, s390x, sparc64 hosts (so likely all bigendian):

TEST: tests/device-introspect-test... (pid=57202)
  /s390x/device/introspect/list:                                       OK
  /s390x/device/introspect/list-fields:                                OK
  /s390x/device/introspect/none:                                       OK
  /s390x/device/introspect/abstract:                                   OK
  /s390x/device/introspect/concrete:                                   **
ERROR:/home/linux1/qemu/qom/object.c:372:object_initialize_with_type:
assertion failed: (type != NULL)
Broken pipe
FAIL
GTester: last random seed: R02S51c433c8a3c2fab5dd7233079b9dac7f
(pid=57214)
  /s390x/device/introspect/abstract-interfaces:                        OK
FAIL: tests/device-introspect-test

Looks like vhost-user-blk-pci is at fault:

$ gdb --args s390x-softmmu/qemu-system-s390x -device
vhost-user-blk-pci -display none

Thread 1 "qemu-system-s39" received signal SIGABRT, Aborted.
0x000003ffe91381b8 in __GI_raise (sig=sig@entry=6) at
../sysdeps/unix/sysv/linux/raise.c:54
54      ../sysdeps/unix/sysv/linux/raise.c: No such file or directory.
(gdb) bt
#0  0x000003ffe91381b8 in __GI_raise (sig=sig@entry=6) at
../sysdeps/unix/sysv/linux/raise.c:54
#1  0x000003ffe9139726 in __GI_abort () at abort.c:89
#2  0x000003ffe96f9d1c in g_assertion_message () from
/lib/s390x-linux-gnu/libglib-2.0.so.0
#3  0x000003ffe96f9dc6 in g_assertion_message_expr () from
/lib/s390x-linux-gnu/libglib-2.0.so.0
#4  0x000002aa002f7f82 in object_initialize_with_type (data=<optimized
out>, size=<optimized out>,
    type=<optimized out>) at /home/linux1/qemu/qom/object.c:372
#5  0x000002aa0018f84e in virtio_instance_init_common
(proxy_obj=0x2aa00d49e10, data=0x2aa00d51f60,
    vdev_size=<optimized out>, vdev_name=<optimized out>) at
/home/linux1/qemu/hw/virtio/virtio.c:2232
#6  0x000002aa002881fe in vhost_user_blk_pci_instance_init (obj=0x2aa00d49e10)
    at /home/linux1/qemu/hw/virtio/virtio-pci.c:2018
#7  0x000002aa002f7e02 in object_initialize_with_type
(data=data@entry=0x2aa00d49e10, size=34200,
    type=type@entry=0x2aa00c87c90) at /home/linux1/qemu/qom/object.c:384
#8  0x000002aa002f7fd8 in object_new_with_type (type=0x2aa00c87c90) at
/home/linux1/qemu/qom/object.c:492
#9  0x000002aa001fb344 in qdev_device_add (opts=<optimized out>,
errp=<optimized out>)
    at /home/linux1/qemu/qdev-monitor.c:612
#10 0x000002aa001fe2fc in device_init_func (opaque=<optimized out>,
opts=<optimized out>,
    errp=<optimized out>) at /home/linux1/qemu/vl.c:2387
#11 0x000002aa003f59b6 in qemu_opts_foreach (list=<optimized out>,
func=0x2aa001fe2c8 <device_init_func>,
    opaque=0x0, errp=0x0) at /home/linux1/qemu/util/qemu-option.c:1070
#12 0x000002aa000ebc40 in main (argc=<optimized out>, argv=<optimized
out>, envp=<optimized out>)
    at /home/linux1/qemu/vl.c:4648

(required QOM type not compiled in ?)

thanks
-- PMM
Peter Maydell Jan. 16, 2018, 12:58 p.m. UTC | #2
On 16 January 2018 at 12:24, Peter Maydell <peter.maydell@linaro.org> wrote:
> On 16 January 2018 at 04:46, Michael S. Tsirkin <mst@redhat.com> wrote:
>> A large pull due to patch buildup over the holiday period.
>> Most notable here is probably the addition of vhost-user-blk.
>>
>> The following changes since commit f521eeee3bd060b460c99e605472b7e03967db43:
>>
>>   Merge remote-tracking branch 'remotes/juanquintela/tags/migration/20180115' into staging (2018-01-15 13:17:47 +0000)
>>
>> 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 631ae6adb1fcea786e0db8c6f1b19570bad0f90c:
>>
>>   vhost: remove assertion to prevent crash (2018-01-16 06:36:19 +0200)
>>
>> ----------------------------------------------------------------
>> pc, pci, virtio: features, fixes, cleanups
>>
>> A bunch of fixes, cleanus and new features all over the place.
>>
>> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
>>
>
> Build failure, 32 bit:
>
> /home/peter.maydell/qemu/hw/virtio/vhost.c: In function 'vhost_commit':
> /home/peter.maydell/qemu/hw/virtio/vhost.c:666:28: error: cast to
> pointer from integer of different size [-Werror=int-to-pointer-cast]
>                             (void *)dev->mem->regions[i].userspace_addr,
>                             ^
>
> Test failures, ppc64, s390x, sparc64 hosts (so likely all bigendian):
>
> TEST: tests/device-introspect-test... (pid=57202)
>   /s390x/device/introspect/list:                                       OK
>   /s390x/device/introspect/list-fields:                                OK
>   /s390x/device/introspect/none:                                       OK
>   /s390x/device/introspect/abstract:                                   OK
>   /s390x/device/introspect/concrete:                                   **
> ERROR:/home/linux1/qemu/qom/object.c:372:object_initialize_with_type:
> assertion failed: (type != NULL)
> Broken pipe
> FAIL
> GTester: last random seed: R02S51c433c8a3c2fab5dd7233079b9dac7f
> (pid=57214)
>   /s390x/device/introspect/abstract-interfaces:                        OK
> FAIL: tests/device-introspect-test

I get this failure on arm and x86 too, so not big-endian specific.

thanks
-- PMM
Dr. David Alan Gilbert Jan. 16, 2018, 12:59 p.m. UTC | #3
* Peter Maydell (peter.maydell@linaro.org) wrote:
> On 16 January 2018 at 04:46, Michael S. Tsirkin <mst@redhat.com> wrote:
> > A large pull due to patch buildup over the holiday period.
> > Most notable here is probably the addition of vhost-user-blk.
> >
> > The following changes since commit f521eeee3bd060b460c99e605472b7e03967db43:
> >
> >   Merge remote-tracking branch 'remotes/juanquintela/tags/migration/20180115' into staging (2018-01-15 13:17:47 +0000)
> >
> > 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 631ae6adb1fcea786e0db8c6f1b19570bad0f90c:
> >
> >   vhost: remove assertion to prevent crash (2018-01-16 06:36:19 +0200)
> >
> > ----------------------------------------------------------------
> > pc, pci, virtio: features, fixes, cleanups
> >
> > A bunch of fixes, cleanus and new features all over the place.
> >
> > Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
> >
> 
> Build failure, 32 bit:
> 
> /home/peter.maydell/qemu/hw/virtio/vhost.c: In function 'vhost_commit':
> /home/peter.maydell/qemu/hw/virtio/vhost.c:666:28: error: cast to
> pointer from integer of different size [-Werror=int-to-pointer-cast]
>                             (void *)dev->mem->regions[i].userspace_addr,
>                             ^

Hmm yes that's from my 'vhost: Simplify ring verficiation checks'
and will need a (uintptr_t) adding.

Dave

> 
> Test failures, ppc64, s390x, sparc64 hosts (so likely all bigendian):
> 
> TEST: tests/device-introspect-test... (pid=57202)
>   /s390x/device/introspect/list:                                       OK
>   /s390x/device/introspect/list-fields:                                OK
>   /s390x/device/introspect/none:                                       OK
>   /s390x/device/introspect/abstract:                                   OK
>   /s390x/device/introspect/concrete:                                   **
> ERROR:/home/linux1/qemu/qom/object.c:372:object_initialize_with_type:
> assertion failed: (type != NULL)
> Broken pipe
> FAIL
> GTester: last random seed: R02S51c433c8a3c2fab5dd7233079b9dac7f
> (pid=57214)
>   /s390x/device/introspect/abstract-interfaces:                        OK
> FAIL: tests/device-introspect-test
> 
> Looks like vhost-user-blk-pci is at fault:
> 
> $ gdb --args s390x-softmmu/qemu-system-s390x -device
> vhost-user-blk-pci -display none
> 
> Thread 1 "qemu-system-s39" received signal SIGABRT, Aborted.
> 0x000003ffe91381b8 in __GI_raise (sig=sig@entry=6) at
> ../sysdeps/unix/sysv/linux/raise.c:54
> 54      ../sysdeps/unix/sysv/linux/raise.c: No such file or directory.
> (gdb) bt
> #0  0x000003ffe91381b8 in __GI_raise (sig=sig@entry=6) at
> ../sysdeps/unix/sysv/linux/raise.c:54
> #1  0x000003ffe9139726 in __GI_abort () at abort.c:89
> #2  0x000003ffe96f9d1c in g_assertion_message () from
> /lib/s390x-linux-gnu/libglib-2.0.so.0
> #3  0x000003ffe96f9dc6 in g_assertion_message_expr () from
> /lib/s390x-linux-gnu/libglib-2.0.so.0
> #4  0x000002aa002f7f82 in object_initialize_with_type (data=<optimized
> out>, size=<optimized out>,
>     type=<optimized out>) at /home/linux1/qemu/qom/object.c:372
> #5  0x000002aa0018f84e in virtio_instance_init_common
> (proxy_obj=0x2aa00d49e10, data=0x2aa00d51f60,
>     vdev_size=<optimized out>, vdev_name=<optimized out>) at
> /home/linux1/qemu/hw/virtio/virtio.c:2232
> #6  0x000002aa002881fe in vhost_user_blk_pci_instance_init (obj=0x2aa00d49e10)
>     at /home/linux1/qemu/hw/virtio/virtio-pci.c:2018
> #7  0x000002aa002f7e02 in object_initialize_with_type
> (data=data@entry=0x2aa00d49e10, size=34200,
>     type=type@entry=0x2aa00c87c90) at /home/linux1/qemu/qom/object.c:384
> #8  0x000002aa002f7fd8 in object_new_with_type (type=0x2aa00c87c90) at
> /home/linux1/qemu/qom/object.c:492
> #9  0x000002aa001fb344 in qdev_device_add (opts=<optimized out>,
> errp=<optimized out>)
>     at /home/linux1/qemu/qdev-monitor.c:612
> #10 0x000002aa001fe2fc in device_init_func (opaque=<optimized out>,
> opts=<optimized out>,
>     errp=<optimized out>) at /home/linux1/qemu/vl.c:2387
> #11 0x000002aa003f59b6 in qemu_opts_foreach (list=<optimized out>,
> func=0x2aa001fe2c8 <device_init_func>,
>     opaque=0x0, errp=0x0) at /home/linux1/qemu/util/qemu-option.c:1070
> #12 0x000002aa000ebc40 in main (argc=<optimized out>, argv=<optimized
> out>, envp=<optimized out>)
>     at /home/linux1/qemu/vl.c:4648
> 
> (required QOM type not compiled in ?)
> 
> thanks
> -- PMM
> 
--
Dr. David Alan Gilbert / dgilbert@redhat.com / Manchester, UK