pseries: Generate device paths for VIO devices
commitc4eda5b7234265313b09c2c9f9fdd3a960db97db
authorDavid Gibson <david@gibson.dropbear.id.au>
Sun, 7 Apr 2013 19:08:17 +0000 (7 19:08 +0000)
committerAlexander Graf <agraf@suse.de>
Fri, 26 Apr 2013 21:02:42 +0000 (26 23:02 +0200)
treed9efef84bdba33eb66f2b70744b41c9f0b1e4c26
parentfd506b4f61cd22793f8c54a9adf5c69345792501
pseries: Generate device paths for VIO devices

This patch implements a get_dev_path qdev hook for the pseries paravirtual
VIO bus.  With upcoming savevm support, this will become very important for
scsi disks hanging of VIO virtual SCSI adapters.  scsibus_get_dev_path
uses the get_dev_path of the parent adapter if available, but otherwise
just uses a local channel/target/lun number to identify the device.  So if
two disks are present in the system having the same target and lun on
seperate VIO scsi adapters, savevm cannot distinguish them.  Since the
conventional way of using VSCSI adapters is to have just one disk per
adapter, such a conflict is very likely.

Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
Signed-off-by: Alexander Graf <agraf@suse.de>
hw/ppc/spapr_vio.c