On Fri, Oct 24, 2025 at 4:38 PM Alexandr Moshkov
<[email protected]> wrote:
>
> Hi, thanks for testing!
>
> On 10/23/25 19:29, Lei Yang wrote:
>
> Hi Alexandr
>
> According to my test result, this series of patches introduce issues,
> it prints the following error messages when compiling the process
> after applying your patch.
> The test based on this commit:
> commit 3a2d5612a7422732b648b46d4b934e2e54622fd6 (origin/master, origin/HEAD)
> Author: Peter Maydell <[email protected]>
> Date:   Fri Oct 17 14:31:56 2025 +0100
>
> Error messages:
> [1849/2964] Compiling C object
> libqemu-x86_64-softmmu.a.p/hw_block_vhost-user-blk.c.o
> FAILED: libqemu-x86_64-softmmu.a.p/hw_block_vhost-user-blk.c.o
> cc -m64 -Ilibqemu-x86_64-softmmu.a.p -I. -I.. -Itarget/i386
> -I../target/i386 -Isubprojects/dtc/libfdt -I../subprojects/dtc/libfdt
> -Isubprojects/libvduse -I../subprojects/libvduse -Iqapi -Itrace -Iui
> -Iui/shader -I/usr/include/pixman-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/slirp
> -fdiagnostics-color=auto -Wall -Winvalid-pch -Werror -std=gnu11 -O0 -g
> -fstack-protector-strong -Wempty-body -Wendif-labels
> -Wexpansion-to-defined -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
> /mnt/tests/distribution/command/qemu/linux-headers -isystem
> linux-headers -iquote . -iquote /mnt/tests/distribution/command/qemu
> -iquote /mnt/tests/distribution/command/qemu/include -iquote
> /mnt/tests/distribution/command/qemu/host/include/x86_64 -iquote
> /mnt/tests/distribution/command/qemu/host/include/generic -iquote
> /mnt/tests/distribution/command/qemu/tcg/i386 -pthread -mcx16 -msse2
> -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE
> -fno-strict-aliasing -fno-common -fwrapv -ftrivial-auto-var-init=zero
> -fzero-call-used-regs=used-gpr -fPIE -DWITH_GZFILEOP
> -isystem../linux-headers -isystemlinux-headers -DCOMPILING_PER_TARGET
> '-DCONFIG_TARGET="x86_64-softmmu-config-target.h"'
> '-DCONFIG_DEVICES="x86_64-softmmu-config-devices.h"' -MD -MQ
> libqemu-x86_64-softmmu.a.p/hw_block_vhost-user-blk.c.o -MF
> libqemu-x86_64-softmmu.a.p/hw_block_vhost-user-blk.c.o.d -o
> libqemu-x86_64-softmmu.a.p/hw_block_vhost-user-blk.c.o -c
> ../hw/block/vhost-user-blk.c
> In file included from
> /mnt/tests/distribution/command/qemu/migration/options.h:19,
>                  from ../hw/block/vhost-user-blk.c:34:
> /mnt/tests/distribution/command/qemu/include/migration/client-options.h:26:1:
> error: unknown type name ‘MigMode’
>    26 | MigMode migrate_mode(void);
>       | ^~~~~~~
> /mnt/tests/distribution/command/qemu/migration/options.h:66:7: error:
> unknown type name ‘BitmapMigrationNodeAliasList’
>    66 | const BitmapMigrationNodeAliasList 
> *migrate_block_bitmap_mapping(void);
>       |       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
> /mnt/tests/distribution/command/qemu/migration/options.h:80:1: error:
> unknown type name ‘MultiFDCompression’
>    80 | MultiFDCompression migrate_multifd_compression(void);
>       | ^~~~~~~~~~~~~~~~~~
> /mnt/tests/distribution/command/qemu/migration/options.h:89:1: error:
> unknown type name ‘ZeroPageDetection’
>    89 | ZeroPageDetection migrate_zero_page_detection(void);
>       | ^~~~~~~~~~~~~~~~~
> /mnt/tests/distribution/command/qemu/migration/options.h:93:27: error:
> unknown type name ‘MigrationParameters’; did you mean
> ‘MigrationState’?
>    93 | bool migrate_params_check(MigrationParameters *params, Error **errp);
>       |                           ^~~~~~~~~~~~~~~~~~~
>       |                           MigrationState
> /mnt/tests/distribution/command/qemu/migration/options.h:94:26: error:
> unknown type name ‘MigrationParameters’; did you mean
> ‘MigrationState’?
>    94 | void migrate_params_init(MigrationParameters *params);
>       |                          ^~~~~~~~~~~~~~~~~~~
>       |                          MigrationState
> ninja: build stopped: subcommand failed.
> make[1]: *** [Makefile:168: run-ninja] Error 1
>
> Thanks
> Lei
>
> I have the same issue on my machine...
>
> In file included from 
> /home/dtalexundeer/code/qemu-upstream/migration/options.h:19,
>                  from ../hw/block/vhost-user-blk.c:34:
> /home/dtalexundeer/code/qemu-upstream/include/migration/client-options.h:26:1:
>  error: unknown type name ‘MigMode’
>    26 | MigMode migrate_mode(void);
>       | ^~~~~~~
> In file included from ../hw/block/vhost-user-blk.c:34:
> /home/dtalexundeer/code/qemu-upstream/migration/options.h:65:7: error: 
> unknown type name ‘BitmapMigrationNodeAliasList’
>    65 | const BitmapMigrationNodeAliasList 
> *migrate_block_bitmap_mapping(void);
>       |       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
> /home/dtalexundeer/code/qemu-upstream/migration/options.h:79:1: error: 
> unknown type name ‘MultiFDCompression’
>    79 | MultiFDCompression migrate_multifd_compression(void);
>       | ^~~~~~~~~~~~~~~~~~
> /home/dtalexundeer/code/qemu-upstream/migration/options.h:88:1: error: 
> unknown type name ‘ZeroPageDetection’
>    88 | ZeroPageDetection migrate_zero_page_detection(void);
>       | ^~~~~~~~~~~~~~~~~
> /home/dtalexundeer/code/qemu-upstream/migration/options.h:92:27: error: 
> unknown type name ‘MigrationParameters’; did you mean ‘MigrationState’?
>    92 | bool migrate_params_check(MigrationParameters *params, Error **errp);
>       |                           ^~~~~~~~~~~~~~~~~~~
>       |                           MigrationState
> /home/dtalexundeer/code/qemu-upstream/migration/options.h:93:26: error: 
> unknown type name ‘MigrationParameters’; did you mean ‘MigrationState’?
>    93 | void migrate_params_init(MigrationParameters *params);
>       |                          ^~~~~~~~~~~~~~~~~~~
>       |                          MigrationState
>

Hi Alexandr

> When I send a patch, did you know, is any CI performed (like compilation)?

To be honest, I'm not sure if there's such a check in place upstream.
I discovered this issue because my local CI tool caught the files
modified by your patch, found the ones I was interested in, triggered
the tests, and only discovered the issue when I looked at the results.

Thanks
Lei
>
> I was thinking that there was some issue in my environment (or some other 
> code) because it even reproduces on the latest master if I add this include 
> to the vhost-user-blk.c file:
>
> diff --git a/hw/block/vhost-user-blk.c b/hw/block/vhost-user-blk.c index 
> c0cc5f6942..70235737f0 100644 --- a/hw/block/vhost-user-blk.c +++ 
> b/hw/block/vhost-user-blk.c @@ -31,6 +31,7 @@ #include 
> "hw/virtio/virtio-access.h" #include "system/system.h" #include 
> "system/runstate.h" +#include "migration/options.h"
>
> So, it looks like there is a problem with the client-options.h file (that 
> needs to include the qapi file) or in qapi generation process. If I apply 
> this patch:
>
> diff --git a/include/migration/client-options.h 
> b/include/migration/client-options.h index 289c9d7762..38cf53388d 100644 --- 
> a/include/migration/client-options.h +++ b/include/migration/client-options.h 
> @@ -10,6 +10,7 @@ #ifndef QEMU_MIGRATION_CLIENT_OPTIONS_H #define 
> QEMU_MIGRATION_CLIENT_OPTIONS_H +#include "qapi/qapi-types-migration.h" /* 
> properties */
>
> the problem goes away..


Reply via email to