2a79eb1a61
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 <mhartmay@linux.vnet.ibm.com> Reviewed-by: Halil Pasic <pasic@linux.vnet.ibm.com> Reviewed-by: Sascha Silbe <silbe@linux.vnet.ibm.com> Tested-by: Marc Hartmayer <mhartmay@linux.vnet.ibm.com> Signed-off-by: Cornelia Huck <cornelia.huck@de.ibm.com>
39 lines
1.0 KiB
C
39 lines
1.0 KiB
C
/*
|
|
* virtual css bridge definition
|
|
*
|
|
* Copyright 2012,2016 IBM Corp.
|
|
* Author(s): Cornelia Huck <cornelia.huck@de.ibm.com>
|
|
* Pierre Morel <pmorel@linux.vnet.ibm.com>
|
|
*
|
|
* This work is licensed under the terms of the GNU GPL, version 2 or (at
|
|
* your option) any later version. See the COPYING file in the top-level
|
|
* directory.
|
|
*/
|
|
|
|
#ifndef HW_S390X_CSS_BRIDGE_H
|
|
#define HW_S390X_CSS_BRIDGE_H
|
|
#include "qom/object.h"
|
|
#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 {
|
|
BusState parent_obj;
|
|
} VirtualCssBus;
|
|
|
|
#define TYPE_VIRTUAL_CSS_BUS "virtual-css-bus"
|
|
#define VIRTUAL_CSS_BUS(obj) \
|
|
OBJECT_CHECK(VirtualCssBus, (obj), TYPE_VIRTUAL_CSS_BUS)
|
|
VirtualCssBus *virtual_css_bus_init(void);
|
|
|
|
#endif
|