[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-ppc] [PATCH v6 1/4] spapr: Add a pseries-3.1 machine type
From: |
Greg Kurz |
Subject: |
Re: [Qemu-ppc] [PATCH v6 1/4] spapr: Add a pseries-3.1 machine type |
Date: |
Mon, 30 Jul 2018 16:43:35 +0200 |
On Mon, 30 Jul 2018 16:11:31 +0200
Cédric Le Goater <address@hidden> wrote:
> Signed-off-by: Cédric Le Goater <address@hidden>
> ---
Reviewed-by: Greg Kurz <address@hidden>
> include/hw/compat.h | 3 +++
> hw/ppc/spapr.c | 23 +++++++++++++++++++++--
> 2 files changed, 24 insertions(+), 2 deletions(-)
>
> diff --git a/include/hw/compat.h b/include/hw/compat.h
> index c08f4040bb80..6f4d5fc64704 100644
> --- a/include/hw/compat.h
> +++ b/include/hw/compat.h
> @@ -1,6 +1,9 @@
> #ifndef HW_COMPAT_H
> #define HW_COMPAT_H
>
> +#define HW_COMPAT_3_0 \
> + /* empty */
> +
> #define HW_COMPAT_2_12 \
> {\
> .driver = "migration",\
> diff --git a/hw/ppc/spapr.c b/hw/ppc/spapr.c
> index 421b2dd09b51..3c72173c7e0f 100644
> --- a/hw/ppc/spapr.c
> +++ b/hw/ppc/spapr.c
> @@ -4058,19 +4058,38 @@ static const TypeInfo spapr_machine_info = {
> } \
> type_init(spapr_machine_register_##suffix)
>
> + /*
> + * pseries-3.1
> + */
> +static void spapr_machine_3_1_instance_options(MachineState *machine)
> +{
> +}
> +
> +static void spapr_machine_3_1_class_options(MachineClass *mc)
> +{
> + /* Defaults for the latest behaviour inherited from the base class */
> +}
> +
> +DEFINE_SPAPR_MACHINE(3_1, "3.1", true);
> +
> /*
> * pseries-3.0
> */
> +#define SPAPR_COMPAT_3_0 \
> + HW_COMPAT_3_0
> +
> static void spapr_machine_3_0_instance_options(MachineState *machine)
> {
> + spapr_machine_3_1_instance_options(machine);
> }
>
> static void spapr_machine_3_0_class_options(MachineClass *mc)
> {
> - /* Defaults for the latest behaviour inherited from the base class */
> + spapr_machine_3_1_class_options(mc);
> + SET_MACHINE_COMPAT(mc, SPAPR_COMPAT_3_0);
> }
>
> -DEFINE_SPAPR_MACHINE(3_0, "3.0", true);
> +DEFINE_SPAPR_MACHINE(3_0, "3.0", false);
>
> /*
> * pseries-2.12