• R/O
  • HTTP
  • SSH
  • HTTPS

Commit

Tags
No Tags

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

Commit MetaInfo

Revisióncaef62430fed6e732d3e43d76752d165cf02ad67 (tree)
Tiempo2019-05-21 23:59:16
AutorChristian Borntraeger <borntraeger@de.i...>
CommiterCornelia Huck

Log Message

s390x/cpumodel: add gen15 defintions

add several new features (msa9, sort, deflate, additional vector
instructions, new general purpose instructions) to generation 15.

Also disable csske and bpb from the default and base models >=15.
This will allow to migrate gen15 machines to future machines that
do not have these features.

Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com>
Message-Id: <20190429090250.7648-9-borntraeger@de.ibm.com>
Reviewed-by: David Hildenbrand <david@redhat.com>
Signed-off-by: Cornelia Huck <cohuck@redhat.com>

Cambiar Resumen

Diferencia incremental

--- a/target/s390x/gen-features.c
+++ b/target/s390x/gen-features.c
@@ -13,6 +13,7 @@
1313
1414 #include <inttypes.h>
1515 #include <stdio.h>
16+#include <string.h>
1617 #include "cpu_features_def.h"
1718
1819 #define ARRAY_SIZE(array) (sizeof(array) / sizeof(array[0]))
@@ -419,6 +420,10 @@ static uint16_t base_GEN14_GA1[] = {
419420
420421 #define base_GEN14_GA2 EmptyFeat
421422
423+static uint16_t base_GEN15_GA1[] = {
424+ S390_FEAT_MISC_INSTRUCTION_EXT3,
425+};
426+
422427 /* Full features (in order of release)
423428 * Automatically includes corresponding base features.
424429 * Full features are all features this hardware supports even if kvm/QEMU do not
@@ -548,6 +553,16 @@ static uint16_t full_GEN14_GA1[] = {
548553
549554 #define full_GEN14_GA2 EmptyFeat
550555
556+static uint16_t full_GEN15_GA1[] = {
557+ S390_FEAT_VECTOR_ENH2,
558+ S390_FEAT_GROUP_ENH_SORT,
559+ S390_FEAT_GROUP_DEFLATE_CONVERSION,
560+ S390_FEAT_VECTOR_BCD_ENH,
561+ S390_FEAT_GROUP_MSA_EXT_9,
562+ S390_FEAT_GROUP_MSA_EXT_9_PCKMO,
563+ S390_FEAT_ETOKEN,
564+};
565+
551566 /* Default features (in order of release)
552567 * Automatically includes corresponding base features.
553568 * Default features are all features this version of QEMU supports for this
@@ -624,6 +639,16 @@ static uint16_t default_GEN14_GA1[] = {
624639
625640 #define default_GEN14_GA2 EmptyFeat
626641
642+static uint16_t default_GEN15_GA1[] = {
643+ S390_FEAT_VECTOR_ENH2,
644+ S390_FEAT_GROUP_ENH_SORT,
645+ S390_FEAT_GROUP_DEFLATE_CONVERSION,
646+ S390_FEAT_VECTOR_BCD_ENH,
647+ S390_FEAT_GROUP_MSA_EXT_9,
648+ S390_FEAT_GROUP_MSA_EXT_9_PCKMO,
649+ S390_FEAT_ETOKEN,
650+};
651+
627652 /* QEMU (CPU model) features */
628653
629654 static uint16_t qemu_V2_11[] = {
@@ -740,6 +765,7 @@ static CpuFeatDefSpec CpuFeatDef[] = {
740765 CPU_FEAT_INITIALIZER(GEN13_GA2),
741766 CPU_FEAT_INITIALIZER(GEN14_GA1),
742767 CPU_FEAT_INITIALIZER(GEN14_GA2),
768+ CPU_FEAT_INITIALIZER(GEN15_GA1),
743769 };
744770
745771 #define FEAT_GROUP_INITIALIZER(_name) \
@@ -808,6 +834,11 @@ static void set_bits(uint64_t list[], BitSpec bits)
808834 }
809835 }
810836
837+static inline void clear_bit(uint64_t list[], unsigned long nr)
838+{
839+ list[nr / 64] &= ~(1ULL << (nr % 64));
840+}
841+
811842 static void print_feature_defs(void)
812843 {
813844 uint64_t base_feat[S390_FEAT_MAX / 64 + 1] = {};
@@ -818,6 +849,12 @@ static void print_feature_defs(void)
818849 printf("\n/* CPU model feature list data */\n");
819850
820851 for (i = 0; i < ARRAY_SIZE(CpuFeatDef); i++) {
852+ /* With gen15 CSSKE and BPB are deprecated */
853+ if (strcmp(CpuFeatDef[i].name, "S390_FEAT_LIST_GEN15_GA1") == 0) {
854+ clear_bit(base_feat, S390_FEAT_CONDITIONAL_SSKE);
855+ clear_bit(default_feat, S390_FEAT_CONDITIONAL_SSKE);
856+ clear_bit(default_feat, S390_FEAT_BPB);
857+ }
821858 set_bits(base_feat, CpuFeatDef[i].base_bits);
822859 /* add the base to the default features */
823860 set_bits(default_feat, CpuFeatDef[i].base_bits);