• R/O
  • HTTP
  • SSH
  • HTTPS

コミット

タグ
未設定

よく使われているワード(クリックで追加)

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

コミットメタ情報

リビジョンd220fabf16091ca5c26f3313541bdfb7435d6a08 (tree)
日時2019-05-21 23:59:16
作者Christian Borntraeger <borntraeger@de.i...>
コミッターCornelia Huck

ログメッセージ

s390x/cpumodel: enhanced sort facility

add the enhanced sort facility.

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

変更サマリ

差分

--- a/target/s390x/cpu_features.c
+++ b/target/s390x/cpu_features.c
@@ -109,6 +109,7 @@ static const S390FeatDef s390_features[] = {
109109 FEAT_INIT("msa8-base", S390_FEAT_TYPE_STFL, 146, "Message-security-assist-extension-8 facility (excluding subfunctions)"),
110110 FEAT_INIT("cmmnt", S390_FEAT_TYPE_STFL, 147, "CMM: ESSA-enhancement (no translate) facility"),
111111 FEAT_INIT("vxeh2", S390_FEAT_TYPE_STFL, 148, "Vector Enhancements facility 2"),
112+ FEAT_INIT("esort-base", S390_FEAT_TYPE_STFL, 150, "Enhanced-sort facility (excluding subfunctions)"),
112113 FEAT_INIT("vxbeh", S390_FEAT_TYPE_STFL, 152, "Vector BCD enhancements facility 1"),
113114 FEAT_INIT("msa9-base", S390_FEAT_TYPE_STFL, 155, "Message-security-assist-extension-9 facility (excluding subfunctions)"),
114115 FEAT_INIT("etoken", S390_FEAT_TYPE_STFL, 156, "Etoken facility"),
@@ -340,6 +341,12 @@ static const S390FeatDef s390_features[] = {
340341 FEAT_INIT("kdsa-eddsa-sign-ed448", S390_FEAT_TYPE_KDSA, 44, "KDSA EdDSA-Sign-Ed448"),
341342 FEAT_INIT("kdsa-eeddsa-sign-ed25519", S390_FEAT_TYPE_KDSA, 48, "KDSA Encrypted-EdDSA-Sign-Ed25519"),
342343 FEAT_INIT("kdsa-eeddsa-sign-ed448", S390_FEAT_TYPE_KDSA, 52, "KDSA Encrypted-EdDSA-Sign-Ed448"),
344+
345+ FEAT_INIT("sortl-sflr", S390_FEAT_TYPE_SORTL, 1, "SORTL SFLR"),
346+ FEAT_INIT("sortl-svlr", S390_FEAT_TYPE_SORTL, 2, "SORTL SVLR"),
347+ FEAT_INIT("sortl-32", S390_FEAT_TYPE_SORTL, 130, "SORTL 32 input lists"),
348+ FEAT_INIT("sortl-128", S390_FEAT_TYPE_SORTL, 132, "SORTL 128 input lists"),
349+ FEAT_INIT("sortl-f0", S390_FEAT_TYPE_SORTL, 192, "SORTL format 0 parameter-block"),
343350 };
344351
345352 const S390FeatDef *s390_feat_def(S390Feat feat)
@@ -403,6 +410,7 @@ void s390_fill_feat_block(const S390FeatBitmap features, S390FeatType type,
403410 case S390_FEAT_TYPE_PPNO:
404411 case S390_FEAT_TYPE_KMA:
405412 case S390_FEAT_TYPE_KDSA:
413+ case S390_FEAT_TYPE_SORTL:
406414 set_be_bit(0, data); /* query is always available */
407415 break;
408416 default:
@@ -430,6 +438,7 @@ void s390_add_from_feat_block(S390FeatBitmap features, S390FeatType type,
430438 nr_bits = 16384;
431439 break;
432440 case S390_FEAT_TYPE_PLO:
441+ case S390_FEAT_TYPE_SORTL:
433442 nr_bits = 256;
434443 break;
435444 default:
@@ -501,6 +510,7 @@ static S390FeatGroupDef s390_feature_groups[] = {
501510 FEAT_GROUP_INIT("msa9", MSA_EXT_9, "Message-security-assist-extension 9 facility"),
502511 FEAT_GROUP_INIT("msa9_pckmo", MSA_EXT_9_PCKMO, "Message-security-assist-extension 9 PCKMO subfunctions"),
503512 FEAT_GROUP_INIT("mepochptff", MULTIPLE_EPOCH_PTFF, "PTFF enhancements introduced with Multiple-epoch facility"),
513+ FEAT_GROUP_INIT("esort", ENH_SORT, "Enhanced-sort facility"),
504514 };
505515
506516 const S390FeatGroupDef *s390_feat_group_def(S390FeatGroup group)
--- a/target/s390x/cpu_features.h
+++ b/target/s390x/cpu_features.h
@@ -40,6 +40,7 @@ typedef enum {
4040 S390_FEAT_TYPE_PPNO,
4141 S390_FEAT_TYPE_KMA,
4242 S390_FEAT_TYPE_KDSA,
43+ S390_FEAT_TYPE_SORTL,
4344 } S390FeatType;
4445
4546 /* Definition of a CPU feature */
--- a/target/s390x/cpu_features_def.h
+++ b/target/s390x/cpu_features_def.h
@@ -97,6 +97,7 @@ typedef enum {
9797 S390_FEAT_MSA_EXT_8,
9898 S390_FEAT_CMM_NT,
9999 S390_FEAT_VECTOR_ENH2,
100+ S390_FEAT_ESORT_BASE,
100101 S390_FEAT_VECTOR_BCD_ENH,
101102 S390_FEAT_MSA_EXT_9,
102103 S390_FEAT_ETOKEN,
@@ -346,6 +347,13 @@ typedef enum {
346347 S390_FEAT_EEDDSA_SIGN_ED25519,
347348 S390_FEAT_EEDDSA_SIGN_ED448,
348349
350+ /* SORTL */
351+ S390_FEAT_SORTL_SFLR,
352+ S390_FEAT_SORTL_SVLR,
353+ S390_FEAT_SORTL_32,
354+ S390_FEAT_SORTL_128,
355+ S390_FEAT_SORTL_F0,
356+
349357 S390_FEAT_MAX,
350358 } S390Feat;
351359
--- a/target/s390x/gen-features.c
+++ b/target/s390x/gen-features.c
@@ -245,6 +245,15 @@
245245 S390_FEAT_PCKMO_ECC_ED25519, \
246246 S390_FEAT_PCKMO_ECC_ED448
247247
248+#define S390_FEAT_GROUP_ENH_SORT \
249+ S390_FEAT_ESORT_BASE, \
250+ S390_FEAT_SORTL_SFLR, \
251+ S390_FEAT_SORTL_SVLR, \
252+ S390_FEAT_SORTL_32, \
253+ S390_FEAT_SORTL_128, \
254+ S390_FEAT_SORTL_F0
255+
256+
248257 /* cpu feature groups */
249258 static uint16_t group_PLO[] = {
250259 S390_FEAT_GROUP_PLO,
@@ -294,6 +303,10 @@ static uint16_t group_MSA_EXT_9_PCKMO[] = {
294303 S390_FEAT_GROUP_MSA_EXT_9_PCKMO,
295304 };
296305
306+static uint16_t group_ENH_SORT[] = {
307+ S390_FEAT_GROUP_ENH_SORT,
308+};
309+
297310 /* Base features (in order of release)
298311 * Only non-hypervisor managed features belong here.
299312 * Base feature sets are static meaning they do not change in future QEMU
@@ -752,6 +765,7 @@ static FeatGroupDefSpec FeatGroupDef[] = {
752765 FEAT_GROUP_INITIALIZER(MSA_EXT_9),
753766 FEAT_GROUP_INITIALIZER(MSA_EXT_9_PCKMO),
754767 FEAT_GROUP_INITIALIZER(MULTIPLE_EPOCH_PTFF),
768+ FEAT_GROUP_INITIALIZER(ENH_SORT),
755769 };
756770
757771 #define QEMU_FEAT_INITIALIZER(_name) \
--- a/target/s390x/kvm.c
+++ b/target/s390x/kvm.c
@@ -2076,6 +2076,9 @@ static int query_cpu_subfunc(S390FeatBitmap features)
20762076 if (test_bit(S390_FEAT_MSA_EXT_9, features)) {
20772077 s390_add_from_feat_block(features, S390_FEAT_TYPE_KDSA, prop.kdsa);
20782078 }
2079+ if (test_bit(S390_FEAT_ESORT_BASE, features)) {
2080+ s390_add_from_feat_block(features, S390_FEAT_TYPE_SORTL, prop.sortl);
2081+ }
20792082 return 0;
20802083 }
20812084
@@ -2123,6 +2126,9 @@ static int configure_cpu_subfunc(const S390FeatBitmap features)
21232126 if (test_bit(S390_FEAT_MSA_EXT_9, features)) {
21242127 s390_fill_feat_block(features, S390_FEAT_TYPE_KDSA, prop.kdsa);
21252128 }
2129+ if (test_bit(S390_FEAT_ESORT_BASE, features)) {
2130+ s390_fill_feat_block(features, S390_FEAT_TYPE_SORTL, prop.sortl);
2131+ }
21262132 return kvm_vm_ioctl(kvm_state, KVM_SET_DEVICE_ATTR, &attr);
21272133 }
21282134