diff options
author | Yi Min Zhao <zyimin@linux.vnet.ibm.com> | 2017-06-14 13:25:58 +0800 |
---|---|---|
committer | Christian Borntraeger <borntraeger@de.ibm.com> | 2017-07-14 12:29:49 +0200 |
commit | 3b00f702c236900cca403bdcbed48d59bfec0fba (patch) | |
tree | cede66702508caac3cbd3974135aadcc59e23a72 /target/s390x/kvm.c | |
parent | 3720d3356d47aedf2f66b6586011661a7eeb0222 (diff) | |
download | qemu-3b00f702c236900cca403bdcbed48d59bfec0fba.zip qemu-3b00f702c236900cca403bdcbed48d59bfec0fba.tar.gz qemu-3b00f702c236900cca403bdcbed48d59bfec0fba.tar.bz2 |
s390x/cpumodel: add zpci, aen and ais facilities
zPCI instructions and facilities are available since IBM zEnterprise
EC12. To support z/PCI in QEMU we enable zpci, aen and ais facilities
starting with zEC12 GA1. And we always set zpci and aen bits in max cpu
model. Later they might be switched off due to applied real cpu model.
For ais bit, we only provide it in the full cpu model beginning with
zEC12 and defer its enablement in the default cpu model to a later point
in time. At the same time, disable them for 2.9 and older machines.
Because of introducing AIS facility, we could check if it's enabled to
initialize flic->ais_supported with the real value.
Signed-off-by: Yi Min Zhao <zyimin@linux.vnet.ibm.com>
Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com>
Reviewed-by: Cornelia Huck <cohuck@redhat.com>
Diffstat (limited to 'target/s390x/kvm.c')
-rw-r--r-- | target/s390x/kvm.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/target/s390x/kvm.c b/target/s390x/kvm.c index 78ebe83..1901153 100644 --- a/target/s390x/kvm.c +++ b/target/s390x/kvm.c @@ -302,6 +302,9 @@ int kvm_arch_init(MachineState *ms, KVMState *s) } } + /* Try to enable AIS facility */ + kvm_vm_enable_cap(s, KVM_CAP_S390_AIS, 0); + qemu_mutex_init(&qemu_sigp_mutex); return 0; @@ -2635,6 +2638,10 @@ void kvm_s390_get_host_cpu_model(S390CPUModel *model, Error **errp) set_bit(S390_FEAT_CMM, model->features); } + /* set zpci and aen facilities */ + set_bit(S390_FEAT_ZPCI, model->features); + set_bit(S390_FEAT_ADAPTER_EVENT_NOTIFICATION, model->features); + if (s390_known_cpu_type(cpu_type)) { /* we want the exact model, even if some features are missing */ model->def = s390_find_cpu_def(cpu_type, ibc_gen(unblocked_ibc), |