Skip to content

Commit

Permalink
s390x: always provide pci support
Browse files Browse the repository at this point in the history
We tried to make pci support optional on s390x in the past;
unfortunately, we still require the s390 phb to be created
unconditionally due to backwards compatibility issues.

Instead of sinking more effort into this (including compat
handling for older machines etc.) for non-obvious gains, let's
just make CONFIG_PCI something that is always set on s390x.

Note that you can still fence off pci for the _guest_ if you
provide a cpu model without the zpci feature.

Message-Id: <20190211113255.3837-1-cohuck@redhat.com>
Reviewed-by: Thomas Huth <thuth@redhat.com>
Reviewed-by: David Hildenbrand <david@redhat.com>
Acked-by: Christian Borntraeger <borntraeger@de.ibm.com>
Signed-off-by: Cornelia Huck <cohuck@redhat.com>
  • Loading branch information
cohuck committed Feb 18, 2019
1 parent 44699e1 commit 09ced81
Show file tree
Hide file tree
Showing 6 changed files with 2 additions and 92 deletions.
3 changes: 1 addition & 2 deletions hw/s390x/Makefile.objs
Expand Up @@ -21,8 +21,7 @@ obj-$(call land,$(CONFIG_VIRTIO_9P),$(CONFIG_VIRTFS)) += virtio-ccw-9p.o
obj-$(CONFIG_VHOST_VSOCK) += vhost-vsock-ccw.o
obj-y += css-bridge.o
obj-y += ccw-device.o
obj-$(CONFIG_PCI) += s390-pci-bus.o s390-pci-inst.o
obj-$(call lnot,$(CONFIG_PCI)) += s390-pci-stub.o
obj-y += s390-pci-bus.o s390-pci-inst.o
obj-y += s390-skeys.o
obj-y += s390-stattrib.o
obj-y += tod.o
Expand Down
77 changes: 0 additions & 77 deletions hw/s390x/s390-pci-stub.c

This file was deleted.

4 changes: 0 additions & 4 deletions hw/s390x/s390-virtio-ccw.c
Expand Up @@ -272,10 +272,6 @@ static void ccw_init(MachineState *machine)
machine->initrd_filename, "s390-ccw.img",
"s390-netboot.img", true);

/*
* We cannot easily make the pci host bridge conditional as older QEMUs
* always created it. Doing so would break migration across QEMU versions.
*/
dev = qdev_create(NULL, TYPE_S390_PCI_HOST_BRIDGE);
object_property_add_child(qdev_get_machine(), TYPE_S390_PCI_HOST_BRIDGE,
OBJECT(dev), NULL);
Expand Down
5 changes: 0 additions & 5 deletions target/s390x/cpu_models.c
Expand Up @@ -1314,11 +1314,6 @@ static void register_types(void)

/* init all bitmaps from gnerated data initially */
s390_init_feat_bitmap(qemu_max_cpu_feat_init, qemu_max_cpu_feat);
#ifndef CONFIG_USER_ONLY
if (!pci_available) {
clear_bit(S390_FEAT_ZPCI, qemu_max_cpu_feat);
}
#endif
for (i = 0; i < ARRAY_SIZE(s390_cpu_defs); i++) {
s390_init_feat_bitmap(s390_cpu_defs[i].base_init,
s390_cpu_defs[i].base_feat);
Expand Down
1 change: 0 additions & 1 deletion target/s390x/gen-features.c
Expand Up @@ -598,7 +598,6 @@ static uint16_t qemu_MAX[] = {
S390_FEAT_STFLE_53,
/* generates a dependency warning, leave it out for now */
S390_FEAT_MSA_EXT_5,
/* only with CONFIG_PCI */
S390_FEAT_ZPCI,
};

Expand Down
4 changes: 1 addition & 3 deletions target/s390x/kvm.c
Expand Up @@ -2278,9 +2278,7 @@ void kvm_s390_get_host_cpu_model(S390CPUModel *model, Error **errp)
}

/* We emulate a zPCI bus and AEN, therefore we don't need HW support */
if (pci_available) {
set_bit(S390_FEAT_ZPCI, model->features);
}
set_bit(S390_FEAT_ZPCI, model->features);
set_bit(S390_FEAT_ADAPTER_EVENT_NOTIFICATION, model->features);

if (s390_known_cpu_type(cpu_type)) {
Expand Down

0 comments on commit 09ced81

Please sign in to comment.