On 8/26/2026 4:31 PM, Richard Henderson wrote: > On 8/26/26 16:29, Pierrick Bouvier wrote: >>> Can we please just have a plain callback? >> Something like: >> >> --- a/include/qom/object.h >> +++ b/include/qom/object.h >> @@ -494,6 +494,7 @@ struct TypeInfo >> void (*class_init)(ObjectClass *klass, const void *data); >> void (*class_base_init)(ObjectClass *klass, const void *data); >> const void *class_data; >> + bool (*is_available)(void); >> const InterfaceInfo *interfaces; >> >> And used as: >> >> ... >> is_available = target_aarch64. >> ... >> >> We would keep the exact same set of types registered than today. >> >> Would that work for you Richard? > > Yes, please. > > r~ >
Please see an implementation of it here: https://lore.kernel.org/qemu-devel/[email protected]/T/#t Regards, Pierrick
