[kvm-unit-tests PATCH 2/2] pci: pci_host_bridge_get_paddr() can not fail

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Function pci_host_bridge_get_paddr() is passed a PCI bus
address to translate into physical one. The PCI address
is always read from a device BAR and is expected to be
valid. Therefore, a failure to find the mapping for the
PCI address indicates a serious implementation problem
elsewhere.

Cc: Thomas Huth <thuth@xxxxxxxxxx>
Cc: Andrew Jones <drjones@xxxxxxxxxx>
Signed-off-by: Alexander Gordeev <agordeev@xxxxxxxxxx>
---
 lib/pci-host-generic.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/lib/pci-host-generic.c b/lib/pci-host-generic.c
index 7f72d649144e..433a0c8e4d15 100644
--- a/lib/pci-host-generic.c
+++ b/lib/pci-host-generic.c
@@ -271,6 +271,7 @@ phys_addr_t pci_host_bridge_get_paddr(u64 pci_addr)
 		as++;
 	}
 
+	assert(0);
 	return ~0;
 }
 
-- 
1.8.3.1

--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux