qemu-commits
[Top][All Lists]
Advanced

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

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


From: Peter Maydell
Subject: [Qemu-commits] [qemu/qemu] acedc9: configure: fix GLIB_VERSION for cross-compilation
Date: Thu, 12 Jan 2023 07:42:50 -0800

  Branch: refs/heads/master
  Home:   https://github.com/qemu/qemu
  Commit: acedc9a660f83b362a1dec4b699e85d5dd82a067
      
https://github.com/qemu/qemu/commit/acedc9a660f83b362a1dec4b699e85d5dd82a067
  Author: Paolo Bonzini <pbonzini@redhat.com>
  Date:   2023-01-11 (Wed, 11 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: b585edca34a817fdb751dfe94fbd3cde32ffe60d
      
https://github.com/qemu/qemu/commit/b585edca34a817fdb751dfe94fbd3cde32ffe60d
  Author: Joe Richey <joerichey@google.com>
  Date:   2023-01-11 (Wed, 11 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: bd688fc93120fb3e28aa70e3dfdf567ccc1e0bc1
      
https://github.com/qemu/qemu/commit/bd688fc93120fb3e28aa70e3dfdf567ccc1e0bc1
  Author: Emanuele Giuseppe Esposito <eesposit@redhat.com>
  Date:   2023-01-11 (Wed, 11 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: a27dd2de68f37ba96fe164a42121daa5f0750afc
      
https://github.com/qemu/qemu/commit/a27dd2de68f37ba96fe164a42121daa5f0750afc
  Author: Emanuele Giuseppe Esposito <eesposit@redhat.com>
  Date:   2023-01-11 (Wed, 11 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: f39b7d2b96e3e73c01bb678cd096f7baf0b9ab39
      
https://github.com/qemu/qemu/commit/f39b7d2b96e3e73c01bb678cd096f7baf0b9ab39
  Author: David Hildenbrand <david@redhat.com>
  Date:   2023-01-11 (Wed, 11 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: c0a6665c3c4d63b113ab31c624c53d4a32de2926
      
https://github.com/qemu/qemu/commit/c0a6665c3c4d63b113ab31c624c53d4a32de2926
  Author: Eric Auger <eric.auger@redhat.com>
  Date:   2023-01-11 (Wed, 11 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,
add a default case with g_assert_not_reached().

Otherwise with GCC 11.3.1 "cc (GCC) 11.3.1 20220421 (Red Hat 11.3.1-2)"
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>

Message-Id: <20221222140158.1260748-1-eric.auger@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>


  Commit: 1baf34a1369ed323717c215d69bb6261b89cb5d7
      
https://github.com/qemu/qemu/commit/1baf34a1369ed323717c215d69bb6261b89cb5d7
  Author: Paolo Bonzini <pbonzini@redhat.com>
  Date:   2023-01-11 (Wed, 11 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: 190973dc71b91ccb973fe2f2ce82c20a8e057a84
      
https://github.com/qemu/qemu/commit/190973dc71b91ccb973fe2f2ce82c20a8e057a84
  Author: Daniel P. Berrangé <berrange@redhat.com>
  Date:   2023-01-11 (Wed, 11 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: d94e96e7cf02c8fe3e5ea75da5216b4bad79aa9e
      
https://github.com/qemu/qemu/commit/d94e96e7cf02c8fe3e5ea75da5216b4bad79aa9e
  Author: Daniel P. Berrangé <berrange@redhat.com>
  Date:   2023-01-11 (Wed, 11 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: d62449daf237ee2a48aa61931dde6ab5df0ee282
      
https://github.com/qemu/qemu/commit/d62449daf237ee2a48aa61931dde6ab5df0ee282
  Author: Daniel P. Berrangé <berrange@redhat.com>
  Date:   2023-01-11 (Wed, 11 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: e4418354c0789330b57b06358d51d8ecc21eb39c
      
https://github.com/qemu/qemu/commit/e4418354c0789330b57b06358d51d8ecc21eb39c
  Author: Daniel P. Berrangé <berrange@redhat.com>
  Date:   2023-01-11 (Wed, 11 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: beede7e848cc0ca30599644c19c078bbe3cd9d20
      
https://github.com/qemu/qemu/commit/beede7e848cc0ca30599644c19c078bbe3cd9d20
  Author: Daniel P. Berrangé <berrange@redhat.com>
  Date:   2023-01-11 (Wed, 11 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: 0472b2e541971d162a9bbca7541c8f9299e9d78f
      
https://github.com/qemu/qemu/commit/0472b2e541971d162a9bbca7541c8f9299e9d78f
  Author: Daniel P. Berrangé <berrange@redhat.com>
  Date:   2023-01-11 (Wed, 11 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: 88a0ef00d70c61fdb46ee88ced87046dfb11eb3f
      
https://github.com/qemu/qemu/commit/88a0ef00d70c61fdb46ee88ced87046dfb11eb3f
  Author: Daniel P. Berrangé <berrange@redhat.com>
  Date:   2023-01-11 (Wed, 11 Jan 2023)

  Changed paths:
    M configure
    M tests/fp/meson.build

  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>
[-Wsuggest-attribute=format and -Wmissing-format-attribute are
 synonyms, only include one; disable it for testfloat. - Paolo]
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>


  Commit: 8b8437259ca68e8e2145e0566cf67a29d6ee1816
      
https://github.com/qemu/qemu/commit/8b8437259ca68e8e2145e0566cf67a29d6ee1816
  Author: Daniel P. Berrangé <berrange@redhat.com>
  Date:   2023-01-11 (Wed, 11 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: dadc3d01bcb0d8654361e5ce77f65a679f2d7a80
      
https://github.com/qemu/qemu/commit/dadc3d01bcb0d8654361e5ce77f65a679f2d7a80
  Author: Marcel Holtmann <marcel@holtmann.org>
  Date:   2023-01-11 (Wed, 11 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: aa5d395ac4351d85472fa3d4266b26b8025f9356
      
https://github.com/qemu/qemu/commit/aa5d395ac4351d85472fa3d4266b26b8025f9356
  Author: Marcel Holtmann <marcel@holtmann.org>
  Date:   2023-01-11 (Wed, 11 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: 18fa7f1e95e22f74f509e1b5cf759f7a19a0954d
      
https://github.com/qemu/qemu/commit/18fa7f1e95e22f74f509e1b5cf759f7a19a0954d
  Author: Marcel Holtmann <marcel@holtmann.org>
  Date:   2023-01-11 (Wed, 11 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: 92bf246130faa85b20ca8e3b6c4eda50d5825a5a
      
https://github.com/qemu/qemu/commit/92bf246130faa85b20ca8e3b6c4eda50d5825a5a
  Author: Marcel Holtmann <marcel@holtmann.org>
  Date:   2023-01-11 (Wed, 11 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: d87a642403364d4704324197d75d41641287b4b1
      
https://github.com/qemu/qemu/commit/d87a642403364d4704324197d75d41641287b4b1
  Author: Marcel Holtmann <marcel@holtmann.org>
  Date:   2023-01-11 (Wed, 11 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: f1c563d209e91635974384c0690155a101dca5b4
      
https://github.com/qemu/qemu/commit/f1c563d209e91635974384c0690155a101dca5b4
  Author: Marcel Holtmann <marcel@holtmann.org>
  Date:   2023-01-11 (Wed, 11 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: 518ac42879560e656a62c3f4ed16569cc169202b
      
https://github.com/qemu/qemu/commit/518ac42879560e656a62c3f4ed16569cc169202b
  Author: Marcel Holtmann <marcel@holtmann.org>
  Date:   2023-01-11 (Wed, 11 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: 85899f8e6b3c4dae924a550778a8f594ecc37b33
      
https://github.com/qemu/qemu/commit/85899f8e6b3c4dae924a550778a8f594ecc37b33
  Author: Marcel Holtmann <marcel@holtmann.org>
  Date:   2023-01-11 (Wed, 11 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: 86e61e4233b8de44805914475669c0ca906809c0
      
https://github.com/qemu/qemu/commit/86e61e4233b8de44805914475669c0ca906809c0
  Author: Marcel Holtmann <marcel@holtmann.org>
  Date:   2023-01-11 (Wed, 11 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: 950a2f2eff1aa39620ff78be4485f6290939d8dd
      
https://github.com/qemu/qemu/commit/950a2f2eff1aa39620ff78be4485f6290939d8dd
  Author: Marcel Holtmann <marcel@holtmann.org>
  Date:   2023-01-11 (Wed, 11 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: 722b62d97d75689cff1ef3f1e4eb6d77d6498811
      
https://github.com/qemu/qemu/commit/722b62d97d75689cff1ef3f1e4eb6d77d6498811
  Author: Marcel Holtmann <marcel@holtmann.org>
  Date:   2023-01-11 (Wed, 11 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: 8d5666d76b0a2b0f852e51412c79c3d3d8c90801
      
https://github.com/qemu/qemu/commit/8d5666d76b0a2b0f852e51412c79c3d3d8c90801
  Author: Marcel Holtmann <marcel@holtmann.org>
  Date:   2023-01-11 (Wed, 11 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: 3d304620ec6c95f31db17acc132f42f243369299
      
https://github.com/qemu/qemu/commit/3d304620ec6c95f31db17acc132f42f243369299
  Author: Paolo Bonzini <pbonzini@redhat.com>
  Date:   2023-01-11 (Wed, 11 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: 75cc286485742feeb00f4b446f5682765792323e
      
https://github.com/qemu/qemu/commit/75cc286485742feeb00f4b446f5682765792323e
  Author: Paolo Bonzini <pbonzini@redhat.com>
  Date:   2023-01-11 (Wed, 11 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: 3db29dcac23da85486704ef9e7a8e7217f7829cd
      
https://github.com/qemu/qemu/commit/3db29dcac23da85486704ef9e7a8e7217f7829cd
  Author: Peter Maydell <peter.maydell@linaro.org>
  Date:   2023-01-12 (Thu, 12 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/fp/meson.build
    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/vSX3jHroMFAmO+hUYUHHBib256aW5p
# QHJlZGhhdC5jb20ACgkQv/vSX3jHroM5+Qf9HIy2QDdGZJ1fA3AUhp7bCJgotlRF
# 2NMFwo3P/Vwe4qMzzRGkMpsDLFhJx6j1V+sSyeLNxCPtidHccFcmKJOlTqmGeT0k
# HccK07cgAXSZUtvog2xid7PeNpi8OQjKih2Gn/FnN9Tjtad7yMYfXO3O5ttkRV+7
# F8qXBkm4J74l5zs+UMOXUj9y4PudjRFPS0q/lti82eg8mUZ33BZtBkP18Qjq45GM
# wLcemfId0Z6e4s4fmVeTobZ31ltz/B6HDkoD59pQSK6QW2VBIAoO64Hw6FdZnu5W
# PltBsDy5cboKHibkb/ySZQUMhb7UemKFyf7eRWkdlnSSHHFdL/K4x7x7DA==
# =0b+g
# -----END PGP SIGNATURE-----
# gpg: Signature made Wed 11 Jan 2023 09:45:42 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/a35fa426ee9d...3db29dcac23d



reply via email to

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