aboutsummaryrefslogtreecommitdiff
path: root/target/s390x/cpu_models.c
diff options
context:
space:
mode:
authorTony Krowiak <akrowiak@linux.ibm.com>2018-10-10 13:03:04 -0400
committerCornelia Huck <cohuck@redhat.com>2018-10-12 11:32:18 +0200
commitc5cd17afddda89376712b315a41ede96b034e4c2 (patch)
treeb89d83fa910d4ba71b20691ba0ef5705296ffd4b /target/s390x/cpu_models.c
parent8f3cd250a897213d39e621e3d824507b48158d42 (diff)
s390x/cpumodel: Set up CPU model for AP device support
A new CPU model feature and two new CPU model facilities are introduced to support AP devices for a KVM guest. CPU model features: 1. The S390_FEAT_AP CPU model feature indicates whether AP instructions are available to the guest. This feature will be enabled only if the AP instructions are available on the linux host as determined by the availability of the KVM_S390_VM_CRYPTO_ENABLE_APIE VM attribute which is exposed by KVM only if the AP instructions are available on the host. This feature must be turned on from userspace to execute AP instructions on the KVM guest. The QEMU command line to turn this feature on looks something like this: qemu-system-s390x ... -cpu xxx,ap=on ... This feature will be supported for zEC12 and newer CPU models. The feature will not be supported for older models because there are few older systems on which to test and the older crypto cards will be going out of service in the relatively near future. CPU model facilities: 1. The S390_FEAT_AP_QUERY_CONFIG_INFO feature indicates whether the AP Query Configuration Information (QCI) facility is available to the guest as determined by whether the facility is available on the host. This feature will be exposed by KVM only if the QCI facility is installed on the host. 2. The S390_FEAT_AP_FACILITY_TEST feature indicates whether the AP Facility Test (APFT) facility is available to the guest as determined by whether the facility is available on the host. This feature will be exposed by KVM only if APFT is installed on the host. Signed-off-by: Tony Krowiak <akrowiak@linux.ibm.com> Tested-by: Pierre Morel <pmorel@linux.ibm.com> Reviewed-by: David Hildenbrand <david@redhat.com> Reviewed-by: Halil Pasic <pasic@linux.ibm.com> Reviewed-by: Christian Borntraeger <borntraeger@de.ibm.com> Tested-by: Christian Borntraeger <borntraeger@de.ibm.com> Message-Id: <20181010170309.12045-3-akrowiak@linux.ibm.com> Signed-off-by: Cornelia Huck <cohuck@redhat.com>
Diffstat (limited to 'target/s390x/cpu_models.c')
-rw-r--r--target/s390x/cpu_models.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/target/s390x/cpu_models.c b/target/s390x/cpu_models.c
index 265d25c937..7c253ff308 100644
--- a/target/s390x/cpu_models.c
+++ b/target/s390x/cpu_models.c
@@ -786,6 +786,8 @@ static void check_consistency(const S390CPUModel *model)
{ S390_FEAT_PRNO_TRNG_QRTCR, S390_FEAT_MSA_EXT_5 },
{ S390_FEAT_PRNO_TRNG, S390_FEAT_MSA_EXT_5 },
{ S390_FEAT_SIE_KSS, S390_FEAT_SIE_F2 },
+ { S390_FEAT_AP_QUERY_CONFIG_INFO, S390_FEAT_AP },
+ { S390_FEAT_AP_FACILITIES_TEST, S390_FEAT_AP },
};
int i;