* [Qemu-devel] [PATCH] Make QEmu depends on libpci
@ 2008-11-21 13:41 Sheng Yang
2008-11-21 14:10 ` [Qemu-devel] " Anthony Liguori
0 siblings, 1 reply; 3+ messages in thread
From: Sheng Yang @ 2008-11-21 13:41 UTC (permalink / raw)
To: qemu-devel, Anthony Liguori; +Cc: Avi Kivity, kvm, Sheng Yang
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.
Signed-off-by: Sheng Yang <sheng@linux.intel.com>
---
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 <pci/pci.h>
+#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
--
1.5.4.5
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [Qemu-devel] Re: [PATCH] Make QEmu depends on libpci
2008-11-21 14:10 ` [Qemu-devel] " Anthony Liguori
@ 2008-11-21 14:09 ` Sheng Yang
0 siblings, 0 replies; 3+ messages in thread
From: Sheng Yang @ 2008-11-21 14:09 UTC (permalink / raw)
To: Anthony Liguori; +Cc: qemu-devel, kvm, 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 <sheng@linux.intel.com>
> > ---
> > 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 <pci/pci.h>
> > +#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
^ permalink raw reply [flat|nested] 3+ messages in thread
* [Qemu-devel] Re: [PATCH] Make QEmu depends on libpci
2008-11-21 13:41 [Qemu-devel] [PATCH] Make QEmu depends on libpci Sheng Yang
@ 2008-11-21 14:10 ` Anthony Liguori
2008-11-21 14:09 ` Sheng Yang
0 siblings, 1 reply; 3+ messages in thread
From: Anthony Liguori @ 2008-11-21 14:10 UTC (permalink / raw)
To: Sheng Yang; +Cc: qemu-devel, kvm, Avi Kivity
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.
Regards,
Anthony LIguori
> Signed-off-by: Sheng Yang <sheng@linux.intel.com>
> ---
> 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 <pci/pci.h>
> +#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
>
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2008-11-21 14:13 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-11-21 13:41 [Qemu-devel] [PATCH] Make QEmu depends on libpci Sheng Yang
2008-11-21 14:10 ` [Qemu-devel] " Anthony Liguori
2008-11-21 14:09 ` Sheng Yang
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).