summaryrefslogtreecommitdiff
path: root/hw/s390x
diff options
context:
space:
mode:
Diffstat (limited to 'hw/s390x')
-rw-r--r--hw/s390x/virtio-ccw.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/hw/s390x/virtio-ccw.c b/hw/s390x/virtio-ccw.c
index 56e4872e11..b857413fa4 100644
--- a/hw/s390x/virtio-ccw.c
+++ b/hw/s390x/virtio-ccw.c
@@ -742,10 +742,16 @@ static void virtio_ccw_notify(DeviceState *d, uint16_t vector)
}
if (vector < VIRTIO_PCI_QUEUE_MAX) {
+ if (!dev->indicators) {
+ return;
+ }
indicators = ldq_phys(dev->indicators);
indicators |= 1ULL << vector;
stq_phys(dev->indicators, indicators);
} else {
+ if (!dev->indicators2) {
+ return;
+ }
vector = 0;
indicators = ldq_phys(dev->indicators2);
indicators |= 1ULL << vector;