From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1L3WlM-0006oM-4m for qemu-devel@nongnu.org; Fri, 21 Nov 2008 09:13:36 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1L3WlL-0006o6-8Z for qemu-devel@nongnu.org; Fri, 21 Nov 2008 09:13:35 -0500 Received: from [199.232.76.173] (port=51055 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1L3WlL-0006o3-2T for qemu-devel@nongnu.org; Fri, 21 Nov 2008 09:13:35 -0500 Received: from mga09.intel.com ([134.134.136.24]:60931) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1L3WlK-0007rf-R2 for qemu-devel@nongnu.org; Fri, 21 Nov 2008 09:13:35 -0500 From: Sheng Yang Date: Fri, 21 Nov 2008 22:09:53 +0800 References: <1227274886-23459-1-git-send-email-sheng@linux.intel.com> <4926C173.3090408@codemonkey.ws> In-Reply-To: <4926C173.3090408@codemonkey.ws> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200811212209.53748.sheng@linux.intel.com> Subject: [Qemu-devel] Re: [PATCH] Make QEmu depends on libpci Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Anthony Liguori Cc: qemu-devel@nongnu.org, kvm@vger.kernel.org, Avi Kivity On Friday 21 November 2008 22:10:59 Anthony Liguori wrote: > Sheng Yang wrote: > > libpci is handy to handle some pci device related things. > > > > This is the same as first patch I sent in MSI userspace patchset in kvm > > mailing list, and this one is based on QEmu upstream. > > It should be an optional dependency. If libpci isn't present, then you > should disable PCI passthrough. See the checks for gnutls, libvde, > bluez, etc. OK. And I think we don't have PCI passthrough for QEmu upstream now... I will update the KVM side one. -- regards Yang, Sheng > > Regards, > > Anthony LIguori > > > Signed-off-by: Sheng Yang > > --- > > Makefile.target | 2 +- > > configure | 19 +++++++++++++++++++ > > 2 files changed, 20 insertions(+), 1 deletions(-) > > > > diff --git a/Makefile.target b/Makefile.target > > index 3cdf7db..7cf5b00 100644 > > --- a/Makefile.target > > +++ b/Makefile.target > > @@ -598,7 +598,7 @@ else > > OBJS+=block-raw-posix.o > > endif > > > > -LIBS+=-lz > > +LIBS+=-lz -lpci > > ifdef CONFIG_ALSA > > LIBS += -lasound > > endif > > diff --git a/configure b/configure > > index 1f3d233..1f35e3d 100755 > > --- a/configure > > +++ b/configure > > @@ -764,6 +764,25 @@ else > > fi > > > > ########################################## > > +# libpci probe > > +cat > $TMPC << EOF > > +#include > > +#ifndef PCI_VENDOR_ID > > +#error NO LIBPCI > > +#endif > > +int main(void) { return 0; } > > +EOF > > +if $cc $ARCH_CFLAGS -o $TMPE ${OS_CFLAGS} $TMPC 2>/dev/null ; then > > + : > > +else > > + echo > > + echo "Error: libpci check failed" > > + echo "Make sure to have the libpci libs and headers installed." > > + echo > > + exit 1 > > +fi > > + > > +########################################## > > # SDL probe > > > > sdl_too_old=no