summaryrefslogtreecommitdiff
path: root/target/s390x/kvm.c
diff options
context:
space:
mode:
authorJason J. Herne <jjherne@linux.vnet.ibm.com>2017-04-13 10:28:41 -0400
committerChristian Borntraeger <borntraeger@de.ibm.com>2017-07-14 12:29:49 +0200
commit6da5c593bb2c27cef5fbfc4b37342bbf66133cc1 (patch)
treef9656dcebf461b0a263e27b5b98a387356b95787 /target/s390x/kvm.c
parente7be8d499700f1ebdbfe8094aa19237998c0e1e3 (diff)
downloadqemu-6da5c593bb2c27cef5fbfc4b37342bbf66133cc1.zip
s390x/cpumodel: wire up new hardware features
Some new guest features have been introduced recently. Let's wire them up in the CPU model. Signed-off-by: Jason J. Herne <jjherne@linux.vnet.ibm.com> Acked-by: Christian Borntraeger <borntraeger@de.ibm.com> Acked-by: Cornelia Huck <cohuck@redhat.com> Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com> [split patch]
Diffstat (limited to 'target/s390x/kvm.c')
-rw-r--r--target/s390x/kvm.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/target/s390x/kvm.c b/target/s390x/kvm.c
index 1901153c58..3a80f1fc49 100644
--- a/target/s390x/kvm.c
+++ b/target/s390x/kvm.c
@@ -2447,6 +2447,9 @@ static int query_cpu_subfunc(S390FeatBitmap features)
if (test_bit(S390_FEAT_MSA_EXT_5, features)) {
s390_add_from_feat_block(features, S390_FEAT_TYPE_PPNO, prop.ppno);
}
+ if (test_bit(S390_FEAT_MSA_EXT_8, features)) {
+ s390_add_from_feat_block(features, S390_FEAT_TYPE_KMA, prop.kma);
+ }
return 0;
}
@@ -2500,6 +2503,10 @@ static int configure_cpu_subfunc(const S390FeatBitmap features)
s390_fill_feat_block(features, S390_FEAT_TYPE_PPNO, prop.ppno);
prop.ppno[0] |= 0x80; /* query is always available */
}
+ if (test_bit(S390_FEAT_MSA_EXT_8, features)) {
+ s390_fill_feat_block(features, S390_FEAT_TYPE_KMA, prop.kma);
+ prop.kma[0] |= 0x80; /* query is always available */
+ }
return kvm_vm_ioctl(kvm_state, KVM_SET_DEVICE_ATTR, &attr);
}
@@ -2636,6 +2643,9 @@ void kvm_s390_get_host_cpu_model(S390CPUModel *model, Error **errp)
/* with cpu model support, CMM is only indicated if really available */
if (kvm_s390_cmma_available()) {
set_bit(S390_FEAT_CMM, model->features);
+ } else {
+ /* no cmm -> no cmm nt */
+ clear_bit(S390_FEAT_CMM_NT, model->features);
}
/* set zpci and aen facilities */