Message ID | 20181209194610.29727-18-clg@kaod.org |
---|---|
State | New |
Headers | show |
Series | ppc: support for the XIVE interrupt controller (POWER9) | expand |
On Sun, 2018-12-09 at 20:46 +0100, Cédric Le Goater wrote: > Signed-off-by: Cédric Le Goater <clg@kaod.org> > --- If you're going to do that, can we include large decrementer in there too ? (patches from Suraj in my tree but they night need a bit of massaging). > include/hw/compat.h | 3 +++ > hw/ppc/spapr.c | 25 ++++++++++++++++++++++--- > 2 files changed, 25 insertions(+), 3 deletions(-) > > diff --git a/include/hw/compat.h b/include/hw/compat.h > index 6f4d5fc64704..70958328fe7a 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_1 \ > + /* empty */ > + > #define HW_COMPAT_3_0 \ > /* empty */ > > diff --git a/hw/ppc/spapr.c b/hw/ppc/spapr.c > index fa41927d95dd..4012ebd794a4 100644 > --- a/hw/ppc/spapr.c > +++ b/hw/ppc/spapr.c > @@ -3971,19 +3971,38 @@ static const TypeInfo spapr_machine_info = { > } \ > type_init(spapr_machine_register_##suffix) > > - /* > +/* > + * pseries-4.0 > + */ > +static void spapr_machine_4_0_instance_options(MachineState *machine) > +{ > +} > + > +static void spapr_machine_4_0_class_options(MachineClass *mc) > +{ > + /* Defaults for the latest behaviour inherited from the base class */ > +} > + > +DEFINE_SPAPR_MACHINE(4_0, "4.0", true); > + > +/* > * pseries-3.1 > */ > +#define SPAPR_COMPAT_3_1 \ > + HW_COMPAT_3_1 > + > static void spapr_machine_3_1_instance_options(MachineState *machine) > { > + spapr_machine_4_0_instance_options(machine); > } > > static void spapr_machine_3_1_class_options(MachineClass *mc) > { > - /* Defaults for the latest behaviour inherited from the base class */ > + spapr_machine_4_0_class_options(mc); > + SET_MACHINE_COMPAT(mc, SPAPR_COMPAT_3_1); > } > > -DEFINE_SPAPR_MACHINE(3_1, "3.1", true); > +DEFINE_SPAPR_MACHINE(3_1, "3.1", false); > > /* > * pseries-3.0
On Mon, Dec 10, 2018 at 09:05:06AM +1100, Benjamin Herrenschmidt wrote: > On Sun, 2018-12-09 at 20:46 +0100, Cédric Le Goater wrote: > > Signed-off-by: Cédric Le Goater <clg@kaod.org> > > --- > > If you're going to do that, can we include large decrementer in there > too ? (patches from Suraj in my tree but they night need a bit of > massaging). We don't need to worry about that here. The machine type's not considered finalized until the release, so as long as you get the large dec stuff in before the 4.0 release, it's fine. Looks like Eduardo and others are probably doing a big batch machine type update via the machine tree. That will probably conflict, but it should be a fairly easy one for me to sort out when the time comes. > > > include/hw/compat.h | 3 +++ > > hw/ppc/spapr.c | 25 ++++++++++++++++++++++--- > > 2 files changed, 25 insertions(+), 3 deletions(-) > > > > diff --git a/include/hw/compat.h b/include/hw/compat.h > > index 6f4d5fc64704..70958328fe7a 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_1 \ > > + /* empty */ > > + > > #define HW_COMPAT_3_0 \ > > /* empty */ > > > > diff --git a/hw/ppc/spapr.c b/hw/ppc/spapr.c > > index fa41927d95dd..4012ebd794a4 100644 > > --- a/hw/ppc/spapr.c > > +++ b/hw/ppc/spapr.c > > @@ -3971,19 +3971,38 @@ static const TypeInfo spapr_machine_info = { > > } \ > > type_init(spapr_machine_register_##suffix) > > > > - /* > > +/* > > + * pseries-4.0 > > + */ > > +static void spapr_machine_4_0_instance_options(MachineState *machine) > > +{ > > +} > > + > > +static void spapr_machine_4_0_class_options(MachineClass *mc) > > +{ > > + /* Defaults for the latest behaviour inherited from the base class */ > > +} > > + > > +DEFINE_SPAPR_MACHINE(4_0, "4.0", true); > > + > > +/* > > * pseries-3.1 > > */ > > +#define SPAPR_COMPAT_3_1 \ > > + HW_COMPAT_3_1 > > + > > static void spapr_machine_3_1_instance_options(MachineState *machine) > > { > > + spapr_machine_4_0_instance_options(machine); > > } > > > > static void spapr_machine_3_1_class_options(MachineClass *mc) > > { > > - /* Defaults for the latest behaviour inherited from the base class */ > > + spapr_machine_4_0_class_options(mc); > > + SET_MACHINE_COMPAT(mc, SPAPR_COMPAT_3_1); > > } > > > > -DEFINE_SPAPR_MACHINE(3_1, "3.1", true); > > +DEFINE_SPAPR_MACHINE(3_1, "3.1", false); > > > > /* > > * pseries-3.0 >
On Sun, Dec 09, 2018 at 08:46:08PM +0100, Cédric Le Goater wrote: > Signed-off-by: Cédric Le Goater <clg@kaod.org> Applied, since we'll need something like this sooner or later anyway. I may have conflicts to resolve since I think a patch including a similar chage is in someone else's tree, but it shouldn't be too hard to deal with. > --- > include/hw/compat.h | 3 +++ > hw/ppc/spapr.c | 25 ++++++++++++++++++++++--- > 2 files changed, 25 insertions(+), 3 deletions(-) > > diff --git a/include/hw/compat.h b/include/hw/compat.h > index 6f4d5fc64704..70958328fe7a 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_1 \ > + /* empty */ > + > #define HW_COMPAT_3_0 \ > /* empty */ > > diff --git a/hw/ppc/spapr.c b/hw/ppc/spapr.c > index fa41927d95dd..4012ebd794a4 100644 > --- a/hw/ppc/spapr.c > +++ b/hw/ppc/spapr.c > @@ -3971,19 +3971,38 @@ static const TypeInfo spapr_machine_info = { > } \ > type_init(spapr_machine_register_##suffix) > > - /* > +/* > + * pseries-4.0 > + */ > +static void spapr_machine_4_0_instance_options(MachineState *machine) > +{ > +} > + > +static void spapr_machine_4_0_class_options(MachineClass *mc) > +{ > + /* Defaults for the latest behaviour inherited from the base class */ > +} > + > +DEFINE_SPAPR_MACHINE(4_0, "4.0", true); > + > +/* > * pseries-3.1 > */ > +#define SPAPR_COMPAT_3_1 \ > + HW_COMPAT_3_1 > + > static void spapr_machine_3_1_instance_options(MachineState *machine) > { > + spapr_machine_4_0_instance_options(machine); > } > > static void spapr_machine_3_1_class_options(MachineClass *mc) > { > - /* Defaults for the latest behaviour inherited from the base class */ > + spapr_machine_4_0_class_options(mc); > + SET_MACHINE_COMPAT(mc, SPAPR_COMPAT_3_1); > } > > -DEFINE_SPAPR_MACHINE(3_1, "3.1", true); > +DEFINE_SPAPR_MACHINE(3_1, "3.1", false); > > /* > * pseries-3.0
On 12/10/18 4:41 AM, David Gibson wrote: > On Mon, Dec 10, 2018 at 09:05:06AM +1100, Benjamin Herrenschmidt wrote: >> On Sun, 2018-12-09 at 20:46 +0100, Cédric Le Goater wrote: >>> Signed-off-by: Cédric Le Goater <clg@kaod.org> >>> --- >> >> If you're going to do that, can we include large decrementer in there >> too ? (patches from Suraj in my tree but they night need a bit of >> massaging). > > We don't need to worry about that here. The machine type's not > considered finalized until the release, so as long as you get the > large dec stuff in before the 4.0 release, it's fine. Are we talking about these 5 patches ? target/ppc: Implement large decrementer support for TCG https://github.com/legoater/qemu/commit/9b3131ae25aa1ee630c48a0489d7194b3046031a target/ppc: Implement large decrementer support for KVM https://github.com/legoater/qemu/commit/eceb9fe2c77ba40230621af56dd20090a282e2f1 target/ppc: Implement migration support for large decrementer https://github.com/legoater/qemu/commit/8da02805dfa39b888df530a6f00a59e6b2fbe34b target/ppc: Enable the large decrementer for TCG and KVM guests https://github.com/legoater/qemu/commit/0cff350c80e19553c35a3fc8a9859533d606c3e8 target/ppc: Add cmd line option to disable the large decrementer https://github.com/legoater/qemu/commit/7136bfa944d8dc405150d0bc281c3df5cab98ab1 The PowerNV POWER9 will need the TCG part. > Looks like Eduardo and others are probably doing a big batch machine > type update via the machine tree. That will probably conflict, but it > should be a fairly easy one for me to sort out when the time comes. I think you can possibly just drop this patch if someone adds the 4.0 machine before or just drop the include/hw/compat.h changes C. >> >>> include/hw/compat.h | 3 +++ >>> hw/ppc/spapr.c | 25 ++++++++++++++++++++++--- >>> 2 files changed, 25 insertions(+), 3 deletions(-) >>> >>> diff --git a/include/hw/compat.h b/include/hw/compat.h >>> index 6f4d5fc64704..70958328fe7a 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_1 \ >>> + /* empty */ >>> + >>> #define HW_COMPAT_3_0 \ >>> /* empty */ >>> >>> diff --git a/hw/ppc/spapr.c b/hw/ppc/spapr.c >>> index fa41927d95dd..4012ebd794a4 100644 >>> --- a/hw/ppc/spapr.c >>> +++ b/hw/ppc/spapr.c >>> @@ -3971,19 +3971,38 @@ static const TypeInfo spapr_machine_info = { >>> } \ >>> type_init(spapr_machine_register_##suffix) >>> >>> - /* >>> +/* >>> + * pseries-4.0 >>> + */ >>> +static void spapr_machine_4_0_instance_options(MachineState *machine) >>> +{ >>> +} >>> + >>> +static void spapr_machine_4_0_class_options(MachineClass *mc) >>> +{ >>> + /* Defaults for the latest behaviour inherited from the base class */ >>> +} >>> + >>> +DEFINE_SPAPR_MACHINE(4_0, "4.0", true); >>> + >>> +/* >>> * pseries-3.1 >>> */ >>> +#define SPAPR_COMPAT_3_1 \ >>> + HW_COMPAT_3_1 >>> + >>> static void spapr_machine_3_1_instance_options(MachineState *machine) >>> { >>> + spapr_machine_4_0_instance_options(machine); >>> } >>> >>> static void spapr_machine_3_1_class_options(MachineClass *mc) >>> { >>> - /* Defaults for the latest behaviour inherited from the base class */ >>> + spapr_machine_4_0_class_options(mc); >>> + SET_MACHINE_COMPAT(mc, SPAPR_COMPAT_3_1); >>> } >>> >>> -DEFINE_SPAPR_MACHINE(3_1, "3.1", true); >>> +DEFINE_SPAPR_MACHINE(3_1, "3.1", false); >>> >>> /* >>> * pseries-3.0 >> >
diff --git a/include/hw/compat.h b/include/hw/compat.h index 6f4d5fc64704..70958328fe7a 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_1 \ + /* empty */ + #define HW_COMPAT_3_0 \ /* empty */ diff --git a/hw/ppc/spapr.c b/hw/ppc/spapr.c index fa41927d95dd..4012ebd794a4 100644 --- a/hw/ppc/spapr.c +++ b/hw/ppc/spapr.c @@ -3971,19 +3971,38 @@ static const TypeInfo spapr_machine_info = { } \ type_init(spapr_machine_register_##suffix) - /* +/* + * pseries-4.0 + */ +static void spapr_machine_4_0_instance_options(MachineState *machine) +{ +} + +static void spapr_machine_4_0_class_options(MachineClass *mc) +{ + /* Defaults for the latest behaviour inherited from the base class */ +} + +DEFINE_SPAPR_MACHINE(4_0, "4.0", true); + +/* * pseries-3.1 */ +#define SPAPR_COMPAT_3_1 \ + HW_COMPAT_3_1 + static void spapr_machine_3_1_instance_options(MachineState *machine) { + spapr_machine_4_0_instance_options(machine); } static void spapr_machine_3_1_class_options(MachineClass *mc) { - /* Defaults for the latest behaviour inherited from the base class */ + spapr_machine_4_0_class_options(mc); + SET_MACHINE_COMPAT(mc, SPAPR_COMPAT_3_1); } -DEFINE_SPAPR_MACHINE(3_1, "3.1", true); +DEFINE_SPAPR_MACHINE(3_1, "3.1", false); /* * pseries-3.0
Signed-off-by: Cédric Le Goater <clg@kaod.org> --- include/hw/compat.h | 3 +++ hw/ppc/spapr.c | 25 ++++++++++++++++++++++--- 2 files changed, 25 insertions(+), 3 deletions(-)