s390x/pci: let intercept devices have separate PCI groups
commit30dcf4f7fd23bef7d72a2454c60881710fd4c785
authorMatthew Rosato <mjrosato@linux.ibm.com>
Fri, 2 Sep 2022 17:27:35 +0000 (2 13:27 -0400)
committerThomas Huth <thuth@redhat.com>
Mon, 26 Sep 2022 15:23:47 +0000 (26 17:23 +0200)
treefd4fb90ecb44ea7e5026e861ed2cec923ae193f6
parentd0bc7091c2013ad2fa164100cf7b17962370e8ab
s390x/pci: let intercept devices have separate PCI groups

Let's use the reserved pool of simulated PCI groups to allow intercept
devices to have separate groups from interpreted devices as some group
values may be different. If we run out of simulated PCI groups, subsequent
intercept devices just get the default group.
Furthermore, if we encounter any PCI groups from hostdevs that are marked
as simulated, let's just assign them to the default group to avoid
conflicts between host simulated groups and our own simulated groups.

Signed-off-by: Matthew Rosato <mjrosato@linux.ibm.com>
Reviewed-by: Pierre Morel <pmorel@linux.ibm.com>
Message-Id: <20220902172737.170349-7-mjrosato@linux.ibm.com>
Signed-off-by: Thomas Huth <thuth@redhat.com>
hw/s390x/s390-pci-bus.c
hw/s390x/s390-pci-vfio.c
include/hw/s390x/s390-pci-bus.h