qemu-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-commits] [qemu/qemu] 5031a0: configure: fix GLIB_VERSION for cross


From: Peter Maydell
Subject: [Qemu-commits] [qemu/qemu] 5031a0: configure: fix GLIB_VERSION for cross-compilation
Date: Tue, 10 Jan 2023 10:49:29 -0800

  Branch: refs/heads/staging
  Home:   https://github.com/qemu/qemu
  Commit: 5031a0917258269b6d6e4dfaea519f277bdff773
      
https://github.com/qemu/qemu/commit/5031a0917258269b6d6e4dfaea519f277bdff773
  Author: Paolo Bonzini <pbonzini@redhat.com>
  Date:   2023-01-09 (Mon, 09 Jan 2023)

  Changed paths:
    M configure

  Log Message:
  -----------
  configure: fix GLIB_VERSION for cross-compilation

configure uses "pkg-config" directly so that GLIB_VERSION is always based
on host glib version.   To correctly handle cross-compilation it should use
"$pkg_config" and take GLIB_VERSION from the cross-compiled glib.

Reported-by: Валентин <val15032008@mail.ru>
Resolves: https://gitlab.com/qemu-project/qemu/-/issues/1414
Cc: qemu-stable@nongnu.org
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>


  Commit: 36f385a1d24c730c1aac40da1b9ffee84283dd74
      
https://github.com/qemu/qemu/commit/36f385a1d24c730c1aac40da1b9ffee84283dd74
  Author: Joe Richey <joerichey@google.com>
  Date:   2023-01-09 (Mon, 09 Jan 2023)

  Changed paths:
    M target/i386/tcg/seg_helper.c

  Log Message:
  -----------
  i386: Emit correct error code for 64-bit IDT entry

When in 64-bit mode, IDT entiries are 16 bytes, so `intno * 16` is used
for base/limit/offset calculations. However, even in 64-bit mode, the
exception error code still uses bits [3,16) for the invlaid interrupt
index.

This means the error code should still be `intno * 8 + 2` even in 64-bit
mode.

Resolves: https://gitlab.com/qemu-project/qemu/-/issues/1382
Signed-off-by: Joe Richey <joerichey@google.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>


  Commit: ffab585b2be842f5dc2bb1a7815df08deb724781
      
https://github.com/qemu/qemu/commit/ffab585b2be842f5dc2bb1a7815df08deb724781
  Author: Emanuele Giuseppe Esposito <eesposit@redhat.com>
  Date:   2023-01-09 (Mon, 09 Jan 2023)

  Changed paths:
    A accel/accel-blocker.c
    M accel/meson.build
    M hw/core/cpu-common.c
    M include/hw/core/cpu.h
    A include/sysemu/accel-blocker.h
    M util/meson.build

  Log Message:
  -----------
  accel: introduce accelerator blocker API

This API allows the accelerators to prevent vcpus from issuing
new ioctls while execting a critical section marked with the
accel_ioctl_inhibit_begin/end functions.

Note that all functions submitting ioctls must mark where the
ioctl is being called with accel_{cpu_}ioctl_begin/end().

This API requires the caller to always hold the BQL.
API documentation is in sysemu/accel-blocker.h

Internally, it uses a QemuLockCnt together with a per-CPU QemuLockCnt
(to minimize cache line bouncing) to keep avoid that new ioctls
run when the critical section starts, and a QemuEvent to wait
that all running ioctls finish.

Signed-off-by: Emanuele Giuseppe Esposito <eesposit@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Message-Id: <20221111154758.1372674-2-eesposit@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>


  Commit: 06a36e1f39ef461b78abae7d1d2406f57fd5e684
      
https://github.com/qemu/qemu/commit/06a36e1f39ef461b78abae7d1d2406f57fd5e684
  Author: Emanuele Giuseppe Esposito <eesposit@redhat.com>
  Date:   2023-01-09 (Mon, 09 Jan 2023)

  Changed paths:
    M accel/kvm/kvm-all.c

  Log Message:
  -----------
  KVM: keep track of running ioctls

Using the new accel-blocker API, mark where ioctls are being called
in KVM. Next, we will implement the critical section that will take
care of performing memslots modifications atomically, therefore
preventing any new ioctl from running and allowing the running ones
to finish.

Signed-off-by: David Hildenbrand <david@redhat.com>
Signed-off-by: Emanuele Giuseppe Esposito <eesposit@redhat.com>
Message-Id: <20221111154758.1372674-3-eesposit@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>


  Commit: e23558b4b71d5ea9f119fc1b01cee1d1c54f9a1a
      
https://github.com/qemu/qemu/commit/e23558b4b71d5ea9f119fc1b01cee1d1c54f9a1a
  Author: David Hildenbrand <david@redhat.com>
  Date:   2023-01-09 (Mon, 09 Jan 2023)

  Changed paths:
    M accel/kvm/kvm-all.c
    M include/sysemu/kvm_int.h

  Log Message:
  -----------
  kvm: Atomic memslot updates

If we update an existing memslot (e.g., resize, split), we temporarily
remove the memslot to re-add it immediately afterwards. These updates
are not atomic, especially not for KVM VCPU threads, such that we can
get spurious faults.

Let's inhibit most KVM ioctls while performing relevant updates, such
that we can perform the update just as if it would happen atomically
without additional kernel support.

We capture the add/del changes and apply them in the notifier commit
stage instead. There, we can check for overlaps and perform the ioctl
inhibiting only if really required (-> overlap).

To keep things simple we don't perform additional checks that wouldn't
actually result in an overlap -- such as !RAM memory regions in some
cases (see kvm_set_phys_mem()).

To minimize cache-line bouncing, use a separate indicator
(in_ioctl_lock) per CPU.  Also, make sure to hold the kvm_slots_lock
while performing both actions (removing+re-adding).

We have to wait until all IOCTLs were exited and block new ones from
getting executed.

This approach cannot result in a deadlock as long as the inhibitor does
not hold any locks that might hinder an IOCTL from getting finished and
exited - something fairly unusual. The inhibitor will always hold the BQL.

AFAIKs, one possible candidate would be userfaultfd. If a page cannot be
placed (e.g., during postcopy), because we're waiting for a lock, or if the
userfaultfd thread cannot process a fault, because it is waiting for a
lock, there could be a deadlock. However, the BQL is not applicable here,
because any other guest memory access while holding the BQL would already
result in a deadlock.

Nothing else in the kernel should block forever and wait for userspace
intervention.

Note: pause_all_vcpus()/resume_all_vcpus() or
start_exclusive()/end_exclusive() cannot be used, as they either drop
the BQL or require to be called without the BQL - something inhibitors
cannot handle. We need a low-level locking mechanism that is
deadlock-free even when not releasing the BQL.

Signed-off-by: David Hildenbrand <david@redhat.com>
Signed-off-by: Emanuele Giuseppe Esposito <eesposit@redhat.com>
Tested-by: Emanuele Giuseppe Esposito <eesposit@redhat.com>
Message-Id: <20221111154758.1372674-4-eesposit@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>


  Commit: 598b03b1b481882009c3bba65e5556f105a895b8
      
https://github.com/qemu/qemu/commit/598b03b1b481882009c3bba65e5556f105a895b8
  Author: Eric Auger <eric.auger@redhat.com>
  Date:   2023-01-09 (Mon, 09 Jan 2023)

  Changed paths:
    M target/i386/ops_sse.h

  Log Message:
  -----------
  target/i386: Remove compilation errors when -Werror=maybe-uninitialized

To avoid compilation errors when -Werror=maybe-uninitialized is used,
replace 'case 3' by 'default'.

Otherwise we get:

../target/i386/ops_sse.h: In function ‘helper_vpermdq_ymm’:
../target/i386/ops_sse.h:2495:13: error: ‘r3’ may be used
uninitialized in this function [-Werror=maybe-uninitialized]
   2495 |     d->Q(3) = r3;
        |     ~~~~~~~~^~~~
../target/i386/ops_sse.h:2494:13: error: ‘r2’ may be used
uninitialized in this function [-Werror=maybe-uninitialized]
   2494 |     d->Q(2) = r2;
        |     ~~~~~~~~^~~~
../target/i386/ops_sse.h:2493:13: error: ‘r1’ may be used
uninitialized in this function [-Werror=maybe-uninitialized]
   2493 |     d->Q(1) = r1;
        |     ~~~~~~~~^~~~
../target/i386/ops_sse.h:2492:13: error: ‘r0’ may be used
uninitialized in this function [-Werror=maybe-uninitialized]
   2492 |     d->Q(0) = r0;
        |     ~~~~~~~~^~~~

Signed-off-by: Eric Auger <eric.auger@redhat.com>
Suggested-by: Stefan Weil <sw@weilnetz.de>
Fixes: 790684776861 ("target/i386: reimplement 0x0f 0x3a, add AVX")
Message-Id: <20221221163652.1239362-1-eric.auger@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>


  Commit: 3bfa5491c1b1a036d77d2f98eec005e8aad18c34
      
https://github.com/qemu/qemu/commit/3bfa5491c1b1a036d77d2f98eec005e8aad18c34
  Author: Paolo Bonzini <pbonzini@redhat.com>
  Date:   2023-01-09 (Mon, 09 Jan 2023)

  Changed paths:
    M chardev/char-parallel.c
    M chardev/meson.build
    M include/qemu/osdep.h

  Log Message:
  -----------
  chardev: clean up chardev-parallel.c

Replace HAVE_CHARDEV_PARPORT with a Meson conditional, remove unnecessary
defines, and close the file descriptor on FreeBSD/DragonFly.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>


  Commit: 10c3f2c245161893f95df62d5d2ba56f7c48faec
      
https://github.com/qemu/qemu/commit/10c3f2c245161893f95df62d5d2ba56f7c48faec
  Author: Daniel P. Berrangé <berrange@redhat.com>
  Date:   2023-01-09 (Mon, 09 Jan 2023)

  Changed paths:
    M .gitlab-ci.d/crossbuild-template.yml

  Log Message:
  -----------
  gitlab: remove redundant setting of PKG_CONFIG_PATH

The PKG_CONFIG_PATH variable is not defined in GitLab CI
envs and even if it was, we don't need to set it to its
existing value.

Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
Message-Id: <20221103173044.3969425-2-berrange@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>


  Commit: d619efc46fa23e20edd65df93548bf1bb0ad461f
      
https://github.com/qemu/qemu/commit/d619efc46fa23e20edd65df93548bf1bb0ad461f
  Author: Daniel P. Berrangé <berrange@redhat.com>
  Date:   2023-01-09 (Mon, 09 Jan 2023)

  Changed paths:
    M disas.c

  Log Message:
  -----------
  disas: add G_GNUC_PRINTF to gstring_printf

Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
Message-Id: <20221219130205.687815-2-berrange@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>


  Commit: a22d2c7b6e9a3bb3d0bbac22ebf0a7fd32543db5
      
https://github.com/qemu/qemu/commit/a22d2c7b6e9a3bb3d0bbac22ebf0a7fd32543db5
  Author: Daniel P. Berrangé <berrange@redhat.com>
  Date:   2023-01-09 (Mon, 09 Jan 2023)

  Changed paths:
    M hw/xen/xen-bus.c
    M hw/xen/xen_pvdev.c
    M include/hw/xen/xen-bus-helper.h
    M include/hw/xen/xen-bus.h

  Log Message:
  -----------
  hw/xen: use G_GNUC_PRINTF/SCANF for various functions

Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
Acked-by: Anthony PERARD <anthony.perard@citrix.com>
Message-Id: <20221219130205.687815-3-berrange@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>


  Commit: d7f4c5e3d11357854c36adfb7f5d475afbee6e23
      
https://github.com/qemu/qemu/commit/d7f4c5e3d11357854c36adfb7f5d475afbee6e23
  Author: Daniel P. Berrangé <berrange@redhat.com>
  Date:   2023-01-09 (Mon, 09 Jan 2023)

  Changed paths:
    M tools/virtiofsd/fuse_log.c
    M tools/virtiofsd/fuse_log.h
    M tools/virtiofsd/passthrough_ll.c

  Log Message:
  -----------
  tools/virtiofsd: add G_GNUC_PRINTF for logging functions

Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
Message-Id: <20221219130205.687815-4-berrange@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>


  Commit: 09e0b2b47611d2c995107817c5c03080ed91e728
      
https://github.com/qemu/qemu/commit/09e0b2b47611d2c995107817c5c03080ed91e728
  Author: Daniel P. Berrangé <berrange@redhat.com>
  Date:   2023-01-09 (Mon, 09 Jan 2023)

  Changed paths:
    M util/error-report.c
    M util/error.c

  Log Message:
  -----------
  util/error: add G_GNUC_PRINTF for various functions

Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Message-Id: <20221219130205.687815-5-berrange@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>


  Commit: 0a8b0aa75527fd4f0dce7a8b937526e3fd329d16
      
https://github.com/qemu/qemu/commit/0a8b0aa75527fd4f0dce7a8b937526e3fd329d16
  Author: Daniel P. Berrangé <berrange@redhat.com>
  Date:   2023-01-09 (Mon, 09 Jan 2023)

  Changed paths:
    M tests/qtest/ahci-test.c
    M tests/qtest/arm-cpu-features.c
    M tests/qtest/erst-test.c
    M tests/qtest/ide-test.c
    M tests/qtest/ivshmem-test.c
    M tests/qtest/libqmp.c
    M tests/qtest/libqos/libqos-pc.h
    M tests/qtest/libqos/libqos-spapr.h
    M tests/qtest/libqos/libqos.h
    M tests/qtest/libqos/virtio-9p.c
    M tests/qtest/migration-helpers.h
    M tests/qtest/rtas-test.c
    M tests/qtest/usb-hcd-uhci-test.c
    M tests/unit/test-qmp-cmds.c

  Log Message:
  -----------
  tests: add G_GNUC_PRINTF for various functions

Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
Message-Id: <20221219130205.687815-6-berrange@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>


  Commit: 45831e496924d7e158fa00236646b74101d4c987
      
https://github.com/qemu/qemu/commit/45831e496924d7e158fa00236646b74101d4c987
  Author: Daniel P. Berrangé <berrange@redhat.com>
  Date:   2023-01-09 (Mon, 09 Jan 2023)

  Changed paths:
    M configure

  Log Message:
  -----------
  enforce use of G_GNUC_PRINTF attributes

We've been very gradually adding G_GNUC_PRINTF annotations
to functions over years. This has been useful in detecting
certain malformed printf strings, or cases where we pass
user data as the printf format which is a potential security
flaw.

Given the inherant memory corruption danger in use of format
strings vs mis-matched variadic arguments, it is worth applying
G_GNUC_PRINTF to all functions using printf, even if we know
they are safe.

The compilers can reasonably reliably identify such places
with the -Wsuggest-attribute=format / -Wmissing-format-attribute
flags.

Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
Message-Id: <20221219130205.687815-7-berrange@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>


  Commit: 71ac22ec692fff82656371251b58f73494daff1a
      
https://github.com/qemu/qemu/commit/71ac22ec692fff82656371251b58f73494daff1a
  Author: Daniel P. Berrangé <berrange@redhat.com>
  Date:   2023-01-09 (Mon, 09 Jan 2023)

  Changed paths:
    M hw/display/meson.build

  Log Message:
  -----------
  hw/display: avoid creating empty loadable modules

When using --disable-virglrenderer, QEMU still creates

  hw-display-virtio-gpu-gl.so
  hw-display-virtio-vga-gl.so
  hw-display-virtio-gpu-pci-gl.so

but when these are loaded, they provide no functionality as the code
which registers types is not compiled in. Funtionally this is
relatively harmless, because QEMU is fine loading a module with no
types.

This is rather confusing for users and OS distro maintainers though,
as they think they have the GL functionality built, but in fact the
module they are looking at provides nothing of value.

The root cause is the use of 'when/if_true' rules when adding sources
to the module source set. If all the rules evaluate to false, then we
have declared the module, but not added anything to it.  We need to
put declaration of the entire module inside a condition based on
existance of the 3rd party library deps that are mandatory.

Fixes: https://gitlab.com/qemu-project/qemu/-/issues/1352
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
Message-Id: <20221219125830.2369169-1-berrange@redhat.com>
[Do not check for pixman. - Paolo]
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>


  Commit: bebd624f1dcfbc45142f00b4497170b50e56605b
      
https://github.com/qemu/qemu/commit/bebd624f1dcfbc45142f00b4497170b50e56605b
  Author: Marcel Holtmann <marcel@holtmann.org>
  Date:   2023-01-09 (Mon, 09 Jan 2023)

  Changed paths:
    M subprojects/libvhost-user/libvhost-user.c

  Log Message:
  -----------
  libvhost-user: Provide _GNU_SOURCE when compiling outside of QEMU

Then the libvhost-user sources are used by another project, it can not
be guaranteed that _GNU_SOURCE is set by the build system. If it is for
example not set, errors like this show up.

  CC       libvhost-user.o
libvhost-user.c: In function ‘vu_panic’:
libvhost-user.c:195:9: error: implicit declaration of function ‘vasprintf’; did 
you mean ‘vsprintf’? [-Werror=implicit-function-declaration]
  195 |     if (vasprintf(&buf, msg, ap) < 0) {
      |         ^~~~~~~~~
      |         vsprintf

The simplest way to allow external complication of libvhost-user.[ch] is
by setting _GNU_SOURCE if it is not already set by the build system.

Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Message-Id: 
<be27dcc747a6b5cc6f8ae3f79e0b79171382bcef.1671741278.git.marcel@holtmann.org>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>


  Commit: 158d8a8c9343ca0d68305e3dad9882e29899cd88
      
https://github.com/qemu/qemu/commit/158d8a8c9343ca0d68305e3dad9882e29899cd88
  Author: Marcel Holtmann <marcel@holtmann.org>
  Date:   2023-01-09 (Mon, 09 Jan 2023)

  Changed paths:
    M subprojects/libvhost-user/libvhost-user.c

  Log Message:
  -----------
  libvhost-user: Replace typeof with __typeof__

Strictly speaking only -std=gnu99 support the usage of typeof and for
easier inclusion in external projects, it is better to use __typeof__.

  CC       libvhost-user.o
libvhost-user.c: In function ‘vu_log_queue_fill’:
libvhost-user.c:86:13: error: implicit declaration of function ‘typeof’ 
[-Werror=implicit-function-declaration]
   86 |             typeof(x) _min1 = (x);              \
      |             ^~~~~~

Changing these two users of typeof makes the compiler happy and no extra
flags or pragmas need to be provided.

Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Message-Id: 
<981aa822bcaaa2b8d74f245339a99a85c25b346f.1671741278.git.marcel@holtmann.org>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>


  Commit: 5ebb9765b45ef925084dbdb6ce084ef3cd87b10d
      
https://github.com/qemu/qemu/commit/5ebb9765b45ef925084dbdb6ce084ef3cd87b10d
  Author: Marcel Holtmann <marcel@holtmann.org>
  Date:   2023-01-09 (Mon, 09 Jan 2023)

  Changed paths:
    M subprojects/libvhost-user/libvhost-user.c

  Log Message:
  -----------
  libvhost-user: Cast rc variable to avoid compiler warning

The assert from recvmsg() return value against an uint32_t size field
from a protocol struct throws a compiler warning.

  CC       libvhost-user.o
In file included from libvhost-user.c:27:
libvhost-user.c: In function ‘vu_message_read_default’:
libvhost-user.c:363:19: error: comparison of integer expressions of different 
signedness: ‘int’ and ‘uint32_t’ {aka ‘unsigned int’} [-Werror=sign-compare]
  363 |         assert(rc == vmsg->size);
      |                   ^~

This is not critical, but annoying when the libvhost-user source are
used in an external project that has this compiler warning switched on.

Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Message-Id: 
<7a791e27b7bd3e0a8b8cc8fbb15090a870d226d5.1671741278.git.marcel@holtmann.org>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>


  Commit: 3ba925797713229ecde75c05badcd4347cd5425e
      
https://github.com/qemu/qemu/commit/3ba925797713229ecde75c05badcd4347cd5425e
  Author: Marcel Holtmann <marcel@holtmann.org>
  Date:   2023-01-09 (Mon, 09 Jan 2023)

  Changed paths:
    M subprojects/libvhost-user/libvhost-user.c

  Log Message:
  -----------
  libvhost-user: Use unsigned int i for some for-loop iterations

The sign-compare warning also hits some of the for-loops, but it easy
fixed by just making the iterator variable unsigned int.

  CC       libvhost-user.o
libvhost-user.c: In function ‘vu_gpa_to_va’:
libvhost-user.c:223:19: error: comparison of integer expressions of different 
signedness: ‘int’ and ‘uint32_t’ {aka ‘unsigned int’} [-Werror=sign-compare]
  223 |     for (i = 0; i < dev->nregions; i++) {
      |                   ^

Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Message-Id: 
<decb925e1a6fb9538738d2570bda2804f888fa15.1671741278.git.marcel@holtmann.org>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>


  Commit: 9a575c0082023b33e15e4e8741c16e520ab61ea9
      
https://github.com/qemu/qemu/commit/9a575c0082023b33e15e4e8741c16e520ab61ea9
  Author: Marcel Holtmann <marcel@holtmann.org>
  Date:   2023-01-09 (Mon, 09 Jan 2023)

  Changed paths:
    M subprojects/libvhost-user/libvhost-user.c

  Log Message:
  -----------
  libvhost-user: Declare uffdio_register early to make it C90 compliant

When using libvhost-user source in an external project that wants to
comply with the C90 standard, it is best to declare variables before
code.

  CC       libvhost-user.o
libvhost-user.c: In function ‘generate_faults’:
libvhost-user.c:683:9: error: ISO C90 forbids mixed declarations and code 
[-Werror=declaration-after-statement]
  683 |         struct uffdio_register reg_struct;
      |         ^~~~~~

In this case, it is also simple enough and doesn't cause any extra
ifdef additions.

Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Message-Id: 
<556c2d00c01fa134d13c0371d4014c90694c2943.1671741278.git.marcel@holtmann.org>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>


  Commit: e06e092dba51d36be0fd9dafab859823db35bf29
      
https://github.com/qemu/qemu/commit/e06e092dba51d36be0fd9dafab859823db35bf29
  Author: Marcel Holtmann <marcel@holtmann.org>
  Date:   2023-01-09 (Mon, 09 Jan 2023)

  Changed paths:
    M subprojects/libvhost-user/libvhost-user.c

  Log Message:
  -----------
  libvhost-user: Change dev->postcopy_ufd assignment to make it C90 compliant

The assignment of dev->postcopy_ufd can be moved into an else clause and
then the code becomes C90 compliant.

  CC       libvhost-user.o
libvhost-user.c: In function ‘vu_set_postcopy_advise’:
libvhost-user.c:1625:5: error: ISO C90 forbids mixed declarations and code 
[-Werror=declaration-after-statement]
 1625 |     struct uffdio_api api_struct;
      |     ^~~~~~

Understandable, it might be desired to avoid else clauses, but in this
case it seems clear enough and frankly the dev->postcopy_ufd is only
assigned once.

Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Message-Id: 
<74db52afb1203c4580ffc7fa462b4b2ba260a353.1671741278.git.marcel@holtmann.org>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>


  Commit: 653d66f99731179a4f4a3705f0cdb07d44e32bc4
      
https://github.com/qemu/qemu/commit/653d66f99731179a4f4a3705f0cdb07d44e32bc4
  Author: Marcel Holtmann <marcel@holtmann.org>
  Date:   2023-01-09 (Mon, 09 Jan 2023)

  Changed paths:
    M subprojects/libvduse/libvduse.c

  Log Message:
  -----------
  libvduse: Provide _GNU_SOURCE when compiling outside of QEMU

When the libvduse sources are used by another project, it can not be
guaranteed that _GNU_SOURCE is set by the build system. If it is for
example not set, errors like this show up.

  CC       libvduse.o
libvduse.c: In function ‘vduse_log_get’:
libvduse.c:172:9: error: implicit declaration of function ‘ftruncate’; did you 
mean ‘strncat’? [-Werror=implicit-function-declaration]
  172 |     if (ftruncate(fd, size) == -1) {
      |         ^~~~~~~~~
      |         strncat

The simplest way to allow external complication of libvduse.[ch] by
setting _GNU_SOURCE if it is not already set by the build system.

Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Message-Id: 
<407f3665f0605df936e5bfe60831d180edfb8cca.1671741278.git.marcel@holtmann.org>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>


  Commit: 6c64c5542a31eb6f2eb59f121eea293fa3c06fca
      
https://github.com/qemu/qemu/commit/6c64c5542a31eb6f2eb59f121eea293fa3c06fca
  Author: Marcel Holtmann <marcel@holtmann.org>
  Date:   2023-01-09 (Mon, 09 Jan 2023)

  Changed paths:
    M subprojects/libvduse/libvduse.c

  Log Message:
  -----------
  libvduse: Switch to unsigned int for inuse field in struct VduseVirtq

It seems there is no need to keep the inuse field signed and end up with
compiler warnings for sign-compare.

  CC       libvduse.o
libvduse.c: In function ‘vduse_queue_pop’:
libvduse.c:789:19: error: comparison of integer expressions of different 
signedness: ‘int’ and ‘unsigned int’ [-Werror=sign-compare]
  789 |     if (vq->inuse >= vq->vring.num) {
      |                   ^~

Instead of casting the comparison to unsigned int, just make the inuse
field unsigned int in the fist place.

Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Reviewed-by: Xie Yongji <xieyongji@bytedance.com>
Message-Id: 
<9fe3fd8b042e048bd04d506ca6e43d738b5c45b7.1671741278.git.marcel@holtmann.org>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>


  Commit: 3288ac81778d1b1af45cf970a49e1a9f51c6e79e
      
https://github.com/qemu/qemu/commit/3288ac81778d1b1af45cf970a49e1a9f51c6e79e
  Author: Marcel Holtmann <marcel@holtmann.org>
  Date:   2023-01-09 (Mon, 09 Jan 2023)

  Changed paths:
    M subprojects/libvduse/libvduse.c

  Log Message:
  -----------
  libvduse: Fix assignment in vring_set_avail_event

Since the assignment is causing a compiler warning, fix it by using
memcpy instead.

  CC       libvduse.o
libvduse.c: In function ‘vring_set_avail_event’:
libvduse.c:603:7: error: dereferencing type-punned pointer will break 
strict-aliasing rules [-Werror=strict-aliasin]
  603 |     *((uint16_t *)&vq->vring.used->ring[vq->vring.num]) = htole16(val);
      |      ~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Suggested-by: Xie Yongji <xieyongji@bytedance.com>
Suggested-by: Paolo Bonzini <pbonzini@redhat.com>
Message-Id: 
<4a0fe2a6436464473119fdbf0bc4076b36fbb37f.1671741278.git.marcel@holtmann.org>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>


  Commit: 870a313dc0f729f031d86c383405e36e98c34f03
      
https://github.com/qemu/qemu/commit/870a313dc0f729f031d86c383405e36e98c34f03
  Author: Marcel Holtmann <marcel@holtmann.org>
  Date:   2023-01-09 (Mon, 09 Jan 2023)

  Changed paths:
    M subprojects/libvhost-user/libvhost-user.c

  Log Message:
  -----------
  libvhost-user: Fix assignment in vring_set_avail_event

Since it was proposed to change the code in libvduse.c to use memcpy
instead of an assignment, the code in libvhost-user.c should also be
changed to use memcpy.

Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Suggested-by: Paolo Bonzini <pbonzini@redhat.com>
Message-Id: 
<502b22723264db064e4b05008233a9c1f2f8aaaa.1671741278.git.marcel@holtmann.org>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>


  Commit: 2216e9fb5dd95aff36bed73a19e12acd0571efd3
      
https://github.com/qemu/qemu/commit/2216e9fb5dd95aff36bed73a19e12acd0571efd3
  Author: Marcel Holtmann <marcel@holtmann.org>
  Date:   2023-01-09 (Mon, 09 Jan 2023)

  Changed paths:
    M subprojects/libvhost-user/meson.build

  Log Message:
  -----------
  libvhost-user: Add extra compiler warnings

In case libvhost-user is used externally, that projects compiler
warnings might be more strict. Enforce an extra set of compiler warnings
to catch issues early on.

Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Suggested-by: Paolo Bonzini <pbonzini@redhat.com>
Message-Id: 
<737ebf2e697f8640558e6f73d96a692711f548f6.1671741278.git.marcel@holtmann.org>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>


  Commit: 2a6b3c9f7bd8037a2545b254b517d33dfea9ff40
      
https://github.com/qemu/qemu/commit/2a6b3c9f7bd8037a2545b254b517d33dfea9ff40
  Author: Marcel Holtmann <marcel@holtmann.org>
  Date:   2023-01-09 (Mon, 09 Jan 2023)

  Changed paths:
    M subprojects/libvduse/meson.build

  Log Message:
  -----------
  libvduse: Add extra compiler warnings

In case libvhost-user is used externally, that projects compiler
warnings might be more strict. Enforce an extra set of compiler warnings
to catch issues early on.

Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Suggested-by: Paolo Bonzini <pbonzini@redhat.com>
Message-Id: 
<08daa1896ad8824e17d57d6a970bc0b4bee73ece.1671741278.git.marcel@holtmann.org>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>


  Commit: c4130a6208ee23c7991df031430e462b34114f95
      
https://github.com/qemu/qemu/commit/c4130a6208ee23c7991df031430e462b34114f95
  Author: Paolo Bonzini <pbonzini@redhat.com>
  Date:   2023-01-09 (Mon, 09 Jan 2023)

  Changed paths:
    M target/i386/tcg/decode-new.c.inc

  Log Message:
  -----------
  target/i386: fix operand size of unary SSE operations

VRCPSS, VRSQRTSS and VCVTSx2Sx have a 32-bit or 64-bit memory operand,
which is represented in the decoding tables by X86_VEX_REPScalar.  Add it
to the tables, and make validate_vex() handle the case of an instruction
that is in exception type 4 without the REP prefix and exception type 5
with it; this is the cas of VRCP and VRSQRT.

Reported-by: yongwoo <https://gitlab.com/yongwoo36>
Resolves: https://gitlab.com/qemu-project/qemu/-/issues/1377
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>


  Commit: cd78f1d264c1ac7dfd7fa50abce0dec71a1f41ac
      
https://github.com/qemu/qemu/commit/cd78f1d264c1ac7dfd7fa50abce0dec71a1f41ac
  Author: Paolo Bonzini <pbonzini@redhat.com>
  Date:   2023-01-09 (Mon, 09 Jan 2023)

  Changed paths:
    M configure

  Log Message:
  -----------
  configure: remove backwards-compatibility code

The cmd_line.txt mangling is only needed when rebuilding from very old
trees and is kept mostly as an example of how to extend it.  However,
Meson 0.63 introduces a deprecation mechanism for meson_options.txt
that can be used instead, so get rid of our home-grown hack.

Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>


  Commit: cb8a043cd0187d23eec2e100e39abe2d6e8c2044
      
https://github.com/qemu/qemu/commit/cb8a043cd0187d23eec2e100e39abe2d6e8c2044
  Author: Peter Maydell <peter.maydell@linaro.org>
  Date:   2023-01-10 (Tue, 10 Jan 2023)

  Changed paths:
    M .gitlab-ci.d/crossbuild-template.yml
    A accel/accel-blocker.c
    M accel/kvm/kvm-all.c
    M accel/meson.build
    M chardev/char-parallel.c
    M chardev/meson.build
    M configure
    M disas.c
    M hw/core/cpu-common.c
    M hw/display/meson.build
    M hw/xen/xen-bus.c
    M hw/xen/xen_pvdev.c
    M include/hw/core/cpu.h
    M include/hw/xen/xen-bus-helper.h
    M include/hw/xen/xen-bus.h
    M include/qemu/osdep.h
    A include/sysemu/accel-blocker.h
    M include/sysemu/kvm_int.h
    M subprojects/libvduse/libvduse.c
    M subprojects/libvduse/meson.build
    M subprojects/libvhost-user/libvhost-user.c
    M subprojects/libvhost-user/meson.build
    M target/i386/ops_sse.h
    M target/i386/tcg/decode-new.c.inc
    M target/i386/tcg/seg_helper.c
    M tests/qtest/ahci-test.c
    M tests/qtest/arm-cpu-features.c
    M tests/qtest/erst-test.c
    M tests/qtest/ide-test.c
    M tests/qtest/ivshmem-test.c
    M tests/qtest/libqmp.c
    M tests/qtest/libqos/libqos-pc.h
    M tests/qtest/libqos/libqos-spapr.h
    M tests/qtest/libqos/libqos.h
    M tests/qtest/libqos/virtio-9p.c
    M tests/qtest/migration-helpers.h
    M tests/qtest/rtas-test.c
    M tests/qtest/usb-hcd-uhci-test.c
    M tests/unit/test-qmp-cmds.c
    M tools/virtiofsd/fuse_log.c
    M tools/virtiofsd/fuse_log.h
    M tools/virtiofsd/passthrough_ll.c
    M util/error-report.c
    M util/error.c
    M util/meson.build

  Log Message:
  -----------
  Merge tag 'for-upstream' of https://gitlab.com/bonzini/qemu into staging

* Atomic memslot updates for KVM (Emanuele, David)
* libvhost-user/libvduse warnings fixes (Marcel)
* i386 TCG fixes (Joe, myself)
* Remove compilation errors when -Werror=maybe-uninitialized (Eric)
* fix GLIB_VERSION for cross-compilation (Paolo)

# -----BEGIN PGP SIGNATURE-----
#
# iQFIBAABCAAyFiEE8TM4V0tmI4mGbHaCv/vSX3jHroMFAmO9JxcUHHBib256aW5p
# QHJlZGhhdC5jb20ACgkQv/vSX3jHroOjugf+IilphZlsj7BuKehkbkMAA58G1TaA
# 4yr8uNAE2zU7sgDDRSjDlYF/hFoiEzLu7tI3a3Cye338zC+JXg2yxAd/Fb63RG5X
# b1AmLShgJnIUwZu2cxP326e+llIUKm7cSFrwumiKMFcEvDIbM3CCtbS07FUBWs9S
# FNhMFGkOxFx7HtP9iQcOELk+F9CbIB2o56swCQwzgz5Cv+jr5Xu8pb6GryUWnLDF
# ry+mHnLYK939D6GMBODqdpaFAqysPJ6UdjMBOg49JGN122S8UCdHdXCZn0bttq9a
# FpgtlvYr1TU9U7ZAp6U+8KALXlE0z/XjT09e5dFDAarhpcUnGsaWiBeqwg==
# =NV4c
# -----END PGP SIGNATURE-----
# gpg: Signature made Tue 10 Jan 2023 08:51:35 GMT
# gpg:                using RSA key F13338574B662389866C7682BFFBD25F78C7AE83
# gpg:                issuer "pbonzini@redhat.com"
# gpg: Good signature from "Paolo Bonzini <bonzini@gnu.org>" [full]
# gpg:                 aka "Paolo Bonzini <pbonzini@redhat.com>" [full]
# Primary key fingerprint: 46F5 9FBD 57D6 12E7 BFD4  E2F7 7E15 100C CD36 69B1
#      Subkey fingerprint: F133 3857 4B66 2389 866C  7682 BFFB D25F 78C7 AE83

* tag 'for-upstream' of https://gitlab.com/bonzini/qemu: (29 commits)
  configure: remove backwards-compatibility code
  target/i386: fix operand size of unary SSE operations
  libvduse: Add extra compiler warnings
  libvhost-user: Add extra compiler warnings
  libvhost-user: Fix assignment in vring_set_avail_event
  libvduse: Fix assignment in vring_set_avail_event
  libvduse: Switch to unsigned int for inuse field in struct VduseVirtq
  libvduse: Provide _GNU_SOURCE when compiling outside of QEMU
  libvhost-user: Change dev->postcopy_ufd assignment to make it C90 compliant
  libvhost-user: Declare uffdio_register early to make it C90 compliant
  libvhost-user: Use unsigned int i for some for-loop iterations
  libvhost-user: Cast rc variable to avoid compiler warning
  libvhost-user: Replace typeof with __typeof__
  libvhost-user: Provide _GNU_SOURCE when compiling outside of QEMU
  hw/display: avoid creating empty loadable modules
  enforce use of G_GNUC_PRINTF attributes
  tests: add G_GNUC_PRINTF for various functions
  util/error: add G_GNUC_PRINTF for various functions
  tools/virtiofsd: add G_GNUC_PRINTF for logging functions
  hw/xen: use G_GNUC_PRINTF/SCANF for various functions
  ...

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>


Compare: https://github.com/qemu/qemu/compare/aa96ab7c9df5...cb8a043cd018



reply via email to

[Prev in Thread] Current Thread [Next in Thread]