spapr_pci: populate ibm,loc-code
commit16b0ea1d852873cf17630133d86df6a68e23f38c
authorNikunj A Dadhania <nikunj@linux.vnet.ibm.com>
Thu, 2 Jul 2015 06:23:22 +0000 (2 16:23 +1000)
committerAlexander Graf <agraf@suse.de>
Tue, 7 Jul 2015 15:44:53 +0000 (7 17:44 +0200)
tree8d02aa3490f4f5e171b0d4559b0acae6ce2e2c37
parent1d2d974244c6f1629ca83f1de293eaa557634627
spapr_pci: populate ibm,loc-code

Each hardware instance has a platform unique location code.  The OF
device tree that describes a part of a hardware entity must include
the “ibm,loc-code” property with a value that represents the location
code for that hardware entity.

Populate ibm,loc-code.

1) PCI passthru devices need to identify with its own ibm,loc-code
   available on the host. In failure cases use:
   vfio_<name>:<phb-index>:<bus>:<slot>.<fn>

2) Emulated devices encode as following:
   qemu_<name>:<phb-index>:<bus>:<slot>.<fn>

Signed-off-by: Nikunj A Dadhania <nikunj@linux.vnet.ibm.com>
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
Signed-off-by: Alexander Graf <agraf@suse.de>
hw/ppc/spapr_pci.c