aboutsummaryrefslogtreecommitdiff
path: root/hw/s390x/virtio-ccw.h
diff options
context:
space:
mode:
authorCornelia Huck <cornelia.huck@de.ibm.com>2015-09-11 15:16:44 +0200
committerMichael S. Tsirkin <mst@redhat.com>2015-09-24 13:42:17 +0300
commit542571d523268357fd8f5b1a523ba2a6191c4c18 (patch)
treef1f2f48686547dd5c1c4ee9501272d34e465621a /hw/s390x/virtio-ccw.h
parentb4f8f9df152fca0e79b7a3ca40a3eea700a40855 (diff)
virtio-ccw: enable virtio-1
Let's enable revision 1 for virtio-ccw devices. We can always offer VERSION_1 as drivers in legacy mode won't be able to see it anyway. We have to introduce a way to set a lower maximum revision for a device to accommodate the following cases: - compat machines (to enforce legacy only) - virtio-blk with scsi support (version 1 + scsi is fenced by common code, with a user-configured max revision of 0 we can allow scsi via not offering VERSION_1) Signed-off-by: Cornelia Huck <cornelia.huck@de.ibm.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.h')
-rw-r--r--hw/s390x/virtio-ccw.h6
1 files changed, 4 insertions, 2 deletions
diff --git a/hw/s390x/virtio-ccw.h b/hw/s390x/virtio-ccw.h
index 692ddd7318..7ab8367baa 100644
--- a/hw/s390x/virtio-ccw.h
+++ b/hw/s390x/virtio-ccw.h
@@ -88,6 +88,7 @@ struct VirtioCcwDevice {
SubchDev *sch;
char *bus_id;
int revision;
+ uint32_t max_rev;
VirtioBusState bus;
bool ioeventfd_started;
bool ioeventfd_disabled;
@@ -102,9 +103,10 @@ struct VirtioCcwDevice {
};
/* The maximum virtio revision we support. */
-static inline int virtio_ccw_rev_max(VirtIODevice *vdev)
+#define VIRTIO_CCW_MAX_REV 1
+static inline int virtio_ccw_rev_max(VirtioCcwDevice *dev)
{
- return 0;
+ return dev->max_rev;
}
/* virtual css bus type */