diff options
author | Peter Maydell <peter.maydell@linaro.org> | 2017-04-26 10:22:31 +0100 |
---|---|---|
committer | Peter Maydell <peter.maydell@linaro.org> | 2017-04-26 10:22:31 +0100 |
commit | 52e94ea5de3ed9d7ddf1b0e5fc6ff7c2807ae711 (patch) | |
tree | 74d9071f278bbd22fa1d8da03cc33660199e7a96 /configure | |
parent | fe491fa85c4634453b340b18046aae2eaf8147db (diff) | |
parent | 28b99f473bda682385da944b0404aedbe11ea0dc (diff) | |
download | qemu-52e94ea5de3ed9d7ddf1b0e5fc6ff7c2807ae711.zip qemu-52e94ea5de3ed9d7ddf1b0e5fc6ff7c2807ae711.tar.gz qemu-52e94ea5de3ed9d7ddf1b0e5fc6ff7c2807ae711.tar.bz2 |
Merge remote-tracking branch 'remotes/sstabellini/tags/xen-20170421-v2-tag' into staging
Xen 2017/04/21 + fix
# gpg: Signature made Tue 25 Apr 2017 19:10:37 BST
# gpg: using RSA key 0x894F8F4870E1AE90
# gpg: Good signature from "Stefano Stabellini <stefano.stabellini@eu.citrix.com>"
# gpg: aka "Stefano Stabellini <sstabellini@kernel.org>"
# Primary key fingerprint: D04E 33AB A51F 67BA 07D3 0AEA 894F 8F48 70E1 AE90
* remotes/sstabellini/tags/xen-20170421-v2-tag: (21 commits)
move xen-mapcache.c to hw/i386/xen/
move xen-hvm.c to hw/i386/xen/
move xen-common.c to hw/xen/
add xen-9p-backend to MAINTAINERS under Xen
xen/9pfs: build and register Xen 9pfs backend
xen/9pfs: send responses back to the frontend
xen/9pfs: implement in/out_iov_from_pdu and vmarshal/vunmarshal
xen/9pfs: receive requests from the frontend
xen/9pfs: connect to the frontend
xen/9pfs: introduce Xen 9pfs backend
9p: introduce a type for the 9p header
xen: import ring.h from xen
configure: use pkg-config for obtaining xen version
xen: additionally restrict xenforeignmemory operations
xen: use libxendevice model to restrict operations
xen: use 5 digit xen versions
xen: use libxendevicemodel when available
configure: detect presence of libxendevicemodel
xen: create wrappers for all other uses of xc_hvm_XXX() functions
xen: rename xen_modified_memory() to xen_hvm_modified_memory()
...
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'configure')
-rwxr-xr-x | configure | 164 |
1 files changed, 100 insertions, 64 deletions
@@ -1997,30 +1997,65 @@ fi # xen probe if test "$xen" != "no" ; then - xen_libs="-lxenstore -lxenctrl -lxenguest" - xen_stable_libs="-lxenforeignmemory -lxengnttab -lxenevtchn" + # Check whether Xen library path is specified via --extra-ldflags to avoid + # overriding this setting with pkg-config output. If not, try pkg-config + # to obtain all needed flags. + + if ! echo $EXTRA_LDFLAGS | grep tools/libxc > /dev/null && \ + $pkg_config --exists xencontrol ; then + xen_ctrl_version="$(printf '%d%02d%02d' \ + $($pkg_config --modversion xencontrol | sed 's/\./ /g') )" + xen=yes + xen_pc="xencontrol xenstore xenguest xenforeignmemory xengnttab" + xen_pc="$xen_pc xenevtchn xendevicemodel" + QEMU_CFLAGS="$QEMU_CFLAGS $($pkg_config --cflags $xen_pc)" + libs_softmmu="$($pkg_config --libs $xen_pc) $libs_softmmu" + LDFLAGS="$($pkg_config --libs $xen_pc) $LDFLAGS" + else - # First we test whether Xen headers and libraries are available. - # If no, we are done and there is no Xen support. - # If yes, more tests are run to detect the Xen version. + xen_libs="-lxenstore -lxenctrl -lxenguest" + xen_stable_libs="-lxencall -lxenforeignmemory -lxengnttab -lxenevtchn" - # Xen (any) - cat > $TMPC <<EOF + # First we test whether Xen headers and libraries are available. + # If no, we are done and there is no Xen support. + # If yes, more tests are run to detect the Xen version. + + # Xen (any) + cat > $TMPC <<EOF #include <xenctrl.h> int main(void) { return 0; } EOF - if ! compile_prog "" "$xen_libs" ; then - # Xen not found - if test "$xen" = "yes" ; then - feature_not_found "xen" "Install xen devel" - fi - xen=no + if ! compile_prog "" "$xen_libs" ; then + # Xen not found + if test "$xen" = "yes" ; then + feature_not_found "xen" "Install xen devel" + fi + xen=no + + # Xen unstable + elif + cat > $TMPC <<EOF && +#undef XC_WANT_COMPAT_DEVICEMODEL_API +#define __XEN_TOOLS__ +#include <xendevicemodel.h> +int main(void) { + xendevicemodel_handle *xd; - # Xen unstable - elif - cat > $TMPC <<EOF && + xd = xendevicemodel_open(0, 0); + xendevicemodel_close(xd); + + return 0; +} +EOF + compile_prog "" "$xen_libs -lxendevicemodel $xen_stable_libs" + then + xen_stable_libs="-lxendevicemodel $xen_stable_libs" + xen_ctrl_version=40900 + xen=yes + elif + cat > $TMPC <<EOF && /* * If we have stable libs the we don't want the libxc compat * layers, regardless of what CFLAGS we may have been given. @@ -2070,12 +2105,12 @@ int main(void) { return 0; } EOF - compile_prog "" "$xen_libs $xen_stable_libs" - then - xen_ctrl_version=480 - xen=yes - elif - cat > $TMPC <<EOF && + compile_prog "" "$xen_libs $xen_stable_libs" + then + xen_ctrl_version=40800 + xen=yes + elif + cat > $TMPC <<EOF && /* * If we have stable libs the we don't want the libxc compat * layers, regardless of what CFLAGS we may have been given. @@ -2121,12 +2156,12 @@ int main(void) { return 0; } EOF - compile_prog "" "$xen_libs $xen_stable_libs" - then - xen_ctrl_version=471 - xen=yes - elif - cat > $TMPC <<EOF && + compile_prog "" "$xen_libs $xen_stable_libs" + then + xen_ctrl_version=40701 + xen=yes + elif + cat > $TMPC <<EOF && #include <xenctrl.h> #include <stdint.h> int main(void) { @@ -2136,14 +2171,14 @@ int main(void) { return 0; } EOF - compile_prog "" "$xen_libs" - then - xen_ctrl_version=470 - xen=yes - - # Xen 4.6 - elif - cat > $TMPC <<EOF && + compile_prog "" "$xen_libs" + then + xen_ctrl_version=40700 + xen=yes + + # Xen 4.6 + elif + cat > $TMPC <<EOF && #include <xenctrl.h> #include <xenstore.h> #include <stdint.h> @@ -2164,14 +2199,14 @@ int main(void) { return 0; } EOF - compile_prog "" "$xen_libs" - then - xen_ctrl_version=460 - xen=yes - - # Xen 4.5 - elif - cat > $TMPC <<EOF && + compile_prog "" "$xen_libs" + then + xen_ctrl_version=40600 + xen=yes + + # Xen 4.5 + elif + cat > $TMPC <<EOF && #include <xenctrl.h> #include <xenstore.h> #include <stdint.h> @@ -2191,13 +2226,13 @@ int main(void) { return 0; } EOF - compile_prog "" "$xen_libs" - then - xen_ctrl_version=450 - xen=yes + compile_prog "" "$xen_libs" + then + xen_ctrl_version=40500 + xen=yes - elif - cat > $TMPC <<EOF && + elif + cat > $TMPC <<EOF && #include <xenctrl.h> #include <xenstore.h> #include <stdint.h> @@ -2216,24 +2251,25 @@ int main(void) { return 0; } EOF - compile_prog "" "$xen_libs" - then - xen_ctrl_version=420 - xen=yes + compile_prog "" "$xen_libs" + then + xen_ctrl_version=40200 + xen=yes - else - if test "$xen" = "yes" ; then - feature_not_found "xen (unsupported version)" \ - "Install a supported xen (xen 4.2 or newer)" + else + if test "$xen" = "yes" ; then + feature_not_found "xen (unsupported version)" \ + "Install a supported xen (xen 4.2 or newer)" + fi + xen=no fi - xen=no - fi - if test "$xen" = yes; then - if test $xen_ctrl_version -ge 471 ; then - libs_softmmu="$xen_stable_libs $libs_softmmu" + if test "$xen" = yes; then + if test $xen_ctrl_version -ge 40701 ; then + libs_softmmu="$xen_stable_libs $libs_softmmu" + fi + libs_softmmu="$xen_libs $libs_softmmu" fi - libs_softmmu="$xen_libs $libs_softmmu" fi fi |