All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Philippe Mathieu-Daudé" <philmd@oss.qualcomm.com>
To: "Marc-André Lureau" <marcandre.lureau@redhat.com>
Cc: qemu-devel@nongnu.org, Markus Armbruster <armbru@redhat.com>,
	David Gibson <david@gibson.dropbear.id.au>,
	"Dr. David Alan Gilbert" <dave@treblig.org>,
	Richard Henderson <richard.henderson@linaro.org>
Subject: Re: [PATCH v2 10/16] monitor: Remove unnecessary 'block/block.h' header
Date: Wed, 12 Aug 2026 18:05:15 +0200	[thread overview]
Message-ID: <a27c4385-71d8-43a6-9ea9-3f8e360ed321@oss.qualcomm.com> (raw)
In-Reply-To: <CAJ+F1C+X4DNFWXn9AK8kxp6zyCUnau5SawaZbQLO+=Gjw07y3Q@mail.gmail.com>

On 2026-08-12 16:00, Marc-André Lureau wrote:
> Hi
> 
> On Wed, Aug 12, 2026 at 5:38 PM Philippe Mathieu-Daudé
> <philmd@oss.qualcomm.com> wrote:
>>
>> Nothing here requires declarations from "block/block.h".
>>
>> Signed-off-by: Philippe Mathieu-Daudé <philmd@oss.qualcomm.com>
> 
> breaks for me:
> [38/286] Compiling C object libsystem.a.p/net_vhost-vdpa.c.o
> FAILED: [code=1] libsystem.a.p/net_vhost-vdpa.c.o
> cc -m64 -Ilibsystem.a.p -I. -I.. -Isubprojects/libvduse
> -I../subprojects/libvduse -Iui -Iqapi -Itrace -Iui/shader
> -I/usr/include/p11-kit-1 -I/usr/include/libpng16
> -I/usr/include/pixman-1 -I/usr/include/spice-1 -I/usr/include/glib-2.0
> -I/usr/lib64/glib-2.0/include -I/usr/include/libmount
> -I/usr/include/blkid -I/usr/include/sysprof-6
> -I/usr/include/gio-unix-2.0 -I/usr/include/spice-server
> -I/usr/include/opus -I/usr/include/cacard -I/usr/include/nss3
> -I/usr/include/nspr4 -I/usr/include/PCSC -I/usr/include/gstreamer-1.0
> -I/usr/include/libdrm -I/usr/include/orc-0.4 -I/usr/include/slirp
> -I/usr/local/include -I/usr/include/libusb-1.0 -I/usr/include/SDL2
> -I/usr/include/gtk-3.0 -I/usr/include/pango-1.0
> -I/usr/include/cloudproviders -I/usr/include/cairo
> -I/usr/include/gdk-pixbuf-2.0 -I/usr/include/glycin-2
> -I/usr/include/at-spi2-atk/2.0 -I/usr/include/at-spi-2.0
> -I/usr/include/atk-1.0 -I/usr/lib64/pkgconfig/../../include/dbus-1.0
> -I/usr/lib64/pkgconfig/../../lib64/dbus-1.0/include
> -I/usr/include/fribidi -I/usr/include/libxml2 -I/usr/include/harfbuzz
> -I/usr/include/freetype2 -I/usr/include/vte-2.91 -I/usr/include/rav1e
> -I/usr/include/svt-av1 -I/usr/include/libvmaf -I/usr/include/webp
> -I/usr/include/virgl -I/usr/include/fuse3 -I/usr/include/pipewire-0.3
> -I/usr/include/spa-0.2 -fdiagnostics-color=auto -Wall -Winvalid-pch
> -Werror -std=gnu11 -O2 -g -mcx16 -msse2 -fno-link-libatomic
> -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE
> -fno-strict-aliasing -fno-common -fwrapv -ftrivial-auto-var-init=zero
> -fzero-init-padding-bits=all -fzero-call-used-regs=used-gpr
> -fsanitize=address -fstack-protector-strong -fno-omit-frame-pointer
> -Wempty-body -Wendif-labels -Wexpansion-to-defined -Wformat-overflow=2
> -Wformat-security -Wformat-y2k -Wignored-qualifiers
> -Wimplicit-fallthrough=2 -Winit-self -Wmissing-format-attribute
> -Wmissing-prototypes -Wnested-externs -Wold-style-declaration
> -Wold-style-definition -Wredundant-decls -Wshadow=local
> -Wstrict-prototypes -Wtype-limits -Wundef -Wvla -Wwrite-strings
> -Wno-missing-include-dirs -Wno-psabi -Wno-shift-negative-value
> -isystem /home/elmarco/src/qemu.nmi/linux-headers -isystem
> linux-headers -iquote . -iquote /home/elmarco/src/qemu.nmi -iquote
> /home/elmarco/src/qemu.nmi/include -iquote
> /home/elmarco/src/qemu.nmi/host/include/x86_64 -iquote
> /home/elmarco/src/qemu.nmi/host/include/generic -iquote
> /home/elmarco/src/qemu.nmi/tcg/x86_64 -pthread -fPIE
> -fno-strict-aliasing -fno-strict-overflow -DHWY_SHARED_DEFINE
> -DAVIF_DLL -DEB_DLL -D_DEFAULT_SOURCE -D_XOPEN_SOURCE=600
> -DNCURSES_WIDECHAR=1 -D_GNU_SOURCE=1 -D_REENTRANT
> -DSTRUCT_IOVEC_DEFINED -DWITH_GZFILEOP -DCONFIG_SOFTMMU
> -DCOMPILING_SYSTEM_VS_USER -MD -MQ libsystem.a.p/net_vhost-vdpa.c.o
> -MF libsystem.a.p/net_vhost-vdpa.c.o.d -o
> libsystem.a.p/net_vhost-vdpa.c.o -c ../net/vhost-vdpa.c
> ../net/vhost-vdpa.c: In function ‘vhost_vdpa_net_load_cmd’:
> ../net/vhost-vdpa.c:714:24: error: implicit declaration of function
> ‘iov_size’ [-Wimplicit-function-declaration]
>    714 |     size_t data_size = iov_size(data_sg, data_num), cmd_size;
>        |                        ^~~~~~~~
> ../net/vhost-vdpa.c:714:24: error: nested extern declaration of
> ‘iov_size’ [-Werror=nested-externs]
> ../net/vhost-vdpa.c:742:5: error: implicit declaration of function
> ‘iov_from_buf’ [-Wimplicit-function-declaration]
>    742 |     iov_from_buf(out_cursor, 1, 0, &ctrl, sizeof(ctrl));
>        |     ^~~~~~~~~~~~
> ../net/vhost-vdpa.c:742:5: error: nested extern declaration of
> ‘iov_from_buf’ [-Werror=nested-externs]
> ../net/vhost-vdpa.c:744:5: error: implicit declaration of function
> ‘iov_to_buf’ [-Wimplicit-function-declaration]
>    744 |     iov_to_buf(data_sg, data_num, 0,
>        |     ^~~~~~~~~~
> ../net/vhost-vdpa.c:744:5: error: nested extern declaration of
> ‘iov_to_buf’ [-Werror=nested-externs]
> ../net/vhost-vdpa.c:748:5: error: implicit declaration of function
> ‘iov_copy’; did you mean ‘error_copy’?
> [-Wimplicit-function-declaration]
>    748 |     iov_copy(&out, 1, out_cursor, 1, 0, cmd_size);
>        |     ^~~~~~~~
>        |     error_copy
> ../net/vhost-vdpa.c:748:5: error: nested extern declaration of
> ‘iov_copy’ [-Werror=nested-externs]
> ../net/vhost-vdpa.c:760:5: error: implicit declaration of function
> ‘iov_discard_front’ [-Wimplicit-function-declaration]
>    760 |     iov_discard_front(&out_cursor, &dummy_cursor_iov_cnt, cmd_size);
>        |     ^~~~~~~~~~~~~~~~~
> ../net/vhost-vdpa.c:760:5: error: nested extern declaration of
> ‘iov_discard_front’ [-Werror=nested-externs]
> cc1: all warnings being treated as errors
> [55/286] Compiling C object libsystem.a.p/system_physmem.c.o
> ninja: build stopped: subcommand failed.
TIL monitor_fd_param().

Anyway thanks, consider the following as "PATCH 9.5/16":
-- >8 --
Author: Philippe Mathieu-Daudé <philmd@oss.qualcomm.com>
Date:   Wed Aug 12 18:03:10 2026 +0200

     net/vhost-vdpa: Include missing 'qemu/iov.h' header

     vhost-vdpa.c uses methods declared in the "qemu/iov." header.
     Include it otherwise we get when refactoring unrelated headers:

       ../net/vhost-vdpa.c: In function ‘vhost_vdpa_net_load_cmd’:
       ../net/vhost-vdpa.c:714:24: error: implicit declaration of 
function ‘iov_size’
         714 |     size_t data_size = iov_size(data_sg, data_num), cmd_size;
             |                        ^~~~~~~~
       ../net/vhost-vdpa.c:714:24: error: nested extern declaration of 
‘iov_size’
       ../net/vhost-vdpa.c:742:5: error: implicit declaration of 
function ‘iov_from_buf’
         742 |     iov_from_buf(out_cursor, 1, 0, &ctrl, sizeof(ctrl));
             |     ^~~~~~~~~~~~
       ../net/vhost-vdpa.c:742:5: error: nested extern declaration of 
‘iov_from_buf’
       ../net/vhost-vdpa.c:744:5: error: implicit declaration of 
function ‘iov_to_buf’
         744 |     iov_to_buf(data_sg, data_num, 0,
             |     ^~~~~~~~~~
       ../net/vhost-vdpa.c:744:5: error: nested extern declaration of 
‘iov_to_buf’
       ../net/vhost-vdpa.c:748:5: error: implicit declaration of 
function ‘iov_copy’
         748 |     iov_copy(&out, 1, out_cursor, 1, 0, cmd_size);
             |     ^~~~~~~~

     Signed-off-by: Philippe Mathieu-Daudé <philmd@oss.qualcomm.com>

diff --git a/net/vhost-vdpa.c b/net/vhost-vdpa.c
index c526c2b2dc..1052361a4a 100644
--- a/net/vhost-vdpa.c
+++ b/net/vhost-vdpa.c
@@ -17,6 +17,7 @@
  #include "hw/virtio/vhost-vdpa.h"
  #include "qemu/config-file.h"
  #include "qemu/error-report.h"
+#include "qemu/iov.h"
  #include "qemu/log.h"
  #include "qemu/memalign.h"
  #include "qemu/option.h"
---


  reply	other threads:[~2026-08-12 16:06 UTC|newest]

Thread overview: 34+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-08-12 13:11 [PATCH v2 00/16] monitor: Reduce headers included in 'monitor/monitor.h' Philippe Mathieu-Daudé
2026-08-12 13:11 ` [PATCH v2 01/16] hexagon: Remove unnecessary 'monitor/monitor.h' header Philippe Mathieu-Daudé
2026-08-12 14:05   ` marcandre.lureau
2026-08-12 13:11 ` [PATCH v2 02/16] tests/unit: Include 'qemu/main-loop.h' header in test-util-sockets.c Philippe Mathieu-Daudé
2026-08-12 14:05   ` marcandre.lureau
2026-08-12 13:11 ` [PATCH v2 03/16] qapi/qmp-dispatch: Include 'qemu/aio-wait.h' and 'monitor/monitor.h' Philippe Mathieu-Daudé
2026-08-12 14:05   ` marcandre.lureau
2026-08-12 13:11 ` [PATCH v2 04/16] qapi/qmp-registry: Remove unnecessary 'monitor/monitor.h' header Philippe Mathieu-Daudé
2026-08-12 14:05   ` marcandre.lureau
2026-08-12 13:11 ` [PATCH v2 05/16] migration/hmp-cmds: Include 'block/block-global-state.h' header Philippe Mathieu-Daudé
2026-08-12 14:05   ` marcandre.lureau
2026-08-12 13:11 ` [PATCH v2 06/16] monitor: Include missing 'qemu/aio-wait.h' header Philippe Mathieu-Daudé
2026-08-12 14:05   ` marcandre.lureau
2026-08-12 13:11 ` [PATCH v2 07/16] monitor: Include missing 'qemu/lockable.h' header Philippe Mathieu-Daudé
2026-08-12 14:05   ` marcandre.lureau
2026-08-12 13:11 ` [PATCH v2 08/16] monitor: Include missing 'qemu/coroutine-core.h' header Philippe Mathieu-Daudé
2026-08-12 14:05   ` marcandre.lureau
2026-08-12 13:11 ` [PATCH v2 09/16] monitor: Reduce inclusion of 'qapi/qapi-emit-events.h' header Philippe Mathieu-Daudé
2026-08-12 14:05   ` marcandre.lureau
2026-08-12 13:11 ` [PATCH v2 10/16] monitor: Remove unnecessary 'block/block.h' header Philippe Mathieu-Daudé
2026-08-12 14:00   ` Marc-André Lureau
2026-08-12 16:05     ` Philippe Mathieu-Daudé [this message]
2026-08-12 13:11 ` [PATCH v2 11/16] monitor/hmp: Remove unnecessary 'monitor/monitor.h' header Philippe Mathieu-Daudé
2026-08-12 14:05   ` marcandre.lureau
2026-08-12 13:11 ` [PATCH v2 12/16] system: " Philippe Mathieu-Daudé
2026-08-12 14:05   ` marcandre.lureau
2026-08-12 13:11 ` [PATCH v2 13/16] system/dirtylimit: Extract HMP code to dirtylimit-hmp-cmds.c Philippe Mathieu-Daudé
2026-08-12 14:05   ` marcandre.lureau
2026-08-12 13:11 ` [PATCH v2 14/16] system: Move qmp_inject_nmi() to hw/core/machine-qmp-cmds.c Philippe Mathieu-Daudé
2026-08-12 14:05   ` marcandre.lureau
2026-08-12 13:11 ` [PATCH v2 15/16] system: Extract QMP memsave/pmemsave commands to physmem-qmp-cmds.c Philippe Mathieu-Daudé
2026-08-12 14:05   ` marcandre.lureau
2026-08-12 13:11 ` [PATCH v2 16/16] system: Move runstate-related code from cpus.c to runstate.c Philippe Mathieu-Daudé
2026-08-12 14:05   ` marcandre.lureau

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=a27c4385-71d8-43a6-9ea9-3f8e360ed321@oss.qualcomm.com \
    --to=philmd@oss.qualcomm.com \
    --cc=armbru@redhat.com \
    --cc=dave@treblig.org \
    --cc=david@gibson.dropbear.id.au \
    --cc=marcandre.lureau@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=richard.henderson@linaro.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.