diff options
author | Cornelia Huck <cohuck@redhat.com> | 2017-07-06 17:21:52 +0200 |
---|---|---|
committer | Cornelia Huck <cohuck@redhat.com> | 2017-08-30 18:23:25 +0200 |
commit | d32bd032d8fde41281aae34c16a4aa97e9acfeac (patch) | |
tree | 9a80bec5cd8a8496c57be0373acfb23155d91b73 /hw | |
parent | 21eb052cf2934fcf94e671f0a84d596874538459 (diff) | |
download | qemu-d32bd032d8fde41281aae34c16a4aa97e9acfeac.zip qemu-d32bd032d8fde41281aae34c16a4aa97e9acfeac.tar.gz qemu-d32bd032d8fde41281aae34c16a4aa97e9acfeac.tar.bz2 |
s390x/ccw: create s390 phb conditionally
Don't create the s390 pci host bridge if we do not provide the zpci
facility.
Reviewed-by: Thomas Huth <thuth@redhat.com>
Acked-by: Christian Borntraeger <borntraeger@de.ibm.com>
Signed-off-by: Cornelia Huck <cohuck@redhat.com>
Diffstat (limited to 'hw')
-rw-r--r-- | hw/s390x/s390-virtio-ccw.c | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/hw/s390x/s390-virtio-ccw.c b/hw/s390x/s390-virtio-ccw.c index d3d67b8..8331c0a 100644 --- a/hw/s390x/s390-virtio-ccw.c +++ b/hw/s390x/s390-virtio-ccw.c @@ -118,12 +118,11 @@ static void ccw_init(MachineState *machine) { int ret; VirtualCssBus *css_bus; - DeviceState *dev; s390_sclp_init(); s390_memory_init(machine->ram_size); - /* init CPUs */ + /* init CPUs (incl. CPU model) early so s390_has_feature() works */ s390_init_cpus(machine); s390_flic_init(); @@ -134,10 +133,13 @@ static void ccw_init(MachineState *machine) machine->initrd_filename, "s390-ccw.img", "s390-netboot.img", true); - dev = qdev_create(NULL, TYPE_S390_PCI_HOST_BRIDGE); - object_property_add_child(qdev_get_machine(), TYPE_S390_PCI_HOST_BRIDGE, - OBJECT(dev), NULL); - qdev_init_nofail(dev); + if (s390_has_feat(S390_FEAT_ZPCI)) { + DeviceState *dev = qdev_create(NULL, TYPE_S390_PCI_HOST_BRIDGE); + object_property_add_child(qdev_get_machine(), + TYPE_S390_PCI_HOST_BRIDGE, + OBJECT(dev), NULL); + qdev_init_nofail(dev); + } /* register hypercalls */ virtio_ccw_register_hcalls(); |