pci: fix 'io hints' capability for RedHat PCI bridges
Commit ec6cb17f (pci: enable RedHat PCI bridges to reserve additional
resources on PCI init)
added a new vendor specific PCI capability for RedHat PCI bridges
allowing them to reserve additional buses and/or IO/MEM space.
When adding the IO hints PCI capability to the pcie-root-port
without specifying a value for bus reservation, the subordinate bus
computation is wrong and the guest kernel gets messed up.
Fix it by returning to prev code if the value for bus
reservation is not set.
Removed also a wrong debug print "PCI: invalid QEMU resource reserve
cap offset" which appears if the 'IO hints' capability is not present.
Acked-by: Michael S. Tsirkin <email@example.com>
Signed-off-by: Marcel Apfelbaum <firstname.lastname@example.org>
(cherry picked from commit 14d91c353e19b7085fdbb7b2dcc43f3355665670)
1 file changed