mirror of
https://github.com/xemu-project/xemu.git
synced 2024-11-23 19:49:43 +00:00
s390x: always provide pci support
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>
This commit is contained in:
parent
44699e1c94
commit
09ced81aac
@ -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
|
||||
|
@ -1,77 +0,0 @@
|
||||
/* stubs for non-pci builds */
|
||||
|
||||
#include "qemu/osdep.h"
|
||||
#include "qemu-common.h"
|
||||
#include "cpu.h"
|
||||
#include "s390-pci-inst.h"
|
||||
#include "s390-pci-bus.h"
|
||||
|
||||
/* target/s390x/ioinst.c */
|
||||
int pci_chsc_sei_nt2_get_event(void *res)
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
|
||||
int pci_chsc_sei_nt2_have_event(void)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* hw/s390x/sclp.c */
|
||||
void s390_pci_sclp_configure(SCCB *sccb)
|
||||
{
|
||||
sccb->h.response_code = cpu_to_be16(SCLP_RC_ADAPTER_TYPE_NOT_RECOGNIZED);
|
||||
}
|
||||
|
||||
void s390_pci_sclp_deconfigure(SCCB *sccb)
|
||||
{
|
||||
sccb->h.response_code = cpu_to_be16(SCLP_RC_ADAPTER_TYPE_NOT_RECOGNIZED);
|
||||
}
|
||||
|
||||
/* target/s390x/kvm.c */
|
||||
int clp_service_call(S390CPU *cpu, uint8_t r2)
|
||||
{
|
||||
return -1;
|
||||
}
|
||||
|
||||
int pcilg_service_call(S390CPU *cpu, uint8_t r1, uint8_t r2)
|
||||
{
|
||||
return -1;
|
||||
}
|
||||
|
||||
int pcistg_service_call(S390CPU *cpu, uint8_t r1, uint8_t r2)
|
||||
{
|
||||
return -1;
|
||||
}
|
||||
|
||||
int stpcifc_service_call(S390CPU *cpu, uint8_t r1, uint64_t fiba, uint8_t ar)
|
||||
{
|
||||
return -1;
|
||||
}
|
||||
|
||||
int rpcit_service_call(S390CPU *cpu, uint8_t r1, uint8_t r2)
|
||||
{
|
||||
return -1;
|
||||
}
|
||||
|
||||
int pcistb_service_call(S390CPU *cpu, uint8_t r1, uint8_t r3, uint64_t gaddr,
|
||||
uint8_t ar)
|
||||
{
|
||||
return -1;
|
||||
}
|
||||
|
||||
int mpcifc_service_call(S390CPU *cpu, uint8_t r1, uint64_t fiba, uint8_t ar)
|
||||
{
|
||||
return -1;
|
||||
}
|
||||
|
||||
S390pciState *s390_get_phb(void)
|
||||
{
|
||||
return NULL;
|
||||
}
|
||||
|
||||
S390PCIBusDevice *s390_pci_find_dev_by_target(S390pciState *s,
|
||||
const char *target)
|
||||
{
|
||||
return NULL;
|
||||
}
|
@ -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);
|
||||
|
@ -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);
|
||||
|
@ -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,
|
||||
};
|
||||
|
||||
|
@ -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)) {
|
||||
|
Loading…
Reference in New Issue
Block a user