The following patch is going to add compatiblity parameters.
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
---
include/hw/compat.h | 4 +++-
include/hw/i386/pc.h | 5 ++++-
hw/i386/pc_piix.c | 13 ++++++++++++-
hw/i386/pc_q35.c | 12 +++++++++++-
4 files changed, 30 insertions(+), 4 deletions(-)
diff --git a/include/hw/compat.h b/include/hw/compat.h
index c08f4040bb..f8e596969a 100644
--- a/include/hw/compat.h
+++ b/include/hw/compat.h
@@ -1,7 +1,9 @@
#ifndef HW_COMPAT_H
#define HW_COMPAT_H
-#define HW_COMPAT_2_12 \
+#define HW_COMPAT_3_0
+
+#define HW_COMPAT_2_12 \
{\
.driver = "migration",\
.property = "decompress-error-check",\
diff --git a/include/hw/i386/pc.h b/include/hw/i386/pc.h
index 6894f37df1..09b0365a8e 100644
--- a/include/hw/i386/pc.h
+++ b/include/hw/i386/pc.h
@@ -294,7 +294,10 @@ int e820_add_entry(uint64_t, uint64_t, uint32_t);
int e820_get_num_entries(void);
bool e820_get_entry(int, uint32_t, uint64_t *, uint64_t *);
-#define PC_COMPAT_2_12 \
+#define PC_COMPAT_3_0 \
+ HW_COMPAT_3_0
+
+#define PC_COMPAT_2_12 \
HW_COMPAT_2_12 \
{\
.driver = TYPE_X86_CPU,\
diff --git a/hw/i386/pc_piix.c b/hw/i386/pc_piix.c
index dc09466b3e..7db1fa88ef 100644
--- a/hw/i386/pc_piix.c
+++ b/hw/i386/pc_piix.c
@@ -428,13 +428,24 @@ static void pc_i440fx_machine_options(MachineClass *m)
machine_class_allow_dynamic_sysbus_dev(m, TYPE_RAMFB_DEVICE);
}
-static void pc_i440fx_3_0_machine_options(MachineClass *m)
+static void pc_i440fx_3_1_machine_options(MachineClass *m)
{
pc_i440fx_machine_options(m);
m->alias = "pc";
m->is_default = 1;
}
+DEFINE_I440FX_MACHINE(v3_1, "pc-i440fx-3.1", NULL,
+ pc_i440fx_3_1_machine_options);
+
+static void pc_i440fx_3_0_machine_options(MachineClass *m)
+{
+ pc_i440fx_machine_options(m);
+ m->is_default = 0;
+ m->alias = NULL;
+ SET_MACHINE_COMPAT(m, PC_COMPAT_3_0);
+}
+
DEFINE_I440FX_MACHINE(v3_0, "pc-i440fx-3.0", NULL,
pc_i440fx_3_0_machine_options);
diff --git a/hw/i386/pc_q35.c b/hw/i386/pc_q35.c
index 532241e3f8..cb1980a088 100644
--- a/hw/i386/pc_q35.c
+++ b/hw/i386/pc_q35.c
@@ -311,12 +311,22 @@ static void pc_q35_machine_options(MachineClass *m)
m->max_cpus = 288;
}
-static void pc_q35_3_0_machine_options(MachineClass *m)
+static void pc_q35_3_1_machine_options(MachineClass *m)
{
pc_q35_machine_options(m);
m->alias = "q35";
}
+DEFINE_Q35_MACHINE(v3_1, "pc-q35-3.1", NULL,
+ pc_q35_3_1_machine_options);
+
+static void pc_q35_3_0_machine_options(MachineClass *m)
+{
+ pc_q35_machine_options(m);
+ m->alias = NULL;
+ SET_MACHINE_COMPAT(m, PC_COMPAT_3_0);
+}
+
DEFINE_Q35_MACHINE(v3_0, "pc-q35-3.0", NULL,
pc_q35_3_0_machine_options);
--
2.18.0.547.g1d89318c48
ping
On Fri, Aug 10, 2018 at 5:34 PM Marc-André Lureau
<marcandre.lureau@redhat.com> wrote:
>
> The following patch is going to add compatiblity parameters.
>
> Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
> ---
> include/hw/compat.h | 4 +++-
> include/hw/i386/pc.h | 5 ++++-
> hw/i386/pc_piix.c | 13 ++++++++++++-
> hw/i386/pc_q35.c | 12 +++++++++++-
> 4 files changed, 30 insertions(+), 4 deletions(-)
>
> diff --git a/include/hw/compat.h b/include/hw/compat.h
> index c08f4040bb..f8e596969a 100644
> --- a/include/hw/compat.h
> +++ b/include/hw/compat.h
> @@ -1,7 +1,9 @@
> #ifndef HW_COMPAT_H
> #define HW_COMPAT_H
>
> -#define HW_COMPAT_2_12 \
> +#define HW_COMPAT_3_0
> +
> +#define HW_COMPAT_2_12 \
> {\
> .driver = "migration",\
> .property = "decompress-error-check",\
> diff --git a/include/hw/i386/pc.h b/include/hw/i386/pc.h
> index 6894f37df1..09b0365a8e 100644
> --- a/include/hw/i386/pc.h
> +++ b/include/hw/i386/pc.h
> @@ -294,7 +294,10 @@ int e820_add_entry(uint64_t, uint64_t, uint32_t);
> int e820_get_num_entries(void);
> bool e820_get_entry(int, uint32_t, uint64_t *, uint64_t *);
>
> -#define PC_COMPAT_2_12 \
> +#define PC_COMPAT_3_0 \
> + HW_COMPAT_3_0
> +
> +#define PC_COMPAT_2_12 \
> HW_COMPAT_2_12 \
> {\
> .driver = TYPE_X86_CPU,\
> diff --git a/hw/i386/pc_piix.c b/hw/i386/pc_piix.c
> index dc09466b3e..7db1fa88ef 100644
> --- a/hw/i386/pc_piix.c
> +++ b/hw/i386/pc_piix.c
> @@ -428,13 +428,24 @@ static void pc_i440fx_machine_options(MachineClass *m)
> machine_class_allow_dynamic_sysbus_dev(m, TYPE_RAMFB_DEVICE);
> }
>
> -static void pc_i440fx_3_0_machine_options(MachineClass *m)
> +static void pc_i440fx_3_1_machine_options(MachineClass *m)
> {
> pc_i440fx_machine_options(m);
> m->alias = "pc";
> m->is_default = 1;
> }
>
> +DEFINE_I440FX_MACHINE(v3_1, "pc-i440fx-3.1", NULL,
> + pc_i440fx_3_1_machine_options);
> +
> +static void pc_i440fx_3_0_machine_options(MachineClass *m)
> +{
> + pc_i440fx_machine_options(m);
> + m->is_default = 0;
> + m->alias = NULL;
> + SET_MACHINE_COMPAT(m, PC_COMPAT_3_0);
> +}
> +
> DEFINE_I440FX_MACHINE(v3_0, "pc-i440fx-3.0", NULL,
> pc_i440fx_3_0_machine_options);
>
> diff --git a/hw/i386/pc_q35.c b/hw/i386/pc_q35.c
> index 532241e3f8..cb1980a088 100644
> --- a/hw/i386/pc_q35.c
> +++ b/hw/i386/pc_q35.c
> @@ -311,12 +311,22 @@ static void pc_q35_machine_options(MachineClass *m)
> m->max_cpus = 288;
> }
>
> -static void pc_q35_3_0_machine_options(MachineClass *m)
> +static void pc_q35_3_1_machine_options(MachineClass *m)
> {
> pc_q35_machine_options(m);
> m->alias = "q35";
> }
>
> +DEFINE_Q35_MACHINE(v3_1, "pc-q35-3.1", NULL,
> + pc_q35_3_1_machine_options);
> +
> +static void pc_q35_3_0_machine_options(MachineClass *m)
> +{
> + pc_q35_machine_options(m);
> + m->alias = NULL;
> + SET_MACHINE_COMPAT(m, PC_COMPAT_3_0);
> +}
> +
> DEFINE_Q35_MACHINE(v3_0, "pc-q35-3.0", NULL,
> pc_q35_3_0_machine_options);
>
> --
> 2.18.0.547.g1d89318c48
>
>
--
Marc-André Lureau
On 08/28/2018 10:05 AM, Marc-André Lureau wrote:
> ping
> On Fri, Aug 10, 2018 at 5:34 PM Marc-André Lureau
> <marcandre.lureau@redhat.com> wrote:
>> The following patch is going to add compatiblity parameters.
>>
>> Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
>> ---
>> include/hw/compat.h | 4 +++-
>> include/hw/i386/pc.h | 5 ++++-
>> hw/i386/pc_piix.c | 13 ++++++++++++-
>> hw/i386/pc_q35.c | 12 +++++++++++-
>> 4 files changed, 30 insertions(+), 4 deletions(-)
>>
>> diff --git a/include/hw/compat.h b/include/hw/compat.h
>> index c08f4040bb..f8e596969a 100644
>> --- a/include/hw/compat.h
>> +++ b/include/hw/compat.h
>> @@ -1,7 +1,9 @@
>> #ifndef HW_COMPAT_H
>> #define HW_COMPAT_H
>>
>> -#define HW_COMPAT_2_12 \
>> +#define HW_COMPAT_3_0
Should probably be 3_1 now?
>> +
>> +#define HW_COMPAT_2_12 \
>> {\
>> .driver = "migration",\
>> .property = "decompress-error-check",\
>> diff --git a/include/hw/i386/pc.h b/include/hw/i386/pc.h
>> index 6894f37df1..09b0365a8e 100644
>> --- a/include/hw/i386/pc.h
>> +++ b/include/hw/i386/pc.h
>> @@ -294,7 +294,10 @@ int e820_add_entry(uint64_t, uint64_t, uint32_t);
>> int e820_get_num_entries(void);
>> bool e820_get_entry(int, uint32_t, uint64_t *, uint64_t *);
>>
>> -#define PC_COMPAT_2_12 \
>> +#define PC_COMPAT_3_0 \
Same here?
>> + HW_COMPAT_3_0
>> +
>> +#define PC_COMPAT_2_12 \
>> HW_COMPAT_2_12 \
>> {\
>> .driver = TYPE_X86_CPU,\
>> diff --git a/hw/i386/pc_piix.c b/hw/i386/pc_piix.c
>> index dc09466b3e..7db1fa88ef 100644
>> --- a/hw/i386/pc_piix.c
>> +++ b/hw/i386/pc_piix.c
>> @@ -428,13 +428,24 @@ static void pc_i440fx_machine_options(MachineClass *m)
>> machine_class_allow_dynamic_sysbus_dev(m, TYPE_RAMFB_DEVICE);
>> }
>>
>> -static void pc_i440fx_3_0_machine_options(MachineClass *m)
>> +static void pc_i440fx_3_1_machine_options(MachineClass *m)
>> {
>> pc_i440fx_machine_options(m);
>> m->alias = "pc";
>> m->is_default = 1;
>> }
>>
>> +DEFINE_I440FX_MACHINE(v3_1, "pc-i440fx-3.1", NULL,
>> + pc_i440fx_3_1_machine_options);
>> +
>> +static void pc_i440fx_3_0_machine_options(MachineClass *m)
should this be the 3_1 rather than the one above?
>> +{
>> + pc_i440fx_machine_options(m);
>> + m->is_default = 0;
>> + m->alias = NULL;
>> + SET_MACHINE_COMPAT(m, PC_COMPAT_3_0);
>> +}
>> +
>> DEFINE_I440FX_MACHINE(v3_0, "pc-i440fx-3.0", NULL,
>> pc_i440fx_3_0_machine_options);
>>
>> diff --git a/hw/i386/pc_q35.c b/hw/i386/pc_q35.c
>> index 532241e3f8..cb1980a088 100644
>> --- a/hw/i386/pc_q35.c
>> +++ b/hw/i386/pc_q35.c
>> @@ -311,12 +311,22 @@ static void pc_q35_machine_options(MachineClass *m)
>> m->max_cpus = 288;
>> }
>>
>> -static void pc_q35_3_0_machine_options(MachineClass *m)
>> +static void pc_q35_3_1_machine_options(MachineClass *m)
>> {
>> pc_q35_machine_options(m);
>> m->alias = "q35";
>> }
>>
>> +DEFINE_Q35_MACHINE(v3_1, "pc-q35-3.1", NULL,
>> + pc_q35_3_1_machine_options);
>> +
>> +static void pc_q35_3_0_machine_options(MachineClass *m)
>> +{
>> + pc_q35_machine_options(m);
>> + m->alias = NULL;
>> + SET_MACHINE_COMPAT(m, PC_COMPAT_3_0);
>> +}
>> +
>> DEFINE_Q35_MACHINE(v3_0, "pc-q35-3.0", NULL,
>> pc_q35_3_0_machine_options);
>>
>> --
>> 2.18.0.547.g1d89318c48
>>
>>
>
Hi
On Thu, Aug 30, 2018 at 3:54 PM Stefan Berger
<stefanb@linux.vnet.ibm.com> wrote:
>
> On 08/28/2018 10:05 AM, Marc-André Lureau wrote:
> > ping
> > On Fri, Aug 10, 2018 at 5:34 PM Marc-André Lureau
> > <marcandre.lureau@redhat.com> wrote:
> >> The following patch is going to add compatiblity parameters.
> >>
> >> Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
> >> ---
> >> include/hw/compat.h | 4 +++-
> >> include/hw/i386/pc.h | 5 ++++-
> >> hw/i386/pc_piix.c | 13 ++++++++++++-
> >> hw/i386/pc_q35.c | 12 +++++++++++-
> >> 4 files changed, 30 insertions(+), 4 deletions(-)
> >>
> >> diff --git a/include/hw/compat.h b/include/hw/compat.h
> >> index c08f4040bb..f8e596969a 100644
> >> --- a/include/hw/compat.h
> >> +++ b/include/hw/compat.h
> >> @@ -1,7 +1,9 @@
> >> #ifndef HW_COMPAT_H
> >> #define HW_COMPAT_H
> >>
> >> -#define HW_COMPAT_2_12 \
> >> +#define HW_COMPAT_3_0
> Should probably be 3_1 now?
> >> +
> >> +#define HW_COMPAT_2_12 \
> >> {\
> >> .driver = "migration",\
> >> .property = "decompress-error-check",\
> >> diff --git a/include/hw/i386/pc.h b/include/hw/i386/pc.h
> >> index 6894f37df1..09b0365a8e 100644
> >> --- a/include/hw/i386/pc.h
> >> +++ b/include/hw/i386/pc.h
> >> @@ -294,7 +294,10 @@ int e820_add_entry(uint64_t, uint64_t, uint32_t);
> >> int e820_get_num_entries(void);
> >> bool e820_get_entry(int, uint32_t, uint64_t *, uint64_t *);
> >>
> >> -#define PC_COMPAT_2_12 \
> >> +#define PC_COMPAT_3_0 \
> Same here?
> >> + HW_COMPAT_3_0
> >> +
> >> +#define PC_COMPAT_2_12 \
> >> HW_COMPAT_2_12 \
> >> {\
> >> .driver = TYPE_X86_CPU,\
> >> diff --git a/hw/i386/pc_piix.c b/hw/i386/pc_piix.c
> >> index dc09466b3e..7db1fa88ef 100644
> >> --- a/hw/i386/pc_piix.c
> >> +++ b/hw/i386/pc_piix.c
> >> @@ -428,13 +428,24 @@ static void pc_i440fx_machine_options(MachineClass *m)
> >> machine_class_allow_dynamic_sysbus_dev(m, TYPE_RAMFB_DEVICE);
> >> }
> >>
> >> -static void pc_i440fx_3_0_machine_options(MachineClass *m)
> >> +static void pc_i440fx_3_1_machine_options(MachineClass *m)
> >> {
> >> pc_i440fx_machine_options(m);
> >> m->alias = "pc";
> >> m->is_default = 1;
> >> }
> >>
> >> +DEFINE_I440FX_MACHINE(v3_1, "pc-i440fx-3.1", NULL,
> >> + pc_i440fx_3_1_machine_options);
> >> +
> >> +static void pc_i440fx_3_0_machine_options(MachineClass *m)
> should this be the 3_1 rather than the one above?
3_1 is just above :)
> >> +{
> >> + pc_i440fx_machine_options(m);
> >> + m->is_default = 0;
> >> + m->alias = NULL;
> >> + SET_MACHINE_COMPAT(m, PC_COMPAT_3_0);
> >> +}
> >> +
> >> DEFINE_I440FX_MACHINE(v3_0, "pc-i440fx-3.0", NULL,
> >> pc_i440fx_3_0_machine_options);
> >>
> >> diff --git a/hw/i386/pc_q35.c b/hw/i386/pc_q35.c
> >> index 532241e3f8..cb1980a088 100644
> >> --- a/hw/i386/pc_q35.c
> >> +++ b/hw/i386/pc_q35.c
> >> @@ -311,12 +311,22 @@ static void pc_q35_machine_options(MachineClass *m)
> >> m->max_cpus = 288;
> >> }
> >>
> >> -static void pc_q35_3_0_machine_options(MachineClass *m)
> >> +static void pc_q35_3_1_machine_options(MachineClass *m)
> >> {
> >> pc_q35_machine_options(m);
> >> m->alias = "q35";
> >> }
> >>
> >> +DEFINE_Q35_MACHINE(v3_1, "pc-q35-3.1", NULL,
> >> + pc_q35_3_1_machine_options);
> >> +
> >> +static void pc_q35_3_0_machine_options(MachineClass *m)
> >> +{
> >> + pc_q35_machine_options(m);
> >> + m->alias = NULL;
> >> + SET_MACHINE_COMPAT(m, PC_COMPAT_3_0);
> >> +}
> >> +
> >> DEFINE_Q35_MACHINE(v3_0, "pc-q35-3.0", NULL,
> >> pc_q35_3_0_machine_options);
> >>
> >> --
> >> 2.18.0.547.g1d89318c48
> >>
> >>
> >
>
--
Marc-André Lureau
On Thu, Aug 30, 2018 at 09:54:05AM -0400, Stefan Berger wrote: > On 08/28/2018 10:05 AM, Marc-André Lureau wrote: > > ping > > On Fri, Aug 10, 2018 at 5:34 PM Marc-André Lureau > > <marcandre.lureau@redhat.com> wrote: > > > The following patch is going to add compatiblity parameters. > > > > > > Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> > > > --- > > > include/hw/compat.h | 4 +++- > > > include/hw/i386/pc.h | 5 ++++- > > > hw/i386/pc_piix.c | 13 ++++++++++++- > > > hw/i386/pc_q35.c | 12 +++++++++++- > > > 4 files changed, 30 insertions(+), 4 deletions(-) > > > > > > diff --git a/include/hw/compat.h b/include/hw/compat.h > > > index c08f4040bb..f8e596969a 100644 > > > --- a/include/hw/compat.h > > > +++ b/include/hw/compat.h > > > @@ -1,7 +1,9 @@ > > > #ifndef HW_COMPAT_H > > > #define HW_COMPAT_H > > > > > > -#define HW_COMPAT_2_12 \ > > > +#define HW_COMPAT_3_0 > Should probably be 3_1 now? *_COMPAT_3_1 will exist only on QEMU 3.2, just like *_COMPAT_2_12 exists only on QEMU 3.0 and newer. We need the compat macros to implement compatibility with older QEMU versions. We don't need compat macros for the current QEMU version. -- Eduardo
On Fri, Aug 10, 2018 at 05:32:18PM +0200, Marc-André Lureau wrote:
> The following patch is going to add compatiblity parameters.
>
> Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
> ---
> include/hw/compat.h | 4 +++-
> include/hw/i386/pc.h | 5 ++++-
> hw/i386/pc_piix.c | 13 ++++++++++++-
> hw/i386/pc_q35.c | 12 +++++++++++-
> 4 files changed, 30 insertions(+), 4 deletions(-)
>
> diff --git a/include/hw/compat.h b/include/hw/compat.h
> index c08f4040bb..f8e596969a 100644
> --- a/include/hw/compat.h
> +++ b/include/hw/compat.h
> @@ -1,7 +1,9 @@
> #ifndef HW_COMPAT_H
> #define HW_COMPAT_H
>
> -#define HW_COMPAT_2_12 \
> +#define HW_COMPAT_3_0
> +
> +#define HW_COMPAT_2_12 \
> {\
> .driver = "migration",\
> .property = "decompress-error-check",\
> diff --git a/include/hw/i386/pc.h b/include/hw/i386/pc.h
> index 6894f37df1..09b0365a8e 100644
> --- a/include/hw/i386/pc.h
> +++ b/include/hw/i386/pc.h
> @@ -294,7 +294,10 @@ int e820_add_entry(uint64_t, uint64_t, uint32_t);
> int e820_get_num_entries(void);
> bool e820_get_entry(int, uint32_t, uint64_t *, uint64_t *);
>
> -#define PC_COMPAT_2_12 \
> +#define PC_COMPAT_3_0 \
> + HW_COMPAT_3_0
> +
> +#define PC_COMPAT_2_12 \
> HW_COMPAT_2_12 \
> {\
> .driver = TYPE_X86_CPU,\
> diff --git a/hw/i386/pc_piix.c b/hw/i386/pc_piix.c
> index dc09466b3e..7db1fa88ef 100644
> --- a/hw/i386/pc_piix.c
> +++ b/hw/i386/pc_piix.c
> @@ -428,13 +428,24 @@ static void pc_i440fx_machine_options(MachineClass *m)
> machine_class_allow_dynamic_sysbus_dev(m, TYPE_RAMFB_DEVICE);
> }
>
> -static void pc_i440fx_3_0_machine_options(MachineClass *m)
> +static void pc_i440fx_3_1_machine_options(MachineClass *m)
> {
> pc_i440fx_machine_options(m);
> m->alias = "pc";
> m->is_default = 1;
> }
>
> +DEFINE_I440FX_MACHINE(v3_1, "pc-i440fx-3.1", NULL,
> + pc_i440fx_3_1_machine_options);
> +
> +static void pc_i440fx_3_0_machine_options(MachineClass *m)
> +{
> + pc_i440fx_machine_options(m);
This should be pc_i440fx_3_1_machine_options().
> + m->is_default = 0;
> + m->alias = NULL;
> + SET_MACHINE_COMPAT(m, PC_COMPAT_3_0);
> +}
> +
> DEFINE_I440FX_MACHINE(v3_0, "pc-i440fx-3.0", NULL,
> pc_i440fx_3_0_machine_options);
>
> diff --git a/hw/i386/pc_q35.c b/hw/i386/pc_q35.c
> index 532241e3f8..cb1980a088 100644
> --- a/hw/i386/pc_q35.c
> +++ b/hw/i386/pc_q35.c
> @@ -311,12 +311,22 @@ static void pc_q35_machine_options(MachineClass *m)
> m->max_cpus = 288;
> }
>
> -static void pc_q35_3_0_machine_options(MachineClass *m)
> +static void pc_q35_3_1_machine_options(MachineClass *m)
> {
> pc_q35_machine_options(m);
> m->alias = "q35";
> }
>
> +DEFINE_Q35_MACHINE(v3_1, "pc-q35-3.1", NULL,
> + pc_q35_3_1_machine_options);
> +
> +static void pc_q35_3_0_machine_options(MachineClass *m)
> +{
> + pc_q35_machine_options(m);
This should be pc_q35_3_1_machine_options().
The rest of the patch looks good to me.
> + m->alias = NULL;
> + SET_MACHINE_COMPAT(m, PC_COMPAT_3_0);
> +}
> +
> DEFINE_Q35_MACHINE(v3_0, "pc-q35-3.0", NULL,
> pc_q35_3_0_machine_options);
>
> --
> 2.18.0.547.g1d89318c48
>
>
--
Eduardo
Hi
On Thu, Aug 30, 2018 at 8:53 PM, Eduardo Habkost <ehabkost@redhat.com> wrote:
> On Fri, Aug 10, 2018 at 05:32:18PM +0200, Marc-André Lureau wrote:
>> The following patch is going to add compatiblity parameters.
>>
>> Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
>> ---
>> include/hw/compat.h | 4 +++-
>> include/hw/i386/pc.h | 5 ++++-
>> hw/i386/pc_piix.c | 13 ++++++++++++-
>> hw/i386/pc_q35.c | 12 +++++++++++-
>> 4 files changed, 30 insertions(+), 4 deletions(-)
>>
>> diff --git a/include/hw/compat.h b/include/hw/compat.h
>> index c08f4040bb..f8e596969a 100644
>> --- a/include/hw/compat.h
>> +++ b/include/hw/compat.h
>> @@ -1,7 +1,9 @@
>> #ifndef HW_COMPAT_H
>> #define HW_COMPAT_H
>>
>> -#define HW_COMPAT_2_12 \
>> +#define HW_COMPAT_3_0
>> +
>> +#define HW_COMPAT_2_12 \
>> {\
>> .driver = "migration",\
>> .property = "decompress-error-check",\
>> diff --git a/include/hw/i386/pc.h b/include/hw/i386/pc.h
>> index 6894f37df1..09b0365a8e 100644
>> --- a/include/hw/i386/pc.h
>> +++ b/include/hw/i386/pc.h
>> @@ -294,7 +294,10 @@ int e820_add_entry(uint64_t, uint64_t, uint32_t);
>> int e820_get_num_entries(void);
>> bool e820_get_entry(int, uint32_t, uint64_t *, uint64_t *);
>>
>> -#define PC_COMPAT_2_12 \
>> +#define PC_COMPAT_3_0 \
>> + HW_COMPAT_3_0
>> +
>> +#define PC_COMPAT_2_12 \
>> HW_COMPAT_2_12 \
>> {\
>> .driver = TYPE_X86_CPU,\
>> diff --git a/hw/i386/pc_piix.c b/hw/i386/pc_piix.c
>> index dc09466b3e..7db1fa88ef 100644
>> --- a/hw/i386/pc_piix.c
>> +++ b/hw/i386/pc_piix.c
>> @@ -428,13 +428,24 @@ static void pc_i440fx_machine_options(MachineClass *m)
>> machine_class_allow_dynamic_sysbus_dev(m, TYPE_RAMFB_DEVICE);
>> }
>>
>> -static void pc_i440fx_3_0_machine_options(MachineClass *m)
>> +static void pc_i440fx_3_1_machine_options(MachineClass *m)
>> {
>> pc_i440fx_machine_options(m);
>> m->alias = "pc";
>> m->is_default = 1;
>> }
>>
>> +DEFINE_I440FX_MACHINE(v3_1, "pc-i440fx-3.1", NULL,
>> + pc_i440fx_3_1_machine_options);
>> +
>> +static void pc_i440fx_3_0_machine_options(MachineClass *m)
>> +{
>> + pc_i440fx_machine_options(m);
>
> This should be pc_i440fx_3_1_machine_options().
fixed
>
>
>> + m->is_default = 0;
>> + m->alias = NULL;
>> + SET_MACHINE_COMPAT(m, PC_COMPAT_3_0);
>> +}
>> +
>> DEFINE_I440FX_MACHINE(v3_0, "pc-i440fx-3.0", NULL,
>> pc_i440fx_3_0_machine_options);
>>
>> diff --git a/hw/i386/pc_q35.c b/hw/i386/pc_q35.c
>> index 532241e3f8..cb1980a088 100644
>> --- a/hw/i386/pc_q35.c
>> +++ b/hw/i386/pc_q35.c
>> @@ -311,12 +311,22 @@ static void pc_q35_machine_options(MachineClass *m)
>> m->max_cpus = 288;
>> }
>>
>> -static void pc_q35_3_0_machine_options(MachineClass *m)
>> +static void pc_q35_3_1_machine_options(MachineClass *m)
>> {
>> pc_q35_machine_options(m);
>> m->alias = "q35";
>> }
>>
>> +DEFINE_Q35_MACHINE(v3_1, "pc-q35-3.1", NULL,
>> + pc_q35_3_1_machine_options);
>> +
>> +static void pc_q35_3_0_machine_options(MachineClass *m)
>> +{
>> + pc_q35_machine_options(m);
>
> This should be pc_q35_3_1_machine_options().
fixed
> The rest of the patch looks good to me.
thanks!
>
>> + m->alias = NULL;
>> + SET_MACHINE_COMPAT(m, PC_COMPAT_3_0);
>> +}
>> +
>> DEFINE_Q35_MACHINE(v3_0, "pc-q35-3.0", NULL,
>> pc_q35_3_0_machine_options);
>>
>> --
>> 2.18.0.547.g1d89318c48
>>
>>
>
> --
> Eduardo
© 2016 - 2025 Red Hat, Inc.