On Tue, 2017-06-27 at 11:59 -0400, Laine Stump wrote:
> @@ -23,10 +23,9 @@
> <target index='1'/>
> </controller>
> <controller type='usb' index='0' model='none'/>
> - <controller type='pci' index='1'
model='pci-bridge'>
> - <model name='pci-bridge'/>
> - <target chassisNr='1'/>
> - <address type='pci' domain='0x0000' bus='0x00'
slot='0x01' function='0x0'/>
> + <controller type='pci' index='1'
model='pci-root'>
> + <model name='spapr-pci-host-bridge'/>
> + <target index='2'/>
Interesting - since we initially had one with controller index=2 that
was automatically given target index=1, now that this PHB controller is
being automatically added at index=1, it uses the next free target
index, which is '2'. I assume that works correctly?
Yes. The test case was crafted specifically to show that
controller index and target index don't have to match.
Although I think (in a separate patch) someone should eliminate all
this
cruft about filling in empty places in the bus numbering with unused
controllers - it's pointless, and in the case of pci-bridge at least, I
think it creates controllers that are unusable (because they have no io
space allocated).
The only drawback I can think of at the moment is that it
might be confusing for the user to have controllers numbered
eg. 0, 42 and 1337, even though of course the guest OS would
not care at all.
--
Andrea Bolognani / Red Hat / Virtualization