pci: acpi: ensure that acpi-index is unique
commit4fd7da4c0336c8fd822cd808d62f7ff8c9936aef
authorIgor Mammedov <imammedo@redhat.com>
Mon, 15 Mar 2021 18:00:59 +0000 (15 14:00 -0400)
committerMichael S. Tsirkin <mst@redhat.com>
Mon, 22 Mar 2021 22:58:19 +0000 (22 18:58 -0400)
tree30dcb1d94e127f24f4b1a0041d1aebb50b79b7e2
parentb32bd763a1ca929677e22ae1c51cb3920921bdce
pci: acpi: ensure that acpi-index is unique

it helps to avoid device naming conflicts when guest OS is
configured to use acpi-index for naming.
Spec ialso says so:

PCI Firmware Specification Revision 3.2
4.6.7.  _DSM for Naming a PCI or PCI Express Device Under Operating Systems
"
Instance number must be unique under \_SB scope. This instance number does not have to
be sequential in a given system configuration.
"

Signed-off-by: Igor Mammedov <imammedo@redhat.com>
Message-Id: <20210315180102.3008391-4-imammedo@redhat.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
hw/acpi/pcihp.c