From mboxrd@z Thu Jan 1 00:00:00 1970 From: Alexander Gordeev Subject: [kvm-unit-tests PATCH 0/4] pci: Various PCI BAR checks Date: Tue, 29 Nov 2016 15:48:49 +0100 Message-ID: Cc: Alexander Gordeev , Thomas Huth , Andrew Jones To: kvm@vger.kernel.org Return-path: Received: from mx1.redhat.com ([209.132.183.28]:33612 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932984AbcK2Os5 (ORCPT ); Tue, 29 Nov 2016 09:48:57 -0500 Received: from int-mx10.intmail.prod.int.phx2.redhat.com (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 043CDCA62D for ; Tue, 29 Nov 2016 14:48:57 +0000 (UTC) Sender: kvm-owner@vger.kernel.org List-ID: 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 Cc: Andrew Jones 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