s390x/cpumodel: default enable mepoch for z14 and later
PATCH 1/2 s390x/cpumodel: default enable mepoch for z14 and later
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.
--- hw/s390x/s390-virtio-ccw.c | 1 + target/s390x/gen-features.c | 1 + 2 files changed, 2 insertions(+)
hw/s390x/s390-virtio-ccw.c +1 -0
@@ -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)
target/s390x/gen-features.c +1 -0
@@ -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 */
Signature · 1 line
2.20.1
PATCH 2/2 s390x/cpumodel: add z14 GA2 model
Introduce the z14 GA2 cpu model for QEMU. There are no new features introduced with this model, and will inherit the same feature set as z14 GA1.
--- target/s390x/cpu_models.c | 1 + target/s390x/gen-features.c | 7 +++++++ 2 files changed, 8 insertions(+)
target/s390x/cpu_models.c +1 -0
@@ -79,6 +79,7 @@ static S390CPUDef s390_cpu_defs[] = {CPUDEF_INIT (0x2964 ,13 ,2 ,47 ,0x08000000U ,"z13.2" ,"IBM z13 GA2" ),CPUDEF_INIT (0x2965 ,13 ,2 ,47 ,0x08000000U ,"z13s" ,"IBM z13s GA1" ),CPUDEF_INIT (0x3906 ,14 ,1 ,47 ,0x08000000U ,"z14" ,"IBM z14 GA1" ), +CPUDEF_INIT (0x3906 ,14 ,2 ,47 ,0x08000000U ,"z14.2" ,"IBM z14 GA2" ), CPUDEF_INIT(0x3907, 14, 1, 47, 0x08000000U, "z14ZR1", "IBM z14 Model ZR1 GA1"), };
target/s390x/gen-features.c +7 -0
@@ -353,6 +353,8 @@ static uint16_t base_GEN14_GA1[] = { S390_FEAT_ORDER_PRESERVING_COMPRESSION, }; +#define base_GEN14_GA2 EmptyFeat +/* Full features (in order of release) * Automatically includes corresponding base features. * Full features are all features this hardware supports even if kvm/QEMU do not
@@ -480,6 +482,8 @@ static uint16_t full_GEN14_GA1[] = { S390_FEAT_GROUP_MULTIPLE_EPOCH_PTFF, }; +#define full_GEN14_GA2 EmptyFeat +/* Default features (in order of release) * Automatically includes corresponding base features. * Default features are all features this version of QEMU supports for this
@@ -553,6 +557,8 @@ static uint16_t default_GEN14_GA1[] = { S390_FEAT_MULTIPLE_EPOCH, }; +#define default_GEN14_GA2 EmptyFeat +/* QEMU (CPU model) features */ static uint16_t qemu_V2_11[] = {
@@ -661,6 +667,7 @@ static CpuFeatDefSpec CpuFeatDef[] = {CPU_FEAT_INITIALIZER (GEN13_GA1 ),CPU_FEAT_INITIALIZER (GEN13_GA2 ),CPU_FEAT_INITIALIZER (GEN14_GA1 ), + CPU_FEAT_INITIALIZER(GEN14_GA2), };#define FEAT_GROUP_INITIALIZER (_name) \
Signature · 1 line
2.20.1
Quoted 8 lines · Collin Walling
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 <[email protected]>
Yes, we missed that back then for the intial z14 version as the kernel and qemu parts were added later.
Quoted 30 lines
--- hw/s390x/s390-virtio-ccw.c | 1 + target/s390x/gen-features.c | 1 + 2 files changed, 2 insertions(+)hw/s390x/s390-virtio-ccw.c +1
-0@@ -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)target/s390x/gen-features.c +1
-0@@ -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 */
Re: [Qemu-devel] [qemu-s390x] [PATCH 2/2] s390x/cpumodel: add z14 GA2 model
In reply to Collin WallingQuoted 5 lines · Collin Walling
Introduce the z14 GA2 cpu model for QEMU. There are no new features introduced with this model, and will inherit the same feature set as z14 GA1.
Signed-off-by Collin Walling <[email protected]>
Quoted 57 lines
--- target/s390x/cpu_models.c | 1 + target/s390x/gen-features.c | 7 +++++++ 2 files changed, 8 insertions(+)target/s390x/cpu_models.c +1
-0@@ -79,6 +79,7 @@ static S390CPUDef s390_cpu_defs[] = {CPUDEF_INIT (0x2964 ,13 ,2 ,47 ,0x08000000U ,"z13.2" ,"IBM z13 GA2" ),CPUDEF_INIT (0x2965 ,13 ,2 ,47 ,0x08000000U ,"z13s" ,"IBM z13s GA1" ),CPUDEF_INIT (0x3906 ,14 ,1 ,47 ,0x08000000U ,"z14" ,"IBM z14 GA1" ), +CPUDEF_INIT (0x3906 ,14 ,2 ,47 ,0x08000000U ,"z14.2" ,"IBM z14 GA2" ), CPUDEF_INIT(0x3907, 14, 1, 47, 0x08000000U, "z14ZR1", "IBM z14 Model ZR1 GA1"), };target/s390x/gen-features.c +7
-0@@ -353,6 +353,8 @@ static uint16_t base_GEN14_GA1[] = { S390_FEAT_ORDER_PRESERVING_COMPRESSION, }; +#define base_GEN14_GA2 EmptyFeat +/* Full features (in order of release) * Automatically includes corresponding base features. * Full features are all features this hardware supports even if kvm/QEMU do not @@ -480,6 +482,8 @@ static uint16_t full_GEN14_GA1[] = { S390_FEAT_GROUP_MULTIPLE_EPOCH_PTFF, }; +#define full_GEN14_GA2 EmptyFeat +/* Default features (in order of release) * Automatically includes corresponding base features. * Default features are all features this version of QEMU supports for this @@ -553,6 +557,8 @@ static uint16_t default_GEN14_GA1[] = { S390_FEAT_MULTIPLE_EPOCH, }; +#define default_GEN14_GA2 EmptyFeat +/* QEMU (CPU model) features */ static uint16_t qemu_V2_11[] = {@@ -661,6 +667,7 @@ static CpuFeatDefSpec CpuFeatDef[] = {CPU_FEAT_INITIALIZER (GEN13_GA1 ),CPU_FEAT_INITIALIZER (GEN13_GA2 ),CPU_FEAT_INITIALIZER (GEN14_GA1 ), + CPU_FEAT_INITIALIZER(GEN14_GA2), };#define FEAT_GROUP_INITIALIZER (_name) \
Quoted 3 lines · On Fri, 8 Feb 2019 17:11:10 -0500 Collin Walling <[email protected]> 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 :)]
Quoted 34 lines
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 <[email protected]>--- hw/s390x/s390-virtio-ccw.c | 1 + target/s390x/gen-features.c | 1 + 2 files changed, 2 insertions(+)hw/s390x/s390-virtio-ccw.c +1
-0@@ -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)target/s390x/gen-features.c +1
-0@@ -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 */
Quoted 9 lines · Cornelia Huck
Quoted 3 lines · On Fri, 8 Feb 2019 17:11:10 -0500 Collin Walling <[email protected]> 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 addS390_FEAT_GROUP_MULTIPLE_EPOCH_PTFF ?
Quoted 39 lines
[It's probably all good, although I like to wait for David's ack for any cpu model patches :)]
Quoted 34 lines
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 <[email protected]>--- hw/s390x/s390-virtio-ccw.c | 1 + target/s390x/gen-features.c | 1 + 2 files changed, 2 insertions(+)hw/s390x/s390-virtio-ccw.c +1
-0@@ -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)target/s390x/gen-features.c +1
-0@@ -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 */
Re: [Qemu-devel] [PATCH 2/2] s390x/cpumodel: add z14 GA2 model
In reply to Collin WallingQuoted 55 lines · Collin Walling
Introduce the z14 GA2 cpu model for QEMU. There are no new features introduced with this model, and will inherit the same feature set as z14 GA1.
Signed-off-by Collin Walling <[email protected]>--- target/s390x/cpu_models.c | 1 + target/s390x/gen-features.c | 7 +++++++ 2 files changed, 8 insertions(+)target/s390x/cpu_models.c +1
-0@@ -79,6 +79,7 @@ static S390CPUDef s390_cpu_defs[] = {CPUDEF_INIT (0x2964 ,13 ,2 ,47 ,0x08000000U ,"z13.2" ,"IBM z13 GA2" ),CPUDEF_INIT (0x2965 ,13 ,2 ,47 ,0x08000000U ,"z13s" ,"IBM z13s GA1" ),CPUDEF_INIT (0x3906 ,14 ,1 ,47 ,0x08000000U ,"z14" ,"IBM z14 GA1" ), +CPUDEF_INIT (0x3906 ,14 ,2 ,47 ,0x08000000U ,"z14.2" ,"IBM z14 GA2" ), CPUDEF_INIT(0x3907, 14, 1, 47, 0x08000000U, "z14ZR1", "IBM z14 Model ZR1 GA1"), };target/s390x/gen-features.c +6
-0@@ -353,6 +353,8 @@ static uint16_t base_GEN14_GA1[] = { S390_FEAT_ORDER_PRESERVING_COMPRESSION, }; +#define base_GEN14_GA2 EmptyFeat +/* Full features (in order of release) * Automatically includes corresponding base features. * Full features are all features this hardware supports even if kvm/QEMU do not @@ -480,6 +482,8 @@ static uint16_t full_GEN14_GA1[] = { S390_FEAT_GROUP_MULTIPLE_EPOCH_PTFF, }; +#define full_GEN14_GA2 EmptyFeat +/* Default features (in order of release) * Automatically includes corresponding base features. * Default features are all features this version of QEMU supports for this @@ -553,6 +557,8 @@ static uint16_t default_GEN14_GA1[] = { S390_FEAT_MULTIPLE_EPOCH, }; +#define default_GEN14_GA2 EmptyFeat +/* QEMU (CPU model) features */ static uint16_t qemu_V2_11[] = {
target/s390x/gen-features.c static CpuFeatDefSpec CpuFeatDef[] = { · line 673
Quoted 7 lines
target/s390x/gen-features.c +1
-0@@ -661,6 +667,7 @@ static CpuFeatDefSpec CpuFeatDef[] = {CPU_FEAT_INITIALIZER (GEN13_GA1 ),CPU_FEAT_INITIALIZER (GEN13_GA2 ),CPU_FEAT_INITIALIZER (GEN14_GA1 ), + CPU_FEAT_INITIALIZER(GEN14_GA2), };#define FEAT_GROUP_INITIALIZER (_name) \
Signature · 3 lines
Thanks, David / dhildenb
David Hildenbrand
Reviewed-byQuoted 10 lines · Christian Borntraeger
Quoted 7 lines · Cornelia Huck
Quoted 3 lines · On Fri, 8 Feb 2019 17:11:10 -0500 Collin Walling <[email protected]> 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.
Quoted 6 lines
Quoted 2 lines
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.
Quoted 2 lines
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".
Quoted 3 lines
Now that I look a 2nd time: shall we also add
S390_FEAT_GROUP_MULTIPLE_EPOCH_PTFF?
I think so.
Quoted 5 lines
Quoted 5 lines
[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
Quoted 37 lines
Quoted 36 lines
Quoted 35 lines
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 <[email protected]>--- hw/s390x/s390-virtio-ccw.c | 1 + target/s390x/gen-features.c | 1 + 2 files changed, 2 insertions(+)hw/s390x/s390-virtio-ccw.c +1
-0@@ -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)target/s390x/gen-features.c +1
-0@@ -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 */
Signature · 3 lines
Thanks, David / dhildenb
Quoted 18 lines · On Mon, 11 Feb 2019 09:55:25 +0100 David Hildenbrand <[email protected]> wrote:
Quoted 10 lines · Christian Borntraeger
Quoted 7 lines · Cornelia Huck
Quoted 3 lines · On Fri, 8 Feb 2019 17:11:10 -0500 Collin Walling <[email protected]> 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.
Quoted 6 lines
Quoted 2 lines
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)
Quoted 8 lines
Or use a compat machine.
Quoted 2 lines
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.
Quoted 10 lines
Quoted 4 lines
Now that I look a 2nd time: shall we also add
S390_FEAT_GROUP_MULTIPLE_EPOCH_PTFF?I think so.
Quoted 3 lines
Quoted 3 lines
Quoted 8 lines
Quoted 2 lines
Quoted 2 lines
[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_PTFFalso addedReviewed-by David Hildenbrand <[email protected]>
Ok, can I please get a v2 with that added as well?
Quoted 40 lines
Quoted 38 lines
Quoted 37 lines
Quoted 36 lines
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 <[email protected]>--- hw/s390x/s390-virtio-ccw.c | 1 + target/s390x/gen-features.c | 1 + 2 files changed, 2 insertions(+)hw/s390x/s390-virtio-ccw.c +1
-0@@ -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)target/s390x/gen-features.c +1
-0@@ -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 */