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

Michael S. Tsirkin posted 25 patches 5 years, 2 months ago
Only 20 patches received!
configure                                          |  105 +-
default-configs/virtio.mak                         |    4 +-
include/exec/poison.h                              |    1 -
include/hw/pci/msi.h                               |    1 +
include/qemu/mmap-alloc.h                          |    2 +-
include/standard-headers/drm/drm_fourcc.h          |   63 ++
include/standard-headers/linux/ethtool.h           |   19 +-
include/standard-headers/linux/input-event-codes.h |   17 +
include/standard-headers/linux/pci_regs.h          |    1 +
include/standard-headers/linux/vhost_types.h       |  128 +++
include/standard-headers/linux/virtio_balloon.h    |    8 +
include/standard-headers/linux/virtio_blk.h        |   54 +
include/standard-headers/linux/virtio_config.h     |    3 +
include/standard-headers/linux/virtio_gpu.h        |   18 +
include/standard-headers/linux/virtio_ring.h       |   52 +
linux-headers/asm-arm/unistd-common.h              |    1 +
linux-headers/asm-arm64/unistd.h                   |    1 +
linux-headers/asm-generic/unistd.h                 |   10 +-
linux-headers/asm-mips/sgidefs.h                   |    8 -
linux-headers/asm-mips/unistd.h                    | 1074 +-------------------
linux-headers/asm-mips/unistd_n32.h                |  338 ++++++
linux-headers/asm-mips/unistd_n64.h                |  334 ++++++
linux-headers/asm-mips/unistd_o32.h                |  374 +++++++
linux-headers/asm-powerpc/unistd.h                 |  389 +------
linux-headers/asm-powerpc/unistd_32.h              |  381 +++++++
linux-headers/asm-powerpc/unistd_64.h              |  372 +++++++
linux-headers/linux/kvm.h                          |   29 +
linux-headers/linux/vfio.h                         |   92 ++
linux-headers/linux/vhost.h                        |  113 +-
linux-headers/linux/vhost_types.h                  |    1 +
contrib/libvhost-user/libvhost-user.c              |    8 +-
contrib/vhost-user-blk/vhost-user-blk.c            |  146 ++-
exec.c                                             |    4 +-
hw/block/vhost-user-blk.c                          |    4 +
hw/i386/acpi-build.c                               |   16 +-
hw/i386/intel_iommu.c                              |    3 +-
hw/net/vhost_net-stub.c                            |   92 ++
hw/net/vhost_net.c                                 |   85 +-
hw/nvram/fw_cfg.c                                  |    9 +-
hw/pci/msi.c                                       |    2 +-
hw/sh4/r2d.c                                       |    2 +-
hw/virtio/vhost-backend.c                          |   12 +-
hw/virtio/vhost-user.c                             |   13 +-
hw/virtio/vhost.c                                  |    2 +-
hw/virtio/virtio-pci.c                             |    4 +-
hw/virtio/virtio.c                                 |    4 +-
net/net.c                                          |    2 +-
net/vhost-user-stub.c                              |   23 +
target/i386/kvm.c                                  |   14 +-
tests/vhost-user-test.c                            |   16 +-
util/mmap-alloc.c                                  |   71 +-
util/oslib-posix.c                                 |    2 +-
backends/Makefile.objs                             |    5 +-
hw/net/Makefile.objs                               |    4 +-
hw/virtio/Makefile.objs                            |    7 +-
net/Makefile.objs                                  |    4 +-
scripts/update-linux-headers.sh                    |   11 +
tests/Makefile.include                             |    5 +-
58 files changed, 2749 insertions(+), 1814 deletions(-)
create mode 100644 include/standard-headers/linux/vhost_types.h
create mode 100644 linux-headers/asm-mips/unistd_n32.h
create mode 100644 linux-headers/asm-mips/unistd_n64.h
create mode 100644 linux-headers/asm-mips/unistd_o32.h
create mode 100644 linux-headers/asm-powerpc/unistd_32.h
create mode 100644 linux-headers/asm-powerpc/unistd_64.h
create mode 100644 linux-headers/linux/vhost_types.h
create mode 100644 hw/net/vhost_net-stub.c
create mode 100644 net/vhost-user-stub.c
[Qemu-devel] [PULL 00/25] pci, pc, virtio: fixes, cleanups, features
Posted by Michael S. Tsirkin 5 years, 2 months ago
The following changes since commit b3fc0af1ff5e922d4dd7c875394dbd26dc7313b4:

  Merge remote-tracking branch 'remotes/kevin/tags/for-upstream' into staging (2019-02-01 17:58:27 +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 5feab30ea98e30446361d184331b7b5ff94b4116:

  contrib/libvhost-user: cleanup casts (2019-02-04 09:23:56 -0500)

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

vhost user blk discard/write zeroes features
misc cleanups and fixes all over the place

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

----------------------------------------------------------------
Changpeng Liu (3):
      contrib: compile vhost-user-blk tool by default
      contrib/vhost-user-blk: fix the compilation issue
      vhost-user-blk: add discard/write zeroes features support

Dima Stepanov (1):
      virtio: add checks for the size of the indirect table

Laszlo Ersek (1):
      fw_cfg: fix the life cycle and the name of "qemu_extra_params_fw"

Li Qiang (1):
      hw: virtio-pci: drop DO_UPCAST

Michael S. Tsirkin (3):
      contrib/libvhost-user: switch to uint64_t
      r2d: fix build on mingw
      contrib/libvhost-user: cleanup casts

Murilo Opsfelder Araujo (2):
      mmap-alloc: unfold qemu_ram_mmap()
      mmap-alloc: fix hugetlbfs misaligned length in ppc64

Paolo Bonzini (7):
      scripts/update-linux-headers.sh: adjust for Linux 4.21-rc1 (or 5.0-rc1)
      include: update Linux headers to 4.21-rc1/5.0-rc1
      vhost-net: move stubs to a separate file
      vhost-net-user: add stubs for when no virtio-net device is present
      vhost: restrict Linux dependency to kernel vhost
      vhost-net: compile it on all targets that have virtio-net.
      vhost-net: revamp configure logic

Peter Xu (4):
      intel_iommu: fix operator in vtd_switch_address_space
      intel_iommu: reset intr_enabled when system reset
      pci/msi: export msi_is_masked()
      i386/kvm: ignore masked irqs when update msi routes

Stefan Berger (1):
      acpi: Make TPM 2.0 with TIS available as MSFT0101

Thomas Huth (1):
      hw/virtio: Use CONFIG_VIRTIO_PCI switch instead of CONFIG_PCI

Wei Yang (1):
      i386, acpi: cleanup build_facs by removing second unused argument

 configure                                          |  105 +-
 default-configs/virtio.mak                         |    4 +-
 include/exec/poison.h                              |    1 -
 include/hw/pci/msi.h                               |    1 +
 include/qemu/mmap-alloc.h                          |    2 +-
 include/standard-headers/drm/drm_fourcc.h          |   63 ++
 include/standard-headers/linux/ethtool.h           |   19 +-
 include/standard-headers/linux/input-event-codes.h |   17 +
 include/standard-headers/linux/pci_regs.h          |    1 +
 include/standard-headers/linux/vhost_types.h       |  128 +++
 include/standard-headers/linux/virtio_balloon.h    |    8 +
 include/standard-headers/linux/virtio_blk.h        |   54 +
 include/standard-headers/linux/virtio_config.h     |    3 +
 include/standard-headers/linux/virtio_gpu.h        |   18 +
 include/standard-headers/linux/virtio_ring.h       |   52 +
 linux-headers/asm-arm/unistd-common.h              |    1 +
 linux-headers/asm-arm64/unistd.h                   |    1 +
 linux-headers/asm-generic/unistd.h                 |   10 +-
 linux-headers/asm-mips/sgidefs.h                   |    8 -
 linux-headers/asm-mips/unistd.h                    | 1074 +-------------------
 linux-headers/asm-mips/unistd_n32.h                |  338 ++++++
 linux-headers/asm-mips/unistd_n64.h                |  334 ++++++
 linux-headers/asm-mips/unistd_o32.h                |  374 +++++++
 linux-headers/asm-powerpc/unistd.h                 |  389 +------
 linux-headers/asm-powerpc/unistd_32.h              |  381 +++++++
 linux-headers/asm-powerpc/unistd_64.h              |  372 +++++++
 linux-headers/linux/kvm.h                          |   29 +
 linux-headers/linux/vfio.h                         |   92 ++
 linux-headers/linux/vhost.h                        |  113 +-
 linux-headers/linux/vhost_types.h                  |    1 +
 contrib/libvhost-user/libvhost-user.c              |    8 +-
 contrib/vhost-user-blk/vhost-user-blk.c            |  146 ++-
 exec.c                                             |    4 +-
 hw/block/vhost-user-blk.c                          |    4 +
 hw/i386/acpi-build.c                               |   16 +-
 hw/i386/intel_iommu.c                              |    3 +-
 hw/net/vhost_net-stub.c                            |   92 ++
 hw/net/vhost_net.c                                 |   85 +-
 hw/nvram/fw_cfg.c                                  |    9 +-
 hw/pci/msi.c                                       |    2 +-
 hw/sh4/r2d.c                                       |    2 +-
 hw/virtio/vhost-backend.c                          |   12 +-
 hw/virtio/vhost-user.c                             |   13 +-
 hw/virtio/vhost.c                                  |    2 +-
 hw/virtio/virtio-pci.c                             |    4 +-
 hw/virtio/virtio.c                                 |    4 +-
 net/net.c                                          |    2 +-
 net/vhost-user-stub.c                              |   23 +
 target/i386/kvm.c                                  |   14 +-
 tests/vhost-user-test.c                            |   16 +-
 util/mmap-alloc.c                                  |   71 +-
 util/oslib-posix.c                                 |    2 +-
 backends/Makefile.objs                             |    5 +-
 hw/net/Makefile.objs                               |    4 +-
 hw/virtio/Makefile.objs                            |    7 +-
 net/Makefile.objs                                  |    4 +-
 scripts/update-linux-headers.sh                    |   11 +
 tests/Makefile.include                             |    5 +-
 58 files changed, 2749 insertions(+), 1814 deletions(-)
 create mode 100644 include/standard-headers/linux/vhost_types.h
 create mode 100644 linux-headers/asm-mips/unistd_n32.h
 create mode 100644 linux-headers/asm-mips/unistd_n64.h
 create mode 100644 linux-headers/asm-mips/unistd_o32.h
 create mode 100644 linux-headers/asm-powerpc/unistd_32.h
 create mode 100644 linux-headers/asm-powerpc/unistd_64.h
 create mode 100644 linux-headers/linux/vhost_types.h
 create mode 100644 hw/net/vhost_net-stub.c
 create mode 100644 net/vhost-user-stub.c


Re: [Qemu-devel] [PULL 00/25] pci, pc, virtio: fixes, cleanups, features
Posted by Peter Maydell 5 years, 2 months ago
On Mon, 4 Feb 2019 at 14:43, Michael S. Tsirkin <mst@redhat.com> wrote:
>
> The following changes since commit b3fc0af1ff5e922d4dd7c875394dbd26dc7313b4:
>
>   Merge remote-tracking branch 'remotes/kevin/tags/for-upstream' into staging (2019-02-01 17:58:27 +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 5feab30ea98e30446361d184331b7b5ff94b4116:
>
>   contrib/libvhost-user: cleanup casts (2019-02-04 09:23:56 -0500)
>
> ----------------------------------------------------------------
> pci, pc, virtio: fixes, cleanups, features
>
> vhost user blk discard/write zeroes features
> misc cleanups and fixes all over the place
>
> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>

Hi; I'm afraid this failed build/test on various platforms.


Format string issues on ppc64 host:

/home/pm215/qemu/contrib/libvhost-user/libvhost-user.c: In function
‘vu_set_mem_table_exec_postcopy’:
/home/pm215/qemu/contrib/libvhost-user/libvhost-user.c:636:9: error:
format ‘%llx’ expects argument of type ‘long long unsigned int’, but
argument 5 has type ‘__u64’ [-Werror=format=]
         DPRINT("%s: region %d: Registered userfault for %llx + %llx\n",
         ^
/home/pm215/qemu/contrib/libvhost-user/libvhost-user.c:636:9: error:
format ‘%llx’ expects argument of type ‘long long unsigned int’, but
argument 6 has type ‘__u64’ [-Werror=format=]


Compilation failure on 32-bit:

/home/peter.maydell/qemu/contrib/libvhost-user/libvhost-user.c: In
function 'vu_set_mem_table_exec_postcopy':
/home/peter.maydell/qemu/contrib/libvhost-user/libvhost-user.c:594:23:
error: cast to pointer from integer of different size
[-Werror=int-to-pointer-cast]
         ret = madvise((void *)dev_region->mmap_addr,
                       ^
/home/peter.maydell/qemu/contrib/libvhost-user/libvhost-user.c:606:23:
error: cast to pointer from integer of different size
[-Werror=int-to-pointer-cast]
         ret = madvise((void *)dev_region->mmap_addr,
                       ^
/home/peter.maydell/qemu/contrib/libvhost-user/libvhost-user.c:639:22:
error: cast to pointer from integer of different size
[-Werror=int-to-pointer-cast]
         if (mprotect((void *)dev_region->mmap_addr,
                      ^


More format string issues on 32-bit:

/home/peter.maydell/qemu/contrib/vhost-user-blk/vhost-user-blk.c: In
function 'vub_readv':
/home/peter.maydell/qemu/contrib/vhost-user-blk/vhost-user-blk.c:146:25:
error: format '%lu' expects argument of type 'long unsigned int', but
argument 5 has type 'size_t {aka unsigned int}' [-Werror=format=]
         fprintf(stderr, "%s, Sector %"PRIu64", Size %lu failed with %s\n",
                         ^
/home/peter.maydell/qemu/contrib/vhost-user-blk/vhost-user-blk.c: In
function 'vub_writev':
/home/peter.maydell/qemu/contrib/vhost-user-blk/vhost-user-blk.c:169:25:
error: format '%lu' expects argument of type 'long unsigned int', but
argument 5 has type 'size_t {aka unsigned int}' [-Werror=format=]
         fprintf(stderr, "%s, Sector %"PRIu64", Size %lu failed with %s\n",
                         ^
/home/peter.maydell/qemu/contrib/vhost-user-blk/vhost-user-blk.c: In
function 'vub_discard_write_zeroes':
/home/peter.maydell/qemu/contrib/vhost-user-blk/vhost-user-blk.c:188:25:
error: format '%ld' expects argument of type 'long int', but argument
3 has type 'ssize_t {aka int}' [-Werror=format=]
         fprintf(stderr, "Invalid size %ld, expect %ld\n", size, sizeof(*desc));
                         ^
/home/peter.maydell/qemu/contrib/vhost-user-blk/vhost-user-blk.c:188:25:
error: format '%ld' expects argument of type 'long int', but argument
4 has type 'unsigned int' [-Werror=format=]


Compiler warning in a test case on the BSDs and OSX:

tests/vhost-user-test.c: In function 'main':
tests/vhost-user-test.c:942:17: warning: unused variable 'hugefs'
[-Wunused-variable]
     const char *hugefs;
                 ^


Test failures on sparc host due to an assert:

ERROR:/home/pm215/qemu/tests/vhost-user-test.c:243:wait_for_fds:
assertion failed: (s->fds_num)
Aborted

and the same on s390x, with a bit more detail:

MALLOC_PERTURB_=${MALLOC_PERTURB_:-$(( ${RANDOM:-0} % 255 + 1))}
QTEST_QEMU_BINARY=i386-softmmu/qemu-system-i386
QTEST_QEMU_IMG=qemu-img tests/vhost-user-test -m=quick -k --tap <
/dev/null | ./scripts/tap-driver.pl --test-name="vhost-user-test"
qemu-system-i386: backend does not support LE vnet headers; falling
back on userspace virtio
qemu-system-i386: backend does not support LE vnet headers; falling
back on userspace virtio
**
ERROR:/home/linux1/qemu/tests/vhost-user-test.c:243:wait_for_fds:
assertion failed: (s->fds_num)
Aborted (core dumped)
ERROR - too few tests run (expected 4, got 0)
/home/linux1/qemu/tests/Makefile.include:858: recipe for target
'check-qtest-i386' failed


New warnings about taking address of packed member on the clang
build: these aren't compile failures but we are very close to being
able to make them compile failures, so please don't add new ones:

/home/petmay01/linaro/qemu-for-merges/contrib/libvhost-user/libvhost-user.c:515:32:
warning: taking address
 of packed member 'payload' of class or structure 'VhostUserMsg' may
result in an unaligned pointer value [
-Waddress-of-packed-member]
    VhostUserMemory *memory = &vmsg->payload.memory;
                               ^~~~~~~~~~~~~~~~~~~~
/home/petmay01/linaro/qemu-for-merges/contrib/libvhost-user/libvhost-user.c:657:32:
warning: taking address
 of packed member 'payload' of class or structure 'VhostUserMsg' may
result in an unaligned pointer value [
-Waddress-of-packed-member]
    VhostUserMemory *memory = &vmsg->payload.memory;
                               ^~~~~~~~~~~~~~~~~~~~
/home/petmay01/linaro/qemu-for-merges/contrib/libvhost-user/libvhost-user.c:786:37:
warning: taking address
 of packed member 'payload' of class or structure 'VhostUserMsg' may
result in an unaligned pointer value [
-Waddress-of-packed-member]
    struct vhost_vring_addr *vra = &vmsg->payload.addr;
                                    ^~~~~~~~~~~~~~~~~~


Compile error on the clang build:

/home/petmay01/linaro/qemu-for-merges/contrib/libvhost-user/libvhost-user.c:953:20:
error: implicit conversion from enumeration type 'enum
VhostUserSlaveRequest' to different enumeration type
'VhostUserRequest' (aka 'enum VhostUserRequest')
[-Werror,-Wenum-conversion]
        .request = VHOST_USER_SLAVE_VRING_HOST_NOTIFIER_MSG,
                   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~


thanks
-- PMM

Re: [Qemu-devel] [PULL 00/25] pci, pc, virtio: fixes, cleanups, features
Posted by Michael S. Tsirkin 5 years, 2 months ago
On Mon, Feb 04, 2019 at 05:59:16PM +0000, Peter Maydell wrote:
> On Mon, 4 Feb 2019 at 14:43, Michael S. Tsirkin <mst@redhat.com> wrote:
> >
> > The following changes since commit b3fc0af1ff5e922d4dd7c875394dbd26dc7313b4:
> >
> >   Merge remote-tracking branch 'remotes/kevin/tags/for-upstream' into staging (2019-02-01 17:58:27 +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 5feab30ea98e30446361d184331b7b5ff94b4116:
> >
> >   contrib/libvhost-user: cleanup casts (2019-02-04 09:23:56 -0500)
> >
> > ----------------------------------------------------------------
> > pci, pc, virtio: fixes, cleanups, features
> >
> > vhost user blk discard/write zeroes features
> > misc cleanups and fixes all over the place
> >
> > Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
> 
> Hi; I'm afraid this failed build/test on various platforms.
> 
> 
> Format string issues on ppc64 host:
> 
> /home/pm215/qemu/contrib/libvhost-user/libvhost-user.c: In function
> ‘vu_set_mem_table_exec_postcopy’:
> /home/pm215/qemu/contrib/libvhost-user/libvhost-user.c:636:9: error:
> format ‘%llx’ expects argument of type ‘long long unsigned int’, but
> argument 5 has type ‘__u64’ [-Werror=format=]
>          DPRINT("%s: region %d: Registered userfault for %llx + %llx\n",
>          ^
> /home/pm215/qemu/contrib/libvhost-user/libvhost-user.c:636:9: error:
> format ‘%llx’ expects argument of type ‘long long unsigned int’, but
> argument 6 has type ‘__u64’ [-Werror=format=]
> 
> 
> Compilation failure on 32-bit:
> 
> /home/peter.maydell/qemu/contrib/libvhost-user/libvhost-user.c: In
> function 'vu_set_mem_table_exec_postcopy':
> /home/peter.maydell/qemu/contrib/libvhost-user/libvhost-user.c:594:23:
> error: cast to pointer from integer of different size
> [-Werror=int-to-pointer-cast]
>          ret = madvise((void *)dev_region->mmap_addr,
>                        ^
> /home/peter.maydell/qemu/contrib/libvhost-user/libvhost-user.c:606:23:
> error: cast to pointer from integer of different size
> [-Werror=int-to-pointer-cast]
>          ret = madvise((void *)dev_region->mmap_addr,
>                        ^
> /home/peter.maydell/qemu/contrib/libvhost-user/libvhost-user.c:639:22:
> error: cast to pointer from integer of different size
> [-Werror=int-to-pointer-cast]
>          if (mprotect((void *)dev_region->mmap_addr,
>                       ^
> 
> 
> More format string issues on 32-bit:
> 
> /home/peter.maydell/qemu/contrib/vhost-user-blk/vhost-user-blk.c: In
> function 'vub_readv':
> /home/peter.maydell/qemu/contrib/vhost-user-blk/vhost-user-blk.c:146:25:
> error: format '%lu' expects argument of type 'long unsigned int', but
> argument 5 has type 'size_t {aka unsigned int}' [-Werror=format=]
>          fprintf(stderr, "%s, Sector %"PRIu64", Size %lu failed with %s\n",
>                          ^
> /home/peter.maydell/qemu/contrib/vhost-user-blk/vhost-user-blk.c: In
> function 'vub_writev':
> /home/peter.maydell/qemu/contrib/vhost-user-blk/vhost-user-blk.c:169:25:
> error: format '%lu' expects argument of type 'long unsigned int', but
> argument 5 has type 'size_t {aka unsigned int}' [-Werror=format=]
>          fprintf(stderr, "%s, Sector %"PRIu64", Size %lu failed with %s\n",
>                          ^
> /home/peter.maydell/qemu/contrib/vhost-user-blk/vhost-user-blk.c: In
> function 'vub_discard_write_zeroes':
> /home/peter.maydell/qemu/contrib/vhost-user-blk/vhost-user-blk.c:188:25:
> error: format '%ld' expects argument of type 'long int', but argument
> 3 has type 'ssize_t {aka int}' [-Werror=format=]
>          fprintf(stderr, "Invalid size %ld, expect %ld\n", size, sizeof(*desc));
>                          ^
> /home/peter.maydell/qemu/contrib/vhost-user-blk/vhost-user-blk.c:188:25:
> error: format '%ld' expects argument of type 'long int', but argument
> 4 has type 'unsigned int' [-Werror=format=]
> 
> 
> Compiler warning in a test case on the BSDs and OSX:
> 
> tests/vhost-user-test.c: In function 'main':
> tests/vhost-user-test.c:942:17: warning: unused variable 'hugefs'
> [-Wunused-variable]
>      const char *hugefs;
>                  ^
> 
> 
> Test failures on sparc host due to an assert:
> 
> ERROR:/home/pm215/qemu/tests/vhost-user-test.c:243:wait_for_fds:
> assertion failed: (s->fds_num)
> Aborted
> 
> and the same on s390x, with a bit more detail:
> 
> MALLOC_PERTURB_=${MALLOC_PERTURB_:-$(( ${RANDOM:-0} % 255 + 1))}
> QTEST_QEMU_BINARY=i386-softmmu/qemu-system-i386
> QTEST_QEMU_IMG=qemu-img tests/vhost-user-test -m=quick -k --tap <
> /dev/null | ./scripts/tap-driver.pl --test-name="vhost-user-test"
> qemu-system-i386: backend does not support LE vnet headers; falling
> back on userspace virtio
> qemu-system-i386: backend does not support LE vnet headers; falling
> back on userspace virtio
> **
> ERROR:/home/linux1/qemu/tests/vhost-user-test.c:243:wait_for_fds:
> assertion failed: (s->fds_num)
> Aborted (core dumped)
> ERROR - too few tests run (expected 4, got 0)
> /home/linux1/qemu/tests/Makefile.include:858: recipe for target
> 'check-qtest-i386' failed
> 
> 
> New warnings about taking address of packed member on the clang
> build: these aren't compile failures but we are very close to being
> able to make them compile failures, so please don't add new ones:
> 
> /home/petmay01/linaro/qemu-for-merges/contrib/libvhost-user/libvhost-user.c:515:32:
> warning: taking address
>  of packed member 'payload' of class or structure 'VhostUserMsg' may
> result in an unaligned pointer value [
> -Waddress-of-packed-member]
>     VhostUserMemory *memory = &vmsg->payload.memory;
>                                ^~~~~~~~~~~~~~~~~~~~
> /home/petmay01/linaro/qemu-for-merges/contrib/libvhost-user/libvhost-user.c:657:32:
> warning: taking address
>  of packed member 'payload' of class or structure 'VhostUserMsg' may
> result in an unaligned pointer value [
> -Waddress-of-packed-member]
>     VhostUserMemory *memory = &vmsg->payload.memory;
>                                ^~~~~~~~~~~~~~~~~~~~
> /home/petmay01/linaro/qemu-for-merges/contrib/libvhost-user/libvhost-user.c:786:37:
> warning: taking address
>  of packed member 'payload' of class or structure 'VhostUserMsg' may
> result in an unaligned pointer value [
> -Waddress-of-packed-member]
>     struct vhost_vring_addr *vra = &vmsg->payload.addr;
>                                     ^~~~~~~~~~~~~~~~~~
> 
> 
> Compile error on the clang build:
> 
> /home/petmay01/linaro/qemu-for-merges/contrib/libvhost-user/libvhost-user.c:953:20:
> error: implicit conversion from enumeration type 'enum
> VhostUserSlaveRequest' to different enumeration type
> 'VhostUserRequest' (aka 'enum VhostUserRequest')
> [-Werror,-Wenum-conversion]
>         .request = VHOST_USER_SLAVE_VRING_HOST_NOTIFIER_MSG,
>                    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> 
> 
> thanks
> -- PMM


OK I dropped the utility from build and repushed.
That should fix most of the issues, except I am
not sure sparc/s390.

Do you mind trying the same tag please and letting me know?


Re: [Qemu-devel] [PULL 00/25] pci, pc, virtio: fixes, cleanups, features
Posted by Michael S. Tsirkin 5 years, 2 months ago
On Mon, Feb 04, 2019 at 05:59:16PM +0000, Peter Maydell wrote:
> On Mon, 4 Feb 2019 at 14:43, Michael S. Tsirkin <mst@redhat.com> wrote:
> >
> > The following changes since commit b3fc0af1ff5e922d4dd7c875394dbd26dc7313b4:
> >
> >   Merge remote-tracking branch 'remotes/kevin/tags/for-upstream' into staging (2019-02-01 17:58:27 +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 5feab30ea98e30446361d184331b7b5ff94b4116:
> >
> >   contrib/libvhost-user: cleanup casts (2019-02-04 09:23:56 -0500)
> >
> > ----------------------------------------------------------------
> > pci, pc, virtio: fixes, cleanups, features
> >
> > vhost user blk discard/write zeroes features
> > misc cleanups and fixes all over the place
> >
> > Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
> 
> Hi; I'm afraid this failed build/test on various platforms.
> 


...


> 
> Test failures on sparc host due to an assert:
> 
> ERROR:/home/pm215/qemu/tests/vhost-user-test.c:243:wait_for_fds:
> assertion failed: (s->fds_num)
> Aborted
> 
> and the same on s390x, with a bit more detail:
> 
> MALLOC_PERTURB_=${MALLOC_PERTURB_:-$(( ${RANDOM:-0} % 255 + 1))}
> QTEST_QEMU_BINARY=i386-softmmu/qemu-system-i386
> QTEST_QEMU_IMG=qemu-img tests/vhost-user-test -m=quick -k --tap <
> /dev/null | ./scripts/tap-driver.pl --test-name="vhost-user-test"
> qemu-system-i386: backend does not support LE vnet headers; falling
> back on userspace virtio
> qemu-system-i386: backend does not support LE vnet headers; falling
> back on userspace virtio
> **
> ERROR:/home/linux1/qemu/tests/vhost-user-test.c:243:wait_for_fds:
> assertion failed: (s->fds_num)
> Aborted (core dumped)
> ERROR - too few tests run (expected 4, got 0)
> /home/linux1/qemu/tests/Makefile.include:858: recipe for target
> 'check-qtest-i386' failed


Cornelia do you happen to have a system where you can help
me debug this?

-- 
MST

Re: [Qemu-devel] [PULL 00/25] pci, pc, virtio: fixes, cleanups, features
Posted by Michael S. Tsirkin 5 years, 2 months ago
On Mon, Feb 04, 2019 at 05:59:16PM +0000, Peter Maydell wrote:
> On Mon, 4 Feb 2019 at 14:43, Michael S. Tsirkin <mst@redhat.com> wrote:
> >
> > The following changes since commit b3fc0af1ff5e922d4dd7c875394dbd26dc7313b4:
> >
> >   Merge remote-tracking branch 'remotes/kevin/tags/for-upstream' into staging (2019-02-01 17:58:27 +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 5feab30ea98e30446361d184331b7b5ff94b4116:
> >
> >   contrib/libvhost-user: cleanup casts (2019-02-04 09:23:56 -0500)
> >
> > ----------------------------------------------------------------
> > pci, pc, virtio: fixes, cleanups, features
> >
> > vhost user blk discard/write zeroes features
> > misc cleanups and fixes all over the place
> >
> > Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
> 
> Hi; I'm afraid this failed build/test on various platforms.
> 
> 
> Format string issues on ppc64 host:
> 
> /home/pm215/qemu/contrib/libvhost-user/libvhost-user.c: In function
> ‘vu_set_mem_table_exec_postcopy’:
> /home/pm215/qemu/contrib/libvhost-user/libvhost-user.c:636:9: error:
> format ‘%llx’ expects argument of type ‘long long unsigned int’, but
> argument 5 has type ‘__u64’ [-Werror=format=]
>          DPRINT("%s: region %d: Registered userfault for %llx + %llx\n",
>          ^
> /home/pm215/qemu/contrib/libvhost-user/libvhost-user.c:636:9: error:
> format ‘%llx’ expects argument of type ‘long long unsigned int’, but
> argument 6 has type ‘__u64’ [-Werror=format=]

So I think I fixed the build errors. And who knows maybe
that will fix the runtime ones somehow ..
Could you try pls? Re-pushed to same tag.

-- 
MST

Re: [Qemu-devel] [PULL 00/25] pci, pc, virtio: fixes, cleanups, features
Posted by Peter Maydell 5 years, 2 months ago
On Tue, 5 Feb 2019 at 01:52, Michael S. Tsirkin <mst@redhat.com> wrote:
> So I think I fixed the build errors. And who knows maybe
> that will fix the runtime ones somehow ..
> Could you try pls? Re-pushed to same tag.

these failures still remain:

unused variable for OSX and the BSDs:

tests/vhost-user-test.c:942:17: warning: unused variable 'hugefs'
[-Wunused-variable]
    const char *hugefs;
                ^

Assertion failure on sparc, s390x and PPC64 hosts:

MALLOC_PERTURB_=${MALLOC_PERTURB_:-$(( ${RANDOM:-0} % 255 + 1))}
QTEST_QEMU_BINARY=i386-softmmu/qemu-system-i386
QTEST_QEMU_IMG=qemu-img tests/vhost-user-test -m=quick -k --tap <
/dev/null | ./scripts/tap-driver.pl --test-name="vhost-user-test"
qemu-system-i386: backend does not support LE vnet headers; falling
back on userspace virtio
qemu-system-i386: backend does not support LE vnet headers; falling
back on userspace virtio
**
ERROR:/home/pm215/qemu/tests/vhost-user-test.c:243:wait_for_fds:
assertion failed: (s->fds_num)
ERROR - too few tests run (expected 4, got 0)

Given the set of hosts affected this is almost certainly
a big-endian-host specific bug.

thanks
-- PMM

Re: [Qemu-devel] [PULL 00/25] pci, pc, virtio: fixes, cleanups, features
Posted by Michael S. Tsirkin 5 years, 2 months ago
On Tue, Feb 05, 2019 at 12:41:55PM +0000, Peter Maydell wrote:
> On Tue, 5 Feb 2019 at 01:52, Michael S. Tsirkin <mst@redhat.com> wrote:
> > So I think I fixed the build errors. And who knows maybe
> > that will fix the runtime ones somehow ..
> > Could you try pls? Re-pushed to same tag.
> 
> these failures still remain:
> 
> unused variable for OSX and the BSDs:
> 
> tests/vhost-user-test.c:942:17: warning: unused variable 'hugefs'
> [-Wunused-variable]
>     const char *hugefs;
>                 ^
> 
> Assertion failure on sparc, s390x and PPC64 hosts:
> 
> MALLOC_PERTURB_=${MALLOC_PERTURB_:-$(( ${RANDOM:-0} % 255 + 1))}
> QTEST_QEMU_BINARY=i386-softmmu/qemu-system-i386
> QTEST_QEMU_IMG=qemu-img tests/vhost-user-test -m=quick -k --tap <
> /dev/null | ./scripts/tap-driver.pl --test-name="vhost-user-test"
> qemu-system-i386: backend does not support LE vnet headers; falling
> back on userspace virtio
> qemu-system-i386: backend does not support LE vnet headers; falling
> back on userspace virtio
> **
> ERROR:/home/pm215/qemu/tests/vhost-user-test.c:243:wait_for_fds:
> assertion failed: (s->fds_num)
> ERROR - too few tests run (expected 4, got 0)
> 
> Given the set of hosts affected this is almost certainly
> a big-endian-host specific bug.
> 
> thanks
> -- PMM

You were right.

OK I reverted the whole part dealing with vhost-user and reposted.

I'm sure it's fine now.


-- 
MST

Re: [Qemu-devel] [PULL 00/25] pci, pc, virtio: fixes, cleanups, features
Posted by Peter Xu 5 years, 2 months ago
On Tue, Feb 05, 2019 at 11:06:42AM -0500, Michael S. Tsirkin wrote:
> On Tue, Feb 05, 2019 at 12:41:55PM +0000, Peter Maydell wrote:
> > On Tue, 5 Feb 2019 at 01:52, Michael S. Tsirkin <mst@redhat.com> wrote:
> > > So I think I fixed the build errors. And who knows maybe
> > > that will fix the runtime ones somehow ..
> > > Could you try pls? Re-pushed to same tag.
> > 
> > these failures still remain:
> > 
> > unused variable for OSX and the BSDs:
> > 
> > tests/vhost-user-test.c:942:17: warning: unused variable 'hugefs'
> > [-Wunused-variable]
> >     const char *hugefs;
> >                 ^
> > 
> > Assertion failure on sparc, s390x and PPC64 hosts:
> > 
> > MALLOC_PERTURB_=${MALLOC_PERTURB_:-$(( ${RANDOM:-0} % 255 + 1))}
> > QTEST_QEMU_BINARY=i386-softmmu/qemu-system-i386
> > QTEST_QEMU_IMG=qemu-img tests/vhost-user-test -m=quick -k --tap <
> > /dev/null | ./scripts/tap-driver.pl --test-name="vhost-user-test"
> > qemu-system-i386: backend does not support LE vnet headers; falling
> > back on userspace virtio
> > qemu-system-i386: backend does not support LE vnet headers; falling
> > back on userspace virtio
> > **
> > ERROR:/home/pm215/qemu/tests/vhost-user-test.c:243:wait_for_fds:
> > assertion failed: (s->fds_num)
> > ERROR - too few tests run (expected 4, got 0)
> > 
> > Given the set of hosts affected this is almost certainly
> > a big-endian-host specific bug.
> > 
> > thanks
> > -- PMM
> 
> You were right.
> 
> OK I reverted the whole part dealing with vhost-user and reposted.

I noticed that the merged pull request could possibly have squashed
the below two patches (in previous pull) into one super patch
(a56de056c91f87e1e):

        i386/kvm: ignore masked irqs when update msi routes
        contrib/vhost-user-blk: fix the compilation issue

Here, the first patch lost its commit message, and the last patch lost
its real author. ;)

Regards,

-- 
Peter Xu

Re: [Qemu-devel] [PULL 00/25] pci, pc, virtio: fixes, cleanups, features
Posted by Philippe Mathieu-Daudé 5 years, 2 months ago
On 2/12/19 8:11 AM, Peter Xu wrote:
> On Tue, Feb 05, 2019 at 11:06:42AM -0500, Michael S. Tsirkin wrote:
>>
>> OK I reverted the whole part dealing with vhost-user and reposted.
> 
> I noticed that the merged pull request could possibly have squashed
> the below two patches (in previous pull) into one super patch
> (a56de056c91f87e1e):
> 
>         i386/kvm: ignore masked irqs when update msi routes
>         contrib/vhost-user-blk: fix the compilation issue
> 
> Here, the first patch lost its commit message, and the last patch lost
> its real author. ;)

I suggest we revert a56de056c9 ASAP and reapply the both patches, this
will ease cherry-picking/downstream workflow.

Re: [Qemu-devel] [PULL 00/25] pci, pc, virtio: fixes, cleanups, features
Posted by Michael S. Tsirkin 5 years, 2 months ago
On Tue, Feb 12, 2019 at 11:39:21AM +0100, Philippe Mathieu-Daudé wrote:
> On 2/12/19 8:11 AM, Peter Xu wrote:
> > On Tue, Feb 05, 2019 at 11:06:42AM -0500, Michael S. Tsirkin wrote:
> >>
> >> OK I reverted the whole part dealing with vhost-user and reposted.
> > 
> > I noticed that the merged pull request could possibly have squashed
> > the below two patches (in previous pull) into one super patch
> > (a56de056c91f87e1e):
> > 
> >         i386/kvm: ignore masked irqs when update msi routes
> >         contrib/vhost-user-blk: fix the compilation issue
> > 
> > Here, the first patch lost its commit message, and the last patch lost
> > its real author. ;)
> 
> I suggest we revert a56de056c9 ASAP and reapply the both patches, this
> will ease cherry-picking/downstream workflow.

I don't see why does it help upstream.

-- 
MST

Re: [Qemu-devel] [PULL 00/25] pci, pc, virtio: fixes, cleanups, features
Posted by Philippe Mathieu-Daudé 5 years, 2 months ago
On 2/12/19 2:04 PM, Michael S. Tsirkin wrote:
> On Tue, Feb 12, 2019 at 11:39:21AM +0100, Philippe Mathieu-Daudé wrote:
>> On 2/12/19 8:11 AM, Peter Xu wrote:
>>> On Tue, Feb 05, 2019 at 11:06:42AM -0500, Michael S. Tsirkin wrote:
>>>>
>>>> OK I reverted the whole part dealing with vhost-user and reposted.
>>>
>>> I noticed that the merged pull request could possibly have squashed
>>> the below two patches (in previous pull) into one super patch
>>> (a56de056c91f87e1e):
>>>
>>>         i386/kvm: ignore masked irqs when update msi routes
>>>         contrib/vhost-user-blk: fix the compilation issue
>>>
>>> Here, the first patch lost its commit message, and the last patch lost
>>> its real author. ;)
>>
>> I suggest we revert a56de056c9 ASAP and reapply the both patches, this
>> will ease cherry-picking/downstream workflow.
> 
> I don't see why does it help upstream.

I'd have suggested the same if I had no idea what 'downstream workflow'
mean, simply to keep the tree clear and avoid to have unrelated changes
squashed altogether.
Commit a56de056c9 really looks messy. MSI/MSIX changes described by "fix
vhost-user-blk compilation".
Hopefully it won't trigger any problem which requires bisecting to it,
then contact Changpeng Liu asking him what he intented to do with his
commit.
Your call anyway :)

Regards,

Phil.

Re: [Qemu-devel] [PULL 00/25] pci, pc, virtio: fixes, cleanups, features
Posted by Michael S. Tsirkin 5 years, 2 months ago
On Tue, Feb 12, 2019 at 02:15:36PM +0100, Philippe Mathieu-Daudé wrote:
> On 2/12/19 2:04 PM, Michael S. Tsirkin wrote:
> > On Tue, Feb 12, 2019 at 11:39:21AM +0100, Philippe Mathieu-Daudé wrote:
> >> On 2/12/19 8:11 AM, Peter Xu wrote:
> >>> On Tue, Feb 05, 2019 at 11:06:42AM -0500, Michael S. Tsirkin wrote:
> >>>>
> >>>> OK I reverted the whole part dealing with vhost-user and reposted.
> >>>
> >>> I noticed that the merged pull request could possibly have squashed
> >>> the below two patches (in previous pull) into one super patch
> >>> (a56de056c91f87e1e):
> >>>
> >>>         i386/kvm: ignore masked irqs when update msi routes
> >>>         contrib/vhost-user-blk: fix the compilation issue
> >>>
> >>> Here, the first patch lost its commit message, and the last patch lost
> >>> its real author. ;)
> >>
> >> I suggest we revert a56de056c9 ASAP and reapply the both patches, this
> >> will ease cherry-picking/downstream workflow.
> > 
> > I don't see why does it help upstream.
> 
> I'd have suggested the same if I had no idea what 'downstream workflow'
> mean, simply to keep the tree clear and avoid to have unrelated changes
> squashed altogether.
> Commit a56de056c9 really looks messy. MSI/MSIX changes described by "fix
> vhost-user-blk compilation".
> Hopefully it won't trigger any problem which requires bisecting to it,
> then contact Changpeng Liu asking him what he intented to do with his
> commit.
> Your call anyway :)
> 
> Regards,
> 
> Phil.


OK these are good points. I'm not sure what happened but it looks like I
screwed up when resolving some conflicts.  Care posting a patchset
looking sane?

-- 
MST

Re: [Qemu-devel] [PULL 00/25] pci, pc, virtio: fixes, cleanups, features
Posted by Philippe Mathieu-Daudé 5 years, 2 months ago
On 2/12/19 2:24 PM, Michael S. Tsirkin wrote:
> On Tue, Feb 12, 2019 at 02:15:36PM +0100, Philippe Mathieu-Daudé wrote:
>> On 2/12/19 2:04 PM, Michael S. Tsirkin wrote:
>>> On Tue, Feb 12, 2019 at 11:39:21AM +0100, Philippe Mathieu-Daudé wrote:
>>>> On 2/12/19 8:11 AM, Peter Xu wrote:
>>>>> On Tue, Feb 05, 2019 at 11:06:42AM -0500, Michael S. Tsirkin wrote:
>>>>>>
>>>>>> OK I reverted the whole part dealing with vhost-user and reposted.
>>>>>
>>>>> I noticed that the merged pull request could possibly have squashed
>>>>> the below two patches (in previous pull) into one super patch
>>>>> (a56de056c91f87e1e):
>>>>>
>>>>>         i386/kvm: ignore masked irqs when update msi routes
>>>>>         contrib/vhost-user-blk: fix the compilation issue
>>>>>
>>>>> Here, the first patch lost its commit message, and the last patch lost
>>>>> its real author. ;)
>>>>
>>>> I suggest we revert a56de056c9 ASAP and reapply the both patches, this
>>>> will ease cherry-picking/downstream workflow.
>>>
>>> I don't see why does it help upstream.
>>
>> I'd have suggested the same if I had no idea what 'downstream workflow'
>> mean, simply to keep the tree clear and avoid to have unrelated changes
>> squashed altogether.
>> Commit a56de056c9 really looks messy. MSI/MSIX changes described by "fix
>> vhost-user-blk compilation".
>> Hopefully it won't trigger any problem which requires bisecting to it,
>> then contact Changpeng Liu asking him what he intented to do with his
>> commit.
>> Your call anyway :)
>>
>> Regards,
>>
>> Phil.
> 
> 
> OK these are good points. I'm not sure what happened but it looks like I
> screwed up when resolving some conflicts.  Care posting a patchset
> looking sane?

Yes, will do.

Re: [Qemu-devel] [PULL 00/25] pci, pc, virtio: fixes, cleanups, features
Posted by Michael S. Tsirkin 5 years, 2 months ago
On Tue, Feb 12, 2019 at 02:53:16PM +0100, Philippe Mathieu-Daudé wrote:
> On 2/12/19 2:24 PM, Michael S. Tsirkin wrote:
> > On Tue, Feb 12, 2019 at 02:15:36PM +0100, Philippe Mathieu-Daudé wrote:
> >> On 2/12/19 2:04 PM, Michael S. Tsirkin wrote:
> >>> On Tue, Feb 12, 2019 at 11:39:21AM +0100, Philippe Mathieu-Daudé wrote:
> >>>> On 2/12/19 8:11 AM, Peter Xu wrote:
> >>>>> On Tue, Feb 05, 2019 at 11:06:42AM -0500, Michael S. Tsirkin wrote:
> >>>>>>
> >>>>>> OK I reverted the whole part dealing with vhost-user and reposted.
> >>>>>
> >>>>> I noticed that the merged pull request could possibly have squashed
> >>>>> the below two patches (in previous pull) into one super patch
> >>>>> (a56de056c91f87e1e):
> >>>>>
> >>>>>         i386/kvm: ignore masked irqs when update msi routes
> >>>>>         contrib/vhost-user-blk: fix the compilation issue
> >>>>>
> >>>>> Here, the first patch lost its commit message, and the last patch lost
> >>>>> its real author. ;)
> >>>>
> >>>> I suggest we revert a56de056c9 ASAP and reapply the both patches, this
> >>>> will ease cherry-picking/downstream workflow.
> >>>
> >>> I don't see why does it help upstream.
> >>
> >> I'd have suggested the same if I had no idea what 'downstream workflow'
> >> mean, simply to keep the tree clear and avoid to have unrelated changes
> >> squashed altogether.
> >> Commit a56de056c9 really looks messy. MSI/MSIX changes described by "fix
> >> vhost-user-blk compilation".
> >> Hopefully it won't trigger any problem which requires bisecting to it,
> >> then contact Changpeng Liu asking him what he intented to do with his
> >> commit.
> >> Your call anyway :)
> >>
> >> Regards,
> >>
> >> Phil.
> > 
> > 
> > OK these are good points. I'm not sure what happened but it looks like I
> > screwed up when resolving some conflicts.  Care posting a patchset
> > looking sane?
> 
> Yes, will do.

Thanks! Include the reverts in it pls.

-- 
MST

Re: [Qemu-devel] [PULL 00/25] pci, pc, virtio: fixes, cleanups, features
Posted by Peter Maydell 5 years, 2 months ago
On Tue, 5 Feb 2019 at 16:06, Michael S. Tsirkin <mst@redhat.com> wrote:
> OK I reverted the whole part dealing with vhost-user and reposted.
>
> I'm sure it's fine now.

Applied, thanks.

Please update the changelog at https://wiki.qemu.org/ChangeLog/4.0
for any user-visible changes.

-- PMM