aboutsummaryrefslogtreecommitdiff
path: root/hw/s390x
diff options
context:
space:
mode:
authorFei Li <sherrylf@linux.vnet.ibm.com>2017-03-07 04:07:44 +0100
committerChristian Borntraeger <borntraeger@de.ibm.com>2017-07-14 12:29:47 +0200
commit1497c1606615b0b08d1b1f78afd1dcf2585879c0 (patch)
tree5ba92e116e000e53a888f1fae001cfccabd1e0c9 /hw/s390x
parentc9ad8a7a53b9f167626a32fe7c1116f8844156db (diff)
downloadqemu-1497c1606615b0b08d1b1f78afd1dcf2585879c0.zip
qemu-1497c1606615b0b08d1b1f78afd1dcf2585879c0.tar.gz
qemu-1497c1606615b0b08d1b1f78afd1dcf2585879c0.tar.bz2
s390x: add flags field for registering I/O adapter
Introduce a new 'flags' field to IoAdapter to contain further characteristics of the adapter, like whether the adapter is subject to adapter-interruption suppression. For the kvm case, pass this value in the 'flags' field when registering an adapter. Signed-off-by: Fei Li <sherrylf@linux.vnet.ibm.com> Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com>
Diffstat (limited to 'hw/s390x')
-rw-r--r--hw/s390x/css-bridge.c2
-rw-r--r--hw/s390x/css.c8
-rw-r--r--hw/s390x/s390-pci-bus.c3
3 files changed, 9 insertions, 4 deletions
diff --git a/hw/s390x/css-bridge.c b/hw/s390x/css-bridge.c
index 823747f..c4a9735 100644
--- a/hw/s390x/css-bridge.c
+++ b/hw/s390x/css-bridge.c
@@ -110,7 +110,7 @@ VirtualCssBus *virtual_css_bus_init(void)
qbus_set_hotplug_handler(bus, dev, &error_abort);
css_register_io_adapters(CSS_IO_ADAPTER_VIRTIO, true, false,
- &error_abort);
+ 0, &error_abort);
return cbus;
}
diff --git a/hw/s390x/css.c b/hw/s390x/css.c
index d67fffa..1fcbc84 100644
--- a/hw/s390x/css.c
+++ b/hw/s390x/css.c
@@ -225,6 +225,7 @@ typedef struct IoAdapter {
uint32_t id;
uint8_t type;
uint8_t isc;
+ uint8_t flags;
} IoAdapter;
typedef struct ChannelSubSys {
@@ -392,10 +393,12 @@ uint32_t css_get_adapter_id(CssIoAdapterType type, uint8_t isc)
*
* @swap: an indication if byte swap is needed.
* @maskable: an indication if the adapter is subject to the mask operation.
+ * @flags: further characteristics of the adapter.
+ * e.g. suppressible, an indication if the adapter is subject to AIS.
* @errp: location to store error information.
*/
void css_register_io_adapters(CssIoAdapterType type, bool swap, bool maskable,
- Error **errp)
+ uint8_t flags, Error **errp)
{
uint32_t id;
int ret, isc;
@@ -413,12 +416,13 @@ void css_register_io_adapters(CssIoAdapterType type, bool swap, bool maskable,
for (isc = 0; isc <= MAX_ISC; isc++) {
id = (type << 3) | isc;
- ret = fsc->register_io_adapter(fs, id, isc, swap, maskable);
+ ret = fsc->register_io_adapter(fs, id, isc, swap, maskable, flags);
if (ret == 0) {
adapter = g_new0(IoAdapter, 1);
adapter->id = id;
adapter->isc = isc;
adapter->type = type;
+ adapter->flags = flags;
channel_subsys.io_adapters[type][isc] = adapter;
} else {
error_setg_errno(errp, -ret, "Unexpected error %d when "
diff --git a/hw/s390x/s390-pci-bus.c b/hw/s390x/s390-pci-bus.c
index 5651483..b9603e7 100644
--- a/hw/s390x/s390-pci-bus.c
+++ b/hw/s390x/s390-pci-bus.c
@@ -582,7 +582,8 @@ static int s390_pcihost_init(SysBusDevice *dev)
QTAILQ_INIT(&s->pending_sei);
QTAILQ_INIT(&s->zpci_devs);
- css_register_io_adapters(CSS_IO_ADAPTER_PCI, true, false, &error_abort);
+ css_register_io_adapters(CSS_IO_ADAPTER_PCI, true, false,
+ S390_ADAPTER_SUPPRESSIBLE, &error_abort);
return 0;
}