aboutsummaryrefslogtreecommitdiff
path: root/configure
diff options
context:
space:
mode:
authorPeter Maydell <peter.maydell@linaro.org>2016-01-26 17:25:11 +0000
committerPeter Maydell <peter.maydell@linaro.org>2016-01-26 17:25:11 +0000
commit39c36a0573d9307d68c0c3336b48e6351ffabc06 (patch)
treee17594e5f0fbd715a59e04de90066bcddfe361a4 /configure
parentba3fb2f023254ab853df278e1719fc55938e1c16 (diff)
parent64a7ad6fe3d8500119d83e0af830e0e45e83499a (diff)
downloadqemu-39c36a0573d9307d68c0c3336b48e6351ffabc06.zip
qemu-39c36a0573d9307d68c0c3336b48e6351ffabc06.tar.gz
qemu-39c36a0573d9307d68c0c3336b48e6351ffabc06.tar.bz2
Merge remote-tracking branch 'remotes/sstabellini/tags/xen-20160126-2' into staging
Xen 2016/01/26 with Signed-off-by lines. # gpg: Signature made Tue 26 Jan 2016 17:20:12 GMT using RSA key ID 70E1AE90 # gpg: Good signature from "Stefano Stabellini <stefano.stabellini@eu.citrix.com>" * remotes/sstabellini/tags/xen-20160126-2: xen: make it possible to build without the Xen PV domain builder xen: domainbuild: reopen libxenctrl interface after forking for domain watcher. xen: Use stable library interfaces when they are available. xen: Switch uses of xc_map_foreign_{pages,bulk} to use libxenforeignmemory API. xen: Switch uses of xc_map_foreign_range into xc_map_foreign_pages xen: Switch to libxengnttab interface for compat shims. xen: Switch to libxenevtchn interface for compat shims. xen_console: correctly cleanup primary console on teardown. Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'configure')
-rwxr-xr-xconfigure70
1 files changed, 70 insertions, 0 deletions
diff --git a/configure b/configure
index 44ac9ab..3506e44 100755
--- a/configure
+++ b/configure
@@ -250,6 +250,7 @@ vnc_jpeg=""
vnc_png=""
xen=""
xen_ctrl_version=""
+xen_pv_domain_build="no"
xen_pci_passthrough=""
linux_aio=""
cap_ng=""
@@ -927,6 +928,10 @@ for opt do
;;
--enable-xen-pci-passthrough) xen_pci_passthrough="yes"
;;
+ --disable-xen-pv-domain-build) xen_pv_domain_build="no"
+ ;;
+ --enable-xen-pv-domain-build) xen_pv_domain_build="yes"
+ ;;
--disable-brlapi) brlapi="no"
;;
--enable-brlapi) brlapi="yes"
@@ -1938,6 +1943,7 @@ fi
if test "$xen" != "no" ; then
xen_libs="-lxenstore -lxenctrl -lxenguest"
+ xen_stable_libs="-lxenforeignmemory -lxengnttab -lxenevtchn"
# First we test whether Xen headers and libraries are available.
# If no, we are done and there is no Xen support.
@@ -1960,6 +1966,57 @@ EOF
# Xen unstable
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.
+ */
+#undef XC_WANT_COMPAT_EVTCHN_API
+#undef XC_WANT_COMPAT_GNTTAB_API
+#undef XC_WANT_COMPAT_MAP_FOREIGN_API
+#include <xenctrl.h>
+#include <xenstore.h>
+#include <xenevtchn.h>
+#include <xengnttab.h>
+#include <xenforeignmemory.h>
+#include <stdint.h>
+#include <xen/hvm/hvm_info_table.h>
+#if !defined(HVM_MAX_VCPUS)
+# error HVM_MAX_VCPUS not defined
+#endif
+int main(void) {
+ xc_interface *xc = NULL;
+ xenforeignmemory_handle *xfmem;
+ xenevtchn_handle *xe;
+ xengnttab_handle *xg;
+ xen_domain_handle_t handle;
+
+ xs_daemon_open();
+
+ xc = xc_interface_open(0, 0, 0);
+ xc_hvm_set_mem_type(0, 0, HVMMEM_ram_ro, 0, 0);
+ xc_domain_add_to_physmap(0, 0, XENMAPSPACE_gmfn, 0, 0);
+ xc_hvm_inject_msi(xc, 0, 0xf0000000, 0x00000000);
+ xc_hvm_create_ioreq_server(xc, 0, HVM_IOREQSRV_BUFIOREQ_ATOMIC, NULL);
+ xc_domain_create(xc, 0, handle, 0, NULL, NULL);
+
+ xfmem = xenforeignmemory_open(0, 0);
+ xenforeignmemory_map(xfmem, 0, 0, 0, 0, 0);
+
+ xe = xenevtchn_open(0, 0);
+ xenevtchn_fd(xe);
+
+ xg = xengnttab_open(0, 0);
+ xengnttab_map_grant_ref(xg, 0, 0, 0);
+
+ return 0;
+}
+EOF
+ compile_prog "" "$xen_libs $xen_stable_libs"
+ then
+ xen_ctrl_version=471
+ xen=yes
+ elif
+ cat > $TMPC <<EOF &&
#include <xenctrl.h>
#include <stdint.h>
int main(void) {
@@ -2153,6 +2210,9 @@ EOF
fi
if test "$xen" = yes; then
+ if test $xen_ctrl_version -ge 471 ; then
+ libs_softmmu="$xen_stable_libs $libs_softmmu"
+ fi
libs_softmmu="$xen_libs $libs_softmmu"
fi
fi
@@ -2174,6 +2234,12 @@ if test "$xen_pci_passthrough" != "no"; then
fi
fi
+if test "$xen_pv_domain_build" = "yes" &&
+ test "$xen" != "yes"; then
+ error_exit "User requested Xen PV domain builder support" \
+ "which requires Xen support."
+fi
+
##########################################
# libtool probe
@@ -4793,6 +4859,7 @@ fi
echo "xen support $xen"
if test "$xen" = "yes" ; then
echo "xen ctrl version $xen_ctrl_version"
+ echo "pv dom build $xen_pv_domain_build"
fi
echo "brlapi support $brlapi"
echo "bluez support $bluez"
@@ -5164,6 +5231,9 @@ fi
if test "$xen" = "yes" ; then
echo "CONFIG_XEN_BACKEND=y" >> $config_host_mak
echo "CONFIG_XEN_CTRL_INTERFACE_VERSION=$xen_ctrl_version" >> $config_host_mak
+ if test "$xen_pv_domain_build" = "yes" ; then
+ echo "CONFIG_XEN_PV_DOMAIN_BUILD=y" >> $config_host_mak
+ fi
fi
if test "$linux_aio" = "yes" ; then
echo "CONFIG_LINUX_AIO=y" >> $config_host_mak