Skip to contentSkip to conversation

Misc patches for QEMU 6.1-rc2

GIT PULL Applied Paolo Bonzini 5 participants 16 messages Jul 29, 2021 – Aug 19, 2021

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

The following changes since commit 69ea12b19a15ae006521cd5cc0f627f27f738746:

Merge remote-tracking branch 'remotes/armbru/tags/pull-misc-2021-07-27' into staging (2021-07-28 13:32:12 +0100)

are available in the Git repository at:

https://gitlab.com/bonzini/qemu.git tags/for-upstream

for you to fetch changes up to 4fe29344bef6c54a6eff7aa0343754f8a9df5715:

libvhost-user: fix -Werror=format= warnings with __u64 fields (2021-07-29 10:15:52 +0200)

----------------------------------------------------------------
Bugfixes.

----------------------------------------------------------------
Alexey Neyman (1):
Makefile: ignore long options

Lara Lazier (1):
target/i386: Added consistency checks for event injection

Marc-André Lureau (2):
meson: fix meson 0.58 warning with libvhost-user subproject
libvhost-user: fix -Werror=format= warnings with __u64 fields

Paolo Bonzini (1):
target/i386: fix typo in ctl_has_irq

Richard Henderson (1):
configure: Add -Werror to avx2, avx512 tests

Vitaly Kuznetsov (1):

      i386: assert 'cs->kvm_state' is not null
 Makefile                                         |  8 +++++---
 configure                                        |  4 ++--
 subprojects/libvhost-user/include/atomic.h       |  1 +
 subprojects/libvhost-user/libvhost-user.c        | 10 +++++-----
 subprojects/libvhost-user/meson.build            |  6 +-----
 subprojects/libvhost-user/standard-headers/linux |  1 +
 target/i386/kvm/kvm.c                            | 14 ++++++++++++++
 target/i386/tcg/sysemu/svm_helper.c              |  8 +++++++-
 8 files changed, 36 insertions(+), 16 deletions(-)
 create mode 120000 subprojects/libvhost-user/include/atomic.h
 create mode 120000 subprojects/libvhost-user/standard-headers/linux
Signature · 1 line
2.31.1
#1 lore raw

[PULL 1/7] i386: assert 'cs->kvm_state' is not null

From: Vitaly Kuznetsov <[email protected]>

Coverity reports potential NULL pointer dereference in get_supported_hv_cpuid_legacy() when 'cs->kvm_state' is NULL. While 'cs->kvm_state' can indeed be NULL in hv_cpuid_get_host(), kvm_hyperv_expand_features() makes sure that it only happens when KVM_CAP_SYS_HYPERV_CPUID is supported and KVM_CAP_SYS_HYPERV_CPUID implies KVM_CAP_HYPERV_CPUID so get_supported_hv_cpuid_legacy() is never really called. Add asserts to strengthen the protection against broken KVM behavior.

Coverity: CID 1458243

Message-Id: <[email protected]>

---
 target/i386/kvm/kvm.c | 14 ++++++++++++++
 1 file changed, 14 insertions(+)
target/i386/kvm/kvm.c +14 -0
index 59ed8327ac..e69abe48e3 100644
@@ -974,6 +974,12 @@ static struct kvm_cpuid2 *get_supported_hv_cpuid(CPUState *cs)
     do_sys_ioctl =
         kvm_check_extension(kvm_state, KVM_CAP_SYS_HYPERV_CPUID) > 0;
 
+    /*
+     * Non-empty KVM context is needed when KVM_CAP_SYS_HYPERV_CPUID is
+     * unsupported, kvm_hyperv_expand_features() checks for that.
+     */
+    assert(do_sys_ioctl || cs->kvm_state);
+
     /*
      * When the buffer is too small, KVM_GET_SUPPORTED_HV_CPUID fails with
      * -E2BIG, however, it doesn't report back the right size. Keep increasing
@@ -1105,6 +1111,14 @@ static uint32_t hv_cpuid_get_host(CPUState *cs, uint32_t func, int reg)
         if (kvm_check_extension(kvm_state, KVM_CAP_HYPERV_CPUID) > 0) {
             cpuid = get_supported_hv_cpuid(cs);
         } else {
+            /*
+             * 'cs->kvm_state' may be NULL when Hyper-V features are expanded
+             * before KVM context is created but this is only done when
+             * KVM_CAP_SYS_HYPERV_CPUID is supported and it implies
+             * KVM_CAP_HYPERV_CPUID.
+             */
+            assert(cs->kvm_state);
+
             cpuid = get_supported_hv_cpuid_legacy(cs);
         }
         hv_cpuid_cache = cpuid;
Signature · 1 line
2.31.1
#2 lore raw

[PULL 4/7] target/i386: Added consistency checks for event injection

In reply to Paolo Bonzini

From: Lara Lazier <[email protected]>

VMRUN exits with SVM_EXIT_ERR if either:
* The event injected has a reserved type.
* When the event injected is of type 3 (exception), and the vector that has been specified does not correspond to an exception.

This does not fix the entire exc_inj test in kvm-unit-tests.

Message-Id: <[email protected]>

---
 target/i386/tcg/sysemu/svm_helper.c | 6 ++++++
 1 file changed, 6 insertions(+)
target/i386/tcg/sysemu/svm_helper.c +6 -0
index 145511d635..90a9de30f8 100644
@@ -383,6 +383,9 @@ void helper_vmrun(CPUX86State *env, int aflag, int next_eip_addend)
             cpu_loop_exit(cs);
             break;
         case SVM_EVTINJ_TYPE_EXEPT:
+            if (vector == EXCP02_NMI || vector >= 31)  {
+                cpu_vmexit(env, SVM_EXIT_ERR, 0, GETPC());
+            }
             cs->exception_index = vector;
             env->error_code = event_inj_err;
             env->exception_is_int = 0;
@@ -398,6 +401,9 @@ void helper_vmrun(CPUX86State *env, int aflag, int next_eip_addend)
             qemu_log_mask(CPU_LOG_TB_IN_ASM, "SOFT");
             cpu_loop_exit(cs);
             break;
+        default:
+            cpu_vmexit(env, SVM_EXIT_ERR, 0, GETPC());
+            break;
         }
         qemu_log_mask(CPU_LOG_TB_IN_ASM, " %#x %#x\n", cs->exception_index,
                       env->error_code);
Signature · 1 line
2.31.1
#3 lore raw

[PULL 5/7] target/i386: fix typo in ctl_has_irq

In reply to Paolo Bonzini

The shift constant was incorrect, causing int_prio to always be zero.

[Rewritten commit message since v1 had already been included. - Paolo]
---
 target/i386/tcg/sysemu/svm_helper.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
target/i386/tcg/sysemu/svm_helper.c +1 -1
index 90a9de30f8..e151104b4e 100644
@@ -70,7 +70,7 @@ static inline bool ctl_has_irq(uint32_t int_ctl)
     uint32_t int_prio;
     uint32_t tpr;
 
-    int_prio = (int_ctl & V_INTR_PRIO_MASK) >> V_INTR_MASKING_SHIFT;
+    int_prio = (int_ctl & V_INTR_PRIO_MASK) >> V_INTR_PRIO_SHIFT;
     tpr = int_ctl & V_TPR_MASK;
     return (int_ctl & V_IRQ_MASK) && (int_prio >= tpr);
 }
Signature · 1 line
2.31.1
#4 lore raw

[PULL 2/7] Makefile: ignore long options

In reply to Paolo Bonzini

From: Alexey Neyman <[email protected]>

When searching for options like -n in MAKEFLAGS, current code may result in a false positive match when make is invoked with long options like --no-print-directory. This has been observed with certain versions of host make (e.g. 3.82) while building the Qemu package in buildroot.

Filter out such long options before searching for one-character options.

Message-Id: <[email protected]>

---
 Makefile | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)
Makefile +5 -3
index 6c36330eef..401c623a65 100644
@@ -129,9 +129,11 @@ endif
 # 4. Rules to bridge to other makefiles
 
 ifneq ($(NINJA),)
-MAKE.n = $(findstring n,$(firstword $(MAKEFLAGS)))
-MAKE.k = $(findstring k,$(firstword $(MAKEFLAGS)))
-MAKE.q = $(findstring q,$(firstword $(MAKEFLAGS)))
+# Filter out long options to avoid flags like --no-print-directory which
+# may result in false positive match for MAKE.n
+MAKE.n = $(findstring n,$(firstword $(filter-out --%,$(MAKEFLAGS))))
+MAKE.k = $(findstring k,$(firstword $(filter-out --%,$(MAKEFLAGS))))
+MAKE.q = $(findstring q,$(firstword $(filter-out --%,$(MAKEFLAGS))))
 MAKE.nq = $(if $(word 2, $(MAKE.n) $(MAKE.q)),nq)
 NINJAFLAGS = $(if $V,-v) $(if $(MAKE.n), -n) $(if $(MAKE.k), -k0) \
         $(filter-out -j, $(lastword -j1 $(filter -l% -j%, $(MAKEFLAGS)))) \
Signature · 1 line
2.31.1
#5 lore raw

[PULL 7/7] libvhost-user: fix -Werror=format= warnings with __u64 fields

In reply to Paolo Bonzini

From: Marc-André Lureau <[email protected]>

../subprojects/libvhost-user/libvhost-user.c:1070:12: error: format ‘%lx’ expects argument of type ‘long unsigned int’, but argument 3 has type ‘__u64’ {aka ‘long long unsigned int’} [-Werror=format=]

 1070 |     DPRINT("    desc_user_addr:   0x%016" PRIx64 "\n", vra->desc_user_addr);
      |            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~              ~~~~~~~~~~~~~~~~~~~
      |                                                           |
      |                                                           __u64 {aka long long unsigned int}

Rather than using %llx, which may fail if __u64 is declared differently elsewhere, let's just cast the values. Feel free to propose a better solution!

Message-Id: <[email protected]>

---
 subprojects/libvhost-user/libvhost-user.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
subprojects/libvhost-user/libvhost-user.c +4 -4
index 2971ba0112..bf09693255 100644
@@ -1067,10 +1067,10 @@ vu_set_vring_addr_exec(VuDev *dev, VhostUserMsg *vmsg)
     DPRINT("vhost_vring_addr:\n");
     DPRINT("    index:  %d\n", vra->index);
     DPRINT("    flags:  %d\n", vra->flags);
-    DPRINT("    desc_user_addr:   0x%016" PRIx64 "\n", vra->desc_user_addr);
-    DPRINT("    used_user_addr:   0x%016" PRIx64 "\n", vra->used_user_addr);
-    DPRINT("    avail_user_addr:  0x%016" PRIx64 "\n", vra->avail_user_addr);
-    DPRINT("    log_guest_addr:   0x%016" PRIx64 "\n", vra->log_guest_addr);
+    DPRINT("    desc_user_addr:   0x%016" PRIx64 "\n", (uint64_t)vra->desc_user_addr);
+    DPRINT("    used_user_addr:   0x%016" PRIx64 "\n", (uint64_t)vra->used_user_addr);
+    DPRINT("    avail_user_addr:  0x%016" PRIx64 "\n", (uint64_t)vra->avail_user_addr);
+    DPRINT("    log_guest_addr:   0x%016" PRIx64 "\n", (uint64_t)vra->log_guest_addr);
 
     vq->vra = *vra;
     vq->vring.flags = vra->flags;
Signature · 1 line
2.31.1
#6 lore raw

[PULL 3/7] configure: Add -Werror to avx2, avx512 tests

In reply to Paolo Bonzini

From: Richard Henderson <[email protected]>

When using clang, we get

ERROR: configure test passed without -Werror but failed with -Werror.
This is probably a bug in the configure script. The failing command will be at the bottom of config.log.
You can run configure with --disable-werror to bypass this check.

What we really want from these two tests is whether the entire code sequence is supported, including pragmas. Adding -Werror makes the test properly fail for clang.

Message-Id: <[email protected]>

---
 configure | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
configure +2 -2
index 79e2ddc74e..422a456f0b 100755
@@ -3881,7 +3881,7 @@ static int bar(void *a) {
 }
 int main(int argc, char *argv[]) { return bar(argv[0]); }
 EOF
-  if compile_object "" ; then
+  if compile_object "-Werror" ; then
     avx2_opt="yes"
   else
     avx2_opt="no"
@@ -3911,7 +3911,7 @@ int main(int argc, char *argv[])
 	return bar(argv[0]);
 }
 EOF
-  if ! compile_object "" ; then
+  if ! compile_object "-Werror" ; then
     avx512f_opt="no"
   fi
 else
Signature · 1 line
2.31.1
#7 lore raw

[PULL 6/7] meson: fix meson 0.58 warning with libvhost-user subproject

In reply to Paolo Bonzini

From: Marc-André Lureau <[email protected]>

Meson now checks that subprojects do not access files from parent project. While we all agree this is best practice, libvhost-user also want to share a few headers with QEMU, and libvhost-user isn't really a standalone project at this point (although this is making the dependency a bit more explicit).

Message-Id: <[email protected]>

---
 subprojects/libvhost-user/include/atomic.h       | 1 +
 subprojects/libvhost-user/libvhost-user.c        | 2 +-
 subprojects/libvhost-user/meson.build            | 6 +-----
 subprojects/libvhost-user/standard-headers/linux | 1 +
 4 files changed, 4 insertions(+), 6 deletions(-)
 create mode 120000 subprojects/libvhost-user/include/atomic.h
 create mode 120000 subprojects/libvhost-user/standard-headers/linux
subprojects/libvhost-user/include/atomic.h new file +1 -0
new file mode 120000
index 0000000000..8c2be64f7b
@@ -0,0 +1 @@
+../../../include/qemu/atomic.h
\ No newline at end of file
subprojects/libvhost-user/libvhost-user.c +1 -1
index fab7ca17ee..2971ba0112 100644
@@ -40,7 +40,7 @@
 
 #endif
 
-#include "qemu/atomic.h"
+#include "include/atomic.h"
 
 #include "libvhost-user.h"
 
subprojects/libvhost-user/meson.build +1 -5
index b03446e7cd..39825d9404 100644
@@ -4,21 +4,17 @@ project('libvhost-user', 'c',
 
 threads = dependency('threads')
 glib = dependency('glib-2.0')
-inc = include_directories('../../include', '../../linux-headers')
 
 vhost_user = static_library('vhost-user',
                             files('libvhost-user.c'),
-                            include_directories: inc,
                             dependencies: threads,
                             c_args: '-D_GNU_SOURCE')
 
 executable('link-test', files('link-test.c'),
-           link_whole: vhost_user,
-           include_directories: inc)
+           link_whole: vhost_user)
 
 vhost_user_glib = static_library('vhost-user-glib',
                                  files('libvhost-user-glib.c'),
-                                 include_directories: inc,
                                  link_with: vhost_user,
                                  dependencies: glib)
 
subprojects/libvhost-user/standard-headers/linux new file +1 -0
new file mode 120000
index 0000000000..15a2378139
@@ -0,0 +1 @@
+../../../include/standard-headers/linux
\ No newline at end of file
Signature · 1 line
2.31.1
#8 lore raw

Re: [PULL 6/7] meson: fix meson 0.58 warning with libvhost-user subproject

Quoted 33 lines · Paolo Bonzini

From: Marc-André Lureau <[email protected]>

Meson now checks that subprojects do not access files from parent project. While we all agree this is best practice, libvhost-user also want to share a few headers with QEMU, and libvhost-user isn't really a standalone project at this point (although this is making the dependency a bit more explicit).

Message-Id: <[email protected]>

---
 subprojects/libvhost-user/include/atomic.h       | 1 +
 subprojects/libvhost-user/libvhost-user.c        | 2 +-
 subprojects/libvhost-user/meson.build            | 6 +-----
 subprojects/libvhost-user/standard-headers/linux | 1 +
subprojects/libvhost-user/include/atomic.h new file +1 -0
new file mode 120000
index 0000000000..8c2be64f7b
@@ -0,0 +1 @@
+../../../include/qemu/atomic.h
\ No newline at end of file
subprojects/libvhost-user/standard-headers/linux new file +0 -0
new file mode 120000
index 0000000000..15a2378139

subprojects/libvhost-user/standard-headers/linux line 1

Quoted 2 lines
subprojects/libvhost-user/standard-headers/linux new file +1 -0
@@ -0,0 +1 @@
+../../../include/standard-headers/linux
\ No newline at end of file

Should these really be missing the trailing newline ?

-- PMM

#9 lore raw

Re: [PULL 6/7] meson: fix meson 0.58 warning with libvhost-user subproject

Quoted 28 lines · Peter Maydell
Quoted 26 lines · Paolo Bonzini

From: Marc-André Lureau <[email protected]>

Meson now checks that subprojects do not access files from parent project. While we all agree this is best practice, libvhost-user also want to share a few headers with QEMU, and libvhost-user isn't really a standalone project at this point (although this is making the dependency a bit more explicit).

Message-Id: <[email protected]>

---
  subprojects/libvhost-user/include/atomic.h       | 1 +
  subprojects/libvhost-user/libvhost-user.c        | 2 +-
  subprojects/libvhost-user/meson.build            | 6 +-----
  subprojects/libvhost-user/standard-headers/linux | 1 +
subprojects/libvhost-user/include/atomic.h new file +1 -0
new file mode 120000
index 0000000000..8c2be64f7b
@@ -0,0 +1 @@
+../../../include/qemu/atomic.h
\ No newline at end of file
Quoted 11 lines

subprojects/libvhost-user/standard-headers/linux line 1

Quoted 8 lines
subprojects/libvhost-user/standard-headers/linux new file +1 -0
new file mode 120000
index 0000000000..15a2378139
@@ -0,0 +1 @@
+../../../include/standard-headers/linux
\ No newline at end of file

Should these really be missing the trailing newline ?

It's a symlink, so yes, there does not need to be a newline in here.

Thomas

#10 lore raw

Re: [PULL 6/7] meson: fix meson 0.58 warning with libvhost-user subproject

Quoted 42 lines · Thomas Huth
Quoted 28 lines · Peter Maydell
Quoted 26 lines · Paolo Bonzini

From: Marc-André Lureau <[email protected]>

Meson now checks that subprojects do not access files from parent project. While we all agree this is best practice, libvhost-user also want to share a few headers with QEMU, and libvhost-user isn't really a standalone project at this point (although this is making the dependency a bit more explicit).

Message-Id: <[email protected]>

---
  subprojects/libvhost-user/include/atomic.h       | 1 +
  subprojects/libvhost-user/libvhost-user.c        | 2 +-
  subprojects/libvhost-user/meson.build            | 6 +-----
  subprojects/libvhost-user/standard-headers/linux | 1 +
subprojects/libvhost-user/include/atomic.h new file +1 -0
new file mode 120000
index 0000000000..8c2be64f7b
@@ -0,0 +1 @@
+../../../include/qemu/atomic.h
\ No newline at end of file
Quoted 11 lines

subprojects/libvhost-user/standard-headers/linux line 1

Quoted 8 lines
subprojects/libvhost-user/standard-headers/linux new file +1 -0
new file mode 120000
index 0000000000..15a2378139
@@ -0,0 +1 @@
+../../../include/standard-headers/linux
\ No newline at end of file

Should these really be missing the trailing newline ?

Quoted 1 line

It's a symlink, so yes, there does not need to be a newline in here.

Interesting. How does it work on Windows hosts ?

-- PMM

#11 lore raw

Re: [PULL 6/7] meson: fix meson 0.58 warning with libvhost-user subproject

Relative symlink should work on Windows.
Only symlink that points to non-exist file would file.

Quoted 5 lines · Peter Maydell
Quoted 3 lines · Thomas Huth
Quoted 1 line · Peter Maydell

On Thu, 29 Jul 2021 at 13:56, Paolo Bonzini <[email protected]>

Quoted 6 lines · wrote:
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines

From: Marc-André Lureau <[email protected]>

Meson now checks that subprojects do not access files from parent project. While we all agree this is best practice, libvhost-user also want to share a few headers with QEMU, and libvhost-user isn't

really a

Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

standalone project at this point (although this is making the

dependency

Quoted 11 lines
Quoted 11 lines
Quoted 11 lines
Quoted 10 lines

a bit more explicit).

Message-Id: <[email protected]>

---
  subprojects/libvhost-user/include/atomic.h       | 1 +
  subprojects/libvhost-user/libvhost-user.c        | 2 +-
  subprojects/libvhost-user/meson.build            | 6 +-----
  subprojects/libvhost-user/standard-headers/linux | 1 +
Quoted 1 line
Quoted 1 line
Quoted 1 line

Review

Quoted 1 line
(quoted diff) +0 -0

b/subprojects/libvhost-user/include/atomic.h

Quoted 9 lines
Quoted 9 lines
Quoted 9 lines

Review

Quoted 9 lines

new file mode 120000
index 0000000000..8c2be64f7b

subprojects/libvhost-user/include/atomic.h new file +1 -0
@@ -0,0 +1 @@
+../../../include/qemu/atomic.h
\ No newline at end of file
(quoted diff) +0 -0

b/subprojects/libvhost-user/standard-headers/linux

Quoted 11 lines
Quoted 11 lines
Quoted 10 lines

subprojects/libvhost-user/standard-headers/linux line 1

Quoted 7 lines

new file mode 120000
index 0000000000..15a2378139

subprojects/libvhost-user/standard-headers/linux new file +1 -0
@@ -0,0 +1 @@
+../../../include/standard-headers/linux
\ No newline at end of file

Should these really be missing the trailing newline ?

Quoted 6 lines
Quoted 1 line

It's a symlink, so yes, there does not need to be a newline in here.

Interesting. How does it work on Windows hosts ?

-- PMM

--
此致
礼
罗勇刚
Yours
sincerely,
Yonggang Luo

#12 lore raw

Re: [PULL 6/7] meson: fix meson 0.58 warning with libvhost-user subproject

In reply to Paolo Bonzini

Interestingly enough this breaks my rpmbuild (both rpmbuild and mock). (mostly with a modified f35 spec file):

cc -Isubprojects/libvhost-user/libvhost-user.a.p -Isubprojects/libvhost-user -I../subprojects/libvhost-user -fdiagnostics-color=auto -pipe -Wall -Winvalid-pch -std=gnu11 -O2 -g -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 -m64 -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -Wstrict-prototypes -Wredundant-decls -Wundef -Wwrite-strings -Wmissing-prototypes -fno-strict-aliasing -fno-common -fwrapv -O2 -fexceptions -g -grecord-gcc-switches -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -march=zEC12 -mtune=z13 -fasynchronous-unwind-tables -fstack-clash-protection -Wold-style-declaration -Wold-style-definition -Wtype-limits -Wformat-security -Wformat-y2k -Winit-self -Wignored-qualifiers -Wempty-body -Wnested-externs -Wendif-labels -Wexpansion-to-defined -Wimplicit-fallthrough=2 -Wno-missing-include-dirs -Wno-shift-negative-value -Wno-psabi -fstack-protector-strong -DSTAP_SDT_V2 -fPIE -pthread -D_GNU_SOURCE -MD -MQ subprojects/libvhost-user/libvhost-user.a.p/libvhost-user.c.o -MF subprojects/libvhost-user/libvhost-user.a.p/libvhost-user.c.o.d -o subprojects/libvhost-user/libvhost-user.a.p/libvhost-user.c.o -c ../subprojects/libvhost-user/libvhost-user.c ../subprojects/libvhost-user/libvhost-user.c:43:10: fatal error: include/atomic.h: No such file or directory
43 | #include "include/atomic.h"

      |          ^~~~~~~~~~~~~~~~~~

compilation terminated.

and

DEBUG: FAILED: subprojects/libvhost-user/libvhost-user-glib.a.p/libvhost-user-glib.c.o
DEBUG: cc -Isubprojects/libvhost-user/libvhost-user-glib.a.p -Isubprojects/libvhost-user -I../subprojects/libvhost-user -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -I/usr/include/sysprof-4 -fdiagnostics-color=auto -Wall -Winvalid-pch -std=gnu11 -O2 -g -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 -m64 -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -Wstrict-prototypes -Wredundant-decls -Wundef -Wwrite-strings -Wmissing-prototypes -fno-strict-aliasing -fno-common -fwrapv -O2 -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -march=zEC12 -mtune=z13 -fasynchronous-unwind-tables -fstack-clash-protection -Wold-style-declaration -Wold-style-definition -Wtype-limits -Wformat-security -Wformat-y2k -Winit-self -Wignored-qualifiers -Wempty-body -Wnested-externs -Wendif-labels -Wexpansion-to-defined -Wimplicit-fallthrough=2 -Wno-missing-include-dirs -Wno-shift-negative-value -Wno-psabi -fstack-protector-strong -DSTAP_SDT_V2 -fPIE -pthread -MD -MQ subprojects/libvhost-user/libvhost-user-glib.a.p/libvhost-user-glib.c.o -MF subprojects/libvhost-user/libvhost-user-glib.a.p/libvhost-user-glib.c.o.d -o subprojects/libvhost-user/libvhost-user-glib.a.p/libvhost-user-glib.c.o -c ../subprojects/libvhost-user/libvhost-user-glib.c
DEBUG: In file included from ../subprojects/libvhost-user/libvhost-user-glib.h:19,
DEBUG:                  from ../subprojects/libvhost-user/libvhost-user-glib.c:15:
DEBUG: ../subprojects/libvhost-user/libvhost-user.h:23:10: fatal error: standard-headers/linux/virtio_ring.h: No such file or directory
DEBUG:    23 | #include "standard-headers/linux/virtio_ring.h"
DEBUG:       |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
DEBUG: compilation terminated.
DEBUG: [12/10271] /usr/bin/meson --internal exe --capture qemu-version.h -- /builddir/build/BUILD/qemu-6.0.94/scripts/qemu-version.sh /builddir/build/BUILD/qemu-6.0.94 qemu-6.0.94-20210819.0.2e47441a94ba.fc34 6.0.94
DEBUG: [13/10271] /usr/bin/meson --internal exe --capture qemu-img-cmds.h -- /builddir/build/BUILD/qemu-6.0.94/scripts/hxtool -h ../qemu-img-cmds.hx
DEBUG: [14/10271] /usr/bin/meson --internal exe --capture hmp-commands-info.h -- /builddir/build/BUILD/qemu-6.0.94/scripts/hxtool -h ../hmp-commands-info.hx
DEBUG: [15/10271] /usr/bin/meson --internal exe --capture hmp-commands.h -- /builddir/build/BUILD/qemu-6.0.94/scripts/hxtool -h ../hmp-commands.hx
DEBUG: [16/10271] /usr/bin/meson --internal exe --capture qemu-options.def -- /builddir/build/BUILD/qemu-6.0.94/scripts/hxtool -h ../qemu-options.hx
DEBUG: ninja: build stopped: subcommand failed.
DEBUG: make: *** [Makefile:156: run-ninja] Error 1
DEBUG: error: Bad exit status from /var/tmp/rpm-tmp.fgqi3Y (%build)
DEBUG: RPM build errors:
DEBUG:     Bad exit status from /var/tmp/rpm-tmp.fgqi3Y (%build)
DEBUG: Child return code was: 1
#13 lore raw

Re: [PULL 6/7] meson: fix meson 0.58 warning with libvhost-user subproject

Quoted 9 lines · Christian Borntraeger

Interestingly enough this breaks my rpmbuild (both rpmbuild and mock). (mostly with a modified f35 spec file):

cc -Isubprojects/libvhost-user/libvhost-user.a.p -Isubprojects/libvhost-user -I../subprojects/libvhost-user -fdiagnostics-color=auto -pipe -Wall -Winvalid-pch -std=gnu11 -O2 -g -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 -m64 -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -Wstrict-prototypes -Wredundant-decls -Wundef -Wwrite-strings -Wmissing-prototypes -fno-strict-aliasing -fno-common -fwrapv -O2 -fexceptions -g -grecord-gcc-switches -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -march=zEC12 -mtune=z13 -fasynchronous-unwind-tables -fstack-clash-protection -Wold-style-declaration -Wold-style-definition -Wtype-limits -Wformat-security -Wformat-y2k -Winit-self -Wignored-qualifiers -Wempty-body -Wnested-externs -Wendif-labels -Wexpansion-to-defined -Wimplicit-fallthrough=2 -Wno-missing-include-dirs -Wno-shift-negative-value -Wno-psabi -fstack-protector-strong -DSTAP_SDT_V2 -fPIE -pthread -D_GNU_SOURCE -MD -MQ subprojects/libvhost-user/libvhost-user.a.p/libvhost-user.c.o -MF subprojects/libvhost-user/libvhost-user.a.p/libvhost-user.c.o.d -o subprojects/libvhost-user/libvhost-user.a.p/libvhost-user.c.o -c ../subprojects/libvhost-user/libvhost-user.c ../subprojects/libvhost-user/libvhost-user.c:43:10: fatal error: include/atomic.h: No such file or directory
43 | #include "include/atomic.h"
| ^~~~~~~~~~~~~~~~~~
compilation terminated.

Looks like the link in the tar.xz file is broken. We do use scripts/archive-source.sh. Will look further.

#14 lore raw

Re: [PULL 6/7] meson: fix meson 0.58 warning with libvhost-user subproject

Quoted 14 lines · Christian Borntraeger
Quoted 10 lines · Christian Borntraeger

Interestingly enough this breaks my rpmbuild (both rpmbuild and mock). (mostly with a modified f35 spec file):

cc -Isubprojects/libvhost-user/libvhost-user.a.p -Isubprojects/libvhost-user -I../subprojects/libvhost-user -fdiagnostics-color=auto -pipe -Wall -Winvalid-pch -std=gnu11 -O2 -g -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 -m64 -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -Wstrict-prototypes -Wredundant-decls -Wundef -Wwrite-strings -Wmissing-prototypes -fno-strict-aliasing -fno-common -fwrapv -O2 -fexceptions -g -grecord-gcc-switches -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -march=zEC12 -mtune=z13 -fasynchronous-unwind-tables -fstack-clash-protection -Wold-style-declaration -Wold-style-definition -Wtype-limits -Wformat-security -Wformat-y2k -Winit-self -Wignored-qualifiers -Wempty-body -Wnested-externs -Wendif-labels -Wexpansion-to-defined -Wimplicit-fallthrough=2 -Wno-missing-include-dirs -Wno-shift-negative-value -Wno-psabi -fstack-protector-strong -DSTAP_SDT_V2 -fPIE -pthread -D_GNU_SOURCE -MD -MQ subprojects/libvhost-user/libvhost-user.a.p/libvhost-user.c.o -MF subprojects/libvhost-user/libvhost-user.a.p/libvhost-user.c.o.d -o subprojects/libvhost-user/libvhost-user.a.p/libvhost-user.c.o -c ../subprojects/libvhost-user/libvhost-user.c
../subprojects/libvhost-user/libvhost-user.c:43:10: fatal error: include/atomic.h: No such file or directory
    43 | #include "include/atomic.h"
       |          ^~~~~~~~~~~~~~~~~~
compilation terminated.

Quoted 2 lines

Looks like the link in the tar.xz file is broken. We do use scripts/archive-source.sh. Will look further.

OK, the build pipeline used tar -xform to prepend a folder name for rpmbuild. adding flags=r solved my issue.

#15 lore raw
In reply to Paolo Bonzini
Quoted 7 lines · Paolo Bonzini

The following changes since commit 69ea12b19a15ae006521cd5cc0f627f27f738746:

Merge remote-tracking branch 'remotes/armbru/tags/pull-misc-2021-07-27' into staging (2021-07-28 13:32:12 +0100)

are available in the Git repository at:

Quoted 9 lines

https://gitlab.com/bonzini/qemu.git tags/for-upstream

for you to fetch changes up to 4fe29344bef6c54a6eff7aa0343754f8a9df5715:

libvhost-user: fix -Werror=format= warnings with __u64 fields (2021-07-29 10:15:52 +0200)

----------------------------------------------------------------
Bugfixes.

Applied, thanks.

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

-- PMM