Skip to contentSkip to conversation

s390x/cpumodel: add stfl197 processor-activity-instrumentation extension 1

PATCH In review Christian Borntraeger 3 participants 3 messages Jul 27, 2022 – Aug 23, 2022

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 s390x/cpumodel: add stfl197 processor-activity-instrumentation extension 1

Add stfle 197 (processor-activity-instrumentation extension 1) to the gen16 default model and fence it off for 7.1 and older.

---
v1->v2:
- this is on top of "hw: Add compat machines for 7.2" from Cornelia Huck (please queue afterwards)
- move fencing to 7.1

 hw/s390x/s390-virtio-ccw.c          | 1 +
 target/s390x/cpu_features_def.h.inc | 1 +
 target/s390x/gen-features.c         | 2 ++
 3 files changed, 4 insertions(+)
hw/s390x/s390-virtio-ccw.c +1 -0
index bf1b36d824..9a2467c889 100644
@@ -804,6 +804,7 @@ DEFINE_CCW_MACHINE(7_2, "7.2", true);
 static void ccw_machine_7_1_instance_options(MachineState *machine)
 {
     ccw_machine_7_2_instance_options(machine);
+    s390_cpudef_featoff_greater(16, 1, S390_FEAT_PAIE);
 }
 
 static void ccw_machine_7_1_class_options(MachineClass *mc)
target/s390x/cpu_features_def.h.inc +1 -0
index 3603e5fb12..e3cfe63735 100644
@@ -114,6 +114,7 @@ DEF_FEAT(VECTOR_PACKED_DECIMAL_ENH2, "vxpdeh2", STFL, 192, "Vector-Packed-Decima
 DEF_FEAT(BEAR_ENH, "beareh", STFL, 193, "BEAR-enhancement facility")
 DEF_FEAT(RDP, "rdp", STFL, 194, "Reset-DAT-protection facility")
 DEF_FEAT(PAI, "pai", STFL, 196, "Processor-Activity-Instrumentation facility")
+DEF_FEAT(PAIE, "paie", STFL, 197, "Processor-Activity-Instrumentation extension-1")
 
 /* Features exposed via SCLP SCCB Byte 80 - 98  (bit numbers relative to byte-80) */
 DEF_FEAT(SIE_GSLS, "gsls", SCLP_CONF_CHAR, 40, "SIE: Guest-storage-limit-suppression facility")
target/s390x/gen-features.c +2 -0
index ad140184b9..1558c52626 100644
@@ -575,6 +575,7 @@ static uint16_t full_GEN16_GA1[] = {
     S390_FEAT_BEAR_ENH,
     S390_FEAT_RDP,
     S390_FEAT_PAI,
+    S390_FEAT_PAIE,
 };
 
 
@@ -669,6 +670,7 @@ static uint16_t default_GEN16_GA1[] = {
     S390_FEAT_BEAR_ENH,
     S390_FEAT_RDP,
     S390_FEAT_PAI,
+    S390_FEAT_PAIE,
 };
 
 /* QEMU (CPU model) features */
Signature · 1 line
2.34.1
Acked-by on v2 1/1
#1 lore raw
Quoted 11 lines · Christian Borntraeger

Add stfle 197 (processor-activity-instrumentation extension 1) to the gen16 default model and fence it off for 7.1 and older.

---
v1->v2:
- this is on top of "hw: Add compat machines for 7.2" from Cornelia Huck (please queue afterwards)
- move fencing to 7.1

Quoted 4 lines
 hw/s390x/s390-virtio-ccw.c          | 1 +
 target/s390x/cpu_features_def.h.inc | 1 +
 target/s390x/gen-features.c         | 2 ++
 3 files changed, 4 insertions(+)
#2 lore raw
In reply to Christian Borntraeger
Quoted 11 lines · Christian Borntraeger

Add stfle 197 (processor-activity-instrumentation extension 1) to the gen16 default model and fence it off for 7.1 and older.

---
v1->v2:
- this is on top of "hw: Add compat machines for 7.2" from Cornelia Huck (please queue afterwards)
- move fencing to 7.1

Quoted 4 lines
  hw/s390x/s390-virtio-ccw.c          | 1 +
  target/s390x/cpu_features_def.h.inc | 1 +
  target/s390x/gen-features.c         | 2 ++
  3 files changed, 4 insertions(+)

Thanks, queue (together with Cornelia's patch) to my s390x-next branch:

https://gitlab.com/thuth/qemu/-/commits/s390x-next/

Thomas