From nobody Tue Feb 10 12:40:30 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) client-ip=209.132.183.28; envelope-from=libvir-list-bounces@redhat.com; helo=mx1.redhat.com; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1562569840; cv=none; d=zoho.com; s=zohoarc; b=K9h/uZlCrlMNSvVOM0JlVsy4Hd95Z8u78mHeHFS1DlMRUQ9qNY+wSDDSMPrBAggdWECSsr7PZMUODHdGgXTtvLsuppZwxRM/rnuC+EjWp3RI37ZUrndeVB3D/p93kdFYohtAvIn7nk2GEIcHHsPsoalPoNdxza+haUSgWVT/nGw= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1562569840; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To:ARC-Authentication-Results; bh=Hc4k1Zgoq7aFJDX52C6vcnkf31azcM+BtZ6YUrmDVyw=; b=K+lZiCvb3uZoX70peAX56j55BDiCothMfgzbp2Bcqv5S2e9DnKLUdJCc683/kO62V6sZtum3JRAGpkZ6h9FS4sMGaTI2Mm8/aoJGmp5h6pMOdxJ/vLRZ9zZw4wq8I/eOGIfXsyfLh5SyvMLBlc5HPngjZUd+9cEEPoEI6fNxjt0= ARC-Authentication-Results: i=1; mx.zoho.com; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 1562569840255980.6031835185877; Mon, 8 Jul 2019 00:10:40 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id B08D03082211; Mon, 8 Jul 2019 07:10:38 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.20]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 8CBC2BA7C; Mon, 8 Jul 2019 07:10:38 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id 54F131833005; Mon, 8 Jul 2019 07:10:38 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id x687AZLT006953 for ; Mon, 8 Jul 2019 03:10:35 -0400 Received: by smtp.corp.redhat.com (Postfix) id D5E2E5DA2E; Mon, 8 Jul 2019 07:10:35 +0000 (UTC) Received: from localhost (ovpn-112-17.ams2.redhat.com [10.36.112.17]) by smtp.corp.redhat.com (Postfix) with ESMTP id 0DCF55D9E5; Mon, 8 Jul 2019 07:10:29 +0000 (UTC) From: marcandre.lureau@redhat.com To: libvir-list@redhat.com Date: Mon, 8 Jul 2019 11:07:38 +0400 Message-Id: <20190708070747.1962-15-marcandre.lureau@redhat.com> In-Reply-To: <20190708070747.1962-1-marcandre.lureau@redhat.com> References: <20190708070747.1962-1-marcandre.lureau@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 X-loop: libvir-list@redhat.com Cc: mprivozn@redhat.com, =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= Subject: [libvirt] [PATCH 14/23] qemu-conf: add configurable slirp-helper location X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.47]); Mon, 08 Jul 2019 07:10:39 +0000 (UTC) From: Marc-Andr=C3=A9 Lureau A slirp helper is a process that provides user-mode networking through a unix domain socket. It is expected to follow the following specification: https://gitlab.freedesktop.org/slirp/libslirp-rs/blob/master/src/bin/README= .rst Signed-off-by: Marc-Andr=C3=A9 Lureau --- m4/virt-driver-qemu.m4 | 5 +++++ src/qemu/libvirtd_qemu.aug | 1 + src/qemu/qemu.conf | 3 +++ src/qemu/qemu_conf.c | 5 +++++ src/qemu/qemu_conf.h | 1 + src/qemu/test_libvirtd_qemu.aug.in | 1 + 6 files changed, 16 insertions(+) diff --git a/m4/virt-driver-qemu.m4 b/m4/virt-driver-qemu.m4 index 1bc1755620..b050411b7b 100644 --- a/m4/virt-driver-qemu.m4 +++ b/m4/virt-driver-qemu.m4 @@ -110,6 +110,11 @@ AC_DEFUN([LIBVIRT_DRIVER_CHECK_QEMU], [ [/usr/bin:/usr/libexec]) AC_DEFINE_UNQUOTED([QEMU_DBUS_DAEMON], ["$QEMU_DBUS_DAEMON"], [QEMU dbus daemon]) + AC_PATH_PROG([QEMU_SLIRP_HELPER], [slirp-helper], + [/usr/bin/slirp-helper], + [/usr/bin:/usr/libexec]) + AC_DEFINE_UNQUOTED([QEMU_SLIRP_HELPER], ["$QEMU_SLIRP_HELPER"], + [QEMU slirp helper]) ]) =20 AC_DEFUN([LIBVIRT_DRIVER_RESULT_QEMU], [ diff --git a/src/qemu/libvirtd_qemu.aug b/src/qemu/libvirtd_qemu.aug index ba4caabc42..e989fa8623 100644 --- a/src/qemu/libvirtd_qemu.aug +++ b/src/qemu/libvirtd_qemu.aug @@ -90,6 +90,7 @@ module Libvirtd_qemu =3D | str_entry "bridge_helper" | str_entry "pr_helper" | str_entry "dbus_daemon" + | str_entry "slirp_helper" | bool_entry "set_process_name" | int_entry "max_processes" | int_entry "max_files" diff --git a/src/qemu/qemu.conf b/src/qemu/qemu.conf index 26bab39123..b8408b2f79 100644 --- a/src/qemu/qemu.conf +++ b/src/qemu/qemu.conf @@ -823,6 +823,9 @@ # used whenever are enabled for SCSI LUN devices. #pr_helper =3D "/usr/bin/qemu-pr-helper" =20 +# Path to the SLIRP networking helper. +#slirp_helper =3D "/usr/bin/slirp-helper" + # Path to the dbus-daemon #dbus_daemon =3D "/usr/bin/dbus-daemon" =20 diff --git a/src/qemu/qemu_conf.c b/src/qemu/qemu_conf.c index 5f6f93d828..a986feecea 100644 --- a/src/qemu/qemu_conf.c +++ b/src/qemu/qemu_conf.c @@ -286,6 +286,7 @@ virQEMUDriverConfigPtr virQEMUDriverConfigNew(bool priv= ileged) =20 if (VIR_STRDUP(cfg->bridgeHelperName, QEMU_BRIDGE_HELPER) < 0 || VIR_STRDUP(cfg->prHelperName, QEMU_PR_HELPER) < 0 || + VIR_STRDUP(cfg->slirpHelperName, QEMU_SLIRP_HELPER) < 0 || VIR_STRDUP(cfg->dbusDaemonName, QEMU_DBUS_DAEMON) < 0) goto error; =20 @@ -377,6 +378,7 @@ static void virQEMUDriverConfigDispose(void *obj) VIR_FREE(cfg->hugetlbfs); VIR_FREE(cfg->bridgeHelperName); VIR_FREE(cfg->prHelperName); + VIR_FREE(cfg->slirpHelperName); VIR_FREE(cfg->dbusDaemonName); =20 VIR_FREE(cfg->saveImageFormat); @@ -674,6 +676,9 @@ virQEMUDriverConfigLoadProcessEntry(virQEMUDriverConfig= Ptr cfg, if (virConfGetValueString(conf, "pr_helper", &cfg->prHelperName) < 0) return -1; =20 + if (virConfGetValueString(conf, "slirp_helper", &cfg->slirpHelperName)= < 0) + return -1; + if (virConfGetValueString(conf, "dbus_daemon", &cfg->dbusDaemonName) <= 0) return -1; =20 diff --git a/src/qemu/qemu_conf.h b/src/qemu/qemu_conf.h index c87cb8bc41..003851d2a7 100644 --- a/src/qemu/qemu_conf.h +++ b/src/qemu/qemu_conf.h @@ -153,6 +153,7 @@ struct _virQEMUDriverConfig { char *bridgeHelperName; char *prHelperName; char *dbusDaemonName; + char *slirpHelperName; =20 bool macFilter; =20 diff --git a/src/qemu/test_libvirtd_qemu.aug.in b/src/qemu/test_libvirtd_qe= mu.aug.in index e135869717..1bb3de3edc 100644 --- a/src/qemu/test_libvirtd_qemu.aug.in +++ b/src/qemu/test_libvirtd_qemu.aug.in @@ -103,6 +103,7 @@ module Test_libvirtd_qemu =3D } { "memory_backing_dir" =3D "/var/lib/libvirt/qemu/ram" } { "pr_helper" =3D "/usr/bin/qemu-pr-helper" } +{ "slirp_helper" =3D "/usr/bin/slirp-helper" } { "dbus_daemon" =3D "/usr/bin/dbus-daemon" } { "swtpm_user" =3D "tss" } { "swtpm_group" =3D "tss" } --=20 2.22.0.214.g8dca754b1e -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list