Hi Andrew, I would consider making PCI BAR number an unsigned integer in all existing APIs. But for now assert(bar_num >= 0 ...) is checked. Sources are at https://github.com/a-gordeev/kvm-unit-tests.git pci-fixes Cc: Thomas Huth <thuth@xxxxxxxxxx> Cc: Andrew Jones <drjones@xxxxxxxxxx> Alexander Gordeev (4): Move INVALID_PHYS_ADDR macro to lib/libcflat.h pci: Assert when PCI bus address can not be translated pci: Sanity check PCI device BAR numbers pci: Do not set or get addresses for unimplemented BARs lib/alloc.h | 2 -- lib/libcflat.h | 1 + lib/pci-host-generic.c | 2 +- lib/pci.c | 34 +++++++++++++++++++++++++++++----- 4 files changed, 31 insertions(+), 8 deletions(-) -- 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