All of lore.kernel.org
 help / color / mirror / Atom feed
* [Qemu-devel] [RFC PATCH 1/1] s390x/css: unresrict cssids
@ 2017-11-21 11:18 Halil Pasic
  2017-11-21 13:44 ` Cornelia Huck
  2017-11-22 11:25 ` Shalini Chellathurai Saroja
  0 siblings, 2 replies; 51+ messages in thread
From: Halil Pasic @ 2017-11-21 11:18 UTC (permalink / raw)
  To: Boris Fiuczynski, Cornelia Huck
  Cc: Dong Jia Shi, Christian Borntraeger, Shalini Chellathurai Saroja,
	qemu-devel, qemu-s390x, Halil Pasic

The default css 0xFE is currently restricted to virtual subchannel
devices. The hope when the decision was made was, that non-virtual
subchannel devices will come around when guest can exploit multiple
channel subsystems. Since the guests generally don't do, the pain
of the partitioned (cssid) namespace outweighs the gain.

Let us remove the corresponding restrictions (virtual devices
can be put only in 0xFE and non-virtual devices in any css except
the 0xFE), and inform management software property on all ccw
devices.

The adverse effect on migration should not be too severe as
vfio-ccw devices are not live-migratable yet, and for virtual
devices using the extra freedom would only make sense with
the aforementioned guest support in place.

Signed-off-by: Halil Pasic <pasic@linux.vnet.ibm.com>
Acked-by: Christian Borntraeger <borntraeger@de.ibm.com>
Reviewed-by: Dong Jia Shi <bjsdjshi@linux.vnet.ibm.com>

---
Hi!

About indicating this at the ccw devices instead of, e.g. as a machine
property (or otherwise globally), was requested by our libvirt guys. I
have no strong opinion regarding in this matter.

This patch is intended as a discussion starter. I would at least like to
get a Tested-by by Shalini before promoting it to non-RFC (provided the
discussion goes well).

TODOs:
* Consider adding a description for the new property.
* Consider renaming VIRTUAL_CSSID.
* Consider changing the bus-id generation scheme (when
devno is not specified by the user). his patch keep the current scheme in
place: they won't go into the default css (but slots are filled up
starting at cssid 0). This is theoretically good for migration
compatibility same command line same addresses.  Practically since there
is no migratable non-virtual ccw device, we should consider using the
same bus-id generation scheme for virtual and non-virtual devices.

---
 hw/s390x/ccw-device.c | 6 ++++++
 hw/s390x/css.c        | 9 ---------
 2 files changed, 6 insertions(+), 9 deletions(-)

diff --git a/hw/s390x/ccw-device.c b/hw/s390x/ccw-device.c
index f9bfa154d6..2167ccea5d 100644
--- a/hw/s390x/ccw-device.c
+++ b/hw/s390x/ccw-device.c
@@ -40,6 +40,10 @@ static Property ccw_device_properties[] = {
     DEFINE_PROP_END_OF_LIST(),
 };
 
+static bool prop_get_true(Object *obj, Error **errp)
+{
+    return true;
+}
 static void ccw_device_class_init(ObjectClass *klass, void *data)
 {
     DeviceClass *dc = DEVICE_CLASS(klass);
@@ -48,6 +52,8 @@ static void ccw_device_class_init(ObjectClass *klass, void *data)
     k->realize = ccw_device_realize;
     k->refill_ids = ccw_device_refill_ids;
     dc->props = ccw_device_properties;
+    object_class_property_add_bool(klass, "cssid-unrestricted",
+                                   prop_get_true, NULL, NULL);
 }
 
 const VMStateDescription vmstate_ccw_dev = {
diff --git a/hw/s390x/css.c b/hw/s390x/css.c
index f6b5c807cd..957cb9ec90 100644
--- a/hw/s390x/css.c
+++ b/hw/s390x/css.c
@@ -2377,15 +2377,6 @@ SubchDev *css_create_sch(CssDevId bus_id, bool is_virtual, bool squash_mcss,
     SubchDev *sch;
 
     if (bus_id.valid) {
-        if (is_virtual != (bus_id.cssid == VIRTUAL_CSSID)) {
-            error_setg(errp, "cssid %hhx not valid for %s devices",
-                       bus_id.cssid,
-                       (is_virtual ? "virtual" : "non-virtual"));
-            return NULL;
-        }
-    }
-
-    if (bus_id.valid) {
         if (squash_mcss) {
             bus_id.cssid = channel_subsys.default_cssid;
         } else if (!channel_subsys.css[bus_id.cssid]) {
-- 
2.13.5

^ permalink raw reply related	[flat|nested] 51+ messages in thread

end of thread, other threads:[~2017-11-30 12:09 UTC | newest]

Thread overview: 51+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-11-21 11:18 [Qemu-devel] [RFC PATCH 1/1] s390x/css: unresrict cssids Halil Pasic
2017-11-21 13:44 ` Cornelia Huck
2017-11-21 14:27   ` Christian Borntraeger
2017-11-21 14:45   ` Christian Borntraeger
2017-11-21 16:06     ` Cornelia Huck
2017-11-21 18:10       ` Christian Borntraeger
2017-11-22 12:18         ` Cornelia Huck
2017-11-21 15:47   ` Halil Pasic
2017-11-21 16:20     ` Cornelia Huck
2017-11-21 17:05       ` Halil Pasic
2017-11-22 12:13         ` Cornelia Huck
2017-11-22 14:45           ` Boris Fiuczynski
2017-11-22 16:25             ` Cornelia Huck
2017-11-23 13:33               ` Halil Pasic
2017-11-24 12:46                 ` Cornelia Huck
2017-11-24 13:01                   ` Christian Borntraeger
2017-11-24 13:27                     ` Cornelia Huck
2017-11-24 14:58                       ` Christian Borntraeger
2017-11-24 15:30                         ` Halil Pasic
2017-11-24 16:15                           ` Cornelia Huck
2017-11-24 16:39                             ` Halil Pasic
2017-11-27  2:20                               ` Dong Jia Shi
2017-11-27 12:58                                 ` Cornelia Huck
2017-11-28  2:10                                   ` Dong Jia Shi
2017-11-27 12:56                               ` Cornelia Huck
2017-11-27 13:11                                 ` Halil Pasic
2017-11-27 13:19                                   ` Cornelia Huck
2017-11-27 14:03                                     ` Christian Borntraeger
2017-11-27 14:38                                       ` Halil Pasic
2017-11-27 14:13                                     ` Halil Pasic
2017-11-27 15:09                                       ` Boris Fiuczynski
2017-11-27 16:56                                         ` Cornelia Huck
2017-11-27 17:34                                           ` Halil Pasic
2017-11-28  2:08                                           ` Dong Jia Shi
2017-11-28  8:53                                           ` Boris Fiuczynski
2017-11-28 10:22                                             ` Cornelia Huck
2017-11-28 11:49                                               ` Boris Fiuczynski
2017-11-28 12:14                                                 ` Cornelia Huck
2017-11-28 12:24                                                   ` Christian Borntraeger
2017-11-28 13:17                                                     ` Halil Pasic
2017-11-28 13:25                                                       ` Christian Borntraeger
2017-11-28 14:01                                                         ` Cornelia Huck
2017-11-28 14:17                                                           ` Christian Borntraeger
2017-11-28 14:45                                                             ` Cornelia Huck
2017-11-29 18:51                                                               ` Christian Borntraeger
2017-11-30  9:50                                                                 ` Cornelia Huck
2017-11-30 12:09                                                                   ` Christian Borntraeger
2017-11-28 14:11                   ` Halil Pasic
2017-11-23 16:09           ` Halil Pasic
2017-11-23 16:59             ` Cornelia Huck
2017-11-22 11:25 ` Shalini Chellathurai Saroja

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.