[Qemu-devel] [PULL 00/26] virtio, vhost, pci, pc: features, fixes and cleanups

Michael S. Tsirkin posted 26 patches 6 years, 2 months ago
Only 25 patches received!
docs/interop/vhost-user.txt                     |  26 ++
docs/pcie_pci_bridge.txt                        |   2 +-
configure                                       |  15 +
contrib/libvhost-user/libvhost-user.h           |   3 +-
include/hw/compat.h                             |   8 +
include/hw/pci/pci.h                            |   3 -
include/hw/pci/pci_bridge.h                     |   4 +-
include/hw/virtio/vhost-backend.h               |   8 +
include/hw/virtio/vhost.h                       |   5 +-
include/hw/virtio/virtio-bus.h                  |   2 +
include/hw/virtio/virtio-crypto.h               |   1 +
include/migration/vmstate.h                     |   1 +
include/standard-headers/linux/virtio_balloon.h |   3 +-
include/sysemu/cryptodev-vhost-user.h           |  47 +++
include/sysemu/cryptodev-vhost.h                | 154 ++++++++
include/sysemu/cryptodev.h                      |   8 +
backends/cryptodev-builtin.c                    |   1 +
backends/cryptodev-vhost-user.c                 | 379 ++++++++++++++++++
backends/cryptodev-vhost.c                      | 347 ++++++++++++++++
contrib/libvhost-user/libvhost-user.c           | 147 ++++++-
hw/block/dataplane/virtio-blk.c                 |   2 +
hw/block/nvme.c                                 |   1 -
hw/isa/lpc_ich9.c                               |   1 -
hw/net/e1000e.c                                 |   1 -
hw/pci-bridge/gen_pcie_root_port.c              |   1 +
hw/pci-bridge/i82801b11.c                       |   2 +
hw/pci-bridge/ioh3420.c                         |   1 +
hw/pci-bridge/pci_bridge_dev.c                  |   1 +
hw/pci-bridge/pcie_pci_bridge.c                 |   3 +-
hw/pci-bridge/pcie_root_port.c                  |   1 -
hw/pci-bridge/xio3130_downstream.c              |   2 +-
hw/pci-bridge/xio3130_upstream.c                |   2 +-
hw/pci-host/xilinx-pcie.c                       |   1 -
hw/pci/pci.c                                    |   8 +-
hw/pci/pci_bridge.c                             |  24 +-
hw/scsi/megasas.c                               |   4 -
hw/scsi/virtio-scsi-dataplane.c                 |   2 +
hw/usb/hcd-xhci.c                               |   9 +-
hw/vfio/pci.c                                   |   5 +-
hw/virtio/vhost-user.c                          | 104 +++++
hw/virtio/vhost.c                               | 504 ++++++++----------------
hw/virtio/virtio-balloon.c                      |   2 +
hw/virtio/virtio-bus.c                          |  14 +-
hw/virtio/virtio-crypto.c                       |  70 ++++
hw/virtio/virtio-pci.c                          |  14 +-
hw/virtio/virtio.c                              |  22 +-
hw/xen/xen_pt.c                                 |   9 +-
tests/bios-tables-test.c                        |  35 +-
vl.c                                            |   6 +
backends/Makefile.objs                          |   6 +
hw/virtio/Makefile.objs                         |   2 +-
hw/virtio/trace-events                          |  12 +-
qemu-options.hx                                 |  21 +
tests/acpi-test-data/pc/FACP                    | Bin 116 -> 116 bytes
tests/acpi-test-data/q35/FACP                   | Bin 116 -> 244 bytes
55 files changed, 1662 insertions(+), 394 deletions(-)
create mode 100644 include/sysemu/cryptodev-vhost-user.h
create mode 100644 include/sysemu/cryptodev-vhost.h
create mode 100644 backends/cryptodev-vhost-user.c
create mode 100644 backends/cryptodev-vhost.c
[Qemu-devel] [PULL 00/26] virtio, vhost, pci, pc: features, fixes and cleanups
Posted by Michael S. Tsirkin 6 years, 2 months ago
The following changes since commit 008a51bbb343972dd8cf09126da8c3b87f4e1c96:

  Merge remote-tracking branch 'remotes/famz/tags/staging-pull-request' into staging (2018-02-08 14:31:51 +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 f4ac9b2e04e8d98854a97bc473353207765aa9e7:

  virtio-balloon: include statistics of disk/file caches (2018-02-08 21:06:42 +0200)

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

- a new vhost crypto device
- new stats in virtio balloon
- virtio eventfd rework for boot speedup
- vhost memory rework for boot speedup
- fixes and cleanups all over the place

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

----------------------------------------------------------------
Changpeng Liu (1):
      virtio-blk: enable multiple vectors when using multiple I/O queues

Dr. David Alan Gilbert (7):
      vhost: Build temporary section list and deref after commit
      vhost: Simplify ring verification checks
      vhost: Merge sections added to temporary list
      vhost: Regenerate region list from changed sections list
      vhost: Clean out old vhost_set_memory and friends
      vhost: Merge and delete unused callbacks
      vhost: Move log_dirty check

Gal Hammer (2):
      virtio: remove event notifier cleanup call on de-assign
      virtio: improve virtio devices initialization time

Gonglei (4):
      cryptodev: add vhost-user as a new cryptodev backend
      cryptodev: add vhost support
      cryptodev-vhost-user: add crypto session handler
      cryptodev-vhost-user: set the key length

Igor Mammedov (1):
      tests: acpi: fix FADT not being compared to reference table

Laszlo Ersek (1):
      pci-bridge/i82801b11: clear bridge registers on platform reset

Marcel Apfelbaum (1):
      hw/pci-bridge: fix pcie root port's IO hints capability

Michael S. Tsirkin (3):
      Revert "vhost: add traces for memory listeners"
      lpc: drop pcie host dependency
      acpi-test: update FADT

Peter Xu (1):
      pci/bus: let it has higher migration priority

Tiwei Bie (1):
      virtio-balloon: unref the memory region before continuing

Tomáš Golembiovský (1):
      virtio-balloon: include statistics of disk/file caches

Yongji Xie (2):
      libvhost-user: Fix resource leak
      libvhost-user: Support across-memory-boundary access

Yoni Bettan (1):
      pci: removed the is_express field since a uniform interface was inserted

 docs/interop/vhost-user.txt                     |  26 ++
 docs/pcie_pci_bridge.txt                        |   2 +-
 configure                                       |  15 +
 contrib/libvhost-user/libvhost-user.h           |   3 +-
 include/hw/compat.h                             |   8 +
 include/hw/pci/pci.h                            |   3 -
 include/hw/pci/pci_bridge.h                     |   4 +-
 include/hw/virtio/vhost-backend.h               |   8 +
 include/hw/virtio/vhost.h                       |   5 +-
 include/hw/virtio/virtio-bus.h                  |   2 +
 include/hw/virtio/virtio-crypto.h               |   1 +
 include/migration/vmstate.h                     |   1 +
 include/standard-headers/linux/virtio_balloon.h |   3 +-
 include/sysemu/cryptodev-vhost-user.h           |  47 +++
 include/sysemu/cryptodev-vhost.h                | 154 ++++++++
 include/sysemu/cryptodev.h                      |   8 +
 backends/cryptodev-builtin.c                    |   1 +
 backends/cryptodev-vhost-user.c                 | 379 ++++++++++++++++++
 backends/cryptodev-vhost.c                      | 347 ++++++++++++++++
 contrib/libvhost-user/libvhost-user.c           | 147 ++++++-
 hw/block/dataplane/virtio-blk.c                 |   2 +
 hw/block/nvme.c                                 |   1 -
 hw/isa/lpc_ich9.c                               |   1 -
 hw/net/e1000e.c                                 |   1 -
 hw/pci-bridge/gen_pcie_root_port.c              |   1 +
 hw/pci-bridge/i82801b11.c                       |   2 +
 hw/pci-bridge/ioh3420.c                         |   1 +
 hw/pci-bridge/pci_bridge_dev.c                  |   1 +
 hw/pci-bridge/pcie_pci_bridge.c                 |   3 +-
 hw/pci-bridge/pcie_root_port.c                  |   1 -
 hw/pci-bridge/xio3130_downstream.c              |   2 +-
 hw/pci-bridge/xio3130_upstream.c                |   2 +-
 hw/pci-host/xilinx-pcie.c                       |   1 -
 hw/pci/pci.c                                    |   8 +-
 hw/pci/pci_bridge.c                             |  24 +-
 hw/scsi/megasas.c                               |   4 -
 hw/scsi/virtio-scsi-dataplane.c                 |   2 +
 hw/usb/hcd-xhci.c                               |   9 +-
 hw/vfio/pci.c                                   |   5 +-
 hw/virtio/vhost-user.c                          | 104 +++++
 hw/virtio/vhost.c                               | 504 ++++++++----------------
 hw/virtio/virtio-balloon.c                      |   2 +
 hw/virtio/virtio-bus.c                          |  14 +-
 hw/virtio/virtio-crypto.c                       |  70 ++++
 hw/virtio/virtio-pci.c                          |  14 +-
 hw/virtio/virtio.c                              |  22 +-
 hw/xen/xen_pt.c                                 |   9 +-
 tests/bios-tables-test.c                        |  35 +-
 vl.c                                            |   6 +
 backends/Makefile.objs                          |   6 +
 hw/virtio/Makefile.objs                         |   2 +-
 hw/virtio/trace-events                          |  12 +-
 qemu-options.hx                                 |  21 +
 tests/acpi-test-data/pc/FACP                    | Bin 116 -> 116 bytes
 tests/acpi-test-data/q35/FACP                   | Bin 116 -> 244 bytes
 55 files changed, 1662 insertions(+), 394 deletions(-)
 create mode 100644 include/sysemu/cryptodev-vhost-user.h
 create mode 100644 include/sysemu/cryptodev-vhost.h
 create mode 100644 backends/cryptodev-vhost-user.c
 create mode 100644 backends/cryptodev-vhost.c


Re: [Qemu-devel] [PULL 00/26] virtio, vhost, pci, pc: features, fixes and cleanups
Posted by Peter Maydell 6 years, 2 months ago
On 8 February 2018 at 19:08, Michael S. Tsirkin <mst@redhat.com> wrote:
> The following changes since commit 008a51bbb343972dd8cf09126da8c3b87f4e1c96:
>
>   Merge remote-tracking branch 'remotes/famz/tags/staging-pull-request' into staging (2018-02-08 14:31:51 +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 f4ac9b2e04e8d98854a97bc473353207765aa9e7:
>
>   virtio-balloon: include statistics of disk/file caches (2018-02-08 21:06:42 +0200)
>
> ----------------------------------------------------------------
> virtio,vhost,pci,pc: features, fixes and cleanups
>
> - a new vhost crypto device
> - new stats in virtio balloon
> - virtio eventfd rework for boot speedup
> - vhost memory rework for boot speedup
> - fixes and cleanups all over the place
>
> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
>

Hi. This has some format-string issues:

/home/peter.maydell/qemu/backends/cryptodev-vhost-user.c: In function
'cryptodev_vhost_user_start':
/home/peter.maydell/qemu/backends/cryptodev-vhost-user.c:112:26:
error: format '%lu' expects argument of type 'long unsigned int', but
argument 2 has type 'size_t {aka unsigned int}' [-Werror=format=]
             error_report("failed to init vhost_crypto for queue %lu", i);
                          ^
/home/peter.maydell/qemu/backends/cryptodev-vhost-user.c: In function
'cryptodev_vhost_user_init':
/home/peter.maydell/qemu/backends/cryptodev-vhost-user.c:205:40:
error: format '%lu' expects argument of type 'long unsigned int', but
argument 2 has type 'size_t {aka unsigned int}' [-Werror=format=]
         cc->info_str = g_strdup_printf("cryptodev-vhost-user%lu to %s ",
                                        ^

thanks
-- PMM

Re: [Qemu-devel] [PULL 00/26] virtio, vhost, pci, pc: features, fixes and cleanups
Posted by Michael S. Tsirkin 6 years, 2 months ago
On Fri, Feb 09, 2018 at 10:06:42AM +0000, Peter Maydell wrote:
> On 8 February 2018 at 19:08, Michael S. Tsirkin <mst@redhat.com> wrote:
> > The following changes since commit 008a51bbb343972dd8cf09126da8c3b87f4e1c96:
> >
> >   Merge remote-tracking branch 'remotes/famz/tags/staging-pull-request' into staging (2018-02-08 14:31:51 +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 f4ac9b2e04e8d98854a97bc473353207765aa9e7:
> >
> >   virtio-balloon: include statistics of disk/file caches (2018-02-08 21:06:42 +0200)
> >
> > ----------------------------------------------------------------
> > virtio,vhost,pci,pc: features, fixes and cleanups
> >
> > - a new vhost crypto device
> > - new stats in virtio balloon
> > - virtio eventfd rework for boot speedup
> > - vhost memory rework for boot speedup
> > - fixes and cleanups all over the place
> >
> > Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
> >
> 
> Hi. This has some format-string issues:
> 
> /home/peter.maydell/qemu/backends/cryptodev-vhost-user.c: In function
> 'cryptodev_vhost_user_start':
> /home/peter.maydell/qemu/backends/cryptodev-vhost-user.c:112:26:
> error: format '%lu' expects argument of type 'long unsigned int', but
> argument 2 has type 'size_t {aka unsigned int}' [-Werror=format=]
>              error_report("failed to init vhost_crypto for queue %lu", i);
>                           ^
> /home/peter.maydell/qemu/backends/cryptodev-vhost-user.c: In function
> 'cryptodev_vhost_user_init':
> /home/peter.maydell/qemu/backends/cryptodev-vhost-user.c:205:40:
> error: format '%lu' expects argument of type 'long unsigned int', but
> argument 2 has type 'size_t {aka unsigned int}' [-Werror=format=]
>          cc->info_str = g_strdup_printf("cryptodev-vhost-user%lu to %s ",
>                                         ^
> 
> thanks
> -- PMM

Fixed up now, new hash d94c5ae38f25a6e77e07007dcd510b7203a687e8

-- 
MST

Re: [Qemu-devel] [PULL 00/26] virtio, vhost, pci, pc: features, fixes and cleanups
Posted by Peter Maydell 6 years, 2 months ago
On 9 February 2018 at 17:07, Michael S. Tsirkin <mst@redhat.com> wrote:
> On Fri, Feb 09, 2018 at 10:06:42AM +0000, Peter Maydell wrote:
>> On 8 February 2018 at 19:08, Michael S. Tsirkin <mst@redhat.com> wrote:
>> > The following changes since commit 008a51bbb343972dd8cf09126da8c3b87f4e1c96:
>> >
>> >   Merge remote-tracking branch 'remotes/famz/tags/staging-pull-request' into staging (2018-02-08 14:31:51 +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 f4ac9b2e04e8d98854a97bc473353207765aa9e7:
>> >
>> >   virtio-balloon: include statistics of disk/file caches (2018-02-08 21:06:42 +0200)
>> >
>> > ----------------------------------------------------------------
>> > virtio,vhost,pci,pc: features, fixes and cleanups
>> >
>> > - a new vhost crypto device
>> > - new stats in virtio balloon
>> > - virtio eventfd rework for boot speedup
>> > - vhost memory rework for boot speedup
>> > - fixes and cleanups all over the place
>> >
>> > Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
>> >
>>
>> Hi. This has some format-string issues:

> Fixed up now, new hash d94c5ae38f25a6e77e07007dcd510b7203a687e8

This asserts in 'make check' for NetBSD, FreeBSD, OpenBSD, OSX:

TEST: tests/device-introspect-test... (pid=19530)
  /aarch64/device/introspect/list:                                     OK
  /aarch64/device/introspect/list-fields:                              OK
  /aarch64/device/introspect/none:                                     OK
  /aarch64/device/introspect/abstract:                                 OK
  /aarch64/device/introspect/concrete:                                 **
ERROR:/root/qemu/qom/object.c:372:object_initialize_with_type:
assertion failed: (type != NULL)
Broken pipe
FAIL
GTester: last random seed: R02Sd4e2c04f6ac00d843a31ccac4de0d914
(pid=12686)
  /aarch64/device/introspect/abstract-interfaces:                      OK
FAIL: tests/device-introspect-test

(other archs fail too, aarch64 is just the first one we hit). This
error is often "device A instantiates device B, but device B is
conditionally compiled in and A is always compiled; so test fails
trying to create device A on hosts where device B isn't built" I think.

clang build on x86 fails to compile:
/home/petmay01/linaro/qemu-for-merges/backends/cryptodev-vhost-user.c:86:16:
error: address of array 's->vhost_crypto' will always evaluate to
'true' [-Werror,-Wpointer-bool-conversion]
        if (s->vhost_crypto) {
        ~~  ~~~^~~~~~~~~~~~

thanks
-- PMM

Re: [Qemu-devel] [PULL 00/26] virtio, vhost, pci, pc: features, fixes and cleanups
Posted by Peter Maydell 6 years, 2 months ago
On 12 February 2018 at 09:35, Peter Maydell <peter.maydell@linaro.org> wrote:
> This asserts in 'make check' for NetBSD, FreeBSD, OpenBSD, OSX:
>
> TEST: tests/device-introspect-test... (pid=19530)
>   /aarch64/device/introspect/list:                                     OK
>   /aarch64/device/introspect/list-fields:                              OK
>   /aarch64/device/introspect/none:                                     OK
>   /aarch64/device/introspect/abstract:                                 OK
>   /aarch64/device/introspect/concrete:                                 **
> ERROR:/root/qemu/qom/object.c:372:object_initialize_with_type:
> assertion failed: (type != NULL)
> Broken pipe
> FAIL
> GTester: last random seed: R02Sd4e2c04f6ac00d843a31ccac4de0d914
> (pid=12686)
>   /aarch64/device/introspect/abstract-interfaces:                      OK
> FAIL: tests/device-introspect-test
>
> (other archs fail too, aarch64 is just the first one we hit). This
> error is often "device A instantiates device B, but device B is
> conditionally compiled in and A is always compiled; so test fails
> trying to create device A on hosts where device B isn't built" I think.

This part is indeed that problem -- the 'virtio-crypto-device' object
is built only if CONFIG_LINUX, but 'virtio-crypto-pci' is built if
CONFIG_VIRTIO_PCI, so on systems where the latter is true but not the
former you get a virtio-crypto-pci device that crashes when instantiated.

The fix should be
--- a/hw/virtio/Makefile.objs
+++ b/hw/virtio/Makefile.objs
@@ -8,7 +8,7 @@ obj-y += virtio.o virtio-balloon.o
 obj-$(CONFIG_LINUX) += vhost.o vhost-backend.o vhost-user.o
 obj-$(CONFIG_VHOST_VSOCK) += vhost-vsock.o
 obj-$(CONFIG_LINUX) += virtio-crypto.o
-obj-$(CONFIG_VIRTIO_PCI) += virtio-crypto-pci.o
+obj-$(call land,$(CONFIG_LINUX),$(CONFIG_VIRTIO_PCI)) += virtio-crypto-pci.o
 endif

 common-obj-$(call lnot,$(CONFIG_LINUX)) += vhost-stub.o


thanks
-- PMM

Re: [Qemu-devel] [PULL 00/26] virtio, vhost, pci, pc: features, fixes and cleanups
Posted by Michael S. Tsirkin 6 years, 2 months ago
On Tue, Feb 13, 2018 at 04:33:14PM +0000, Peter Maydell wrote:
> On 12 February 2018 at 09:35, Peter Maydell <peter.maydell@linaro.org> wrote:
> > This asserts in 'make check' for NetBSD, FreeBSD, OpenBSD, OSX:
> >
> > TEST: tests/device-introspect-test... (pid=19530)
> >   /aarch64/device/introspect/list:                                     OK
> >   /aarch64/device/introspect/list-fields:                              OK
> >   /aarch64/device/introspect/none:                                     OK
> >   /aarch64/device/introspect/abstract:                                 OK
> >   /aarch64/device/introspect/concrete:                                 **
> > ERROR:/root/qemu/qom/object.c:372:object_initialize_with_type:
> > assertion failed: (type != NULL)
> > Broken pipe
> > FAIL
> > GTester: last random seed: R02Sd4e2c04f6ac00d843a31ccac4de0d914
> > (pid=12686)
> >   /aarch64/device/introspect/abstract-interfaces:                      OK
> > FAIL: tests/device-introspect-test
> >
> > (other archs fail too, aarch64 is just the first one we hit). This
> > error is often "device A instantiates device B, but device B is
> > conditionally compiled in and A is always compiled; so test fails
> > trying to create device A on hosts where device B isn't built" I think.
> 
> This part is indeed that problem -- the 'virtio-crypto-device' object
> is built only if CONFIG_LINUX, but 'virtio-crypto-pci' is built if
> CONFIG_VIRTIO_PCI, so on systems where the latter is true but not the
> former you get a virtio-crypto-pci device that crashes when instantiated.
> 
> The fix should be
> --- a/hw/virtio/Makefile.objs
> +++ b/hw/virtio/Makefile.objs
> @@ -8,7 +8,7 @@ obj-y += virtio.o virtio-balloon.o
>  obj-$(CONFIG_LINUX) += vhost.o vhost-backend.o vhost-user.o
>  obj-$(CONFIG_VHOST_VSOCK) += vhost-vsock.o
>  obj-$(CONFIG_LINUX) += virtio-crypto.o
> -obj-$(CONFIG_VIRTIO_PCI) += virtio-crypto-pci.o
> +obj-$(call land,$(CONFIG_LINUX),$(CONFIG_VIRTIO_PCI)) += virtio-crypto-pci.o
>  endif
> 
>  common-obj-$(call lnot,$(CONFIG_LINUX)) += vhost-stub.o
> 
> 
> thanks
> -- PMM

Thanks for your help with this!

I think the root cause is that one of the patches disables
virtio-crypto build on non linux which used to be enabled.

This has been silently done by a patch which was supposed to
merely add a vhost crypto device, I'm sorry I missed that
in the review.

I've dropped the crypto vhost patches from the pull request for now.

Pushed with the same name - should be fine now.

-- 
MST

Re: [Qemu-devel] [PULL 00/26] virtio, vhost, pci, pc: features, fixes and cleanups
Posted by Peter Maydell 6 years, 2 months ago
On 13 February 2018 at 16:52, Michael S. Tsirkin <mst@redhat.com> wrote:
> I've dropped the crypto vhost patches from the pull request for now.
>
> Pushed with the same name - should be fine now.

Applied the fixed version, thanks.

-- PMM

Re: [Qemu-devel] [PULL 00/26] virtio, vhost, pci, pc: features, fixes and cleanups
Posted by Zhoujian (jay) 6 years, 2 months ago
> -----Original Message-----
> From: Qemu-devel [mailto:qemu-devel-
> bounces+jianjay.zhou=huawei.com@nongnu.org] On Behalf Of Michael S. Tsirkin
> Sent: Wednesday, February 14, 2018 12:52 AM
> To: Peter Maydell <peter.maydell@linaro.org>
> Cc: QEMU Developers <qemu-devel@nongnu.org>
> Subject: Re: [Qemu-devel] [PULL 00/26] virtio, vhost, pci, pc: features,
> fixes and cleanups
> 
> On Tue, Feb 13, 2018 at 04:33:14PM +0000, Peter Maydell wrote:
> > On 12 February 2018 at 09:35, Peter Maydell <peter.maydell@linaro.org>
> wrote:
> > > This asserts in 'make check' for NetBSD, FreeBSD, OpenBSD, OSX:
> > >
> > > TEST: tests/device-introspect-test... (pid=19530)
> > >   /aarch64/device/introspect/list:                                     OK
> > >   /aarch64/device/introspect/list-fields:                              OK
> > >   /aarch64/device/introspect/none:                                     OK
> > >   /aarch64/device/introspect/abstract:                                 OK
> > >   /aarch64/device/introspect/concrete:                                 **
> > > ERROR:/root/qemu/qom/object.c:372:object_initialize_with_type:
> > > assertion failed: (type != NULL)
> > > Broken pipe
> > > FAIL
> > > GTester: last random seed: R02Sd4e2c04f6ac00d843a31ccac4de0d914
> > > (pid=12686)
> > >   /aarch64/device/introspect/abstract-interfaces:                      OK
> > > FAIL: tests/device-introspect-test
> > >
> > > (other archs fail too, aarch64 is just the first one we hit). This
> > > error is often "device A instantiates device B, but device B is
> > > conditionally compiled in and A is always compiled; so test fails
> > > trying to create device A on hosts where device B isn't built" I think.
> >
> > This part is indeed that problem -- the 'virtio-crypto-device' object
> > is built only if CONFIG_LINUX, but 'virtio-crypto-pci' is built if
> > CONFIG_VIRTIO_PCI, so on systems where the latter is true but not the
> > former you get a virtio-crypto-pci device that crashes when instantiated.
> >
> > The fix should be
> > --- a/hw/virtio/Makefile.objs
> > +++ b/hw/virtio/Makefile.objs
> > @@ -8,7 +8,7 @@ obj-y += virtio.o virtio-balloon.o
> >  obj-$(CONFIG_LINUX) += vhost.o vhost-backend.o vhost-user.o
> >  obj-$(CONFIG_VHOST_VSOCK) += vhost-vsock.o
> >  obj-$(CONFIG_LINUX) += virtio-crypto.o
> > -obj-$(CONFIG_VIRTIO_PCI) += virtio-crypto-pci.o
> > +obj-$(call land,$(CONFIG_LINUX),$(CONFIG_VIRTIO_PCI)) +=
> > +virtio-crypto-pci.o
> >  endif
> >
> >  common-obj-$(call lnot,$(CONFIG_LINUX)) += vhost-stub.o
> >
> >
> > thanks
> > -- PMM
> 
> Thanks for your help with this!
> 
> I think the root cause is that one of the patches disables virtio-crypto
> build on non linux which used to be enabled.
> 
> This has been silently done by a patch which was supposed to merely add a
> vhost crypto device, I'm sorry I missed that in the review.

Hi Michael, Peter

Sorry for the late response and the trouble I have made, I just returned
from a vacation.
Thanks for your help and pointing out the root cause, I should explicitly
put the config change of virtio-crypto into a separate patch to make
review much easier.

> 
> I've dropped the crypto vhost patches from the pull request for now.

Will fix the issue in the next version, sorry again for the inconvenience.

Regards,
Jay

> 
> Pushed with the same name - should be fine now.
> 
> --
> MST


Re: [Qemu-devel] [PULL 00/26] virtio, vhost, pci, pc: features, fixes and cleanups
Posted by Gonglei (Arei) 6 years, 2 months ago
> -----Original Message-----
> From: Qemu-devel
> [mailto:qemu-devel-bounces+arei.gonglei=huawei.com@nongnu.org] On
> Behalf Of Peter Maydell
> Sent: Friday, February 09, 2018 6:07 PM
> To: Michael S. Tsirkin
> Cc: QEMU Developers
> Subject: Re: [Qemu-devel] [PULL 00/26] virtio, vhost, pci, pc: features, fixes and
> cleanups
> 
> On 8 February 2018 at 19:08, Michael S. Tsirkin <mst@redhat.com> wrote:
> > The following changes since commit
> 008a51bbb343972dd8cf09126da8c3b87f4e1c96:
> >
> >   Merge remote-tracking branch 'remotes/famz/tags/staging-pull-request'
> into staging (2018-02-08 14:31:51 +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
> f4ac9b2e04e8d98854a97bc473353207765aa9e7:
> >
> >   virtio-balloon: include statistics of disk/file caches (2018-02-08 21:06:42
> +0200)
> >
> > ----------------------------------------------------------------
> > virtio,vhost,pci,pc: features, fixes and cleanups
> >
> > - a new vhost crypto device
> > - new stats in virtio balloon
> > - virtio eventfd rework for boot speedup
> > - vhost memory rework for boot speedup
> > - fixes and cleanups all over the place
> >
> > Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
> >
> 
> Hi. This has some format-string issues:
> 
> /home/peter.maydell/qemu/backends/cryptodev-vhost-user.c: In function
> 'cryptodev_vhost_user_start':
> /home/peter.maydell/qemu/backends/cryptodev-vhost-user.c:112:26:
> error: format '%lu' expects argument of type 'long unsigned int', but
> argument 2 has type 'size_t {aka unsigned int}' [-Werror=format=]
>              error_report("failed to init vhost_crypto for queue %lu", i);
>                           ^
> /home/peter.maydell/qemu/backends/cryptodev-vhost-user.c: In function
> 'cryptodev_vhost_user_init':
> /home/peter.maydell/qemu/backends/cryptodev-vhost-user.c:205:40:
> error: format '%lu' expects argument of type 'long unsigned int', but
> argument 2 has type 'size_t {aka unsigned int}' [-Werror=format=]
>          cc->info_str = g_strdup_printf("cryptodev-vhost-user%lu to %s ",
>                                         ^
> 
Using %zu instead of %lu will be correct. Michael, could you pls fix it directly?

Very sorry for the inconvenience. :(

Thanks,
-Gonglei

[Qemu-devel] [PULL 25/26] acpi-test: update FADT
Posted by Michael S. Tsirkin 6 years, 2 months ago
Previous commit ("tests: acpi: fix FADT not being compared to reference table")
started tracking changes to the FADT. Generate the expected FACP files -
apparently these weren't updated since 2013.

Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
---
 tests/acpi-test-data/pc/FACP  | Bin 116 -> 116 bytes
 tests/acpi-test-data/q35/FACP | Bin 116 -> 244 bytes
 2 files changed, 0 insertions(+), 0 deletions(-)

diff --git a/tests/acpi-test-data/pc/FACP b/tests/acpi-test-data/pc/FACP
index 0639999ed1f748d44977f88e63d6a0ab49add040..261ebdc5d1c3bdf18fb7935314a04fd7f6f92a7a 100644
GIT binary patch
delta 70
zcmXRZ;c|0y4k%$@U|?K0kxN<=$N&LG22O@eK>FhcAi)L_VPIf^(jYbm+eAM(4kI9I
IX#)cT0Ciyr82|tP

delta 70
zcmXRZ;c|0y4k%$@U|_sCkxN?h!T)*(AZBFXWY`20{P+P#Yye^)V1d#gHphmEesUZj
J*3t$B1^}tB5E%df

diff --git a/tests/acpi-test-data/q35/FACP b/tests/acpi-test-data/q35/FACP
index 19f3ac3ce6ab732caa750d835ce1261bc7343cf2..72c9d97902a4bbf14896023d9ba78e0899d6517b 100644
GIT binary patch
literal 244
zcmZ>BbPo8!z`(#P@8s|75v<@85#a0w6k`O6f!H7#1{fJQ88!hqOw2%n4I;_{r9nIn
zAX@<@&cwhX02KSr|DPYCl7Ybp$XMFKz`)4C!0?j?A_|v;DFV`r3P1wMTp$k&7=Z>N
X+XoXzrWq9=?f{7~HXz&s;==#{<X{c~

literal 116
zcmZ>BbPgzCU|?YEaPoKd2v%^42yk`-iZKGkKx`1raN&Qw0}wMZa58KHa+#Qc#0HQA
i0|N_`2C+GSYz3G&69bC?Q0zbde}0f03@mM6U;qFojS~R?

-- 
MST