Specifying a PF passthrough device in the pci_passthrough_whitelist using its
fully qualified PCI address (no wildcard) causes the device to not be
properly loaded. The PCI device is then not available to be assigned to any
guest.
In this case, the hypervisor reports the PF device without a 'parent_addr'.
But in the PciAddress, match() is using it when doing the comparison to its
own address.
This commit changes the logic of the address matching method in PciDevSpec to
only try to match the address with a physical function device when a
'parent_addr' is reported by the hypervisor.
Change-Id: I5255240871d8ad5c216500f39520339efe46e84b
Closes-Bug: #1613434
(cherry picked from commit d38d5767d15b24df455b1844dfe53ada2ebf9751)
Reviewed: https:/ /review. openstack. org/393752 /git.openstack. org/cgit/ openstack/ nova/commit/ ?id=30deffaca4c 0307170bf46cea4 39dea2c11a8ed9
Committed: https:/
Submitter: Jenkins
Branch: stable/newton
commit 30deffaca4c0307 170bf46cea439de a2c11a8ed9
Author: Ludovic Beliveau <email address hidden>
Date: Wed Aug 31 14:27:43 2016 -0400
PCI: Fix PCI with fully qualified address
Specifying a PF passthrough device in the pci_passthrough _whitelist using its
fully qualified PCI address (no wildcard) causes the device to not be
properly loaded. The PCI device is then not available to be assigned to any
guest.
In this case, the hypervisor reports the PF device without a 'parent_addr'.
But in the PciAddress, match() is using it when doing the comparison to its
own address.
This commit changes the logic of the address matching method in PciDevSpec to
only try to match the address with a physical function device when a
'parent_addr' is reported by the hypervisor.
Change-Id: I5255240871d8ad 5c216500f395203 39efe46e84b f455b1844dfe53a da2ebf9751)
Closes-Bug: #1613434
(cherry picked from commit d38d5767d15b24d