On 2026-01-26 13:53, Janosch Frank wrote:
On 1/23/26 12:42, Harald Freudenberger wrote:
Fix missing parts for MSA 9 kdsa and rework the cpacf
handling code so that further extensions can be made in
a clean and structured way.

Signed-off-by: Harald Freudenberger <[email protected]>
[...]
diff --git a/target/s390x/tcg/insn-data.h.inc b/target/s390x/tcg/insn-data.h.inc
index ec730ee091..b6095711f2 100644
--- a/target/s390x/tcg/insn-data.h.inc
+++ b/target/s390x/tcg/insn-data.h.inc
@@ -1012,6 +1012,7 @@
D(0xb92e, KM, RRE, MSA, 0, 0, 0, 0, msa, 0, S390_FEAT_TYPE_KM) D(0xb92f, KMC, RRE, MSA, 0, 0, 0, 0, msa, 0, S390_FEAT_TYPE_KMC) D(0xb929, KMA, RRF_b, MSA8, 0, 0, 0, 0, msa, 0, S390_FEAT_TYPE_KMA) + D(0xb93a, KDSA, RRE, MSA9, 0, 0, 0, 0, msa, 0, S390_FEAT_TYPE_KDSA) E(0xb93c, PPNO, RRE, MSA5, 0, 0, 0, 0, msa, 0, S390_FEAT_TYPE_PPNO, IF_IO)

@Christian:
Is it time to do the rename to PRNO?
According to the architecture we deprecated PPNO in favor of PRNO with
introduction of MSA7.

D(0xb93e, KIMD, RRE, MSA, 0, 0, 0, 0, msa, 0, S390_FEAT_TYPE_KIMD) D(0xb93f, KLMD, RRE, MSA, 0, 0, 0, 0, msa, 0, S390_FEAT_TYPE_KLMD) diff --git a/target/s390x/tcg/translate.c b/target/s390x/tcg/translate.c
index 4d2b8c5e2b..a5fdc05d37 100644
--- a/target/s390x/tcg/translate.c
+++ b/target/s390x/tcg/translate.c
@@ -2565,6 +2565,12 @@ static DisasJumpType op_msa(DisasContext *s, DisasOps *o)
      case S390_FEAT_TYPE_PCKMO:
      case S390_FEAT_TYPE_PCC:
          break;
+    case S390_FEAT_TYPE_KDSA:
+        if (r1) {
+            gen_program_exception(s, PGM_SPECIFICATION);

Are you sure that's a spec?

r1 and the 8 free bits in the instruction should be set to zero but
the architecture doesn't say you'll get a spec if they are not 0.

The architecture reserves the right to use r1 and the free bits for
new function codes. If you don't set them to 0 you might invoke new
functionality that you don't know about.


Yep, you are right. This check is not needed at all.
The code should look like:

       ...
       case S390_FEAT_TYPE_PCKMO:
       case S390_FEAT_TYPE_PCC:
       case S390_FEAT_TYPE_KDSA:
           break;
       ...

+            return DISAS_NORETURN;
+        }
+        break;
      default:
          g_assert_not_reached();
      };
@@ -6018,6 +6024,7 @@ enum DisasInsnEnum {
#define FAC_MSA4 S390_FEAT_MSA_EXT_4 /* msa-extension-4 facility */ #define FAC_MSA5 S390_FEAT_MSA_EXT_5 /* msa-extension-5 facility */ #define FAC_MSA8 S390_FEAT_MSA_EXT_8 /* msa-extension-8 facility */ +#define FAC_MSA9 S390_FEAT_MSA_EXT_9 /* msa-extension-9 facility */
  #define FAC_ECT         S390_FEAT_EXTRACT_CPU_TIME
  #define FAC_PCI         S390_FEAT_ZPCI /* z/PCI facility */
  #define FAC_AIS         S390_FEAT_ADAPTER_INT_SUPPRESSION

Reply via email to