From e61cc6b5c6909fa69059036bb910ef1725dc7f90 Mon Sep 17 00:00:00 2001 From: Halil Pasic Date: Fri, 9 Dec 2016 13:51:46 +0100 Subject: s390x: add property adapter_routes_max_batch To make virtio-ccw supports more that 64 virtqueues we will have to increase ADAPTER_ROUTES_MAX_GSI which is currently limiting the number if possible adapter routes. Of course increasing the number of supported routes can break backwards migration. Let us introduce a compatibility property adapter_routes_max_batch so client code can use the some old limit if in compatibility mode and retain the migration compatibility. Signed-off-by: Halil Pasic Signed-off-by: Cornelia Huck --- include/hw/s390x/s390_flic.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'include') diff --git a/include/hw/s390x/s390_flic.h b/include/hw/s390x/s390_flic.h index 9094eda..9f0b05c 100644 --- a/include/hw/s390x/s390_flic.h +++ b/include/hw/s390x/s390_flic.h @@ -32,6 +32,8 @@ typedef struct AdapterRoutes { typedef struct S390FLICState { SysBusDevice parent_obj; + /* to limit AdapterRoutes.num_routes for compat */ + uint32_t adapter_routes_max_batch; } S390FLICState; -- cgit v1.1 From 069097dad311ac9c6933d95ebee7c0b53b3378c4 Mon Sep 17 00:00:00 2001 From: Halil Pasic Date: Fri, 9 Dec 2016 20:00:21 +0100 Subject: s390x: bump ADAPTER_ROUTES_MAX_GSI Let's increase ADAPTER_ROUTES_MAX_GSI to VIRTIO_QUEUE_MAX which is the largest demand foreseeable at the moment. Let us add a compatibility macro for the previous machines so client code can maintain backwards migration compatibility To not mess up migration compatibility for virtio-ccw VIRTIO_CCW_QUEUE_MAX is left at it's current value, and will be dropped when virtio-ccw is converted to use the capability of the flic introduced by this patch. Signed-off-by: Halil Pasic Signed-off-by: Cornelia Huck --- include/hw/s390x/s390_flic.h | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'include') diff --git a/include/hw/s390x/s390_flic.h b/include/hw/s390x/s390_flic.h index 9f0b05c..7f8ec75 100644 --- a/include/hw/s390x/s390_flic.h +++ b/include/hw/s390x/s390_flic.h @@ -17,8 +17,14 @@ #include "hw/s390x/adapter.h" #include "hw/virtio/virtio.h" -#define ADAPTER_ROUTES_MAX_GSI 64 -#define VIRTIO_CCW_QUEUE_MAX ADAPTER_ROUTES_MAX_GSI +/* + * Reserve enough gsis to accommodate all virtio devices. + * If any other user of adapter routes needs more of these, + * we need to bump the value; but virtio looks like the + * maximum right now. + */ +#define ADAPTER_ROUTES_MAX_GSI VIRTIO_QUEUE_MAX +#define VIRTIO_CCW_QUEUE_MAX 64 typedef struct AdapterRoutes { AdapterInfo adapter; -- cgit v1.1 From b1914b824ade1706847428e64ef5637ffc0ae238 Mon Sep 17 00:00:00 2001 From: Halil Pasic Date: Mon, 7 Dec 2015 16:45:17 +0100 Subject: virtio-ccw: support VIRTIO_QUEUE_MAX virtqueues The maximal number of virtqueues per device can be limited on a per transport basis. For virtio-ccw this limit is defined by VIRTIO_CCW_QUEUE_MAX, however the limitation used to come form the number of adapter routes supported by flic (via notifiers). Recently the limitation of the flic was adjusted so that it can accommodate VIRTIO_QUEUE_MAX queues, and is in the meanwhile checked for separately too. Let us remove the transport specific limitation of virtio-ccw by dropping VIRTIO_CCW_QUEUE_MAX and using VIRTIO_QUEUE_MAX instead. Signed-off-by: Halil Pasic Signed-off-by: Cornelia Huck --- include/hw/s390x/s390_flic.h | 1 - 1 file changed, 1 deletion(-) (limited to 'include') diff --git a/include/hw/s390x/s390_flic.h b/include/hw/s390x/s390_flic.h index 7f8ec75..f9e6890 100644 --- a/include/hw/s390x/s390_flic.h +++ b/include/hw/s390x/s390_flic.h @@ -24,7 +24,6 @@ * maximum right now. */ #define ADAPTER_ROUTES_MAX_GSI VIRTIO_QUEUE_MAX -#define VIRTIO_CCW_QUEUE_MAX 64 typedef struct AdapterRoutes { AdapterInfo adapter; -- cgit v1.1