aboutsummaryrefslogtreecommitdiff
path: root/target/s390x/cpu_features.c
diff options
context:
space:
mode:
authorDavid Hildenbrand <david@redhat.com>2017-07-20 14:37:18 +0200
committerCornelia Huck <cohuck@redhat.com>2017-07-25 09:17:42 +0200
commitcc18f90762412c657a37a17809be9613ac7f0b00 (patch)
tree61031cae9161937ccbc34d792330066ec5c2ede8 /target/s390x/cpu_features.c
parentf026fcd192dbb63925847fad6c301375b2df59f3 (diff)
target/s390x: indicate query subfunction in s390_fill_feat_block
We'll have to do the same for TCG, so let's just move it in there. Reviewed-by: Christian Borntraeger <borntraeger@de.ibm.com> Signed-off-by: David Hildenbrand <david@redhat.com> Message-Id: <20170720123721.12366-3-david@redhat.com> Signed-off-by: Cornelia Huck <cohuck@redhat.com>
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) {