From 2a79eb1a616a07b0e8c41430f03af254fefe219d Mon Sep 17 00:00:00 2001 From: Cornelia Huck Date: Mon, 11 Jul 2016 12:55:44 +0200 Subject: s390x/css: provide a dev_path for css devices We need to implement the get_dev_path method for the css bus, or else we might end up with two different devices having the same qdev_path. This was noticed when adding two scsi_hd controllers: The SCSIBus code will produce a non-unique dev_path for vmstate usage if the parent bus does not provide the get_dev_path method. We simply use the device's bus id, as this is unique and we won't have any deeper hierarchy from a channel subsystem perspective anyway. Note that we need to disable this for older machine versions, as this changes the migration format. Reported-by: Marc Hartmayer Reviewed-by: Halil Pasic Reviewed-by: Sascha Silbe Tested-by: Marc Hartmayer Signed-off-by: Cornelia Huck --- include/hw/s390x/css-bridge.h | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'include/hw/s390x/css-bridge.h') diff --git a/include/hw/s390x/css-bridge.h b/include/hw/s390x/css-bridge.h index ad73c1faf6..5a0203be5f 100644 --- a/include/hw/s390x/css-bridge.h +++ b/include/hw/s390x/css-bridge.h @@ -16,7 +16,14 @@ #include "hw/qdev-core.h" /* virtual css bridge */ +typedef struct VirtualCssBridge { + SysBusDevice sysbus_dev; + bool css_dev_path; +} VirtualCssBridge; + #define TYPE_VIRTUAL_CSS_BRIDGE "virtual-css-bridge" +#define VIRTUAL_CSS_BRIDGE(obj) \ + OBJECT_CHECK(VirtualCssBridge, (obj), TYPE_VIRTUAL_CSS_BRIDGE) /* virtual css bus type */ typedef struct VirtualCssBus { -- cgit v1.2.3-55-g7522