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 /hw/intc | |
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 'hw/intc')
-rw-r--r-- | hw/intc/s390_flic.c | 3 | ||||
-rw-r--r-- | hw/intc/s390_flic_kvm.c | 3 |
2 files changed, 2 insertions, 4 deletions
diff --git a/hw/intc/s390_flic.c b/hw/intc/s390_flic.c index ff6e4ec..6e7c610 100644 --- a/hw/intc/s390_flic.c +++ b/hw/intc/s390_flic.c @@ -163,9 +163,10 @@ static void s390_flic_common_realize(DeviceState *dev, Error **errp) if (max_batch > ADAPTER_ROUTES_MAX_GSI) { error_setg(errp, "flic property adapter_routes_max_batch too big" " (%d > %d)", max_batch, ADAPTER_ROUTES_MAX_GSI); + return; } - fs->ais_supported = true; + fs->ais_supported = s390_has_feat(S390_FEAT_ADAPTER_INT_SUPPRESSION); } static void s390_flic_class_init(ObjectClass *oc, void *data) diff --git a/hw/intc/s390_flic_kvm.c b/hw/intc/s390_flic_kvm.c index a587ace..d93503f 100644 --- a/hw/intc/s390_flic_kvm.c +++ b/hw/intc/s390_flic_kvm.c @@ -444,7 +444,6 @@ typedef struct KVMS390FLICStateClass { static void kvm_s390_flic_realize(DeviceState *dev, Error **errp) { - S390FLICState *fs = S390_FLIC_COMMON(dev); KVMS390FLICState *flic_state = KVM_S390_FLIC(dev); struct kvm_create_device cd = {0}; struct kvm_device_attr test_attr = {0}; @@ -476,8 +475,6 @@ static void kvm_s390_flic_realize(DeviceState *dev, Error **errp) test_attr.group = KVM_DEV_FLIC_CLEAR_IO_IRQ; flic_state->clear_io_supported = !ioctl(flic_state->fd, KVM_HAS_DEVICE_ATTR, test_attr); - - fs->ais_supported = false; return; fail: error_propagate(errp, errp_local); |