From nobody Mon Nov 17 15:45:56 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 63.128.21.124 as permitted sender) client-ip=63.128.21.124; envelope-from=philmd@redhat.com; helo=us-smtp-delivery-124.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 63.128.21.124 as permitted sender) smtp.mailfrom=philmd@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1605096564; cv=none; d=zohomail.com; s=zohoarc; b=XTlMv2KR4p3ewrU3JMqtL4JvUIXrJOVtfjOD02lRhR+5rFCOeiGjOM5rUReG1GwcIBAvJZ7rkj+Qn8dlIDiqMh9khfUSeOiW9q6tzxE63UPHLZm3JSml/js608+5H3sAOWwoLg0QCTYbj8i/GX2j1FAnyiiGoOLR6sAoj6bbCWs= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1605096564; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:MIME-Version:Message-ID:References:Subject:To; bh=7OU9Wnarb8BK3cIihbrbS+fzlvw4ENVPepjzFPS9F4w=; b=ADYs7WmOkfBUN2150MuNlRQiXNY0WfHYjpt9WpHrEbJvhHJgeaXClGXT8gmeCARnuvFvAGS1wyK/10oq13cvjc5a/ehrcQXtQhsUhsSsCTkdM5H+WTS/qhkwatbSseKeBezcy4+Vlq97+7uaOcvB7istJNR7pzlz+KYz4DHKq/I= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 63.128.21.124 as permitted sender) smtp.mailfrom=philmd@redhat.com; dmarc=pass header.from= (p=none dis=none) header.from= Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [63.128.21.124]) by mx.zohomail.com with SMTPS id 1605096564015391.4096045603833; Wed, 11 Nov 2020 04:09:24 -0800 (PST) Received: from mail-wm1-f72.google.com (mail-wm1-f72.google.com [209.85.128.72]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-268-74Wu3hL8MB6x4OhSNo2HNQ-1; Wed, 11 Nov 2020 07:09:21 -0500 Received: by mail-wm1-f72.google.com with SMTP id o19so826287wme.2 for ; Wed, 11 Nov 2020 04:09:21 -0800 (PST) Return-Path: Return-Path: Received: from x1w.redhat.com (234.red-83-42-66.dynamicip.rima-tde.net. [83.42.66.234]) by smtp.gmail.com with ESMTPSA id r10sm2276470wmg.16.2020.11.11.04.09.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 11 Nov 2020 04:09:18 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1605096562; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=7OU9Wnarb8BK3cIihbrbS+fzlvw4ENVPepjzFPS9F4w=; b=DzBNolXBeLQY/ONcX3+8kBDN90vvN/TAz7cSIrSwlkiilXYaByG4i8N5iFi/ruoLrweyHi v6xJ5kWGm+g9vHMCNUUhwRPIa2dvmpVQ/z+Pg9MK8hR5Y6Lx53TQB5jolxHD2bO7WkEzIi M5S7+YBSEZNjSaEdOFdywexa4qIxgHA= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1605096562; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=7OU9Wnarb8BK3cIihbrbS+fzlvw4ENVPepjzFPS9F4w=; b=DzBNolXBeLQY/ONcX3+8kBDN90vvN/TAz7cSIrSwlkiilXYaByG4i8N5iFi/ruoLrweyHi v6xJ5kWGm+g9vHMCNUUhwRPIa2dvmpVQ/z+Pg9MK8hR5Y6Lx53TQB5jolxHD2bO7WkEzIi M5S7+YBSEZNjSaEdOFdywexa4qIxgHA= X-MC-Unique: 74Wu3hL8MB6x4OhSNo2HNQ-1 X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=7OU9Wnarb8BK3cIihbrbS+fzlvw4ENVPepjzFPS9F4w=; b=NvmqpZPrBqy/L3P14GnaBJzhzMgfMrou2RKI1CKCJvsNqd2LiyyoneBpLmGCitPhrU goVYI8JKdKG25IQy3TXcTsEFoyTjXZvZR2fURJYI/UcCCjPfv7rmRg73j5GIfchN6JDI 6Vtd01bBbJhp6VIXdZsw7D3HihAohnNkehHifdpfcTTd7DUAaWJBH9CtShH1L1ShnClh 6ZVTYYuBDOrq60gMUBfmHBNpq2fCOh8J5BVuTFaO2QiCaCQrdP8plGM2b2UasVJXic74 YY6ESlHbBSVED3sAQ/Ul8hB5Ruy4UWhPuVyXKr7vPNAO1KOgeiIHZHELwhmgKffdlnRg KBmA== X-Gm-Message-State: AOAM5325a1x9fuvpmzure3STwHzNUPozO+Q0O4Rxt8iOWBm1ZoBvYGgP i3fmbldGeU2uZPCtjs06sU7g8Fz2Hgqav7zSdVgjeR8mKJ3CWx/f3c3DqB7c04elSojVib2DUeF 8MJ5LU5XyJHet4A== X-Received: by 2002:adf:df86:: with SMTP id z6mr26930312wrl.57.1605096559553; Wed, 11 Nov 2020 04:09:19 -0800 (PST) X-Google-Smtp-Source: ABdhPJwnVXutGoISeRAb7wohlWo5L34u5L3llwo9L3Gm2HNKQJO0hpfBdpgHarT0eoiR2wchG9GQGQ== X-Received: by 2002:adf:df86:: with SMTP id z6mr26930293wrl.57.1605096559379; Wed, 11 Nov 2020 04:09:19 -0800 (PST) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Kevin Wolf , Stefan Hajnoczi , Max Reitz , qemu-block@nongnu.org, =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Subject: [PATCH-for-5.2 v2 1/4] meson: move vhost_user_blk_server to meson.build Date: Wed, 11 Nov 2020 13:09:09 +0100 Message-Id: <20201111120912.3245574-2-philmd@redhat.com> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20201111120912.3245574-1-philmd@redhat.com> References: <20201111120912.3245574-1-philmd@redhat.com> MIME-Version: 1.0 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=philmd@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) From: Stefan Hajnoczi The --enable/disable-vhost-user-blk-server options were implemented in ./configure. There has been confusion about them and part of the problem is that the shell syntax used for setting the default value is not easy to read. Move the option over to meson where the conditions are easier to understand: have_vhost_user_blk_server =3D (targetos =3D=3D 'linux') if get_option('vhost_user_blk_server').enabled() if targetos !=3D 'linux' error('vhost_user_blk_server requires linux') endif elif get_option('vhost_user_blk_server').disabled() or not have_system have_vhost_user_blk_server =3D false endif This patch does not change behavior. Signed-off-by: Stefan Hajnoczi Tested-by: Philippe Mathieu-Daud=C3=A9 Message-Id: <20201110171121.1265142-2-stefanha@redhat.com> Signed-off-by: Philippe Mathieu-Daud=C3=A9 --- configure | 16 ++++------------ meson.build | 12 ++++++++++++ block/export/meson.build | 5 ++++- meson_options.txt | 2 ++ 4 files changed, 22 insertions(+), 13 deletions(-) diff --git a/configure b/configure index 4cef321d9dc..516f28a0888 100755 --- a/configure +++ b/configure @@ -329,7 +329,7 @@ vhost_crypto=3D"" vhost_scsi=3D"" vhost_vsock=3D"" vhost_user=3D"" -vhost_user_blk_server=3D"" +vhost_user_blk_server=3D"auto" vhost_user_fs=3D"" kvm=3D"auto" hax=3D"auto" @@ -1247,9 +1247,9 @@ for opt do ;; --enable-vhost-vsock) vhost_vsock=3D"yes" ;; - --disable-vhost-user-blk-server) vhost_user_blk_server=3D"no" + --disable-vhost-user-blk-server) vhost_user_blk_server=3D"disabled" ;; - --enable-vhost-user-blk-server) vhost_user_blk_server=3D"yes" + --enable-vhost-user-blk-server) vhost_user_blk_server=3D"enabled" ;; --disable-vhost-user-fs) vhost_user_fs=3D"no" ;; @@ -2390,12 +2390,6 @@ if test "$vhost_net" =3D ""; then test "$vhost_kernel" =3D "yes" && vhost_net=3Dyes fi =20 -# libvhost-user is Linux-only -test "$vhost_user_blk_server" =3D "" && vhost_user_blk_server=3D$linux -if test "$vhost_user_blk_server" =3D "yes" && test "$linux" =3D "no"; then - error_exit "--enable-vhost-user-blk-server is only available on Linux" -fi - ########################################## # pkg-config probe =20 @@ -6289,9 +6283,6 @@ fi if test "$vhost_vdpa" =3D "yes" ; then echo "CONFIG_VHOST_VDPA=3Dy" >> $config_host_mak fi -if test "$vhost_user_blk_server" =3D "yes" ; then - echo "CONFIG_VHOST_USER_BLK_SERVER=3Dy" >> $config_host_mak -fi if test "$vhost_user_fs" =3D "yes" ; then echo "CONFIG_VHOST_USER_FS=3Dy" >> $config_host_mak fi @@ -7012,6 +7003,7 @@ NINJA=3D$ninja $meson setup \ -Dcapstone=3D$capstone -Dslirp=3D$slirp -Dfdt=3D$fdt \ -Diconv=3D$iconv -Dcurses=3D$curses -Dlibudev=3D$libudev\ -Ddocs=3D$docs -Dsphinx_build=3D$sphinx_build -Dinstall_blobs=3D$b= lobs \ + -Dvhost_user_blk_server=3D$vhost_user_blk_server \ $cross_arg \ "$PWD" "$source_path" =20 diff --git a/meson.build b/meson.build index b4736203219..4b789f18c17 100644 --- a/meson.build +++ b/meson.build @@ -751,6 +751,16 @@ =20 has_statx =3D cc.links(statx_test) =20 +have_vhost_user_blk_server =3D (targetos =3D=3D 'linux') + +if get_option('vhost_user_blk_server').enabled() + if targetos !=3D 'linux' + error('vhost_user_blk_server requires linux') + endif +elif get_option('vhost_user_blk_server').disabled() or not have_system + have_vhost_user_blk_server =3D false +endif + ################# # config-host.h # ################# @@ -775,6 +785,7 @@ config_host_data.set('CONFIG_CURSES', curses.found()) config_host_data.set('CONFIG_SDL', sdl.found()) config_host_data.set('CONFIG_SDL_IMAGE', sdl_image.found()) +config_host_data.set('CONFIG_VHOST_USER_BLK_SERVER', have_vhost_user_blk_s= erver) config_host_data.set('CONFIG_VNC', vnc.found()) config_host_data.set('CONFIG_VNC_JPEG', jpeg.found()) config_host_data.set('CONFIG_VNC_PNG', png.found()) @@ -2103,6 +2114,7 @@ summary_info +=3D {'vhost-scsi support': config_host.has_key('CONFIG_VHOST= _SCSI')} summary_info +=3D {'vhost-vsock support': config_host.has_key('CONFIG_VHOS= T_VSOCK')} summary_info +=3D {'vhost-user support': config_host.has_key('CONFIG_VHOST= _KERNEL')} +summary_info +=3D {'vhost-user-blk server support': have_vhost_user_blk_se= rver} summary_info +=3D {'vhost-user-fs support': config_host.has_key('CONFIG_VH= OST_USER_FS')} summary_info +=3D {'vhost-vdpa support': config_host.has_key('CONFIG_VHOST= _VDPA')} summary_info +=3D {'Trace backends': config_host['TRACE_BACKENDS']} diff --git a/block/export/meson.build b/block/export/meson.build index 19526435d84..135b356775b 100644 --- a/block/export/meson.build +++ b/block/export/meson.build @@ -1,2 +1,5 @@ blockdev_ss.add(files('export.c')) -blockdev_ss.add(when: 'CONFIG_VHOST_USER_BLK_SERVER', if_true: files('vhos= t-user-blk-server.c')) + +if have_vhost_user_blk_server + blockdev_ss.add(files('vhost-user-blk-server.c')) +endif diff --git a/meson_options.txt b/meson_options.txt index b4f18018752..f6f64785fe7 100644 --- a/meson_options.txt +++ b/meson_options.txt @@ -64,6 +64,8 @@ option('xkbcommon', type : 'feature', value : 'auto', description: 'xkbcommon support') option('virtiofsd', type: 'feature', value: 'auto', description: 'build virtiofs daemon (virtiofsd)') +option('vhost_user_blk_server', type: 'feature', value: 'auto', + description: 'build vhost-user-blk server') =20 option('capstone', type: 'combo', value: 'auto', choices: ['disabled', 'enabled', 'auto', 'system', 'internal'], --=20 2.26.2 From nobody Mon Nov 17 15:45:56 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 63.128.21.124 as permitted sender) client-ip=63.128.21.124; envelope-from=philmd@redhat.com; helo=us-smtp-delivery-124.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 63.128.21.124 as permitted sender) smtp.mailfrom=philmd@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1605096568; cv=none; d=zohomail.com; s=zohoarc; b=AVNvUryXVSYIt8V8boSn42gs6KVZMubo+AzuTErs9SXebANIB4ggyVtLcin2b55OGZ8eMS7gWE8Ox3aqzDot7gBDw4e8SOgRZmzoyotxkyDDayO0NelcBX1YiXd/91Wb8KmoTeHdlccd85QGXfcP/7VyB/PgNskBiojuzJspLM8= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1605096568; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:MIME-Version:Message-ID:References:Subject:To; bh=DhWy8pholMfQJkiIQJrVZ9r7WROXeO4d6XcEJNyaGT8=; b=GmSPiI2j/wxxtrqQfL9AvsLTW7pTBtscgFDkj1e2+LXBwCv2Jq3K0Q80Mx9gECLknEQMPwVH/ewdFPbEoPZsz2Y7G0YyvAM9YpVXqzBVU5mKDGKEtqb7BTkfoBaGeyztm487l880XfDVveznNcUYIlpAjerFO4H/8bDAPS5mvrc= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 63.128.21.124 as permitted sender) smtp.mailfrom=philmd@redhat.com; dmarc=pass header.from= (p=none dis=none) header.from= Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [63.128.21.124]) by mx.zohomail.com with SMTPS id 1605096568600734.1836220938205; Wed, 11 Nov 2020 04:09:28 -0800 (PST) Received: from mail-wm1-f72.google.com (mail-wm1-f72.google.com [209.85.128.72]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-274-U-2-vE-8MJmhN87n5OYqrA-1; Wed, 11 Nov 2020 07:09:25 -0500 Received: by mail-wm1-f72.google.com with SMTP id o81so707140wma.0 for ; Wed, 11 Nov 2020 04:09:25 -0800 (PST) Return-Path: Return-Path: Received: from x1w.redhat.com (234.red-83-42-66.dynamicip.rima-tde.net. [83.42.66.234]) by smtp.gmail.com with ESMTPSA id y11sm2194390wmj.36.2020.11.11.04.09.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 11 Nov 2020 04:09:23 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1605096567; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=DhWy8pholMfQJkiIQJrVZ9r7WROXeO4d6XcEJNyaGT8=; b=IOLHLc6+t7axu0Q40iaE2HrjOpNbAZFEmpZbfr7RYN13v4u6tdnMYeT37tQsxLZcLmOPyU iptUm9Uvq1j22AEbb2QXWwksWQbQeY27Iq5hAUSUfB71HQ8Lf3f2Jk5BIjpBn/EZ2/prrq xpQnxLf/1wpeMVFZxqPkAyX7kKEtCWU= X-MC-Unique: U-2-vE-8MJmhN87n5OYqrA-1 X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=DhWy8pholMfQJkiIQJrVZ9r7WROXeO4d6XcEJNyaGT8=; b=rhYsGWxtPTtlZsqu9rYuxNNmV/cjlmgy3iB039z23tJf3AEqQCYd5ypiHGdfT+OSs4 LhYi152l+tfMKudEHFoU19P+yXCiLl1ukYCVyhAw/vKXZJEcUVi/c3W6b1sEa1zb09ij ayHyR1Wyqey9XcBZ3IypknRpRF0Tb9whHXWnguk+7SpvcpfrL20x4r40SJ1HAoMT1XmM mLbzVha55RtSTqGcm0K3TJl5ZeYEboWpxHejNkM3tBV5Z7yiHGSKhjNAEQtwEKKhDtUS 3yhXoDuNSsIvrrtjqEoXLmIuqBmf8mu+eLYmq3YBFMC/EpOeNd6gaWHH78u4k5HmO7v5 xycw== X-Gm-Message-State: AOAM533nazbf2pHYgve/JhZ6eTMInw+YShzyZEAEiq/KP8Tk1CsnN1+J 3jTHzTm8lUFZfSCRuqIwZQ8sAPCNbmZdOBryZei5rJD6uSajnxq5KZmYu0PUA6CxM3/EDnH6Ib6 N39GM7t1+pE9JWw== X-Received: by 2002:a1c:1c3:: with SMTP id 186mr3703188wmb.39.1605096564458; Wed, 11 Nov 2020 04:09:24 -0800 (PST) X-Google-Smtp-Source: ABdhPJziR1WVuyO/s1eaMfNt3JS97VllbCIjBCaUwwiB6m6SsvMbzRPclpgJwZQhgWM1x0CfVNjw1w== X-Received: by 2002:a1c:1c3:: with SMTP id 186mr3703172wmb.39.1605096564324; Wed, 11 Nov 2020 04:09:24 -0800 (PST) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Kevin Wolf , Stefan Hajnoczi , Max Reitz , qemu-block@nongnu.org, =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Subject: [PATCH-for-5.2 v2 2/4] meson: Only build vhost-user when system or tools is enabled Date: Wed, 11 Nov 2020 13:09:10 +0100 Message-Id: <20201111120912.3245574-3-philmd@redhat.com> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20201111120912.3245574-1-philmd@redhat.com> References: <20201111120912.3245574-1-philmd@redhat.com> MIME-Version: 1.0 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=philmd@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) It does not make sense to select vhost-user features without system-mode or tools. Return an error when this configuration is selected. Example: $ ../configure --disable-tools --disable-system --enable-vhost-user-blk-s= erver ../meson.build:755:4: ERROR: Problem encountered: vhost-user does not mak= e sense without system or tools support enabled Signed-off-by: Philippe Mathieu-Daud=C3=A9 --- meson.build | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/meson.build b/meson.build index 4b789f18c17..4fc58eb2c3d 100644 --- a/meson.build +++ b/meson.build @@ -751,6 +751,10 @@ =20 has_statx =3D cc.links(statx_test) =20 +if 'CONFIG_VHOST_USER' in config_host and not (have_system or have_tools) + error('vhost-user does not make sense without system or tools support = enabled') +endif + have_vhost_user_blk_server =3D (targetos =3D=3D 'linux') =20 if get_option('vhost_user_blk_server').enabled() --=20 2.26.2 From nobody Mon Nov 17 15:45:56 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 216.205.24.124 as permitted sender) client-ip=216.205.24.124; envelope-from=philmd@redhat.com; helo=us-smtp-delivery-124.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 216.205.24.124 as permitted sender) smtp.mailfrom=philmd@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1605096574; cv=none; d=zohomail.com; s=zohoarc; b=MzUtW6ngXN3KoiYfgMiqwHZlaryGk1BroZWPhk2/x0AkDhtOCtri7aPQGLwgUizRCKapncjYGBdN6P90gWeEyOEk4L/jSLBUyOw7wbHaAY44DMFP4ASuF5aHWN2XrZgVRDh7EH4iiOcLe94jhUX35XR/urwz6N7oEUxrzkP7sqA= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1605096574; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:MIME-Version:Message-ID:References:Subject:To; bh=K2YRTddG2x/SeHapVACTBBQp4nNKWuAWM30XETx0UHg=; b=bc8tu3t8hUPtMM4t42W4j4ohtdBToNQ4nKAbFOLDqaE5qDZzauAZNxNrsNMXWaTve6aGV1jpVh+XtdthrbGbyTmaHWAanLLdOVMWHfETpSgiJJdiIFW1SL3OMIemgVInjE8XIbg/7es0GGY53ZEdRAC+9fxznbhu9fDaQPuY4so= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 216.205.24.124 as permitted sender) smtp.mailfrom=philmd@redhat.com; dmarc=pass header.from= (p=none dis=none) header.from= Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [216.205.24.124]) by mx.zohomail.com with SMTPS id 1605096574452863.210993535978; Wed, 11 Nov 2020 04:09:34 -0800 (PST) Received: from mail-wm1-f71.google.com (mail-wm1-f71.google.com [209.85.128.71]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-213-UjdaUL5VOWahXZjzTdnkWg-1; Wed, 11 Nov 2020 07:09:30 -0500 Received: by mail-wm1-f71.google.com with SMTP id b206so699667wmd.3 for ; Wed, 11 Nov 2020 04:09:30 -0800 (PST) Return-Path: Return-Path: Received: from x1w.redhat.com (234.red-83-42-66.dynamicip.rima-tde.net. [83.42.66.234]) by smtp.gmail.com with ESMTPSA id a15sm2300209wrn.75.2020.11.11.04.09.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 11 Nov 2020 04:09:28 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1605096573; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=K2YRTddG2x/SeHapVACTBBQp4nNKWuAWM30XETx0UHg=; b=EhttpDBDD/9EeiQ0A+9qID/W8lQUEF3ddNXfPOid6sUarTGh4UoE3VxXw5C1b8vdezgC2e 7fG2gR2c57ypUk9ciq8iwW1nDR2ow7yiuuvIP6H5NMu0NNLxd0XR1oZyuUUzcDU9dJIGbp 0Y120CtDxqBzsliBSZjQUBtf8rWhRMI= X-MC-Unique: UjdaUL5VOWahXZjzTdnkWg-1 X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=K2YRTddG2x/SeHapVACTBBQp4nNKWuAWM30XETx0UHg=; b=SDmbNz/aDFxnJpVqlZLzWYyK8GZkRkDT21XLl5or6Tf0ThpsLohdawsN4dsB7AVCr7 a+Fw3W/Ij8u+NvUjZWFh12i1gTyDdvR7cCMRqg0qKucPclJTAxQam4wMlQL8usva6JUJ KXfvOoOv5ijk1EZF6VP9cvGWjVI+VmH/XS13xpqCCBYaSF/bhH/FmAS2SMJ8KnkYo3zi MlIhkawkb4cTrz0NO572BUvsDs7XCp6dlOOrVajSclubAwJ5/WlPCNwQnsqFBmdiowbW OeOrgIE1UVmvSoBA28q1+J1y5za56twMWislFC5VRtTN95seDM+XiY+zA37AbnFLF54t 5+LQ== X-Gm-Message-State: AOAM533WvP+pMs677ca0MNG4qYIy8WAk8ExNdq1JXo9Fjuz1LlAJ/qAI JyO5ZnYnwWvpHE4Sa6KMooiDVlhF+gqmRz19YMqg2k9hQvHGN0slTAF9NzGYePIZSMeHO73Bzrg mCYOMm41Nfb8hqw== X-Received: by 2002:a1c:ab57:: with SMTP id u84mr2588829wme.99.1605096569385; Wed, 11 Nov 2020 04:09:29 -0800 (PST) X-Google-Smtp-Source: ABdhPJzq4yHUdkNqA37naOfUfNC9xIoM0eZq8iBhuh9Lb7nB4gdStBP4HlTBCncP57Vlmujf65FKHA== X-Received: by 2002:a1c:ab57:: with SMTP id u84mr2588823wme.99.1605096569254; Wed, 11 Nov 2020 04:09:29 -0800 (PST) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Kevin Wolf , Stefan Hajnoczi , Max Reitz , qemu-block@nongnu.org, =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , =?UTF-8?q?Alex=20Benn=C3=A9e?= Subject: [PATCH-for-5.2 v2 3/4] vhost-user-blk-server: depend on CONFIG_VHOST_USER Date: Wed, 11 Nov 2020 13:09:11 +0100 Message-Id: <20201111120912.3245574-4-philmd@redhat.com> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20201111120912.3245574-1-philmd@redhat.com> References: <20201111120912.3245574-1-philmd@redhat.com> MIME-Version: 1.0 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=philmd@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) From: Stefan Hajnoczi I interpreted CONFIG_VHOST_USER as controlling only QEMU's vhost-user device frontends. However, virtiofsd and contrib/ vhost-user device backends are also controlled by CONFIG_VHOST_USER. Make the vhost-user-blk server depend on CONFIG_VHOST_USER for consistency. Now the following error is printed when the vhost-user-blk server is enabled without CONFIG_VHOST_USER: $ ./configure --disable-vhost-user --enable-vhost-user-blk ... ../meson.build:761:8: ERROR: Problem encountered: vhost_user_blk_server r= equires vhost-user support Suggested-by: Philippe Mathieu-Daud=C3=A9 Suggested-by: Alex Benn=C3=A9e Signed-off-by: Stefan Hajnoczi Reviewed-by: Philippe Mathieu-Daud=C3=A9 Tested-by: Philippe Mathieu-Daud=C3=A9 Message-Id: <20201110171121.1265142-3-stefanha@redhat.com> Signed-off-by: Philippe Mathieu-Daud=C3=A9 --- meson.build | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/meson.build b/meson.build index 4fc58eb2c3d..b978e89ec70 100644 --- a/meson.build +++ b/meson.build @@ -755,11 +755,14 @@ error('vhost-user does not make sense without system or tools support = enabled') endif =20 -have_vhost_user_blk_server =3D (targetos =3D=3D 'linux') +have_vhost_user_blk_server =3D (targetos =3D=3D 'linux' and + 'CONFIG_VHOST_USER' in config_host) =20 if get_option('vhost_user_blk_server').enabled() if targetos !=3D 'linux' error('vhost_user_blk_server requires linux') + elif 'CONFIG_VHOST_USER' not in config_host + error('vhost_user_blk_server requires vhost-user support') endif elif get_option('vhost_user_blk_server').disabled() or not have_system have_vhost_user_blk_server =3D false --=20 2.26.2 From nobody Mon Nov 17 15:45:56 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 63.128.21.124 as permitted sender) client-ip=63.128.21.124; envelope-from=philmd@redhat.com; helo=us-smtp-delivery-124.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 63.128.21.124 as permitted sender) smtp.mailfrom=philmd@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1605096578; cv=none; d=zohomail.com; s=zohoarc; b=A0oG+UDNVp0zAQQph8tYNwtrXx6YFRtQl20nhJ9RCmXLUfrr8b6rhxLxQzTy6Mz84s9PMVC5KogqGgYlUcCogVZ/oKkgUKElzrHrLoynlgHESy4EnTfrxe+7T3REmsbOwLjbSVEMDiIK8baqOALGw1tD/u3H/OAijZ5BcyZXayM= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1605096578; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:MIME-Version:Message-ID:References:Subject:To; bh=jbCKVEnSHecoxttJIqXX+fojEN4XVd8UbDYUk4BjIvY=; b=YADapzV1WSaz+k6x5G/uXTIaT/B+9ZkCXeHJNxhXsxxwXLwkYYd6ax6tarL4MDA6AbRYliGtsMPvRuExGbMdc0gOxNowZggZrzXvLsyX3pfwcPN+gQZDH3LbSHODqxeuqpaOndtpTFv1OGT9IV6y3tM8DxZXORBtQLH2+Xfysyk= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 63.128.21.124 as permitted sender) smtp.mailfrom=philmd@redhat.com; dmarc=pass header.from= (p=none dis=none) header.from= Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [63.128.21.124]) by mx.zohomail.com with SMTPS id 1605096578078785.8849835935562; Wed, 11 Nov 2020 04:09:38 -0800 (PST) Received: from mail-wm1-f72.google.com (mail-wm1-f72.google.com [209.85.128.72]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-278-mljmT_UqOM-31vCb0x9Q4A-1; Wed, 11 Nov 2020 07:09:35 -0500 Received: by mail-wm1-f72.google.com with SMTP id u123so693241wmu.5 for ; Wed, 11 Nov 2020 04:09:35 -0800 (PST) Return-Path: Return-Path: Received: from x1w.redhat.com (234.red-83-42-66.dynamicip.rima-tde.net. [83.42.66.234]) by smtp.gmail.com with ESMTPSA id l24sm2401649wmi.7.2020.11.11.04.09.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 11 Nov 2020 04:09:33 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1605096577; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=jbCKVEnSHecoxttJIqXX+fojEN4XVd8UbDYUk4BjIvY=; b=V88hZucc1XkTu448CqpM17uugPoIFbGCY9lEq/doHfqBi96xVvKBWDbw6YghZ/9kq6WQ2s HJ7RtO6suIDANwkI4TlOYZmgt0LlhoueE4aXu763E2Jdv3yO/eS/kn5fgSoadasiJd+7S+ a6vvb3eynZa6aMZHimD4RjyAOrV64w4= X-MC-Unique: mljmT_UqOM-31vCb0x9Q4A-1 X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=jbCKVEnSHecoxttJIqXX+fojEN4XVd8UbDYUk4BjIvY=; b=DIPGzGHZPtEgXTpMSPyl4AQ5Kx+yZTmu7ro5Z/qfVzc2pJA+On9VBpaN71gpbrZ/6e WPGpMHr7MHcF3X9Ivn3dDipeXHshEvvE19SH2MWC73ikAEHx5tqW2V8S6TDs/Mnjp131 W3rdlBkeIiO70NZY00ftV0ABSHpS1vzY12LYjwqBVhA2Lhghrv7CMBc6PW4dibwB3KGK HhFOzFfEBDbx6baGdIl/6rd5tmOwETVbZLOrcA0w28W5cIAv6fpIbfqlnF7sLLjeltM3 c2M5oCJ08fNKKfFmp5g7aopO45znvWzrOIJfhrnQ4pkmbgtEoYKVA+P9sQwa9t/jOaWX evtw== X-Gm-Message-State: AOAM532PVWd2MDi2hkbVqjqGYkqbFDOfYivgxji98UauJb45gqEtlfXa D2ulZ9Mr0AmlUpP1RVtMfwVrNMV9YOnUIzXfYdrmtQ7c3tpoeuZy3pR9msUCDcz0VrcOSbZskLy vcKj3/Ncy1DRe9A== X-Received: by 2002:adf:f888:: with SMTP id u8mr19155910wrp.381.1605096574207; Wed, 11 Nov 2020 04:09:34 -0800 (PST) X-Google-Smtp-Source: ABdhPJxQy0ISXAUNmYX31jd/nnG8+LXeh6kiFVyAF+Y451htCjF1E3ll157jLvbY6zHmwDZaD6wZtg== X-Received: by 2002:adf:f888:: with SMTP id u8mr19155894wrp.381.1605096574064; Wed, 11 Nov 2020 04:09:34 -0800 (PST) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Kevin Wolf , Stefan Hajnoczi , Max Reitz , qemu-block@nongnu.org, Thomas Huth , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Subject: [PATCH-for-5.2 v2 4/4] configure: mark vhost-user Linux-only Date: Wed, 11 Nov 2020 13:09:12 +0100 Message-Id: <20201111120912.3245574-5-philmd@redhat.com> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20201111120912.3245574-1-philmd@redhat.com> References: <20201111120912.3245574-1-philmd@redhat.com> MIME-Version: 1.0 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=philmd@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) From: Stefan Hajnoczi The vhost-user protocol uses the Linux eventfd feature and is typically connected to Linux kvm.ko ioeventfd and irqfd file descriptors. The protocol specification in docs/interop/vhost-user.rst does not describe how platforms without eventfd support work. The QEMU vhost-user devices compile on other POSIX host operating systems because eventfd usage is abstracted in QEMU. The libvhost-user programs in contrib/ do not compile but we failed to notice since they are not built by default. Make it clear that vhost-user is only supported on Linux for the time being. If someone wishes to support it on other platforms then the details can be added to vhost-user.rst and CI jobs can test the feature to prevent bitrot. Signed-off-by: Stefan Hajnoczi Reviewed-by: Thomas Huth Reviewed-by: Philippe Mathieu-Daud=C3=A9 Tested-by: Philippe Mathieu-Daud=C3=A9 Message-Id: <20201110171121.1265142-4-stefanha@redhat.com> Signed-off-by: Philippe Mathieu-Daud=C3=A9 --- configure | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/configure b/configure index 516f28a0888..3fbc2a0c68c 100755 --- a/configure +++ b/configure @@ -328,7 +328,7 @@ vhost_net=3D"" vhost_crypto=3D"" vhost_scsi=3D"" vhost_vsock=3D"" -vhost_user=3D"" +vhost_user=3D"no" vhost_user_blk_server=3D"auto" vhost_user_fs=3D"" kvm=3D"auto" @@ -718,7 +718,6 @@ fi case $targetos in MINGW32*) mingw32=3D"yes" - vhost_user=3D"no" audio_possible_drivers=3D"dsound sdl" if check_include dsound.h; then audio_drv_list=3D"dsound" @@ -797,6 +796,7 @@ Linux) audio_possible_drivers=3D"oss alsa sdl pa" linux=3D"yes" linux_user=3D"yes" + vhost_user=3D"yes" ;; esac =20 @@ -2341,9 +2341,8 @@ fi # vhost interdependencies and host support =20 # vhost backends -test "$vhost_user" =3D "" && vhost_user=3Dyes -if test "$vhost_user" =3D "yes" && test "$mingw32" =3D "yes"; then - error_exit "vhost-user isn't available on win32" +if test "$vhost_user" =3D "yes" && test "$linux" !=3D "yes"; then + error_exit "vhost-user is only available on Linux" fi test "$vhost_vdpa" =3D "" && vhost_vdpa=3D$linux if test "$vhost_vdpa" =3D "yes" && test "$linux" !=3D "yes"; then --=20 2.26.2