On 11/12/2026 5:30 AM, Daniel P. Berrangé wrote:
> Make the TYPE_MACHINE class implement the TYPE_ALIASED
> interface which will replace use of the 'alias' parameter
> in MachineClass. The current 'alias' records the user
> facing machine name, while 'aliases' in TYPE_ALIASED
> will report an internal type name alias.
> 
> Signed-off-by: Daniel P. Berrangé <[email protected]>
> ---
>  hw/core/machine.c | 4 ++++
>  1 file changed, 4 insertions(+)
> 
> diff --git a/hw/core/machine.c b/hw/core/machine.c
> index ed9bf8f5008..f7406537aa7 100644
> --- a/hw/core/machine.c
> +++ b/hw/core/machine.c
> @@ -1802,6 +1802,10 @@ static const TypeInfo machine_info = {
>      .instance_size = sizeof(MachineState),
>      .instance_init = machine_initfn,
>      .instance_finalize = machine_finalize,
> +    .interfaces = (const InterfaceInfo[]) {
> +        { TYPE_ALIASED },
> +        { }
> +    }
>  };
>  
>  static void machine_register_types(void)

Since very few machines require this alias mechanism, would that be
better to be add it where it's needed?

Not a strong opinion though:
Reviewed-by: Pierrick Bouvier <[email protected]>

Regards,
Pierrick

Reply via email to