summaryrefslogtreecommitdiff
path: root/tools/configure.ac
diff options
context:
space:
mode:
authorMarek Marczykowski-Górecki <marmarek@invisiblethingslab.com>2020-05-18 21:54:58 -0400
committerWei Liu <wl@xen.org>2020-05-19 16:19:15 +0100
commit83c845033dc8bb3a35ae245effb7832b6823174a (patch)
tree349da066e990e4b18b3e19ec24fe152fe7dd512c /tools/configure.ac
parent379ab27086be37fbb8d23c4e001e33e05dc18b2e (diff)
downloadxen-83c845033dc8bb3a35ae245effb7832b6823174a.tar.gz
libxl: use vchan for QMP access with Linux stubdomain
Access to QMP of QEMU in Linux stubdomain is possible over vchan connection. Handle the actual vchan connection in a separate process (vchan-socket-proxy). This simplified integration with QMP (already quite complex), but also allows preliminary filtering of (potentially malicious) QMP input. Since only one client can be connected to vchan server at the same time and it is not enforced by the libxenvchan itself, additional client-side locking is needed. It is implicitly implemented by vchan-socket-proxy, as it handle only one connection at a time. Note that qemu supports only one simultaneous client on a control socket anyway (but in UNIX socket case, it enforce it server-side), so it doesn't add any extra limitation. libxl qmp client code already has locking to handle concurrent access attempts to the same qemu qmp interface. Signed-off-by: Marek Marczykowski-Górecki <marmarek@invisiblethingslab.com> Squash in changes of regenerated autotools files. Kill the vchan-socket-proxy so we don't leak the daemonized processes. libxl__stubdomain_is_linux_running() works against the guest_domid, but the xenstore path is beneath the stubdomain. This leads to the use of libxl_is_stubdom in addition to libxl__stubdomain_is_linux_running() so that the stubdomain calls kill for the qmp-proxy. Also call libxl__qmp_cleanup() to remove the unix sockets used by vchan-socket-proxy. vchan-socket-proxy only creates qmp-libxl-$domid, and libxl__qmp_cleanup removes that as well as qmp-libxenstat-$domid. However, it tolerates ENOENT, and a stray qmp-libxenstat-$domid should not exist. Signed-off-by: Jason Andryuk <jandryuk@gmail.com> Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
Diffstat (limited to 'tools/configure.ac')
-rw-r--r--tools/configure.ac9
1 files changed, 9 insertions, 0 deletions
diff --git a/tools/configure.ac b/tools/configure.ac
index b6f8882be4..a9af0a21c6 100644
--- a/tools/configure.ac
+++ b/tools/configure.ac
@@ -194,6 +194,15 @@ AC_SUBST(qemu_xen)
AC_SUBST(qemu_xen_path)
AC_SUBST(qemu_xen_systemd)
+AC_ARG_WITH([stubdom-qmp-proxy],
+ AC_HELP_STRING([--stubdom-qmp-proxy@<:@=PATH@:>@],
+ [Use supplied binary PATH as a QMP proxy into stubdomain]),[
+ stubdom_qmp_proxy="$withval"
+],[
+ stubdom_qmp_proxy="$bindir/vchan-socket-proxy"
+])
+AC_DEFINE_UNQUOTED([STUBDOM_QMP_PROXY_PATH], ["$stubdom_qmp_proxy"], [QMP proxy path])
+
AC_ARG_WITH([system-seabios],
AS_HELP_STRING([--with-system-seabios@<:@=PATH@:>@],
[Use system supplied seabios PATH instead of building and installing