Message ID | 20190208221111.25237-1-walling@linux.ibm.com |
---|---|
State | New |
Headers | show |
Series | [1/2] s390x/cpumodel: default enable mepoch for z14 and later | expand |
On 08.02.2019 23:11, Collin Walling wrote: > Latest systems and host kernels support mepoch, which is a > feature that was meant to be supported for z14 GA1 from the > get-go. Let's copy it to the z14 GA1 default CPU model. > > Machines s390-ccw-virtio-3.1 and older will retain the old CPU > models and will not provide this bit in the default model. > > Signed-off-by: Collin Walling <walling@linux.ibm.com> Yes, we missed that back then for the intial z14 version as the kernel and qemu parts were added later. Reviewed-by: Christian Borntraeger <borntraeger@de.ibm.com> > --- > hw/s390x/s390-virtio-ccw.c | 1 + > target/s390x/gen-features.c | 1 + > 2 files changed, 2 insertions(+) > > diff --git a/hw/s390x/s390-virtio-ccw.c b/hw/s390x/s390-virtio-ccw.c > index fd9d0b0542..32c5027345 100644 > --- a/hw/s390x/s390-virtio-ccw.c > +++ b/hw/s390x/s390-virtio-ccw.c > @@ -757,6 +757,7 @@ DEFINE_CCW_MACHINE(4_0, "4.0", true); > static void ccw_machine_3_1_instance_options(MachineState *machine) > { > ccw_machine_4_0_instance_options(machine); > + s390_cpudef_featoff_greater(14, 1, S390_FEAT_MULTIPLE_EPOCH); > } > > static void ccw_machine_3_1_class_options(MachineClass *mc) > diff --git a/target/s390x/gen-features.c b/target/s390x/gen-features.c > index 70015eaaf5..d258d67dca 100644 > --- a/target/s390x/gen-features.c > +++ b/target/s390x/gen-features.c > @@ -550,6 +550,7 @@ static uint16_t default_GEN14_GA1[] = { > S390_FEAT_GROUP_MSA_EXT_6, > S390_FEAT_GROUP_MSA_EXT_7, > S390_FEAT_GROUP_MSA_EXT_8, > + S390_FEAT_MULTIPLE_EPOCH, > }; > > /* QEMU (CPU model) features */ >
On Fri, 8 Feb 2019 17:11:10 -0500 Collin Walling <walling@linux.ibm.com> wrote: > Latest systems and host kernels support mepoch, which is a > feature that was meant to be supported for z14 GA1 from the > get-go. Let's copy it to the z14 GA1 default CPU model. Do older kernels simply not support it, or was there something actively missing? IOW, is it fine to turn this on with older kernels? [It's probably all good, although I like to wait for David's ack for any cpu model patches :)] > > Machines s390-ccw-virtio-3.1 and older will retain the old CPU > models and will not provide this bit in the default model. > > Signed-off-by: Collin Walling <walling@linux.ibm.com> > --- > hw/s390x/s390-virtio-ccw.c | 1 + > target/s390x/gen-features.c | 1 + > 2 files changed, 2 insertions(+) > > diff --git a/hw/s390x/s390-virtio-ccw.c b/hw/s390x/s390-virtio-ccw.c > index fd9d0b0542..32c5027345 100644 > --- a/hw/s390x/s390-virtio-ccw.c > +++ b/hw/s390x/s390-virtio-ccw.c > @@ -757,6 +757,7 @@ DEFINE_CCW_MACHINE(4_0, "4.0", true); > static void ccw_machine_3_1_instance_options(MachineState *machine) > { > ccw_machine_4_0_instance_options(machine); > + s390_cpudef_featoff_greater(14, 1, S390_FEAT_MULTIPLE_EPOCH); > } > > static void ccw_machine_3_1_class_options(MachineClass *mc) > diff --git a/target/s390x/gen-features.c b/target/s390x/gen-features.c > index 70015eaaf5..d258d67dca 100644 > --- a/target/s390x/gen-features.c > +++ b/target/s390x/gen-features.c > @@ -550,6 +550,7 @@ static uint16_t default_GEN14_GA1[] = { > S390_FEAT_GROUP_MSA_EXT_6, > S390_FEAT_GROUP_MSA_EXT_7, > S390_FEAT_GROUP_MSA_EXT_8, > + S390_FEAT_MULTIPLE_EPOCH, > }; > > /* QEMU (CPU model) features */
On 11.02.2019 09:23, Cornelia Huck wrote: > On Fri, 8 Feb 2019 17:11:10 -0500 > Collin Walling <walling@linux.ibm.com> wrote: > >> Latest systems and host kernels support mepoch, which is a >> feature that was meant to be supported for z14 GA1 from the >> get-go. Let's copy it to the z14 GA1 default CPU model. > > Do older kernels simply not support it, or was there something actively > missing? IOW, is it fine to turn this on with older kernels? Older kernels will not provide the necessary implementation, so mepoch will not work with such older kernel. (So worst case would be that a new qemu+old kernel requires to add mepoch=off to -cpu z14) The idea of this patch is to update QEMU in accordance with newer kernels to use more features by default if people use -cpu z14. Now that I look a 2nd time: shall we also add S390_FEAT_GROUP_MULTIPLE_EPOCH_PTFF ? > > [It's probably all good, although I like to wait for David's ack for > any cpu model patches :)] > >> >> Machines s390-ccw-virtio-3.1 and older will retain the old CPU >> models and will not provide this bit in the default model. >> >> Signed-off-by: Collin Walling <walling@linux.ibm.com> >> --- >> hw/s390x/s390-virtio-ccw.c | 1 + >> target/s390x/gen-features.c | 1 + >> 2 files changed, 2 insertions(+) >> >> diff --git a/hw/s390x/s390-virtio-ccw.c b/hw/s390x/s390-virtio-ccw.c >> index fd9d0b0542..32c5027345 100644 >> --- a/hw/s390x/s390-virtio-ccw.c >> +++ b/hw/s390x/s390-virtio-ccw.c >> @@ -757,6 +757,7 @@ DEFINE_CCW_MACHINE(4_0, "4.0", true); >> static void ccw_machine_3_1_instance_options(MachineState *machine) >> { >> ccw_machine_4_0_instance_options(machine); >> + s390_cpudef_featoff_greater(14, 1, S390_FEAT_MULTIPLE_EPOCH); >> } >> >> static void ccw_machine_3_1_class_options(MachineClass *mc) >> diff --git a/target/s390x/gen-features.c b/target/s390x/gen-features.c >> index 70015eaaf5..d258d67dca 100644 >> --- a/target/s390x/gen-features.c >> +++ b/target/s390x/gen-features.c >> @@ -550,6 +550,7 @@ static uint16_t default_GEN14_GA1[] = { >> S390_FEAT_GROUP_MSA_EXT_6, >> S390_FEAT_GROUP_MSA_EXT_7, >> S390_FEAT_GROUP_MSA_EXT_8, >> + S390_FEAT_MULTIPLE_EPOCH, >> }; >> >> /* QEMU (CPU model) features */ >
On 11.02.19 09:28, Christian Borntraeger wrote: > > > On 11.02.2019 09:23, Cornelia Huck wrote: >> On Fri, 8 Feb 2019 17:11:10 -0500 >> Collin Walling <walling@linux.ibm.com> wrote: >> >>> Latest systems and host kernels support mepoch, which is a >>> feature that was meant to be supported for z14 GA1 from the >>> get-go. Let's copy it to the z14 GA1 default CPU model. >> >> Do older kernels simply not support it, or was there something actively >> missing? IOW, is it fine to turn this on with older kernels? > > Older kernels will not provide the necessary implementation, so mepoch will not > work with such older kernel. (So worst case would be that a new qemu+old kernel > requires to add mepoch=off to -cpu z14) Or use a compat machine. > The idea of this patch is to update QEMU in accordance with newer kernels to use > more features by default if people use -cpu z14. Agreed, this was the original purpose of the default models. Can "break" on old kernels, but the compat machines can help for these users, so it does not really "break". > > Now that I look a 2nd time: shall we also add > S390_FEAT_GROUP_MULTIPLE_EPOCH_PTFF ? I think so. > > >> >> [It's probably all good, although I like to wait for David's ack for >> any cpu model patches :)] I'm fine with this :) With S390_FEAT_GROUP_MULTIPLE_EPOCH_PTFF also added Reviewed-by: David Hildenbrand <david@redhat.com> >> >>> >>> Machines s390-ccw-virtio-3.1 and older will retain the old CPU >>> models and will not provide this bit in the default model. >>> >>> Signed-off-by: Collin Walling <walling@linux.ibm.com> >>> --- >>> hw/s390x/s390-virtio-ccw.c | 1 + >>> target/s390x/gen-features.c | 1 + >>> 2 files changed, 2 insertions(+) >>> >>> diff --git a/hw/s390x/s390-virtio-ccw.c b/hw/s390x/s390-virtio-ccw.c >>> index fd9d0b0542..32c5027345 100644 >>> --- a/hw/s390x/s390-virtio-ccw.c >>> +++ b/hw/s390x/s390-virtio-ccw.c >>> @@ -757,6 +757,7 @@ DEFINE_CCW_MACHINE(4_0, "4.0", true); >>> static void ccw_machine_3_1_instance_options(MachineState *machine) >>> { >>> ccw_machine_4_0_instance_options(machine); >>> + s390_cpudef_featoff_greater(14, 1, S390_FEAT_MULTIPLE_EPOCH); >>> } >>> >>> static void ccw_machine_3_1_class_options(MachineClass *mc) >>> diff --git a/target/s390x/gen-features.c b/target/s390x/gen-features.c >>> index 70015eaaf5..d258d67dca 100644 >>> --- a/target/s390x/gen-features.c >>> +++ b/target/s390x/gen-features.c >>> @@ -550,6 +550,7 @@ static uint16_t default_GEN14_GA1[] = { >>> S390_FEAT_GROUP_MSA_EXT_6, >>> S390_FEAT_GROUP_MSA_EXT_7, >>> S390_FEAT_GROUP_MSA_EXT_8, >>> + S390_FEAT_MULTIPLE_EPOCH, >>> }; >>> >>> /* QEMU (CPU model) features */ >> >
On Mon, 11 Feb 2019 09:55:25 +0100 David Hildenbrand <david@redhat.com> wrote: > On 11.02.19 09:28, Christian Borntraeger wrote: > > > > > > On 11.02.2019 09:23, Cornelia Huck wrote: > >> On Fri, 8 Feb 2019 17:11:10 -0500 > >> Collin Walling <walling@linux.ibm.com> wrote: > >> > >>> Latest systems and host kernels support mepoch, which is a > >>> feature that was meant to be supported for z14 GA1 from the > >>> get-go. Let's copy it to the z14 GA1 default CPU model. > >> > >> Do older kernels simply not support it, or was there something actively > >> missing? IOW, is it fine to turn this on with older kernels? > > > > Older kernels will not provide the necessary implementation, so mepoch will not > > work with such older kernel. (So worst case would be that a new qemu+old kernel > > requires to add mepoch=off to -cpu z14) > > Or use a compat machine. > > > The idea of this patch is to update QEMU in accordance with newer kernels to use > > more features by default if people use -cpu z14. > > Agreed, this was the original purpose of the default models. Can "break" > on old kernels, but the compat machines can help for these users, so it > does not really "break". That seems fine then. > > > > > Now that I look a 2nd time: shall we also add > > S390_FEAT_GROUP_MULTIPLE_EPOCH_PTFF ? > > I think so. > > > > > > >> > >> [It's probably all good, although I like to wait for David's ack for > >> any cpu model patches :)] > > I'm fine with this :) > > With S390_FEAT_GROUP_MULTIPLE_EPOCH_PTFF also added > > Reviewed-by: David Hildenbrand <david@redhat.com> Ok, can I please get a v2 with that added as well? > > >> > >>> > >>> Machines s390-ccw-virtio-3.1 and older will retain the old CPU > >>> models and will not provide this bit in the default model. > >>> > >>> Signed-off-by: Collin Walling <walling@linux.ibm.com> > >>> --- > >>> hw/s390x/s390-virtio-ccw.c | 1 + > >>> target/s390x/gen-features.c | 1 + > >>> 2 files changed, 2 insertions(+) > >>> > >>> diff --git a/hw/s390x/s390-virtio-ccw.c b/hw/s390x/s390-virtio-ccw.c > >>> index fd9d0b0542..32c5027345 100644 > >>> --- a/hw/s390x/s390-virtio-ccw.c > >>> +++ b/hw/s390x/s390-virtio-ccw.c > >>> @@ -757,6 +757,7 @@ DEFINE_CCW_MACHINE(4_0, "4.0", true); > >>> static void ccw_machine_3_1_instance_options(MachineState *machine) > >>> { > >>> ccw_machine_4_0_instance_options(machine); > >>> + s390_cpudef_featoff_greater(14, 1, S390_FEAT_MULTIPLE_EPOCH); > >>> } > >>> > >>> static void ccw_machine_3_1_class_options(MachineClass *mc) > >>> diff --git a/target/s390x/gen-features.c b/target/s390x/gen-features.c > >>> index 70015eaaf5..d258d67dca 100644 > >>> --- a/target/s390x/gen-features.c > >>> +++ b/target/s390x/gen-features.c > >>> @@ -550,6 +550,7 @@ static uint16_t default_GEN14_GA1[] = { > >>> S390_FEAT_GROUP_MSA_EXT_6, > >>> S390_FEAT_GROUP_MSA_EXT_7, > >>> S390_FEAT_GROUP_MSA_EXT_8, > >>> + S390_FEAT_MULTIPLE_EPOCH, > >>> }; > >>> > >>> /* QEMU (CPU model) features */ > >> > > > >
diff --git a/hw/s390x/s390-virtio-ccw.c b/hw/s390x/s390-virtio-ccw.c index fd9d0b0542..32c5027345 100644 --- a/hw/s390x/s390-virtio-ccw.c +++ b/hw/s390x/s390-virtio-ccw.c @@ -757,6 +757,7 @@ DEFINE_CCW_MACHINE(4_0, "4.0", true); static void ccw_machine_3_1_instance_options(MachineState *machine) { ccw_machine_4_0_instance_options(machine); + s390_cpudef_featoff_greater(14, 1, S390_FEAT_MULTIPLE_EPOCH); } static void ccw_machine_3_1_class_options(MachineClass *mc) diff --git a/target/s390x/gen-features.c b/target/s390x/gen-features.c index 70015eaaf5..d258d67dca 100644 --- a/target/s390x/gen-features.c +++ b/target/s390x/gen-features.c @@ -550,6 +550,7 @@ static uint16_t default_GEN14_GA1[] = { S390_FEAT_GROUP_MSA_EXT_6, S390_FEAT_GROUP_MSA_EXT_7, S390_FEAT_GROUP_MSA_EXT_8, + S390_FEAT_MULTIPLE_EPOCH, }; /* QEMU (CPU model) features */
Latest systems and host kernels support mepoch, which is a feature that was meant to be supported for z14 GA1 from the get-go. Let's copy it to the z14 GA1 default CPU model. Machines s390-ccw-virtio-3.1 and older will retain the old CPU models and will not provide this bit in the default model. Signed-off-by: Collin Walling <walling@linux.ibm.com> --- hw/s390x/s390-virtio-ccw.c | 1 + target/s390x/gen-features.c | 1 + 2 files changed, 2 insertions(+)