On Mon, Feb 21, 2022 at 06:08:44PM +0100, Nicolas Saenz Julienne wrote: > diff --git a/include/qemu/main-loop.h b/include/qemu/main-loop.h > index 8dbc6fcb89..fea5a3e9d4 100644 > --- a/include/qemu/main-loop.h > +++ b/include/qemu/main-loop.h > @@ -26,9 +26,20 @@ > #define QEMU_MAIN_LOOP_H > > #include "block/aio.h" > +#include "qom/object.h" > +#include "util/event-loop.h" > > #define SIG_IPI SIGUSR1 > > +#define TYPE_MAIN_LOOP "main-loop" > + > +struct MainLoop { > + EventLoopBackend parent_obj; > +}; > +typedef struct MainLoop MainLoop; > + > +DECLARE_INSTANCE_CHECKER(MainLoop, MAIN_LOOP, TYPE_MAIN_LOOP)
* Direct usage of this macro should be avoided, and the complete * OBJECT_DECLARE_TYPE macro is recommended instead. Is there a reason for using DECLARE_INSTANCE_CHECKER() instead of OBJECT_DECLARE_TYPE()? > @@ -882,7 +883,8 @@ > 'input-barrier': 'InputBarrierProperties', > 'input-linux': { 'type': 'InputLinuxProperties', > 'if': 'CONFIG_LINUX' }, > - 'iothread': 'IothreadProperties', > + 'iothread': 'EventLoopBackendProperties', > + 'main-loop': 'EventLoopBackendProperties', > 'memory-backend-epc': { 'type': 'MemoryBackendEpcProperties', > 'if': 'CONFIG_LINUX' }, > 'memory-backend-file': 'MemoryBackendFileProperties', Does this commit the QAPI schema to keeping iothread and main-loop properties identical or can they diverge over time, if necessary? I think we have the freedom to switch the QAPI schema to different structs for iothread and main-loop in the future because QMP clients aren't supposed to rely on the exact type, but I wanted to double-check. > diff --git a/qga/meson.build b/qga/meson.build > index 1ee9dca60b..3051473e04 100644 > --- a/qga/meson.build > +++ b/qga/meson.build > @@ -52,7 +52,7 @@ qga_ss = qga_ss.apply(config_host, strict: false) > > qga = executable('qemu-ga', qga_ss.sources(), > link_args: config_host['LIBS_QGA'].split(), > - dependencies: [qemuutil, libudev], > + dependencies: [qemuutil, libudev, qom], Looks like a change because the first patch added the base class to qom instead of qemuutil. Maybe this can be undone if the base class is added to qemuutil instead.
signature.asc
Description: PGP signature