aboutsummaryrefslogtreecommitdiff
path: root/hw/s390x/virtio-ccw.c
diff options
context:
space:
mode:
authorPaolo Bonzini <pbonzini@redhat.com>2016-10-21 22:48:04 +0200
committerMichael S. Tsirkin <mst@redhat.com>2016-10-30 19:51:31 +0200
commitca2b413c39b5cb2412bc236ddf3aa22d96594feb (patch)
treea6e5044c7bcb0cc48e96a0ef7f39c7fb6c2a4c09 /hw/s390x/virtio-ccw.c
parent019518a80e24af8fcc14689a1fdfde50c5488d2d (diff)
virtio: disable ioeventfd as early as possible
Avoid "tricking" virtio-blk-dataplane into thinking that ioeventfd will be available when it is not. This bug has always been there, but it will break TCG+ioeventfd=on once the dataplane code will be always used when ioeventfd=on. Reviewed-by: Cornelia Huck <cornelia.huck@de.ibm.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Diffstat (limited to 'hw/s390x/virtio-ccw.c')
-rw-r--r--hw/s390x/virtio-ccw.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/hw/s390x/virtio-ccw.c b/hw/s390x/virtio-ccw.c
index ee136ab940..31304fe7f9 100644
--- a/hw/s390x/virtio-ccw.c
+++ b/hw/s390x/virtio-ccw.c
@@ -709,6 +709,10 @@ static void virtio_ccw_device_realize(VirtioCcwDevice *dev, Error **errp)
sch->cssid, sch->ssid, sch->schid, sch->devno,
ccw_dev->bus_id.valid ? "user-configured" : "auto-configured");
+ if (!kvm_eventfds_enabled()) {
+ dev->flags &= ~VIRTIO_CCW_FLAG_USE_IOEVENTFD;
+ }
+
if (k->realize) {
k->realize(dev, &err);
}
@@ -1311,10 +1315,6 @@ static void virtio_ccw_device_plugged(DeviceState *d, Error **errp)
return;
}
- if (!kvm_eventfds_enabled()) {
- dev->flags &= ~VIRTIO_CCW_FLAG_USE_IOEVENTFD;
- }
-
sch->id.cu_model = virtio_bus_get_vdev_id(&dev->bus);