aboutsummaryrefslogtreecommitdiff
path: root/hw
diff options
context:
space:
mode:
authorPeter Maydell <peter.maydell@linaro.org>2021-05-20 18:42:00 +0100
committerPeter Maydell <peter.maydell@linaro.org>2021-05-20 18:42:00 +0100
commit972e848b53970d12cb2ca64687ef8ff797fb6236 (patch)
treecd58c0c19f2588fa77b2a7ec09e27274908d8403 /hw
parenta1362f392b0aafd197eec0f4f85fd247f7468f2d (diff)
parentf66487756b0553b156d8e3e81bc6411cfc38176e (diff)
downloadqemu-972e848b53970d12cb2ca64687ef8ff797fb6236.zip
qemu-972e848b53970d12cb2ca64687ef8ff797fb6236.tar.gz
qemu-972e848b53970d12cb2ca64687ef8ff797fb6236.tar.bz2
Merge remote-tracking branch 'remotes/cohuck-gitlab/tags/s390x-20210520-v2' into staging
s390x fixes and cleanups; also related fixes in xtensa, arm, and x86 code # gpg: Signature made Thu 20 May 2021 13:23:15 BST # gpg: using RSA key C3D0D66DC3624FF6A8C018CEDECF6B93C6F02FAF # gpg: issuer "cohuck@redhat.com" # gpg: Good signature from "Cornelia Huck <conny@cornelia-huck.de>" [unknown] # gpg: aka "Cornelia Huck <huckc@linux.vnet.ibm.com>" [full] # gpg: aka "Cornelia Huck <cornelia.huck@de.ibm.com>" [full] # gpg: aka "Cornelia Huck <cohuck@kernel.org>" [unknown] # gpg: aka "Cornelia Huck <cohuck@redhat.com>" [unknown] # Primary key fingerprint: C3D0 D66D C362 4FF6 A8C0 18CE DECF 6B93 C6F0 2FAF * remotes/cohuck-gitlab/tags/s390x-20210520-v2: tests/tcg/x86_64: add vsyscall smoke test target/i386: Make sure that vsyscall's tb->size != 0 vfio-ccw: Attempt to clean up all IRQs on error hw/s390x/ccw: Register qbus type in abstract TYPE_CCW_DEVICE parent vfio-ccw: Permit missing IRQs accel/tcg: Assert that tb->size != 0 after translation target/xtensa: Make sure that tb->size != 0 target/arm: Make sure that commpage's tb->size != 0 target/s390x: Fix translation exception on illegal instruction Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'hw')
-rw-r--r--hw/s390x/3270-ccw.c1
-rw-r--r--hw/s390x/ccw-device.c1
-rw-r--r--hw/s390x/ccw-device.h1
-rw-r--r--hw/s390x/s390-ccw.c2
-rw-r--r--hw/s390x/virtio-ccw.c1
-rw-r--r--hw/vfio/ccw.c18
6 files changed, 13 insertions, 11 deletions
diff --git a/hw/s390x/3270-ccw.c b/hw/s390x/3270-ccw.c
index 25e628f..13e93d8 100644
--- a/hw/s390x/3270-ccw.c
+++ b/hw/s390x/3270-ccw.c
@@ -158,7 +158,6 @@ static void emulated_ccw_3270_class_init(ObjectClass *klass, void *data)
DeviceClass *dc = DEVICE_CLASS(klass);
device_class_set_props(dc, emulated_ccw_3270_properties);
- dc->bus_type = TYPE_VIRTUAL_CSS_BUS;
dc->realize = emulated_ccw_3270_realize;
dc->hotpluggable = false;
set_bit(DEVICE_CATEGORY_DISPLAY, dc->categories);
diff --git a/hw/s390x/ccw-device.c b/hw/s390x/ccw-device.c
index c970711..95f269a 100644
--- a/hw/s390x/ccw-device.c
+++ b/hw/s390x/ccw-device.c
@@ -59,6 +59,7 @@ static void ccw_device_class_init(ObjectClass *klass, void *data)
k->refill_ids = ccw_device_refill_ids;
device_class_set_props(dc, ccw_device_properties);
dc->reset = ccw_device_reset;
+ dc->bus_type = TYPE_VIRTUAL_CSS_BUS;
}
const VMStateDescription vmstate_ccw_dev = {
diff --git a/hw/s390x/ccw-device.h b/hw/s390x/ccw-device.h
index 832c78c..6dff952 100644
--- a/hw/s390x/ccw-device.h
+++ b/hw/s390x/ccw-device.h
@@ -14,6 +14,7 @@
#include "qom/object.h"
#include "hw/qdev-core.h"
#include "hw/s390x/css.h"
+#include "hw/s390x/css-bridge.h"
struct CcwDevice {
DeviceState parent_obj;
diff --git a/hw/s390x/s390-ccw.c b/hw/s390x/s390-ccw.c
index 242491a..c227c77 100644
--- a/hw/s390x/s390-ccw.c
+++ b/hw/s390x/s390-ccw.c
@@ -176,10 +176,8 @@ static void s390_ccw_instance_init(Object *obj)
static void s390_ccw_class_init(ObjectClass *klass, void *data)
{
- DeviceClass *dc = DEVICE_CLASS(klass);
S390CCWDeviceClass *cdc = S390_CCW_DEVICE_CLASS(klass);
- dc->bus_type = TYPE_VIRTUAL_CSS_BUS;
cdc->realize = s390_ccw_realize;
cdc->unrealize = s390_ccw_unrealize;
}
diff --git a/hw/s390x/virtio-ccw.c b/hw/s390x/virtio-ccw.c
index 92b950e..220b9ef 100644
--- a/hw/s390x/virtio-ccw.c
+++ b/hw/s390x/virtio-ccw.c
@@ -1234,7 +1234,6 @@ static void virtio_ccw_device_class_init(ObjectClass *klass, void *data)
k->unplug = virtio_ccw_busdev_unplug;
dc->realize = virtio_ccw_busdev_realize;
dc->unrealize = virtio_ccw_busdev_unrealize;
- dc->bus_type = TYPE_VIRTUAL_CSS_BUS;
device_class_set_parent_reset(dc, virtio_ccw_reset, &vdc->parent_reset);
}
diff --git a/hw/vfio/ccw.c b/hw/vfio/ccw.c
index e752c84..139a3d9 100644
--- a/hw/vfio/ccw.c
+++ b/hw/vfio/ccw.c
@@ -411,8 +411,8 @@ static void vfio_ccw_register_irq_notifier(VFIOCCWDevice *vcdev,
}
if (vdev->num_irqs < irq + 1) {
- error_setg(errp, "vfio: unexpected number of irqs %u",
- vdev->num_irqs);
+ error_setg(errp, "vfio: IRQ %u not available (number of irqs %u)",
+ irq, vdev->num_irqs);
return;
}
@@ -469,7 +469,7 @@ static void vfio_ccw_unregister_irq_notifier(VFIOCCWDevice *vcdev,
if (vfio_set_irq_signaling(&vcdev->vdev, irq, 0,
VFIO_IRQ_SET_ACTION_TRIGGER, -1, &err)) {
- error_reportf_err(err, VFIO_MSG_PREFIX, vcdev->vdev.name);
+ warn_reportf_err(err, VFIO_MSG_PREFIX, vcdev->vdev.name);
}
qemu_set_fd_handler(event_notifier_get_fd(notifier),
@@ -689,20 +689,24 @@ static void vfio_ccw_realize(DeviceState *dev, Error **errp)
if (vcdev->crw_region) {
vfio_ccw_register_irq_notifier(vcdev, VFIO_CCW_CRW_IRQ_INDEX, &err);
if (err) {
- goto out_crw_notifier_err;
+ goto out_irq_notifier_err;
}
}
vfio_ccw_register_irq_notifier(vcdev, VFIO_CCW_REQ_IRQ_INDEX, &err);
if (err) {
- goto out_req_notifier_err;
+ /*
+ * Report this error, but do not make it a failing condition.
+ * Lack of this IRQ in the host does not prevent normal operation.
+ */
+ error_report_err(err);
}
return;
-out_req_notifier_err:
+out_irq_notifier_err:
+ vfio_ccw_unregister_irq_notifier(vcdev, VFIO_CCW_REQ_IRQ_INDEX);
vfio_ccw_unregister_irq_notifier(vcdev, VFIO_CCW_CRW_IRQ_INDEX);
-out_crw_notifier_err:
vfio_ccw_unregister_irq_notifier(vcdev, VFIO_CCW_IO_IRQ_INDEX);
out_io_notifier_err:
vfio_ccw_put_region(vcdev);