aboutsummaryrefslogtreecommitdiff
path: root/target/s390x/cpu_features.c
diff options
context:
space:
mode:
Diffstat (limited to 'target/s390x/cpu_features.c')
-rw-r--r--target/s390x/cpu_features.c31
1 files changed, 26 insertions, 5 deletions
diff --git a/target/s390x/cpu_features.c b/target/s390x/cpu_features.c
index fa887d9b6f..8b1491734f 100644
--- a/target/s390x/cpu_features.c
+++ b/target/s390x/cpu_features.c
@@ -336,11 +336,32 @@ void s390_fill_feat_block(const S390FeatBitmap features, S390FeatType type,
S390Feat feat;
int bit_nr;
- if (type == S390_FEAT_TYPE_STFL && test_bit(S390_FEAT_ZARCH, features)) {
- /* Features that are always active */
- data[0] |= 0x20; /* z/Architecture */
- data[17] |= 0x20; /* Configuration-z-architectural-mode */
- }
+ switch (type) {
+ case S390_FEAT_TYPE_STFL:
+ if (test_bit(S390_FEAT_ZARCH, features)) {
+ /* Features that are always active */
+ data[0] |= 0x20; /* z/Architecture */
+ data[17] |= 0x20; /* Configuration-z-architectural-mode */
+ }
+ break;
+ case S390_FEAT_TYPE_PTFF:
+ case S390_FEAT_TYPE_KMAC:
+ case S390_FEAT_TYPE_KMC:
+ case S390_FEAT_TYPE_KM:
+ case S390_FEAT_TYPE_KIMD:
+ case S390_FEAT_TYPE_KLMD:
+ case S390_FEAT_TYPE_PCKMO:
+ case S390_FEAT_TYPE_KMCTR:
+ case S390_FEAT_TYPE_KMF:
+ case S390_FEAT_TYPE_KMO:
+ case S390_FEAT_TYPE_PCC:
+ case S390_FEAT_TYPE_PPNO:
+ case S390_FEAT_TYPE_KMA:
+ data[0] |= 0x80; /* query is always available */
+ break;
+ default:
+ break;
+ };
feat = find_first_bit(features, S390_FEAT_MAX);
while (feat < S390_FEAT_MAX) {