From nobody Sat May 4 20:14:55 2024 Delivered-To: importer2@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer2=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1651246853044447.5386433781438; Fri, 29 Apr 2022 08:40:53 -0700 (PDT) Received: from localhost ([::1]:37398 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nkSjj-0001q8-VB for importer2@patchew.org; Fri, 29 Apr 2022 11:40:52 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:43966) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nkSSk-0001fq-Py for qemu-devel@nongnu.org; Fri, 29 Apr 2022 11:23:18 -0400 Received: from mail-ed1-x52b.google.com ([2a00:1450:4864:20::52b]:39435) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nkSSh-00067N-Qp for qemu-devel@nongnu.org; Fri, 29 Apr 2022 11:23:18 -0400 Received: by mail-ed1-x52b.google.com with SMTP id g20so9455407edw.6 for ; Fri, 29 Apr 2022 08:23:15 -0700 (PDT) Received: from avogadro.redhat.com ([2001:b07:6468:f312:1c09:f536:3de6:228c]) by smtp.gmail.com with ESMTPSA id w25-20020a170907271900b006f3ef214dd6sm736395ejk.60.2022.04.29.08.23.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 29 Apr 2022 08:23:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=sr+1S5AfPs7pF8A9J3lRj9fU0Gq6cRnPtGYyBTEolJA=; b=JOPknC+rTJoK3eLqu3R8+GmaZD2Jfhp8jKxnkmF4HBwFT6Y+O99LELhU1m8+Qx4Aj6 hShIirnsEzMEUgYsSxmlR78yFCdNOrPapCumRbzsa12LgJ193q75rgtndz7Pd/S1ksqJ iIs47RrEkXvcoY/n+2JYjwOVbdc3qoAN1sds0hS3/KUrXbRyjUFAPKdU9XyUezcwhRt/ CrceruzRXDpQspuh6yIGjWEHpjjL12HGoGnrfuhVjRN0gFL85J4EAEjv5Rg9i8o+7Ayq AkEEfnSITAVOmdkojR37Wm47DIt4v5Ipb0X75ZkM75FvOSY8rVuI0yn4fDLG5CcT7H/I M3kQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=sr+1S5AfPs7pF8A9J3lRj9fU0Gq6cRnPtGYyBTEolJA=; b=KgjpeS7fphqaAdteiPnHP54VV32u9MGwU16UcmZT/P8C3WtRlHSnLverAf+MqJnMu9 d2AVgpwVo7ggOv/Y5SjLfXrj0rqXk85ME+MHPWqXAkDxQ9HwUE9rG+HQEo6OIyPminNg 3hE5aedRbm2cabi/Xlq6si8ej5zIgp535SCESPWjZMmH2JvEUtvQ8k+CqzMslIEMwfUb zlV+vF1bfHk7rOpdoW0kEQm3v3ZyCKndj+pzAuADPViLc5N1ZohqZiDIyD5kuIoAxLyU BexpGuXOapvl5oTL0J45c6sw9OKttfcSf4hVQxAH/8M3DMEHt6GxYfjnr0IcIULbDxT7 BWVg== X-Gm-Message-State: AOAM532DqmHSbA9T7qjWDK9Qfv5BzUOl6oInxolyPDA3qVRWr/vIFMS8 jD/yizkc3MNPs+IjKIk46HLKv+S2+tdq+Q== X-Google-Smtp-Source: ABdhPJyu7UqEAHLela71/ppzNv0ft41Ak+X1RaJu6kp3qggq3peSuQASVM6y2mWBIKkC/5fRvTVakg== X-Received: by 2002:aa7:c3ca:0:b0:425:ecfc:4258 with SMTP id l10-20020aa7c3ca000000b00425ecfc4258mr27110006edr.266.1651245794433; Fri, 29 Apr 2022 08:23:14 -0700 (PDT) From: Paolo Bonzini To: qemu-devel@nongnu.org Subject: [PULL 01/25] WHPX: support for xcr0 Date: Fri, 29 Apr 2022 17:22:48 +0200 Message-Id: <20220429152312.335715-2-pbonzini@redhat.com> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220429152312.335715-1-pbonzini@redhat.com> References: <20220429152312.335715-1-pbonzini@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer2=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::52b; envelope-from=paolo.bonzini@gmail.com; helo=mail-ed1-x52b.google.com X-Spam_score_int: -14 X-Spam_score: -1.5 X-Spam_bar: - X-Spam_report: (-1.5 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FORGED_FROMDOMAIN=0.249, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.249, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Sunil Muthuswamy Errors-To: qemu-devel-bounces+importer2=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZM-MESSAGEID: 1651246855966100001 Content-Type: text/plain; charset="utf-8" From: Sunil Muthuswamy Support for xcr0 to be able to enable xsave/xrstor. This by itself is not sufficient to enable xsave/xrstor. WHPX XSAVE API's also needs to be hooked up. Signed-off-by: Sunil Muthuswamy Message-Id: Signed-off-by: Paolo Bonzini --- target/i386/whpx/whpx-all.c | 89 ++++++++++++++++++++++++++++++++ target/i386/whpx/whpx-internal.h | 3 ++ 2 files changed, 92 insertions(+) diff --git a/target/i386/whpx/whpx-all.c b/target/i386/whpx/whpx-all.c index b625ad5bbb..c8376da7ed 100644 --- a/target/i386/whpx/whpx-all.c +++ b/target/i386/whpx/whpx-all.c @@ -246,9 +246,15 @@ static bool whpx_allowed; static bool whp_dispatch_initialized; static HMODULE hWinHvPlatform, hWinHvEmulation; static uint32_t max_vcpu_index; +static WHV_PROCESSOR_XSAVE_FEATURES whpx_xsave_cap; + struct whpx_state whpx_global; struct WHPDispatch whp_dispatch; =20 +static bool whpx_has_xsave(void) +{ + return whpx_xsave_cap.XsaveSupport; +} =20 /* * VP support @@ -300,6 +306,28 @@ static SegmentCache whpx_seg_h2q(const WHV_X64_SEGMENT= _REGISTER *hs) return qs; } =20 +/* X64 Extended Control Registers */ +static void whpx_set_xcrs(CPUState *cpu) +{ + struct CPUX86State *env =3D (CPUArchState *)(cpu->env_ptr); + HRESULT hr; + struct whpx_state *whpx =3D &whpx_global; + WHV_REGISTER_VALUE xcr0; + WHV_REGISTER_NAME xcr0_name =3D WHvX64RegisterXCr0; + + if (!whpx_has_xsave()) { + return; + } + + /* Only xcr0 is supported by the hypervisor currently */ + xcr0.Reg64 =3D env->xcr0; + hr =3D whp_dispatch.WHvSetVirtualProcessorRegisters( + whpx->partition, cpu->cpu_index, &xcr0_name, 1, &xcr0); + if (FAILED(hr)) { + error_report("WHPX: Failed to set register xcr0, hr=3D%08lx", hr); + } +} + static int whpx_set_tsc(CPUState *cpu) { CPUX86State *env =3D cpu->env_ptr; @@ -435,6 +463,12 @@ static void whpx_set_registers(CPUState *cpu, int leve= l) =20 /* 8 Debug Registers - Skipped */ =20 + /* + * Extended control registers needs to be handled separately depending + * on whether xsave is supported/enabled or not. + */ + whpx_set_xcrs(cpu); + /* 16 XMM registers */ assert(whpx_register_names[idx] =3D=3D WHvX64RegisterXmm0); idx_next =3D idx + 16; @@ -541,6 +575,30 @@ static int whpx_get_tsc(CPUState *cpu) return 0; } =20 +/* X64 Extended Control Registers */ +static void whpx_get_xcrs(CPUState *cpu) +{ + struct CPUX86State *env =3D (CPUArchState *)(cpu->env_ptr); + HRESULT hr; + struct whpx_state *whpx =3D &whpx_global; + WHV_REGISTER_VALUE xcr0; + WHV_REGISTER_NAME xcr0_name =3D WHvX64RegisterXCr0; + + if (!whpx_has_xsave()) { + return; + } + + /* Only xcr0 is supported by the hypervisor currently */ + hr =3D whp_dispatch.WHvGetVirtualProcessorRegisters( + whpx->partition, cpu->cpu_index, &xcr0_name, 1, &xcr0); + if (FAILED(hr)) { + error_report("WHPX: Failed to get register xcr0, hr=3D%08lx", hr); + return; + } + + env->xcr0 =3D xcr0.Reg64; +} + static void whpx_get_registers(CPUState *cpu) { struct whpx_state *whpx =3D &whpx_global; @@ -634,6 +692,12 @@ static void whpx_get_registers(CPUState *cpu) =20 /* 8 Debug Registers - Skipped */ =20 + /* + * Extended control registers needs to be handled separately depending + * on whether xsave is supported/enabled or not. + */ + whpx_get_xcrs(cpu); + /* 16 XMM registers */ assert(whpx_register_names[idx] =3D=3D WHvX64RegisterXmm0); idx_next =3D idx + 16; @@ -2513,6 +2577,31 @@ static int whpx_accel_init(MachineState *ms) goto error; } =20 + /* + * Query the XSAVE capability of the partition. Any error here is not + * considered fatal. + */ + hr =3D whp_dispatch.WHvGetPartitionProperty( + whpx->partition, + WHvPartitionPropertyCodeProcessorXsaveFeatures, + &whpx_xsave_cap, + sizeof(whpx_xsave_cap), + &whpx_cap_size); + + /* + * Windows version which don't support this property will return with = the + * specific error code. + */ + if (FAILED(hr) && hr !=3D WHV_E_UNKNOWN_PROPERTY) { + error_report("WHPX: Failed to query XSAVE capability, hr=3D%08lx",= hr); + } + + if (whpx_has_xsave()) { + printf("WHPX: Partition XSAVE capable\n"); + } else { + printf("WHPX: Partition is not XSAVE capable\n"); + } + memset(&prop, 0, sizeof(WHV_PARTITION_PROPERTY)); prop.ProcessorCount =3D ms->smp.cpus; hr =3D whp_dispatch.WHvSetPartitionProperty( diff --git a/target/i386/whpx/whpx-internal.h b/target/i386/whpx/whpx-inter= nal.h index 2416ec7922..dbb7e7ba82 100644 --- a/target/i386/whpx/whpx-internal.h +++ b/target/i386/whpx/whpx-internal.h @@ -48,6 +48,9 @@ void whpx_apic_get(DeviceState *s); =20 #define WHV_E_UNKNOWN_CAPABILITY 0x80370300L =20 +/* This should eventually come from the Windows SDK */ +#define WHV_E_UNKNOWN_PROPERTY 0x80370302 + #define LIST_WINHVPLATFORM_FUNCTIONS(X) \ X(HRESULT, WHvGetCapability, (WHV_CAPABILITY_CODE CapabilityCode, VOID* = CapabilityBuffer, UINT32 CapabilityBufferSizeInBytes, UINT32* WrittenSizeIn= Bytes)) \ X(HRESULT, WHvCreatePartition, (WHV_PARTITION_HANDLE* Partition)) \ --=20 2.35.1 From nobody Sat May 4 20:14:55 2024 Delivered-To: importer2@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer2=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 165124710906155.28551576144628; Fri, 29 Apr 2022 08:45:09 -0700 (PDT) Received: from localhost ([::1]:48994 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nkSnr-0001En-SS for importer2@patchew.org; Fri, 29 Apr 2022 11:45:07 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:43964) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nkSSk-0001f2-Lt for qemu-devel@nongnu.org; Fri, 29 Apr 2022 11:23:18 -0400 Received: from mail-ed1-x52f.google.com ([2a00:1450:4864:20::52f]:45915) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nkSSj-00067S-0h for qemu-devel@nongnu.org; Fri, 29 Apr 2022 11:23:18 -0400 Received: by mail-ed1-x52f.google.com with SMTP id be20so9445738edb.12 for ; Fri, 29 Apr 2022 08:23:16 -0700 (PDT) Received: from avogadro.redhat.com ([2001:b07:6468:f312:1c09:f536:3de6:228c]) by smtp.gmail.com with ESMTPSA id w25-20020a170907271900b006f3ef214dd6sm736395ejk.60.2022.04.29.08.23.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 29 Apr 2022 08:23:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=l0pmPnSw2fP9XE09cQAi1jZrvdds1H+19fdhpbcfKJ8=; b=adqgN0dN+lLLsmpoEbJkeMAJftV1Yc6eiu6iSkgcPReC75tBI/KktZhBuKJfOmCTrp g6WT0dCOPu30r6ARItL/dPE7vamNWrDtboaAh1OV9NJOYZfVP8ntFXDlDv8pVYP4J29j 4EpiaYVgM3l3gFdCCpS0ajTFWb/m0FUe5Sxp8uY4/I1PMmCna6RT6n4Q9AME/rEtBHY4 K0ZWOrTmKWvf4jkD+uLIr6F6wuJ2Mzb116E6ybRFI5qhcsR5m9LWykRC2UftEqwX7Ed3 5UVS66fQdabrlPmhB6UJ5eIG9DsOBaXJIx5hbB4ugDa62exHcv1dSPpYxc8AFhwTEHDc QHTg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=l0pmPnSw2fP9XE09cQAi1jZrvdds1H+19fdhpbcfKJ8=; b=j5Fm7vjZmspJjqrJ7h4m6QJsHY11Wvr83iQjv18S7OSHpWHaf2iuf7sdiNjZ4htZeY /ZBypJOKotjSgIHBejzuBNaflRa22Oe0KTB8d27EAWegSahIGoxdubKpc8DUWDjJ7fRH 3jpl/F/+Dz90abXQJihcV0sWkqx16N/FbO3kIRyVjl6yomjYOy0h36xX4eL/ihz7sfyR KiTMKRAgPVTFrxWHgIXtUekNFmhW29esNdMe/mXEYTPijyNpvxCGsfM3s1OF7Z70fy1v U8wmV/Cx54MHpt1pO0Kbqgo0B0ELDPtP0XpejO2CFL9oxnzQVF9afBhTiqSS3rg0LdF1 ikhg== X-Gm-Message-State: AOAM531/4jjuxlIHlnZ2pXfcgQy9c64yYALOcDbIFARnagCsgY/WZ5Uv EtcNCproYrmM4R3pipue5dIaU8VbuUkxeg== X-Google-Smtp-Source: ABdhPJyXsZxcXcyTIRXrJeHFTCgGSox/Be5j8lPQfW18hDAdPw1t2P2t1m1phuBkg7NbSG0bMSBbhQ== X-Received: by 2002:a05:6402:190c:b0:426:1e86:8f1b with SMTP id e12-20020a056402190c00b004261e868f1bmr12238905edz.82.1651245795266; Fri, 29 Apr 2022 08:23:15 -0700 (PDT) From: Paolo Bonzini To: qemu-devel@nongnu.org Subject: [PULL 02/25] configure: Add cross prefix for widl tool Date: Fri, 29 Apr 2022 17:22:49 +0200 Message-Id: <20220429152312.335715-3-pbonzini@redhat.com> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220429152312.335715-1-pbonzini@redhat.com> References: <20220429152312.335715-1-pbonzini@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Type: text/plain Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer2=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::52f; envelope-from=paolo.bonzini@gmail.com; helo=mail-ed1-x52f.google.com X-Spam_score_int: -4 X-Spam_score: -0.5 X-Spam_bar: / X-Spam_report: (-0.5 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FORGED_FROMDOMAIN=0.249, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.249, PP_MIME_FAKE_ASCII_TEXT=0.999, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Konstantin Kostiuk , =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= Errors-To: qemu-devel-bounces+importer2=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZM-MESSAGEID: 1651247109496100001 From: Konstantin Kostiuk The mingw-w64-tool package in Fedora provides widl tool with a cross prefix, so adds it automatically for cross builds. WIDL env can be used to redefine the path to tool. The same behavior as with windres. Signed-off-by: Konstantin Kostiuk Message-Id: <20220428181525.300521-1-kkostiuk@redhat.com> Reviewed-by: Marc-Andr=C3=A9 Lureau Signed-off-by: Paolo Bonzini --- configure | 3 +++ 1 file changed, 3 insertions(+) diff --git a/configure b/configure index 59c43bea05..8b775492d0 100755 --- a/configure +++ b/configure @@ -415,6 +415,7 @@ ranlib=3D"${RANLIB-${cross_prefix}ranlib}" nm=3D"${NM-${cross_prefix}nm}" smbd=3D"$SMBD" strip=3D"${STRIP-${cross_prefix}strip}" +widl=3D"${WIDL-${cross_prefix}widl}" windres=3D"${WINDRES-${cross_prefix}windres}" pkg_config_exe=3D"${PKG_CONFIG-${cross_prefix}pkg-config}" query_pkg_config() { @@ -2786,6 +2787,7 @@ if test "$skip_meson" =3D no; then echo "sdl2-config =3D [$(meson_quote $sdl2_config)]" >> $cross fi echo "strip =3D [$(meson_quote $strip)]" >> $cross + echo "widl =3D [$(meson_quote $widl)]" >> $cross echo "windres =3D [$(meson_quote $windres)]" >> $cross if test "$cross_compile" =3D "yes"; then cross_arg=3D"--cross-file config-meson.cross" @@ -2907,6 +2909,7 @@ preserve_env PYTHON preserve_env SDL2_CONFIG preserve_env SMBD preserve_env STRIP +preserve_env WIDL preserve_env WINDRES =20 printf "exec" >>config.status --=20 2.35.1 From nobody Sat May 4 20:14:55 2024 Delivered-To: importer2@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer2=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1651246245780889.3265019663253; Fri, 29 Apr 2022 08:30:45 -0700 (PDT) Received: from localhost ([::1]:58678 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nkSZv-0003Qy-W8 for importer2@patchew.org; Fri, 29 Apr 2022 11:30:44 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:43970) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nkSSl-0001hW-7j for qemu-devel@nongnu.org; Fri, 29 Apr 2022 11:23:19 -0400 Received: from mail-ed1-x530.google.com ([2a00:1450:4864:20::530]:40782) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nkSSj-00067U-IX for qemu-devel@nongnu.org; Fri, 29 Apr 2022 11:23:18 -0400 Received: by mail-ed1-x530.google.com with SMTP id p18so9462200edr.7 for ; Fri, 29 Apr 2022 08:23:17 -0700 (PDT) Received: from avogadro.redhat.com ([2001:b07:6468:f312:1c09:f536:3de6:228c]) by smtp.gmail.com with ESMTPSA id w25-20020a170907271900b006f3ef214dd6sm736395ejk.60.2022.04.29.08.23.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 29 Apr 2022 08:23:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=56Uzcfx5/2ZAiMjWDbw7MTVY0cGXIk+YsRTnWPe9dig=; b=KNZKKKXvqgvR01TNDVWNhtThYLmN98ZGZwjz4xF1pNXADauN/kbwtfyUny/kofJvuo 7hSPIZhhe7zLrEEJzKFSP1vsUU38TGdRmIv05TRbGnIvyfqcO9/0vZIJtsR20Mgh3sL4 COODLdD8Hz/66DV/cKUUk0UzLx8/3z7daYiHIsR7HA9FRvpcXuQ4LRk7/3608kn4vhVM 8b3aR+d2+NPww5xEXpWUVvDAv2yfx84xJ5LJIcrbv9z9rNENg9ZKV61E/YK9KgZVj1QZ c5b9hgShzsmL2THHgBtYH4TuuVkOEF70wxg9mgOQ6NOKlcg+kv4cZqwxQTqm0lbyWOI7 pILQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=56Uzcfx5/2ZAiMjWDbw7MTVY0cGXIk+YsRTnWPe9dig=; b=uzLuah2tAZCgdlRRnBvwVwdZtg8piCzyJGG5+Q4sEBAF5LyAlfZdJs0nrNR4a5naaa CpiXMkir+0ZS4QDCm4/9kpXlu2RTgC0QoK0wh61GB8/LlRZaVjWYmoVpUk5kDAoM/oDw CCrM1WTUEXcKiewbh1Z29BpZL3tnO3L0nef+/9m+7h7kb/ZaQ2xz/Jlh5k0HLLeDghcv O/VrAdVOJvIlfJmuGibl+/Gmyd9wkT8fIwlvgOaTCKi2t8TqpdI7k+STd4oCvUP4dwVb KHaJYCesW9xw9e1LUIr14aB2fJUgMjuH7LXNnjr9DYLG2SqPxPNdKf3TztHVyT3LWtwp 8Q/w== X-Gm-Message-State: AOAM533ScFHQIlUjUFnJH1741wEyoit3d+PmstZhd9/UYlJRo+rmE1WN p0AkoTvmoabA6c00QgpZB7iT4f3pVlyUYA== X-Google-Smtp-Source: ABdhPJzkofTncL9V3jk5nx97TXxh98EbrwnbLh3J3+Hm0tFr954begNSgCwZMjU8KRzwi3B0lvIofQ== X-Received: by 2002:aa7:c6c3:0:b0:425:b13b:94f with SMTP id b3-20020aa7c6c3000000b00425b13b094fmr41365806eds.313.1651245796072; Fri, 29 Apr 2022 08:23:16 -0700 (PDT) From: Paolo Bonzini To: qemu-devel@nongnu.org Subject: [PULL 03/25] qga-vss: always build qga-vss.tlb when qga-vss.dll is built Date: Fri, 29 Apr 2022 17:22:50 +0200 Message-Id: <20220429152312.335715-4-pbonzini@redhat.com> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220429152312.335715-1-pbonzini@redhat.com> References: <20220429152312.335715-1-pbonzini@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Type: text/plain Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer2=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::530; envelope-from=paolo.bonzini@gmail.com; helo=mail-ed1-x530.google.com X-Spam_score_int: -4 X-Spam_score: -0.5 X-Spam_bar: / X-Spam_report: (-0.5 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FORGED_FROMDOMAIN=0.249, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.249, PP_MIME_FAKE_ASCII_TEXT=0.999, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Konstantin Kostiuk , =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= Errors-To: qemu-devel-bounces+importer2=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZM-MESSAGEID: 1651246247635100001 From: Konstantin Kostiuk Signed-off-by: Konstantin Kostiuk Message-Id: <20220428181541.300619-1-kkostiuk@redhat.com> Reviewed-by: Marc-Andr=C3=A9 Lureau Signed-off-by: Paolo Bonzini --- qga/vss-win32/meson.build | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/qga/vss-win32/meson.build b/qga/vss-win32/meson.build index 71c50d0866..26c5dd6e0e 100644 --- a/qga/vss-win32/meson.build +++ b/qga/vss-win32/meson.build @@ -23,8 +23,6 @@ qga_vss =3D shared_module( ] ) =20 -all_qga +=3D qga_vss - if midl.found() gen_tlb =3D custom_target('gen-tlb', input: 'qga-vss.idl', @@ -36,3 +34,5 @@ else output: 'qga-vss.tlb', command: [widl, '-t', '@INPUT@', '-o', '@OUTPUT@= ']) endif + +all_qga +=3D [ qga_vss, gen_tlb ] --=20 2.35.1 From nobody Sat May 4 20:14:55 2024 Delivered-To: importer2@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer2=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1651246183323543.0911611346297; Fri, 29 Apr 2022 08:29:43 -0700 (PDT) Received: from localhost ([::1]:56516 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nkSYv-0001vI-RY for importer2@patchew.org; Fri, 29 Apr 2022 11:29:41 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:43990) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nkSSm-0001lv-7I for qemu-devel@nongnu.org; Fri, 29 Apr 2022 11:23:20 -0400 Received: from mail-ej1-x631.google.com ([2a00:1450:4864:20::631]:47067) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nkSSk-00067s-38 for qemu-devel@nongnu.org; Fri, 29 Apr 2022 11:23:19 -0400 Received: by mail-ej1-x631.google.com with SMTP id j6so16058942ejc.13 for ; Fri, 29 Apr 2022 08:23:17 -0700 (PDT) Received: from avogadro.redhat.com ([2001:b07:6468:f312:1c09:f536:3de6:228c]) by smtp.gmail.com with ESMTPSA id w25-20020a170907271900b006f3ef214dd6sm736395ejk.60.2022.04.29.08.23.16 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 29 Apr 2022 08:23:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=/XyJpidgXjw/3lLWklJsHxaHc4ZIBVXZBlPinPPIPrc=; b=M1UjD9j6nhoYakUVXyg+kQHRBkTHfzYNYwx11bel0guceIA7zvUrkDinEudnQuiri0 rvw5PjHH+knOHi/wn5yvwikDCDKD8CdLRnrKpwhPnLQHH96UdrK44fWXQBVIbJLo0/21 EWlGbUE6+oIKB65V9ttzbT2WY90AdOkyASrwSU8oncHWME6SjEmqaZNk0gl29pIxBwrG 0SzdaeOxcS/ATMNYDmMLp7kA4xvD5tA//WAKPxPLdCsHvS1jCN6NYblfDoj5NUmnrRFV dLjcQfRb+mdooGe0lDBx/GKMns7rrojcZwdqulqOlcoVJrTS6rmdvMZ/MQI2SOOz5CyX ccSQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=/XyJpidgXjw/3lLWklJsHxaHc4ZIBVXZBlPinPPIPrc=; b=E2ydd6E5R4DBFM8WKYDyALhs3deoT5SWxL/zQrquzvI6Y++M8Jn/7zde1Fg34yJIBj OOpnC46dpqKy99BC9JlbKMGX6l9/U64/K2lNneRbtosg5pknBpSG1zEi09GPyD77P2so /eVKx5ufrYT2ueNowjfGjYviQebR5orIJfCO5BA4R4zzMU67e3T8Ea/apWhNNbclUjXu e2AB7kiOOWCXTNE3cV+6B4yeSygze8oNyavpASkNzJtz+/H2CEDHMrD9bRlmjhAdpPi/ JLOYkToiHxZgsT0KqQQGAOFgA2P8JdxNLcpkiqb0Q7isgAJY96fsPZqyoTsLVy77O1/a 7q6A== X-Gm-Message-State: AOAM531m9k7u2gH1Z4h5Wge6w0WkeCLXSfk9jpnGIxadPfTBtPpSNEzZ KClwtEXitNtQrfGZe7z4MOq6m8Ib793qJQ== X-Google-Smtp-Source: ABdhPJyrzjAO+eTsKrBEjhgnjaMyQk75uQYNjk2X1FbqwQHYFf7BytrMk/SHv4zt1sUGKXkTuSvZMg== X-Received: by 2002:a17:907:6289:b0:6e0:eb0c:8ee7 with SMTP id nd9-20020a170907628900b006e0eb0c8ee7mr34689859ejc.245.1651245796757; Fri, 29 Apr 2022 08:23:16 -0700 (PDT) From: Paolo Bonzini To: qemu-devel@nongnu.org Subject: [PULL 04/25] meson-buildoptions: add support for string options Date: Fri, 29 Apr 2022 17:22:51 +0200 Message-Id: <20220429152312.335715-5-pbonzini@redhat.com> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220429152312.335715-1-pbonzini@redhat.com> References: <20220429152312.335715-1-pbonzini@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Type: text/plain Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer2=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::631; envelope-from=paolo.bonzini@gmail.com; helo=mail-ej1-x631.google.com X-Spam_score_int: -4 X-Spam_score: -0.5 X-Spam_bar: / X-Spam_report: (-0.5 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FORGED_FROMDOMAIN=0.249, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.249, PP_MIME_FAKE_ASCII_TEXT=0.999, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= Errors-To: qemu-devel-bounces+importer2=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZM-MESSAGEID: 1651246185131100003 Allow using the buildoptions.json file for more options, namely anything that is not a boolean or multiple-choice. The mapping between configure and meson is messy for string options, so allow configure to use to something other than the name in meson_options.txt. This will come in handy anyway for builtin Meson options such as b_lto or b_coverage. Tested-by: Marc-Andr=C3=A9 Lureau Signed-off-by: Paolo Bonzini --- meson_options.txt | 2 +- scripts/meson-buildoptions.py | 65 ++++++++++++++++++++++++++++++----- scripts/meson-buildoptions.sh | 6 ++-- 3 files changed, 60 insertions(+), 13 deletions(-) diff --git a/meson_options.txt b/meson_options.txt index af432a4ee6..390701517c 100644 --- a/meson_options.txt +++ b/meson_options.txt @@ -11,7 +11,7 @@ option('qemu_firmwarepath', type : 'string', value : '', option('smbd', type : 'string', value : '', description: 'Path to smbd for slirp networking') option('sphinx_build', type : 'string', value : '', - description: 'Use specified sphinx-build [$sphinx_build] for buildi= ng document (default to be empty)') + description: 'Use specified sphinx-build for building document') option('iasl', type : 'string', value : '', description: 'Path to ACPI disassembler') option('default_devices', type : 'boolean', value : true, diff --git a/scripts/meson-buildoptions.py b/scripts/meson-buildoptions.py index 693be7b966..4af8d6e732 100755 --- a/scripts/meson-buildoptions.py +++ b/scripts/meson-buildoptions.py @@ -38,6 +38,11 @@ "trace_file", } =20 +OPTION_NAMES =3D { + "malloc": "enable-malloc", + "trace_backends": "enable-trace-backends", +} + BUILTIN_OPTIONS =3D { "strip", } @@ -75,7 +80,7 @@ def help_line(left, opt, indent, long): right =3D f'{opt["description"]}' if long: value =3D value_to_help(opt["value"]) - if value !=3D "auto": + if value !=3D "auto" and value !=3D "": right +=3D f" [{value}]" if "choices" in opt and long: choices =3D "/".join(sorted(opt["choices"])) @@ -96,6 +101,18 @@ def allow_arg(opt): return not (set(opt["choices"]) <=3D {"auto", "disabled", "enabled"}) =20 =20 +# Return whether the option (a dictionary) can be used without +# arguments. Booleans can only be used without arguments; +# combos require an argument if they accept neither "enabled" +# nor "disabled" +def require_arg(opt): + if opt["type"] =3D=3D "boolean": + return False + if opt["type"] !=3D "combo": + return True + return not ({"enabled", "disabled"}.intersection(opt["choices"])) + + def filter_options(json): if ":" in json["name"]: return False @@ -110,20 +127,48 @@ def load_options(json): return sorted(json, key=3Dlambda x: x["name"]) =20 =20 +def cli_option(opt): + name =3D opt["name"] + if name in OPTION_NAMES: + return OPTION_NAMES[name] + return name.replace("_", "-") + + +def cli_help_key(opt): + key =3D cli_option(opt) + if require_arg(opt): + return key + if opt["type"] =3D=3D "boolean" and opt["value"]: + return f"disable-{key}" + return f"enable-{key}" + + +def cli_metavar(opt): + if opt["type"] =3D=3D "string": + return "VALUE" + if opt["type"] =3D=3D "array": + return "CHOICES" + return "CHOICE" + + def print_help(options): print("meson_options_help() {") - for opt in options: - key =3D opt["name"].replace("_", "-") + for opt in sorted(options, key=3Dcli_help_key): + key =3D cli_help_key(opt) # The first section includes options that have an arguments, # and booleans (i.e., only one of enable/disable makes sense) - if opt["type"] =3D=3D "boolean": - left =3D f"--disable-{key}" if opt["value"] else f"--enable-{k= ey}" + if require_arg(opt): + metavar =3D cli_metavar(opt) + left =3D f"--{key}=3D{metavar}" + help_line(left, opt, 27, True) + elif opt["type"] =3D=3D "boolean": + left =3D f"--{key}" help_line(left, opt, 27, False) elif allow_arg(opt): if opt["type"] =3D=3D "combo" and "enabled" in opt["choices"]: - left =3D f"--enable-{key}[=3DCHOICE]" + left =3D f"--{key}[=3DCHOICE]" else: - left =3D f"--enable-{key}=3DCHOICE" + left =3D f"--{key}=3DCHOICE" help_line(left, opt, 27, True) =20 sh_print() @@ -142,9 +187,11 @@ def print_parse(options): print("_meson_option_parse() {") print(" case $1 in") for opt in options: - key =3D opt["name"].replace("_", "-") + key =3D cli_option(opt) name =3D opt["name"] - if opt["type"] =3D=3D "boolean": + if require_arg(opt): + print(f' --{key}=3D*) quote_sh "-D{name}=3D$2" ;;') + elif opt["type"] =3D=3D "boolean": print(f' --enable-{key}) printf "%s" -D{name}=3Dtrue ;;') print(f' --disable-{key}) printf "%s" -D{name}=3Dfalse ;;') else: diff --git a/scripts/meson-buildoptions.sh b/scripts/meson-buildoptions.sh index 21366b2102..2123317654 100644 --- a/scripts/meson-buildoptions.sh +++ b/scripts/meson-buildoptions.sh @@ -1,5 +1,7 @@ # This file is generated by meson-buildoptions.py, do not edit! meson_options_help() { + printf "%s\n" ' --disable-coroutine-pool coroutine freelist (better per= formance)' + printf "%s\n" ' --disable-install-blobs install provided firmware blob= s' printf "%s\n" ' --enable-block-drv-whitelist-in-tools' printf "%s\n" ' use block whitelist also in to= ols instead of only' printf "%s\n" ' QEMU' @@ -8,7 +10,6 @@ meson_options_help() { printf "%s\n" ' (choices: auto/disabled/enable= d/internal/system)' printf "%s\n" ' --enable-cfi Control-Flow Integrity (CFI)' printf "%s\n" ' --enable-cfi-debug Verbose errors in case of CFI = violation' - printf "%s\n" ' --disable-coroutine-pool coroutine freelist (better per= formance)' printf "%s\n" ' --enable-debug-mutex mutex debugging support' printf "%s\n" ' --enable-debug-stack-usage' printf "%s\n" ' measure coroutine stack usage' @@ -16,7 +17,6 @@ meson_options_help() { printf "%s\n" ' (choices: auto/disabled/enable= d/internal/system)' printf "%s\n" ' --enable-fuzzing build fuzzing targets' printf "%s\n" ' --enable-gprof QEMU profiling with gprof' - printf "%s\n" ' --disable-install-blobs install provided firmware blob= s' printf "%s\n" ' --enable-malloc=3DCHOICE choose memory allocator to u= se [system] (choices:' printf "%s\n" ' jemalloc/system/tcmalloc)' printf "%s\n" ' --enable-module-upgrades try to load modules from alter= nate paths for' @@ -29,7 +29,7 @@ meson_options_help() { printf "%s\n" ' (choices: auto/disabled/enable= d/internal/system)' printf "%s\n" ' --enable-strip Strip targets on install' printf "%s\n" ' --enable-tcg-interpreter TCG with bytecode interpreter = (slow)' - printf "%s\n" ' --enable-trace-backends=3DCHOICE' + printf "%s\n" ' --enable-trace-backends=3DCHOICES' printf "%s\n" ' Set available tracing backends= [log] (choices:' printf "%s\n" ' dtrace/ftrace/log/nop/simple/s= yslog/ust)' printf "%s\n" '' --=20 2.35.1 From nobody Sat May 4 20:14:55 2024 Delivered-To: importer2@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer2=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1651246384228930.1630141353212; Fri, 29 Apr 2022 08:33:04 -0700 (PDT) Received: from localhost ([::1]:37198 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nkScB-00082p-3l for importer2@patchew.org; Fri, 29 Apr 2022 11:33:03 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:44038) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nkSSn-0001r8-W6 for qemu-devel@nongnu.org; Fri, 29 Apr 2022 11:23:22 -0400 Received: from mail-ed1-x531.google.com ([2a00:1450:4864:20::531]:43771) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nkSSl-000687-3f for qemu-devel@nongnu.org; Fri, 29 Apr 2022 11:23:21 -0400 Received: by mail-ed1-x531.google.com with SMTP id b24so9455114edu.10 for ; Fri, 29 Apr 2022 08:23:18 -0700 (PDT) Received: from avogadro.redhat.com ([2001:b07:6468:f312:1c09:f536:3de6:228c]) by smtp.gmail.com with ESMTPSA id w25-20020a170907271900b006f3ef214dd6sm736395ejk.60.2022.04.29.08.23.16 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 29 Apr 2022 08:23:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=sender:from:to:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=OrFv60YwFkvh6iw0X1+5fqrbucyv9jtNc75xoRp84JA=; b=FAiBHqeynISDZByPcTdFEWrpTc/T6dY+DBcCBDEmhALk5Gdj7UGJoNOw53olfU53Me DNKg8FmgMPaHVwcREJfIW6xzQGL/SDP5hePsna8/0f7TM7RKijVFm3PRU77BhiYDyQlz BntR43hVK/8GKVKrWYll8Q3cdT/voMpqwwZmeHxaVtvIxabj+iK7T3uNZIcYm5UBS6M0 rGaDs0hhIWN1sXk1aFkaPqCN/5MVb3/+Ru9x9JQ6jfTw+Uq9RAIhV/+SQ6qPKRWZgIdp hg6LTB7PUubgSPZfE+Gj1eTvKjnw5VZXhKIGjeVM4kpbygfut7RmqrCbsIw9swBkRwBc nlaQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:sender:from:to:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=OrFv60YwFkvh6iw0X1+5fqrbucyv9jtNc75xoRp84JA=; b=V6zoAx28GRsGem4NYLg/6XR7Ldatra/sl2vHPad9FLvMbnzgOqq2C9FwZUrgiMgE/w x9WzyFVMQYW0a3KbzYvy9/bPz7w1lRg5Dc2+1FQXPDk2+M+2el10V4HxAMRG/PAlUZxk DYjPOVuGJuBSK45kyEck+6uvWoUEb+92CUNKnu2TxoRSFI3yV0Bj0NPqSKFGNeQH1TJ0 plBc7cqSYfHNttWYzn5VpPvHR5BNloXjRd+uHhHUu6YN4DvrGhcD7S0ExSSqdVhcr1JU yH5Npw8CWJbEwTGq5067pNBxh4+NpjyIsxBJf3Sb8JFi21CvXxvGGdnVwcX/NreR+EW3 fGTw== X-Gm-Message-State: AOAM5322MVJEfOLXtcXGWsH/uZhFy5nRn2qHKLPsq77K12taqNT09AKV yas0Ke6PY41TS1kYP+2iG2ykPKgmpjQ4TA== X-Google-Smtp-Source: ABdhPJyy9XJ6WFUaTy4B5GSqP1LAEaSk/8CPPvIxv2fh76kQt4JfuCxUb3CxdhAFQbbmCYinIWQLIg== X-Received: by 2002:aa7:d44d:0:b0:425:ecf1:e0bd with SMTP id q13-20020aa7d44d000000b00425ecf1e0bdmr26650247edr.309.1651245797622; Fri, 29 Apr 2022 08:23:17 -0700 (PDT) From: Paolo Bonzini To: qemu-devel@nongnu.org Subject: [PULL 05/25] meson, configure: move Xen detection to meson Date: Fri, 29 Apr 2022 17:22:52 +0200 Message-Id: <20220429152312.335715-6-pbonzini@redhat.com> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220429152312.335715-1-pbonzini@redhat.com> References: <20220429152312.335715-1-pbonzini@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer2=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::531; envelope-from=paolo.bonzini@gmail.com; helo=mail-ed1-x531.google.com X-Spam_score_int: -14 X-Spam_score: -1.5 X-Spam_bar: - X-Spam_report: (-1.5 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FORGED_FROMDOMAIN=0.249, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.249, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer2=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZM-MESSAGEID: 1651246384531100001 Content-Type: text/plain; charset="utf-8" This is quite a complicated check. I moved all the test programs to a single file in scripts/, picking the right program with #if and a -D flag in meson.build's cc.links() invocation. Signed-off-by: Paolo Bonzini --- configure | 322 +------------------------------------------ meson.build | 112 ++++++++++++--- scripts/xen-detect.c | 203 +++++++++++++++++++++++++++ 3 files changed, 296 insertions(+), 341 deletions(-) create mode 100644 scripts/xen-detect.c diff --git a/configure b/configure index 8b775492d0..519982800e 100755 --- a/configure +++ b/configure @@ -292,7 +292,6 @@ EXTRA_CXXFLAGS=3D"" EXTRA_OBJCFLAGS=3D"" EXTRA_LDFLAGS=3D"" =20 -xen_ctrl_version=3D"$default_feature" vhost_kernel=3D"$default_feature" vhost_net=3D"$default_feature" vhost_crypto=3D"$default_feature" @@ -346,9 +345,6 @@ default_devices=3D"true" tcg=3D"enabled" cfi=3D"false" =20 -# 4. Detection partly done in configure -xen=3D${default_feature:+disabled} - # parse CC options second for opt do optarg=3D$(expr "x$opt" : 'x[^=3D]*=3D\(.*\)') @@ -867,10 +863,6 @@ for opt do ;; --enable-slirp=3D*) slirp=3D"$optarg" ;; - --disable-xen) xen=3D"disabled" - ;; - --enable-xen) xen=3D"enabled" - ;; --disable-tcg) tcg=3D"disabled" plugins=3D"no" ;; @@ -1698,312 +1690,6 @@ if ! has "$pkg_config_exe"; then error_exit "pkg-config binary '$pkg_config_exe' not found" fi =20 -########################################## -# xen probe - -if test "$xen" !=3D "disabled" ; then - # Check whether Xen library path is specified via --extra-ldflags to avo= id - # 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=3D"$(printf '%d%02d%02d' \ - $($pkg_config --modversion xencontrol | sed 's/\./ /g') )" - xen=3Denabled - xen_pc=3D"xencontrol xenstore xenforeignmemory xengnttab" - xen_pc=3D"$xen_pc xenevtchn xendevicemodel" - if $pkg_config --exists xentoolcore; then - xen_pc=3D"$xen_pc xentoolcore" - fi - xen_cflags=3D"$($pkg_config --cflags $xen_pc)" - xen_libs=3D"$($pkg_config --libs $xen_pc)" - else - - xen_libs=3D"-lxenstore -lxenctrl" - xen_stable_libs=3D"-lxenforeignmemory -lxengnttab -lxenevtchn" - - # 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 < -int main(void) { - return 0; -} -EOF - if ! compile_prog "" "$xen_libs" ; then - # Xen not found - if test "$xen" =3D "enabled" ; then - feature_not_found "xen" "Install xen devel" - fi - xen=3Ddisabled - - # Xen unstable - elif - cat > $TMPC < -#include -int main(void) { - xendevicemodel_handle *xd; - xenforeignmemory_handle *xfmem; - - xd =3D xendevicemodel_open(0, 0); - xendevicemodel_pin_memory_cacheattr(xd, 0, 0, 0, 0); - - xfmem =3D xenforeignmemory_open(0, 0); - xenforeignmemory_map_resource(xfmem, 0, 0, 0, 0, 0, NULL, 0, 0); - - return 0; -} -EOF - compile_prog "" "$xen_libs -lxendevicemodel $xen_stable_libs -lxen= toolcore" - then - xen_stable_libs=3D"-lxendevicemodel $xen_stable_libs -lxentoolcore" - xen_ctrl_version=3D41100 - xen=3Denabled - elif - cat > $TMPC < -#include -int main(void) { - xenforeignmemory_handle *xfmem; - - xfmem =3D xenforeignmemory_open(0, 0); - xenforeignmemory_map2(xfmem, 0, 0, 0, 0, 0, 0, 0); - xentoolcore_restrict_all(0); - - return 0; -} -EOF - compile_prog "" "$xen_libs -lxendevicemodel $xen_stable_libs -lxen= toolcore" - then - xen_stable_libs=3D"-lxendevicemodel $xen_stable_libs -lxentoolcore" - xen_ctrl_version=3D41000 - xen=3Denabled - elif - cat > $TMPC < -int main(void) { - xendevicemodel_handle *xd; - - xd =3D xendevicemodel_open(0, 0); - xendevicemodel_close(xd); - - return 0; -} -EOF - compile_prog "" "$xen_libs -lxendevicemodel $xen_stable_libs" - then - xen_stable_libs=3D"-lxendevicemodel $xen_stable_libs" - xen_ctrl_version=3D40900 - xen=3Denabled - elif - cat > $TMPC < -#include -#include -#include -#include -#include -#include -#if !defined(HVM_MAX_VCPUS) -# error HVM_MAX_VCPUS not defined -#endif -int main(void) { - xc_interface *xc =3D NULL; - xenforeignmemory_handle *xfmem; - xenevtchn_handle *xe; - xengnttab_handle *xg; - xengnttab_grant_copy_segment_t* seg =3D NULL; - - xs_daemon_open(); - - xc =3D 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); - - xfmem =3D xenforeignmemory_open(0, 0); - xenforeignmemory_map(xfmem, 0, 0, 0, 0, 0); - - xe =3D xenevtchn_open(0, 0); - xenevtchn_fd(xe); - - xg =3D xengnttab_open(0, 0); - xengnttab_grant_copy(xg, 0, seg); - - return 0; -} -EOF - compile_prog "" "$xen_libs $xen_stable_libs" - then - xen_ctrl_version=3D40800 - xen=3Denabled - elif - cat > $TMPC < -#include -#include -#include -#include -#include -#include -#if !defined(HVM_MAX_VCPUS) -# error HVM_MAX_VCPUS not defined -#endif -int main(void) { - xc_interface *xc =3D NULL; - xenforeignmemory_handle *xfmem; - xenevtchn_handle *xe; - xengnttab_handle *xg; - - xs_daemon_open(); - - xc =3D 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); - - xfmem =3D xenforeignmemory_open(0, 0); - xenforeignmemory_map(xfmem, 0, 0, 0, 0, 0); - - xe =3D xenevtchn_open(0, 0); - xenevtchn_fd(xe); - - xg =3D 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=3D40701 - xen=3Denabled - - # Xen 4.6 - elif - cat > $TMPC < -#include -#include -#include -#if !defined(HVM_MAX_VCPUS) -# error HVM_MAX_VCPUS not defined -#endif -int main(void) { - xc_interface *xc; - xs_daemon_open(); - xc =3D xc_interface_open(0, 0, 0); - xc_hvm_set_mem_type(0, 0, HVMMEM_ram_ro, 0, 0); - xc_gnttab_open(NULL, 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_reserved_device_memory_map(xc, 0, 0, 0, 0, NULL, 0); - return 0; -} -EOF - compile_prog "" "$xen_libs" - then - xen_ctrl_version=3D40600 - xen=3Denabled - - # Xen 4.5 - elif - cat > $TMPC < -#include -#include -#include -#if !defined(HVM_MAX_VCPUS) -# error HVM_MAX_VCPUS not defined -#endif -int main(void) { - xc_interface *xc; - xs_daemon_open(); - xc =3D xc_interface_open(0, 0, 0); - xc_hvm_set_mem_type(0, 0, HVMMEM_ram_ro, 0, 0); - xc_gnttab_open(NULL, 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, 0, NULL); - return 0; -} -EOF - compile_prog "" "$xen_libs" - then - xen_ctrl_version=3D40500 - xen=3Denabled - - elif - cat > $TMPC < -#include -#include -#include -#if !defined(HVM_MAX_VCPUS) -# error HVM_MAX_VCPUS not defined -#endif -int main(void) { - xc_interface *xc; - xs_daemon_open(); - xc =3D xc_interface_open(0, 0, 0); - xc_hvm_set_mem_type(0, 0, HVMMEM_ram_ro, 0, 0); - xc_gnttab_open(NULL, 0); - xc_domain_add_to_physmap(0, 0, XENMAPSPACE_gmfn, 0, 0); - xc_hvm_inject_msi(xc, 0, 0xf0000000, 0x00000000); - return 0; -} -EOF - compile_prog "" "$xen_libs" - then - xen_ctrl_version=3D40200 - xen=3Denabled - - else - if test "$xen" =3D "enabled" ; then - feature_not_found "xen (unsupported version)" \ - "Install a supported xen (xen 4.2 or newer)" - fi - xen=3Ddisabled - fi - - if test "$xen" =3D enabled; then - if test $xen_ctrl_version -ge 40701 ; then - xen_libs=3D"$xen_libs $xen_stable_libs " - fi - fi - fi -fi - ########################################## # glib support probe =20 @@ -2555,12 +2241,6 @@ if test "$modules" =3D "yes"; then fi echo "CONFIG_TLS_PRIORITY=3D\"$tls_priority\"" >> $config_host_mak =20 -if test "$xen" =3D "enabled" ; then - echo "CONFIG_XEN_BACKEND=3Dy" >> $config_host_mak - echo "CONFIG_XEN_CTRL_INTERFACE_VERSION=3D$xen_ctrl_version" >> $config_= host_mak - echo "XEN_CFLAGS=3D$xen_cflags" >> $config_host_mak - echo "XEN_LIBS=3D$xen_libs" >> $config_host_mak -fi if test "$vhost_scsi" =3D "yes" ; then echo "CONFIG_VHOST_SCSI=3Dy" >> $config_host_mak fi @@ -2839,7 +2519,7 @@ if test "$skip_meson" =3D no; then -Dwerror=3D$(if test "$werror" =3D yes; then echo true; else echo = false; fi) \ -Db_pie=3D$(if test "$pie" =3D yes; then echo true; else echo fals= e; fi) \ -Db_coverage=3D$(if test "$gcov" =3D yes; then echo true; else ech= o false; fi) \ - -Db_lto=3D$lto -Dcfi=3D$cfi -Dtcg=3D$tcg -Dxen=3D$xen \ + -Db_lto=3D$lto -Dcfi=3D$cfi -Dtcg=3D$tcg \ -Dcapstone=3D$capstone -Dfdt=3D$fdt -Dslirp=3D$slirp \ $(test -n "${LIB_FUZZING_ENGINE+xxx}" && echo "-Dfuzzing_engine=3D= $LIB_FUZZING_ENGINE") \ $(if test "$default_feature" =3D no; then echo "-Dauto_features=3D= disabled"; fi) \ diff --git a/meson.build b/meson.build index 1fe7d257ff..50eb19e0ba 100644 --- a/meson.build +++ b/meson.build @@ -348,12 +348,6 @@ accelerators =3D [] if get_option('kvm').allowed() and targetos =3D=3D 'linux' accelerators +=3D 'CONFIG_KVM' endif -if get_option('xen').allowed() and 'CONFIG_XEN_BACKEND' in config_host - accelerators +=3D 'CONFIG_XEN' - have_xen_pci_passthrough =3D get_option('xen_pci_passthrough').allowed()= and targetos =3D=3D 'linux' -else - have_xen_pci_passthrough =3D false -endif if get_option('whpx').allowed() and targetos =3D=3D 'windows' if get_option('whpx').enabled() and host_machine.cpu() !=3D 'x86_64' error('WHPX requires 64-bit host') @@ -425,13 +419,6 @@ endif if 'CONFIG_WHPX' not in accelerators and get_option('whpx').enabled() error('WHPX not available on this platform') endif -if not have_xen_pci_passthrough and get_option('xen_pci_passthrough').enab= led() - if 'CONFIG_XEN' in accelerators - error('Xen PCI passthrough not available on this platform') - else - error('Xen PCI passthrough requested but Xen not enabled') - endif -endif =20 ################ # Dependencies # @@ -1257,10 +1244,86 @@ if not get_option('rdma').auto() or have_system endif =20 xen =3D not_found -if 'CONFIG_XEN_BACKEND' in config_host - xen =3D declare_dependency(compile_args: config_host['XEN_CFLAGS'].split= (), - link_args: config_host['XEN_LIBS'].split()) +if get_option('xen').enabled() or (get_option('xen').auto() and have_syste= m) + xencontrol =3D dependency('xencontrol', required: false, + method: 'pkg-config', kwargs: static_kwargs) + if xencontrol.found() + xen_pc =3D declare_dependency(version: xencontrol.version(), + dependencies: [ + xencontrol, + # disabler: true makes xen_pc.found() return false if any is not f= ound + dependency('xenstore', required: false, + method: 'pkg-config', kwargs: static_kwargs, + disabler: true), + dependency('xenforeignmemory', required: false, + method: 'pkg-config', kwargs: static_kwargs, + disabler: true), + dependency('xengnttab', required: false, + method: 'pkg-config', kwargs: static_kwargs, + disabler: true), + dependency('xenevtchn', required: false, + method: 'pkg-config', kwargs: static_kwargs, + disabler: true), + dependency('xendevicemodel', required: false, + method: 'pkg-config', kwargs: static_kwargs, + disabler: true), + # optional, no "disabler: true" + dependency('xentoolcore', required: false, + method: 'pkg-config', kwargs: static_kwargs)]) + if xen_pc.found() + xen =3D xen_pc + endif + endif + if not xen.found() + xen_tests =3D [ '4.11.0', '4.10.0', '4.9.0', '4.8.0', '4.7.1', '4.6.0'= , '4.5.0', '4.2.0' ] + xen_libs =3D { + '4.11.0': [ 'xenstore', 'xenctrl', 'xendevicemodel', 'xenforeignmemo= ry', 'xengnttab', 'xenevtchn', 'xentoolcore' ], + '4.10.0': [ 'xenstore', 'xenctrl', 'xendevicemodel', 'xenforeignmemo= ry', 'xengnttab', 'xenevtchn', 'xentoolcore' ], + '4.9.0': [ 'xenstore', 'xenctrl', 'xendevicemodel', 'xenforeignmemor= y', 'xengnttab', 'xenevtchn' ], + '4.8.0': [ 'xenstore', 'xenctrl', 'xenforeignmemory', 'xengnttab', '= xenevtchn' ], + '4.7.1': [ 'xenstore', 'xenctrl', 'xenforeignmemory', 'xengnttab', '= xenevtchn' ], + '4.6.0': [ 'xenstore', 'xenctrl' ], + '4.5.0': [ 'xenstore', 'xenctrl' ], + '4.2.0': [ 'xenstore', 'xenctrl' ], + } + xen_deps =3D {} + foreach ver: xen_tests + # cache the various library tests to avoid polluting the logs + xen_test_deps =3D [] + foreach l: xen_libs[ver] + if l not in xen_deps + xen_deps +=3D { l: cc.find_library(l, required: false) } + endif + xen_test_deps +=3D xen_deps[l] + endforeach + + # Use -D to pick just one of the test programs in scripts/xen-detect= .c + xen_version =3D ver.split('.') + xen_ctrl_version =3D xen_version[0] + \ + ('0' + xen_version[1]).substring(-2) + \ + ('0' + xen_version[2]).substring(-2) + if cc.links(files('scripts/xen-detect.c'), + args: '-DCONFIG_XEN_CTRL_INTERFACE_VERSION=3D' + xen_ctr= l_version, + dependencies: xen_test_deps) + xen =3D declare_dependency(version: ver, dependencies: xen_test_de= ps) + break + endif + endforeach + endif + if xen.found() + accelerators +=3D 'CONFIG_XEN' + elif get_option('xen').enabled() + error('could not compile and link Xen test program') + endif endif +have_xen_pci_passthrough =3D get_option('xen_pci_passthrough') \ + .require(xen.found(), + error_message: 'Xen PCI passthrough requested but Xen not enabl= ed') \ + .require(targetos =3D=3D 'linux', + error_message: 'Xen PCI passthrough not available on this platf= orm') \ + .allowed() + + cacard =3D not_found if not get_option('smartcard').auto() or have_system cacard =3D dependency('libcacard', required: get_option('smartcard'), @@ -1634,6 +1697,15 @@ config_host_data.set('CONFIG_X11', x11.found()) config_host_data.set('CONFIG_DBUS_DISPLAY', dbus_display) config_host_data.set('CONFIG_CFI', get_option('cfi')) config_host_data.set('CONFIG_SELINUX', selinux.found()) +config_host_data.set('CONFIG_XEN_BACKEND', xen.found()) +if xen.found() + # protect from xen.version() having less than three components + xen_version =3D xen.version().split('.') + ['0', '0'] + xen_ctrl_version =3D xen_version[0] + \ + ('0' + xen_version[1]).substring(-2) + \ + ('0' + xen_version[2]).substring(-2) + config_host_data.set('CONFIG_XEN_CTRL_INTERFACE_VERSION', xen_ctrl_versi= on) +endif config_host_data.set('QEMU_VERSION', '"@0@"'.format(meson.project_version(= ))) config_host_data.set('QEMU_VERSION_MAJOR', meson.project_version().split('= .')[0]) config_host_data.set('QEMU_VERSION_MINOR', meson.project_version().split('= .')[1]) @@ -2358,7 +2430,7 @@ config_all +=3D config_all_devices config_all +=3D config_host config_all +=3D config_all_disas config_all +=3D { - 'CONFIG_XEN': config_host.has_key('CONFIG_XEN_BACKEND'), + 'CONFIG_XEN': xen.found(), 'CONFIG_SOFTMMU': have_system, 'CONFIG_USER_ONLY': have_user, 'CONFIG_ALL': true, @@ -3689,9 +3761,9 @@ if have_system summary_info +=3D {'HVF support': config_all.has_key('CONFIG_HVF')} summary_info +=3D {'WHPX support': config_all.has_key('CONFIG_WHPX'= )} summary_info +=3D {'NVMM support': config_all.has_key('CONFIG_NVMM'= )} - summary_info +=3D {'Xen support': config_host.has_key('CONFIG_XEN_= BACKEND')} - if config_host.has_key('CONFIG_XEN_BACKEND') - summary_info +=3D {'xen ctrl version': config_host['CONFIG_XEN_CTRL_I= NTERFACE_VERSION']} + summary_info +=3D {'Xen support': xen.found()} + if xen.found() + summary_info +=3D {'xen ctrl version': xen.version()} endif endif summary_info +=3D {'TCG support': config_all.has_key('CONFIG_TCG')} diff --git a/scripts/xen-detect.c b/scripts/xen-detect.c new file mode 100644 index 0000000000..85e8206490 --- /dev/null +++ b/scripts/xen-detect.c @@ -0,0 +1,203 @@ +/* SPDX-License-Identifier: GPL-2.0-or-later */ + +/* Test programs for various Xen versions that QEMU supports. */ +#if CONFIG_XEN_CTRL_INTERFACE_VERSION =3D=3D 41100 + #undef XC_WANT_COMPAT_DEVICEMODEL_API + #define __XEN_TOOLS__ + #include + #include + int main(void) { + xendevicemodel_handle *xd; + xenforeignmemory_handle *xfmem; + + xd =3D xendevicemodel_open(0, 0); + xendevicemodel_pin_memory_cacheattr(xd, 0, 0, 0, 0); + + xfmem =3D xenforeignmemory_open(0, 0); + xenforeignmemory_map_resource(xfmem, 0, 0, 0, 0, 0, NULL, 0, 0); + + return 0; + } + +#elif CONFIG_XEN_CTRL_INTERFACE_VERSION =3D=3D 41000 + #undef XC_WANT_COMPAT_MAP_FOREIGN_API + #include + #include + int main(void) { + xenforeignmemory_handle *xfmem; + + xfmem =3D xenforeignmemory_open(0, 0); + xenforeignmemory_map2(xfmem, 0, 0, 0, 0, 0, 0, 0); + xentoolcore_restrict_all(0); + + return 0; + } + +#elif CONFIG_XEN_CTRL_INTERFACE_VERSION =3D=3D 40900 + #undef XC_WANT_COMPAT_DEVICEMODEL_API + #define __XEN_TOOLS__ + #include + int main(void) { + xendevicemodel_handle *xd; + + xd =3D xendevicemodel_open(0, 0); + xendevicemodel_close(xd); + + return 0; + } + +#elif CONFIG_XEN_CTRL_INTERFACE_VERSION =3D=3D 40800 + /* + * If we have stable libs the we don't want the libxc compat + * layers, regardless of what CFLAGS we may have been given. + * + * Also, check if xengnttab_grant_copy_segment_t is defined and + * grant copy operation is implemented. + */ + #undef XC_WANT_COMPAT_EVTCHN_API + #undef XC_WANT_COMPAT_GNTTAB_API + #undef XC_WANT_COMPAT_MAP_FOREIGN_API + #include + #include + #include + #include + #include + #include + #include + #if !defined(HVM_MAX_VCPUS) + # error HVM_MAX_VCPUS not defined + #endif + int main(void) { + xc_interface *xc =3D NULL; + xenforeignmemory_handle *xfmem; + xenevtchn_handle *xe; + xengnttab_handle *xg; + xengnttab_grant_copy_segment_t* seg =3D NULL; + + xs_daemon_open(); + + xc =3D 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); + + xfmem =3D xenforeignmemory_open(0, 0); + xenforeignmemory_map(xfmem, 0, 0, 0, 0, 0); + + xe =3D xenevtchn_open(0, 0); + xenevtchn_fd(xe); + + xg =3D xengnttab_open(0, 0); + xengnttab_grant_copy(xg, 0, seg); + + return 0; + } + +#elif CONFIG_XEN_CTRL_INTERFACE_VERSION =3D=3D 40701 + /* + * 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 + #include + #include + #include + #include + #include + #include + #if !defined(HVM_MAX_VCPUS) + # error HVM_MAX_VCPUS not defined + #endif + int main(void) { + xc_interface *xc =3D NULL; + xenforeignmemory_handle *xfmem; + xenevtchn_handle *xe; + xengnttab_handle *xg; + + xs_daemon_open(); + + xc =3D 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); + + xfmem =3D xenforeignmemory_open(0, 0); + xenforeignmemory_map(xfmem, 0, 0, 0, 0, 0); + + xe =3D xenevtchn_open(0, 0); + xenevtchn_fd(xe); + + xg =3D xengnttab_open(0, 0); + xengnttab_map_grant_ref(xg, 0, 0, 0); + + return 0; + } + +#elif CONFIG_XEN_CTRL_INTERFACE_VERSION =3D=3D 40600 + #include + #include + #include + #include + #if !defined(HVM_MAX_VCPUS) + # error HVM_MAX_VCPUS not defined + #endif + int main(void) { + xc_interface *xc; + xs_daemon_open(); + xc =3D xc_interface_open(0, 0, 0); + xc_hvm_set_mem_type(0, 0, HVMMEM_ram_ro, 0, 0); + xc_gnttab_open(NULL, 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_reserved_device_memory_map(xc, 0, 0, 0, 0, NULL, 0); + return 0; + } + +#elif CONFIG_XEN_CTRL_INTERFACE_VERSION =3D=3D 40500 + #include + #include + #include + #include + #if !defined(HVM_MAX_VCPUS) + # error HVM_MAX_VCPUS not defined + #endif + int main(void) { + xc_interface *xc; + xs_daemon_open(); + xc =3D xc_interface_open(0, 0, 0); + xc_hvm_set_mem_type(0, 0, HVMMEM_ram_ro, 0, 0); + xc_gnttab_open(NULL, 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, 0, NULL); + return 0; + } + +#elif CONFIG_XEN_CTRL_INTERFACE_VERSION =3D=3D 40200 + #include + #include + #include + #include + #if !defined(HVM_MAX_VCPUS) + # error HVM_MAX_VCPUS not defined + #endif + int main(void) { + xc_interface *xc; + xs_daemon_open(); + xc =3D xc_interface_open(0, 0, 0); + xc_hvm_set_mem_type(0, 0, HVMMEM_ram_ro, 0, 0); + xc_gnttab_open(NULL, 0); + xc_domain_add_to_physmap(0, 0, XENMAPSPACE_gmfn, 0, 0); + xc_hvm_inject_msi(xc, 0, 0xf0000000, 0x00000000); + return 0; + } + +#else +#error invalid CONFIG_XEN_CTRL_INTERFACE_VERSION +#endif --=20 2.35.1 From nobody Sat May 4 20:14:55 2024 Delivered-To: importer2@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer2=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1651247345979105.23202836429823; Fri, 29 Apr 2022 08:49:05 -0700 (PDT) Received: from localhost ([::1]:57612 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nkSrg-00072k-Ij for importer2@patchew.org; Fri, 29 Apr 2022 11:49:04 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:44022) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nkSSn-0001pr-Au for qemu-devel@nongnu.org; Fri, 29 Apr 2022 11:23:21 -0400 Received: from mail-ej1-x629.google.com ([2a00:1450:4864:20::629]:34703) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nkSSl-00068N-Oq for qemu-devel@nongnu.org; Fri, 29 Apr 2022 11:23:21 -0400 Received: by mail-ej1-x629.google.com with SMTP id g6so16130337ejw.1 for ; Fri, 29 Apr 2022 08:23:19 -0700 (PDT) Received: from avogadro.redhat.com ([2001:b07:6468:f312:1c09:f536:3de6:228c]) by smtp.gmail.com with ESMTPSA id w25-20020a170907271900b006f3ef214dd6sm736395ejk.60.2022.04.29.08.23.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 29 Apr 2022 08:23:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=ILW7a6YSitOsVJxzuyE5svZCe+2dMekkGFJpwShkepY=; b=NWeR6n1iZP82R8Zt6bNRPxeYP0LAR1rvxl+l/F8Hy11RMz0GkgMft3WBEvwbVTey7u 5a20w2q05M1sDjcPI6gplHy5E1wB4vZrJjLNjuTTgbHd8pe4vug5kPXINlBgJT3QBmXU 2MI1dYjARzWu1+2B4kk2+UbSx5HYJYVRZOxFFS4DnsNiNm8fKYjblxPXW2bv1CeuXGCh 4Rhf8f866cINNV22Cu1UIm69MUqxHFazHUHqYWBGHWkJJ+Zwgv4xanLu51z27Wfm/1di YeDzTdMQopK2TEGKjcxUZqzFKetRecV0vgpQSm0/EavhvLIYKt3UN8r2oml+kI4zzolu coNg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=ILW7a6YSitOsVJxzuyE5svZCe+2dMekkGFJpwShkepY=; b=xC9nnXplMhIdEQhjWv7yY7S43/u/GEdV0Q3QTp0QE9Ek9tZqpk9Q4TBuf2XK3iWS4b 6MPQWTwGCheYFndqagxlHaky4NGx51i62VBvOV6qGYY4aplZ0M6JrjMFpQVCQP1k8A/q CwRYEXIZ8mZsPIAiReDJ0CNNC0Utm9yVp5EVA04ZYVH8TzOcPQNL1Adz+ZugipvNLZrx scSkmbCgZUoRbF10dA10rgAwI8igjmrja+N6YNFj0tV7brlAYzlq+jizet8O+9PyrGbq eV00VLsgciEkm29o0C3LSoOjZ8HLOCSuCr8RbeGJeQ+ztjjYsg17f2o5qgIWonq+rF+Z EaKA== X-Gm-Message-State: AOAM533X/PJlDpo7JiD3Mt7+w2Qhezkns6zHcQx+bI5iVVTZj6IyKpmS 1ZQIki3GEUAq0tGkNfaVHD3q5zK87KRg5Q== X-Google-Smtp-Source: ABdhPJysEDEcefNZJ+VvysvDZ8XQ0xx3iJeJjc9ffre6AcAn8t9KxHPpJnxA435mLrGtEdOKQj9G5w== X-Received: by 2002:a17:907:7295:b0:6f3:eca6:8b87 with SMTP id dt21-20020a170907729500b006f3eca68b87mr5403666ejc.754.1651245798427; Fri, 29 Apr 2022 08:23:18 -0700 (PDT) From: Paolo Bonzini To: qemu-devel@nongnu.org Subject: [PULL 06/25] configure, meson: move iasl detection to meson Date: Fri, 29 Apr 2022 17:22:53 +0200 Message-Id: <20220429152312.335715-7-pbonzini@redhat.com> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220429152312.335715-1-pbonzini@redhat.com> References: <20220429152312.335715-1-pbonzini@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Type: text/plain Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer2=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::629; envelope-from=paolo.bonzini@gmail.com; helo=mail-ej1-x629.google.com X-Spam_score_int: -4 X-Spam_score: -0.5 X-Spam_bar: / X-Spam_report: (-0.5 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FORGED_FROMDOMAIN=0.249, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.249, PP_MIME_FAKE_ASCII_TEXT=0.999, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= Errors-To: qemu-devel-bounces+importer2=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZM-MESSAGEID: 1651247347574100001 Reviewed-by: Marc-Andr=C3=A9 Lureau Signed-off-by: Paolo Bonzini --- configure | 2 +- meson.build | 16 +++++++++------- 2 files changed, 10 insertions(+), 8 deletions(-) diff --git a/configure b/configure index 519982800e..b146763fbd 100755 --- a/configure +++ b/configure @@ -2508,7 +2508,7 @@ if test "$skip_meson" =3D no; then -Daudio_drv_list=3D$audio_drv_list \ -Ddefault_devices=3D$default_devices \ -Ddocdir=3D"$docdir" \ - -Diasl=3D"$($iasl -h >/dev/null 2>&1 && printf %s "$iasl")" \ + -Diasl=3D"$iasl" \ -Dqemu_firmwarepath=3D"$firmwarepath" \ -Dqemu_suffix=3D"$qemu_suffix" \ -Dsmbd=3D"$smbd" \ diff --git a/meson.build b/meson.build index 50eb19e0ba..84f3ae7bd6 100644 --- a/meson.build +++ b/meson.build @@ -167,6 +167,12 @@ if 'dtrace' in get_option('trace_backends') endif endif =20 +if get_option('iasl') =3D=3D '' + iasl =3D find_program('iasl', required: false) +else + iasl =3D find_program(get_option('iasl'), required: true) +endif + ################## # Compiler flags # ################## @@ -1584,8 +1590,8 @@ foreach k : get_option('trace_backends') config_host_data.set('CONFIG_TRACE_' + k.to_upper(), true) endforeach config_host_data.set_quoted('CONFIG_TRACE_FILE', get_option('trace_file')) -if get_option('iasl') !=3D '' - config_host_data.set_quoted('CONFIG_IASL', get_option('iasl')) +if iasl.found() + config_host_data.set_quoted('CONFIG_IASL', iasl.full_path()) endif config_host_data.set_quoted('CONFIG_BINDIR', get_option('prefix') / get_op= tion('bindir')) config_host_data.set_quoted('CONFIG_PREFIX', get_option('prefix')) @@ -3630,11 +3636,7 @@ summary_info +=3D {'sphinx-build': sphinx_build} if config_host.has_key('HAVE_GDB_BIN') summary_info +=3D {'gdb': config_host['HAVE_GDB_BIN']} endif -if get_option('iasl') !=3D '' - summary_info +=3D {'iasl': get_option('iasl')} -else - summary_info +=3D {'iasl': false} -endif +summary_info +=3D {'iasl': iasl} summary_info +=3D {'genisoimage': config_host['GENISOIMAGE']} if targetos =3D=3D 'windows' and have_ga summary_info +=3D {'wixl': wixl} --=20 2.35.1 From nobody Sat May 4 20:14:55 2024 Delivered-To: importer2@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer2=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1651247472189100.61599074729384; Fri, 29 Apr 2022 08:51:12 -0700 (PDT) Received: from localhost ([::1]:37752 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nkSti-0004KU-KG for importer2@patchew.org; Fri, 29 Apr 2022 11:51:10 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:44052) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nkSSo-0001tH-LL for qemu-devel@nongnu.org; Fri, 29 Apr 2022 11:23:22 -0400 Received: from mail-ed1-x533.google.com ([2a00:1450:4864:20::533]:35543) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nkSSm-00068Y-GH for qemu-devel@nongnu.org; Fri, 29 Apr 2022 11:23:22 -0400 Received: by mail-ed1-x533.google.com with SMTP id y21so9477235edo.2 for ; Fri, 29 Apr 2022 08:23:20 -0700 (PDT) Received: from avogadro.redhat.com ([2001:b07:6468:f312:1c09:f536:3de6:228c]) by smtp.gmail.com with ESMTPSA id w25-20020a170907271900b006f3ef214dd6sm736395ejk.60.2022.04.29.08.23.18 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 29 Apr 2022 08:23:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=sender:from:to:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=ShlFAMo9vIx7fPh6AcvtW8Q3VA/Fy2DGTEg/pChtEAo=; b=DUZ0DSywLhWDpMIblDCCsFwyEy9Ne3OorHP60GPwiJmMneoN7O+V+ws2pHPQ0gDDW8 YMqyGEDuYlZf5prRAUgGXfV9r+uF+xqRUoPMQI2usRWINbsuWHLUmbIw5iAwofDYR5/5 VTTdTVX3rRS2id/kbXNRsH0VwAvBvID4CWv3+476LGdohPxd8H7gZYG0QBo3bg2enTeC /SEDspPcsPlJP9SMaKI5p6R4kXE29LdzhnMgn/SBXd9lR8lnNlbGAkGjkc8Z7i8T5shL VkaEID0730mkcBxoyQsiuO/By2EvAgosaBFy16ktKukns8zZgo/VknF+r6WkfHukOMAy Oa0A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:sender:from:to:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=ShlFAMo9vIx7fPh6AcvtW8Q3VA/Fy2DGTEg/pChtEAo=; b=VCzWGZowErl/uA5e6B4LynbPcODZX/yEpla5Lfs04JE+nCsJ8pwMrKwAqCwnGepAZI RFB4mrfatmUxtAlVXdqYIwlfg6FssZTV1vQbjO1wHlvDVP/duk2qWIveEdJDY83ECRUH hQ3+UVIete3WUBZalpujxLZ4+ELwqUIe+y+DJSsBG20Us5Q/7R2da3kc+BKnBpJMyzsf aJ9TQefTxnpyn4sxHg+WDpDHhny3O0mSBXCtQYTVrnKaWkGUOUEcqb6NKQuBjDwccBVr iERhytWsG/bSbekhHwM9UN1J8j1Id00kfx+4nzMVC2TbwgCoKU+4Rq9ocIVXbeWsGpXk o/eQ== X-Gm-Message-State: AOAM531mRLXEf1CTZ60ZwReTZalxIjBdancKZbVZYZVZaqxNFGT52E63 TgEnIrXxkwLz1rkNiKDq56yoFATRz21nzA== X-Google-Smtp-Source: ABdhPJw1xFxS0zdAdGeJ5w/Aj8uU+wXoUL1ahQULPB0DwIbtkwPyzUiXUV1TyiEXP95p8HtMUNYNeg== X-Received: by 2002:aa7:c5c8:0:b0:426:34a7:f8b with SMTP id h8-20020aa7c5c8000000b0042634a70f8bmr5562994eds.321.1651245799225; Fri, 29 Apr 2022 08:23:19 -0700 (PDT) From: Paolo Bonzini To: qemu-devel@nongnu.org Subject: [PULL 07/25] configure: move Windows flags detection to meson Date: Fri, 29 Apr 2022 17:22:54 +0200 Message-Id: <20220429152312.335715-8-pbonzini@redhat.com> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220429152312.335715-1-pbonzini@redhat.com> References: <20220429152312.335715-1-pbonzini@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer2=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::533; envelope-from=paolo.bonzini@gmail.com; helo=mail-ed1-x533.google.com X-Spam_score_int: -14 X-Spam_score: -1.5 X-Spam_bar: - X-Spam_report: (-1.5 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FORGED_FROMDOMAIN=0.249, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.249, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer2=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZM-MESSAGEID: 1651247475254100001 Content-Type: text/plain; charset="utf-8" Signed-off-by: Paolo Bonzini --- configure | 20 -------------------- meson.build | 8 ++++++++ 2 files changed, 8 insertions(+), 20 deletions(-) diff --git a/configure b/configure index b146763fbd..c54e10ea26 100755 --- a/configure +++ b/configure @@ -224,10 +224,6 @@ glob() { eval test -z '"${1#'"$2"'}"' } =20 -ld_has() { - $ld --help 2>/dev/null | grep ".$1" >/dev/null 2>&1 -} - if printf %s\\n "$source_path" "$PWD" | grep -q "[[:space:]:]"; then error_exit "main directory cannot contain spaces nor colons" @@ -2089,22 +2085,6 @@ if test "$solaris" =3D "no" && test "$tsan" =3D "no"= ; then fi fi =20 -# Use ASLR, no-SEH and DEP if available -if test "$mingw32" =3D "yes" ; then - flags=3D"--no-seh --nxcompat" - - # Disable ASLR for debug builds to allow debugging with gdb - if test "$debug" =3D "no" ; then - flags=3D"--dynamicbase $flags" - fi - - for flag in $flags; do - if ld_has $flag ; then - QEMU_LDFLAGS=3D"-Wl,$flag $QEMU_LDFLAGS" - fi - done -fi - # Guest agent Windows MSI package =20 if test "$QEMU_GA_MANUFACTURER" =3D ""; then diff --git a/meson.build b/meson.build index 84f3ae7bd6..31380f1f2e 100644 --- a/meson.build +++ b/meson.build @@ -182,6 +182,14 @@ qemu_cxxflags =3D config_host['QEMU_CXXFLAGS'].split() qemu_objcflags =3D config_host['QEMU_OBJCFLAGS'].split() qemu_ldflags =3D config_host['QEMU_LDFLAGS'].split() =20 +if targetos =3D=3D 'windows' + qemu_ldflags +=3D cc.get_supported_link_arguments('-Wl,--no-seh', '-Wl,-= -nxcompat') + # Disable ASLR for debug builds to allow debugging with gdb + if get_option('optimization') =3D=3D '0' + qemu_ldflags +=3D cc.get_supported_link_arguments('-Wl,--dynamicbase') + endif +endif + if get_option('gprof') qemu_cflags +=3D ['-p'] qemu_cxxflags +=3D ['-p'] --=20 2.35.1 From nobody Sat May 4 20:14:55 2024 Delivered-To: importer2@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer2=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1651246405443402.7852389904359; Fri, 29 Apr 2022 08:33:25 -0700 (PDT) Received: from localhost ([::1]:39328 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nkScW-00011Y-AC for importer2@patchew.org; Fri, 29 Apr 2022 11:33:24 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:44068) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nkSSp-0001wb-Bm for qemu-devel@nongnu.org; Fri, 29 Apr 2022 11:23:23 -0400 Received: from mail-ej1-x62a.google.com ([2a00:1450:4864:20::62a]:38683) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nkSSn-00068j-Au for qemu-devel@nongnu.org; Fri, 29 Apr 2022 11:23:23 -0400 Received: by mail-ej1-x62a.google.com with SMTP id r13so16100193ejd.5 for ; Fri, 29 Apr 2022 08:23:20 -0700 (PDT) Received: from avogadro.redhat.com ([2001:b07:6468:f312:1c09:f536:3de6:228c]) by smtp.gmail.com with ESMTPSA id w25-20020a170907271900b006f3ef214dd6sm736395ejk.60.2022.04.29.08.23.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 29 Apr 2022 08:23:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=IBzidD1ffM8CHKzuyc1vo8LNQOF35wTXDgAsRw/9q8g=; b=R3qAkIhRjwiKlWSRREtyO+Qta2oXJ/qyfow0K4V+O6gpKrVWkIpP0MkeTtpPzVrD7x 6V4K24x7V4A/sHucDEtanDwMsBphMk7yyLACw+Ez7PK/ayexcjjA2Lhnb+ySsbs+n27G YQWyoPszsjArIfRJpUz9+w9wCrSc+/Tky7/88eUWaGNZ24qcsmyc9V66hX4VytwNnH51 8DxgMXaXmAGO6t3tZbRrscxiMMNlGyQiOmY0KQY51BaWYuQvupjl3Ae7q3SGll2kG1Af eJpvqyt4XEwkHg17URABI7X9Kq4dwoALbrcKFElYY9NrtSDvA86LTZfpywR7SrTuY1zU O/ug== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=IBzidD1ffM8CHKzuyc1vo8LNQOF35wTXDgAsRw/9q8g=; b=WeGBdnPIE+kdRvUO4CLeCT9k+fGG6tZXBT35zUgDEvecqY31rpbQE4sSgbaU9GhJJo 1rPGkNoJCeJb2I7Yw04JkZ/JCdry9+t7Gm6m7js9RAJudRHiuYeUcqG6+03HOXgOKOKz wvw1jWYowNiK2VHp5YxXuulFn/mAJ1W3I2TvEHDYMXE6wiyGjoXeWKqJrXeBGBfk2EEB cMb0zp1PBlaCDkjFUjVGrmQXFQ9ulH7V23L3+4jZkaqUr1nL9+0yxX0NkcVtuT2zGP0I nWxIX19HKgRrnsNNcQfgRVwVu/Q4GT14fKNsWXO2cVRdNPT8QPTezyzJfMDcicEEj9yW 9S9g== X-Gm-Message-State: AOAM533ykctunGnhE6sMJZlT1WvFQ7r1ssauu950Mhphv/ZF0QBoS5Ov b2DGUsnIAEOGSWHHmPmeLrY87k4Cu+gGqw== X-Google-Smtp-Source: ABdhPJxbHjwbLaXwrQE4AL3sWxvnjX7mscJSz122O+bZ+iXFwNpPLK7p+G6qJ0aiiOEMyW+MSUfzlQ== X-Received: by 2002:a17:907:7282:b0:6ef:f412:f7c4 with SMTP id dt2-20020a170907728200b006eff412f7c4mr36489565ejc.258.1651245799929; Fri, 29 Apr 2022 08:23:19 -0700 (PDT) From: Paolo Bonzini To: qemu-devel@nongnu.org Subject: [PULL 08/25] configure: switch string options to automatic parsing Date: Fri, 29 Apr 2022 17:22:55 +0200 Message-Id: <20220429152312.335715-9-pbonzini@redhat.com> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220429152312.335715-1-pbonzini@redhat.com> References: <20220429152312.335715-1-pbonzini@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Type: text/plain Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer2=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::62a; envelope-from=paolo.bonzini@gmail.com; helo=mail-ej1-x62a.google.com X-Spam_score_int: -4 X-Spam_score: -0.5 X-Spam_bar: / X-Spam_report: (-0.5 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FORGED_FROMDOMAIN=0.249, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.249, PP_MIME_FAKE_ASCII_TEXT=0.999, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= Errors-To: qemu-devel-bounces+importer2=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZM-MESSAGEID: 1651246406632100001 Reviewed-by: Marc-Andr=C3=A9 Lureau Signed-off-by: Paolo Bonzini --- configure | 24 +----------------------- scripts/meson-buildoptions.py | 5 +---- scripts/meson-buildoptions.sh | 9 +++++++++ 3 files changed, 11 insertions(+), 27 deletions(-) diff --git a/configure b/configure index c54e10ea26..c1eb4923dd 100755 --- a/configure +++ b/configure @@ -231,12 +231,10 @@ fi =20 # default parameters cpu=3D"" -iasl=3D"iasl" interp_prefix=3D"/usr/gnemul/qemu-%M" static=3D"no" cross_compile=3D"no" cross_prefix=3D"" -audio_drv_list=3D"default" block_drv_rw_whitelist=3D"" block_drv_ro_whitelist=3D"" host_cc=3D"cc" @@ -312,7 +310,6 @@ linux_user=3D"" bsd_user=3D"" pkgversion=3D"" pie=3D"" -trace_file=3D"trace" coroutine=3D"" tls_priority=3D"NORMAL" plugins=3D"$default_feature" @@ -714,8 +711,6 @@ for opt do ;; --cxx=3D*) ;; - --iasl=3D*) iasl=3D"$optarg" - ;; --objcc=3D*) objcc=3D"$optarg" ;; --make=3D*) make=3D"$optarg" @@ -724,8 +719,6 @@ for opt do ;; --python=3D*) python=3D"$optarg" ; explicit_python=3Dyes ;; - --sphinx-build=3D*) sphinx_build=3D"$optarg" - ;; --skip-meson) skip_meson=3Dyes ;; --meson=3D*) meson=3D"$optarg" @@ -766,8 +759,6 @@ for opt do error_exit "Can't mix --target-list-exclude with --= target-list" fi ;; - --with-trace-file=3D*) trace_file=3D"$optarg" - ;; --with-default-devices) default_devices=3D"true" ;; --without-default-devices) default_devices=3D"false" @@ -826,8 +817,6 @@ for opt do # configure to be used by RPM and similar macros that set # lots of directory switches by default. ;; - --audio-drv-list=3D*) audio_drv_list=3D"$optarg" - ;; --block-drv-rw-whitelist=3D*|--block-drv-whitelist=3D*) block_drv_rw_whi= telist=3D$(echo "$optarg" | sed -e 's/,/ /g') ;; --block-drv-ro-whitelist=3D*) block_drv_ro_whitelist=3D$(echo "$optarg" = | sed -e 's/,/ /g') @@ -1001,12 +990,7 @@ for opt do --enable-jemalloc) meson_option_parse --enable-malloc=3Djemalloc jemalloc ;; # everything else has the same name in configure and meson - --enable-* | --disable-*) meson_option_parse "$opt" "$optarg" - ;; - *) - echo "ERROR: unknown option $opt" - echo "Try '$0 --help' for more information" - exit 1 + --*) meson_option_parse "$opt" "$optarg" ;; esac done @@ -1129,7 +1113,6 @@ $(echo Available targets: $default_target_list | \ Advanced options (experts only): --cross-prefix=3DPREFIX use PREFIX for compile tools, PREFIX can be b= lank [$cross_prefix] --cc=3DCC use C compiler CC [$cc] - --iasl=3DIASL use ACPI compiler IASL [$iasl] --host-cc=3DCC use C compiler CC [$host_cc] for code run at build time --cxx=3DCXX use C++ compiler CXX [$cxx] @@ -1142,7 +1125,6 @@ Advanced options (experts only): --cross-cc-cflags-ARCH=3D use compiler flags when building ARCH guest t= ests --make=3DMAKE use specified make [$make] --python=3DPYTHON use specified python [$python] - --sphinx-build=3DSPHINX use specified sphinx-build [$sphinx_build] --meson=3DMESON use specified meson [$meson] --ninja=3DNINJA use specified ninja [$ninja] --smbd=3DSMBD use specified smbd [$smbd] @@ -2485,15 +2467,11 @@ if test "$skip_meson" =3D no; then --sysconfdir "$sysconfdir" \ --localedir "$localedir" \ --localstatedir "$local_statedir" \ - -Daudio_drv_list=3D$audio_drv_list \ -Ddefault_devices=3D$default_devices \ -Ddocdir=3D"$docdir" \ - -Diasl=3D"$iasl" \ -Dqemu_firmwarepath=3D"$firmwarepath" \ -Dqemu_suffix=3D"$qemu_suffix" \ -Dsmbd=3D"$smbd" \ - -Dsphinx_build=3D"$sphinx_build" \ - -Dtrace_file=3D"$trace_file" \ -Doptimization=3D$(if test "$debug" =3D yes; then echo 0; else ech= o 2; fi) \ -Ddebug=3D$(if test "$debug_info" =3D yes; then echo true; else ec= ho false; fi) \ -Dwerror=3D$(if test "$werror" =3D yes; then echo true; else echo = false; fi) \ diff --git a/scripts/meson-buildoptions.py b/scripts/meson-buildoptions.py index 4af8d6e732..3e540e8bb3 100755 --- a/scripts/meson-buildoptions.py +++ b/scripts/meson-buildoptions.py @@ -26,21 +26,18 @@ import sys =20 SKIP_OPTIONS =3D { - "audio_drv_list", "default_devices", "docdir", "fuzzing_engine", - "iasl", "qemu_firmwarepath", "qemu_suffix", "smbd", - "sphinx_build", - "trace_file", } =20 OPTION_NAMES =3D { "malloc": "enable-malloc", "trace_backends": "enable-trace-backends", + "trace_file": "with-trace-file", } =20 BUILTIN_OPTIONS =3D { diff --git a/scripts/meson-buildoptions.sh b/scripts/meson-buildoptions.sh index 2123317654..bdaa128ee4 100644 --- a/scripts/meson-buildoptions.sh +++ b/scripts/meson-buildoptions.sh @@ -1,5 +1,7 @@ # This file is generated by meson-buildoptions.py, do not edit! meson_options_help() { + printf "%s\n" ' --audio-drv-list=3DCHOICES Set audio driver list [defau= lt] (choices:' + printf "%s\n" ' alsa/coreaudio/default/dsound/= jack/oss/pa/sdl)' printf "%s\n" ' --disable-coroutine-pool coroutine freelist (better per= formance)' printf "%s\n" ' --disable-install-blobs install provided firmware blob= s' printf "%s\n" ' --enable-block-drv-whitelist-in-tools' @@ -32,6 +34,9 @@ meson_options_help() { printf "%s\n" ' --enable-trace-backends=3DCHOICES' printf "%s\n" ' Set available tracing backends= [log] (choices:' printf "%s\n" ' dtrace/ftrace/log/nop/simple/s= yslog/ust)' + printf "%s\n" ' --iasl=3DVALUE Path to ACPI disassembler' + printf "%s\n" ' --sphinx-build=3DVALUE Use specified sphinx-build f= or building document' + printf "%s\n" ' --with-trace-file=3DVALUE Trace file prefix for simple= backend [trace]' printf "%s\n" '' printf "%s\n" 'Optional features, enabled with --enable-FEATURE and' printf "%s\n" 'disabled with --disable-FEATURE, default is enabled if av= ailable' @@ -147,6 +152,7 @@ _meson_option_parse() { --disable-alsa) printf "%s" -Dalsa=3Ddisabled ;; --enable-attr) printf "%s" -Dattr=3Denabled ;; --disable-attr) printf "%s" -Dattr=3Ddisabled ;; + --audio-drv-list=3D*) quote_sh "-Daudio_drv_list=3D$2" ;; --enable-auth-pam) printf "%s" -Dauth_pam=3Denabled ;; --disable-auth-pam) printf "%s" -Dauth_pam=3Ddisabled ;; --enable-avx2) printf "%s" -Davx2=3Denabled ;; @@ -229,6 +235,7 @@ _meson_option_parse() { --disable-hax) printf "%s" -Dhax=3Ddisabled ;; --enable-hvf) printf "%s" -Dhvf=3Denabled ;; --disable-hvf) printf "%s" -Dhvf=3Ddisabled ;; + --iasl=3D*) quote_sh "-Diasl=3D$2" ;; --enable-iconv) printf "%s" -Diconv=3Denabled ;; --disable-iconv) printf "%s" -Diconv=3Ddisabled ;; --enable-install-blobs) printf "%s" -Dinstall_blobs=3Dtrue ;; @@ -333,6 +340,7 @@ _meson_option_parse() { --disable-snappy) printf "%s" -Dsnappy=3Ddisabled ;; --enable-sparse) printf "%s" -Dsparse=3Denabled ;; --disable-sparse) printf "%s" -Dsparse=3Ddisabled ;; + --sphinx-build=3D*) quote_sh "-Dsphinx_build=3D$2" ;; --enable-spice) printf "%s" -Dspice=3Denabled ;; --disable-spice) printf "%s" -Dspice=3Ddisabled ;; --enable-spice-protocol) printf "%s" -Dspice_protocol=3Denabled ;; @@ -348,6 +356,7 @@ _meson_option_parse() { --enable-tpm) printf "%s" -Dtpm=3Denabled ;; --disable-tpm) printf "%s" -Dtpm=3Ddisabled ;; --enable-trace-backends=3D*) quote_sh "-Dtrace_backends=3D$2" ;; + --with-trace-file=3D*) quote_sh "-Dtrace_file=3D$2" ;; --enable-u2f) printf "%s" -Du2f=3Denabled ;; --disable-u2f) printf "%s" -Du2f=3Ddisabled ;; --enable-usb-redir) printf "%s" -Dusb_redir=3Denabled ;; --=20 2.35.1 From nobody Sat May 4 20:14:55 2024 Delivered-To: importer2@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer2=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1651246621824545.0633586919249; Fri, 29 Apr 2022 08:37:01 -0700 (PDT) Received: from localhost ([::1]:48202 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nkSg0-000702-CI for importer2@patchew.org; Fri, 29 Apr 2022 11:37:00 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:44072) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nkSSp-0001yn-Rm for qemu-devel@nongnu.org; Fri, 29 Apr 2022 11:23:23 -0400 Received: from mail-ed1-x52c.google.com ([2a00:1450:4864:20::52c]:41795) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nkSSo-00068p-2l for qemu-devel@nongnu.org; Fri, 29 Apr 2022 11:23:23 -0400 Received: by mail-ed1-x52c.google.com with SMTP id d6so9459558ede.8 for ; Fri, 29 Apr 2022 08:23:21 -0700 (PDT) Received: from avogadro.redhat.com ([2001:b07:6468:f312:1c09:f536:3de6:228c]) by smtp.gmail.com with ESMTPSA id w25-20020a170907271900b006f3ef214dd6sm736395ejk.60.2022.04.29.08.23.20 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 29 Apr 2022 08:23:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=mXDxkE9hGoUrZ6f+HtgdaCZPXnV++dYqWjZUuFCEstw=; b=ozFFBdC//NwICBYcVqyk2iHb/rJrBtKECFIslrFYLWUo6Hpd8iWBxKYX7TciprJCuP iEIaVPtIEXNnAqtb1YzT4Frgp9S9bp5jgMnwoTPRYCp+YP1vH4yTD49+OkTPZYa3iV/a 3dd6Y5ch0OvLkH3/T6uo6zpunyNqXj42kqAv7CkWGnZRBYTJl5FJzxPkJHz53NNfS55P DrmUnaPPVtByezTgWPrQwTJvttOnVVzs+YXbA9YB/q9GQMYKkkLf2tZlUpWhqlIu5GJv +Z/i4vo8cNM2u4l2Je4SBs3GmavEeZE02rgQHvyZuE9Rbjb45sss+Xi0Dn3cY9XocOeD SKaw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=mXDxkE9hGoUrZ6f+HtgdaCZPXnV++dYqWjZUuFCEstw=; b=JJN6FpU8IwJ5dVIXYwgBqZVu58kJ/UL+pw0no/ixswyU6OKiwU+hjJD5L6PY/OSC6M ydzaKv1QYT0j6c/EAtD6pSMbAw9uZ/y9ovwAiDjl1sBVmJur25oRbvMcwpcvvI6mvx5u 1Qcvl4zGNnDWpC7YRCjbZBhB5UyRYqwhK+VwS5lXlgS5IilnMcKD53aOix6ONtKjp0q3 S8H9JhX1TXS3T7fZX9fc8JVSGZajUgEkz5G6tKdWfVrIGseu05GCgDo8TErM5OOEY3zq fQ9wthRpnWBiNf6tBGGOZY0AgKxwZsK5STp6DB2JH27p3gBaCKiREGvYoL43uCe5queZ 0LmA== X-Gm-Message-State: AOAM531eGDbsr3KtZO/QLD3x5Mx+oZbFDGfRxM+agxpaQUaEmk6/uDGf NaGzLMYEwCDIrVzMBC/KkIVMhrY/jX6nqw== X-Google-Smtp-Source: ABdhPJztdGHC5/6mhl/pUHnZZkiOX2ne+nQDPawMcyw9Ukv0mbaFgXgtGpr5x/23vUxSzEaPgllwUA== X-Received: by 2002:a05:6402:358f:b0:426:2b74:2c03 with SMTP id y15-20020a056402358f00b004262b742c03mr8788615edc.402.1651245800759; Fri, 29 Apr 2022 08:23:20 -0700 (PDT) From: Paolo Bonzini To: qemu-devel@nongnu.org Subject: [PULL 09/25] meson, configure: move --tls-priority to meson Date: Fri, 29 Apr 2022 17:22:56 +0200 Message-Id: <20220429152312.335715-10-pbonzini@redhat.com> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220429152312.335715-1-pbonzini@redhat.com> References: <20220429152312.335715-1-pbonzini@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Type: text/plain Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer2=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::52c; envelope-from=paolo.bonzini@gmail.com; helo=mail-ed1-x52c.google.com X-Spam_score_int: -4 X-Spam_score: -0.5 X-Spam_bar: / X-Spam_report: (-0.5 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FORGED_FROMDOMAIN=0.249, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.249, PP_MIME_FAKE_ASCII_TEXT=0.999, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= Errors-To: qemu-devel-bounces+importer2=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZM-MESSAGEID: 1651246623509100001 Use the new support for string option parsing. Reviewed-by: Marc-Andr=C3=A9 Lureau Signed-off-by: Paolo Bonzini --- configure | 5 ----- meson.build | 3 ++- meson_options.txt | 2 ++ scripts/meson-buildoptions.sh | 3 +++ 4 files changed, 7 insertions(+), 6 deletions(-) diff --git a/configure b/configure index c1eb4923dd..9062f9ccd6 100755 --- a/configure +++ b/configure @@ -311,7 +311,6 @@ bsd_user=3D"" pkgversion=3D"" pie=3D"" coroutine=3D"" -tls_priority=3D"NORMAL" plugins=3D"$default_feature" meson=3D"" meson_args=3D"" @@ -939,8 +938,6 @@ for opt do --enable-uuid|--disable-uuid) echo "$0: $opt is obsolete, UUID support is always built" >&2 ;; - --tls-priority=3D*) tls_priority=3D"$optarg" - ;; --disable-vhost-user) vhost_user=3D"no" ;; --enable-vhost-user) vhost_user=3D"yes" @@ -1170,7 +1167,6 @@ Advanced options (experts only): --with-coroutine=3DBACKEND coroutine backend. Supported options: ucontext, sigaltstack, windows --enable-gcov enable test coverage analysis with gcov - --tls-priority default TLS protocol/cipher priority string --enable-plugins enable plugins via shared library loading --disable-containers don't use containers for cross-building @@ -2201,7 +2197,6 @@ if test "$modules" =3D "yes"; then echo "CONFIG_STAMP=3D_$( (echo $qemu_version; echo $pkgversion; cat $0) = | $shacmd - | cut -f1 -d\ )" >> $config_host_mak echo "CONFIG_MODULES=3Dy" >> $config_host_mak fi -echo "CONFIG_TLS_PRIORITY=3D\"$tls_priority\"" >> $config_host_mak =20 if test "$vhost_scsi" =3D "yes" ; then echo "CONFIG_VHOST_SCSI=3Dy" >> $config_host_mak diff --git a/meson.build b/meson.build index 31380f1f2e..f4f518c7b8 100644 --- a/meson.build +++ b/meson.build @@ -1598,6 +1598,7 @@ foreach k : get_option('trace_backends') config_host_data.set('CONFIG_TRACE_' + k.to_upper(), true) endforeach config_host_data.set_quoted('CONFIG_TRACE_FILE', get_option('trace_file')) +config_host_data.set_quoted('CONFIG_TLS_PRIORITY', get_option('tls_priorit= y')) if iasl.found() config_host_data.set_quoted('CONFIG_IASL', iasl.full_path()) endif @@ -3819,7 +3820,7 @@ summary(summary_info, bool_yn: true, section: 'Block = layer support') =20 # Crypto summary_info =3D {} -summary_info +=3D {'TLS priority': config_host['CONFIG_TLS_PRIORITY']} +summary_info +=3D {'TLS priority': get_option('tls_priority')} summary_info +=3D {'GNUTLS support': gnutls} if gnutls.found() summary_info +=3D {' GNUTLS crypto': gnutls_crypto.found()} diff --git a/meson_options.txt b/meson_options.txt index 390701517c..c8e0a10d91 100644 --- a/meson_options.txt +++ b/meson_options.txt @@ -14,6 +14,8 @@ option('sphinx_build', type : 'string', value : '', description: 'Use specified sphinx-build for building document') option('iasl', type : 'string', value : '', description: 'Path to ACPI disassembler') +option('tls_priority', type : 'string', value : 'NORMAL', + description: 'Default TLS protocol/cipher priority string') option('default_devices', type : 'boolean', value : true, description: 'Include a default selection of devices in emulators') option('audio_drv_list', type: 'array', value: ['default'], diff --git a/scripts/meson-buildoptions.sh b/scripts/meson-buildoptions.sh index bdaa128ee4..3919eeec0b 100644 --- a/scripts/meson-buildoptions.sh +++ b/scripts/meson-buildoptions.sh @@ -36,6 +36,8 @@ meson_options_help() { printf "%s\n" ' dtrace/ftrace/log/nop/simple/s= yslog/ust)' printf "%s\n" ' --iasl=3DVALUE Path to ACPI disassembler' printf "%s\n" ' --sphinx-build=3DVALUE Use specified sphinx-build f= or building document' + printf "%s\n" ' --tls-priority=3DVALUE Default TLS protocol/cipher = priority string' + printf "%s\n" ' [NORMAL]' printf "%s\n" ' --with-trace-file=3DVALUE Trace file prefix for simple= backend [trace]' printf "%s\n" '' printf "%s\n" 'Optional features, enabled with --enable-FEATURE and' @@ -351,6 +353,7 @@ _meson_option_parse() { --disable-tcg) printf "%s" -Dtcg=3Ddisabled ;; --enable-tcg-interpreter) printf "%s" -Dtcg_interpreter=3Dtrue ;; --disable-tcg-interpreter) printf "%s" -Dtcg_interpreter=3Dfalse ;; + --tls-priority=3D*) quote_sh "-Dtls_priority=3D$2" ;; --enable-tools) printf "%s" -Dtools=3Denabled ;; --disable-tools) printf "%s" -Dtools=3Ddisabled ;; --enable-tpm) printf "%s" -Dtpm=3Denabled ;; --=20 2.35.1 From nobody Sat May 4 20:14:55 2024 Delivered-To: importer2@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer2=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1651247586004737.4432041168621; Fri, 29 Apr 2022 08:53:06 -0700 (PDT) Received: from localhost ([::1]:46326 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nkSvY-0001fe-LJ for importer2@patchew.org; Fri, 29 Apr 2022 11:53:04 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:44086) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nkSSq-00022o-Ry for qemu-devel@nongnu.org; Fri, 29 Apr 2022 11:23:24 -0400 Received: from mail-ed1-x533.google.com ([2a00:1450:4864:20::533]:44971) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nkSSo-000698-Vh for qemu-devel@nongnu.org; Fri, 29 Apr 2022 11:23:24 -0400 Received: by mail-ed1-x533.google.com with SMTP id e23so9441515eda.11 for ; Fri, 29 Apr 2022 08:23:22 -0700 (PDT) Received: from avogadro.redhat.com ([2001:b07:6468:f312:1c09:f536:3de6:228c]) by smtp.gmail.com with ESMTPSA id w25-20020a170907271900b006f3ef214dd6sm736395ejk.60.2022.04.29.08.23.20 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 29 Apr 2022 08:23:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=fNc5lWvrIfTI+jbsjepWvHetTBezBT3cJOef0+HALMI=; b=Iwd8exNs35LcE8c7PWIaFSbkwqLI1lOboaAF4zWBE3yMhwNVMwOnib5eGEfer9inSW darz2xfscY9ze+Apmki5ZHD4bGTW5SmdZgK4zY5+0C9wzZonTuP3fl7nxB4kztMXK5s5 fElczKY+ptgccz6AIT09gQhWlsa2rjGSVgCQfJjPiAqfalU46sU/YQpXLp5hSLPsUQ3j aUp0diEmRrh4hFh4hQOEX9dzP5qYraxGuw2Rh3S63j4Uq04Sn3yRjmZE+4TBHu2w7DyC Vi82SaBezTyv4Z7Dy0x8hf/3A8j86RSUYVv6iRkhUKEtiy6KTetDhxIh5ZQBIqCys1v1 chfw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=fNc5lWvrIfTI+jbsjepWvHetTBezBT3cJOef0+HALMI=; b=2Wgbz4byVrxPn6RkQqXXeE34mUh1GT3LoyJ8wayKcsMDvKxrRTtO9wpjTp56e7u5ig VAeZfuia9c7kL0CVrhATKs0lhKyW1x7GU3KCrGcbS4zJJjxPkjZzZy9g+8LrWvyKAf3U i2u8rZRQaOc7apXylxDie4N9xQI6/uMO8R0gqg/Wh8gX+sUizGNFKPGSiKa+7q0nJige l3foPO36kZDykvm4j8tqYGikm5sdT1VlHZLnFyH+bQdnAqpJIYSei23eviRWDvm47x3f 8S7AagKLXRuY0saiAKUh1/7kXE9DtbY4llr8cSFBPEEECLljQhF3VyFUftKHEKTWuGZ1 G0MQ== X-Gm-Message-State: AOAM531YW2qjjeY15gD8J72IAaz7rTMydJG3iCbs3B6d8Ab6STs3Ef/v b9HgWVPW8DidxApiPwCXpQJtLmnMxlEeOg== X-Google-Smtp-Source: ABdhPJzvekwyu3iYqphRHHvr0NBjIZnmfz/WAvnOwiW7Mwg9E+d71UcDMUl0YgHJQSA3DmOQm92DwA== X-Received: by 2002:a05:6402:22e1:b0:425:d5e5:c63 with SMTP id dn1-20020a05640222e100b00425d5e50c63mr32827595edb.185.1651245801727; Fri, 29 Apr 2022 08:23:21 -0700 (PDT) From: Paolo Bonzini To: qemu-devel@nongnu.org Subject: [PULL 10/25] meson, configure: move bdrv whitelists to meson Date: Fri, 29 Apr 2022 17:22:57 +0200 Message-Id: <20220429152312.335715-11-pbonzini@redhat.com> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220429152312.335715-1-pbonzini@redhat.com> References: <20220429152312.335715-1-pbonzini@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Type: text/plain Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer2=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::533; envelope-from=paolo.bonzini@gmail.com; helo=mail-ed1-x533.google.com X-Spam_score_int: -4 X-Spam_score: -0.5 X-Spam_bar: / X-Spam_report: (-0.5 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FORGED_FROMDOMAIN=0.249, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.249, PP_MIME_FAKE_ASCII_TEXT=0.999, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= Errors-To: qemu-devel-bounces+importer2=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZM-MESSAGEID: 1651247587089100001 Use the new support for string option parsing. Reviewed-by: Marc-Andr=C3=A9 Lureau Signed-off-by: Paolo Bonzini --- configure | 14 -------------- meson.build | 27 ++++++++++++++++----------- meson_options.txt | 4 ++++ scripts/meson-buildoptions.sh | 8 ++++++++ 4 files changed, 28 insertions(+), 25 deletions(-) diff --git a/configure b/configure index 9062f9ccd6..e81ea490da 100755 --- a/configure +++ b/configure @@ -235,8 +235,6 @@ interp_prefix=3D"/usr/gnemul/qemu-%M" static=3D"no" cross_compile=3D"no" cross_prefix=3D"" -block_drv_rw_whitelist=3D"" -block_drv_ro_whitelist=3D"" host_cc=3D"cc" lto=3D"false" stack_protector=3D"" @@ -816,10 +814,6 @@ for opt do # configure to be used by RPM and similar macros that set # lots of directory switches by default. ;; - --block-drv-rw-whitelist=3D*|--block-drv-whitelist=3D*) block_drv_rw_whi= telist=3D$(echo "$optarg" | sed -e 's/,/ /g') - ;; - --block-drv-ro-whitelist=3D*) block_drv_ro_whitelist=3D$(echo "$optarg" = | sed -e 's/,/ /g') - ;; --enable-debug-tcg) debug_tcg=3D"yes" ;; --disable-debug-tcg) debug_tcg=3D"no" @@ -1155,12 +1149,6 @@ Advanced options (experts only): --disable-stack-protector disable compiler-provided stack protection --audio-drv-list=3DLIST set audio drivers to try if -audiodev is not = used --block-drv-whitelist=3DL Same as --block-drv-rw-whitelist=3DL - --block-drv-rw-whitelist=3DL - set block driver read-write whitelist - (by default affects only QEMU, not tools like q= emu-img) - --block-drv-ro-whitelist=3DL - set block driver read-only whitelist - (by default affects only QEMU, not tools like q= emu-img) --with-trace-file=3DNAME Full PATH,NAME of file to store traces Default:trace- --cpu=3DCPU Build for host CPU [$cpu] @@ -2185,8 +2173,6 @@ fi if test "$static" =3D "yes" ; then echo "CONFIG_STATIC=3Dy" >> $config_host_mak fi -echo "CONFIG_BDRV_RW_WHITELIST=3D$block_drv_rw_whitelist" >> $config_host_= mak -echo "CONFIG_BDRV_RO_WHITELIST=3D$block_drv_ro_whitelist" >> $config_host_= mak qemu_version=3D$(head $source_path/VERSION) echo "PKGVERSION=3D$pkgversion" >>$config_host_mak echo "SRC_PATH=3D$source_path" >> $config_host_mak diff --git a/meson.build b/meson.build index f4f518c7b8..750840a0e9 100644 --- a/meson.build +++ b/meson.build @@ -1594,6 +1594,19 @@ have_virtfs =3D get_option('virtfs') \ =20 have_virtfs_proxy_helper =3D targetos !=3D 'darwin' and have_virtfs and ha= ve_tools =20 +if get_option('block_drv_ro_whitelist') =3D=3D '' + config_host_data.set('CONFIG_BDRV_RO_WHITELIST', '') +else + config_host_data.set('CONFIG_BDRV_RO_WHITELIST', + '"' + get_option('block_drv_ro_whitelist').replace(',', '", "') + = '"') +endif +if get_option('block_drv_rw_whitelist') =3D=3D '' + config_host_data.set('CONFIG_BDRV_RW_WHITELIST', '') +else + config_host_data.set('CONFIG_BDRV_RW_WHITELIST', + '"' + get_option('block_drv_rw_whitelist').replace(',', '", "') + = '"') +endif + foreach k : get_option('trace_backends') config_host_data.set('CONFIG_TRACE_' + k.to_upper(), true) endforeach @@ -2208,16 +2221,8 @@ config_host_data.set('HAVE_VSS_SDK', have_vss_sdk) =20 ignored =3D ['CONFIG_QEMU_INTERP_PREFIX', # actually per-target 'HAVE_GDB_BIN'] -arrays =3D ['CONFIG_BDRV_RW_WHITELIST', 'CONFIG_BDRV_RO_WHITELIST'] foreach k, v: config_host - if ignored.contains(k) - # do nothing - elif arrays.contains(k) - if v !=3D '' - v =3D '"' + '", "'.join(v.split()) + '", ' - endif - config_host_data.set(k, v) - elif k.startswith('CONFIG_') + if k.startswith('CONFIG_') and not ignored.contains(k) config_host_data.set(k, v =3D=3D 'y' ? 1 : v) endif endforeach @@ -3799,8 +3804,8 @@ summary_info =3D {} summary_info +=3D {'coroutine backend': config_host['CONFIG_COROUTINE_BACK= END']} summary_info +=3D {'coroutine pool': have_coroutine_pool} if have_block - summary_info +=3D {'Block whitelist (rw)': config_host['CONFIG_BDRV_RW_W= HITELIST']} - summary_info +=3D {'Block whitelist (ro)': config_host['CONFIG_BDRV_RO_W= HITELIST']} + summary_info +=3D {'Block whitelist (rw)': get_option('block_drv_rw_whit= elist')} + summary_info +=3D {'Block whitelist (ro)': get_option('block_drv_ro_whit= elist')} summary_info +=3D {'Use block whitelist in tools': get_option('block_drv= _whitelist_in_tools')} summary_info +=3D {'VirtFS support': have_virtfs} summary_info +=3D {'build virtiofs daemon': have_virtiofsd} diff --git a/meson_options.txt b/meson_options.txt index c8e0a10d91..430674522f 100644 --- a/meson_options.txt +++ b/meson_options.txt @@ -21,6 +21,10 @@ option('default_devices', type : 'boolean', value : true, option('audio_drv_list', type: 'array', value: ['default'], choices: ['alsa', 'coreaudio', 'default', 'dsound', 'jack', 'oss', = 'pa', 'sdl'], description: 'Set audio driver list') +option('block_drv_rw_whitelist', type : 'string', value : '', + description: 'set block driver read-write whitelist (by default aff= ects only QEMU, not tools like qemu-img)') +option('block_drv_ro_whitelist', type : 'string', value : '', + description: 'set block driver read-only whitelist (by default affe= cts only QEMU, not tools like qemu-img)') option('fuzzing_engine', type : 'string', value : '', description: 'fuzzing engine library for OSS-Fuzz') option('trace_file', type: 'string', value: 'trace', diff --git a/scripts/meson-buildoptions.sh b/scripts/meson-buildoptions.sh index 3919eeec0b..d5cba2638a 100644 --- a/scripts/meson-buildoptions.sh +++ b/scripts/meson-buildoptions.sh @@ -2,6 +2,12 @@ meson_options_help() { printf "%s\n" ' --audio-drv-list=3DCHOICES Set audio driver list [defau= lt] (choices:' printf "%s\n" ' alsa/coreaudio/default/dsound/= jack/oss/pa/sdl)' + printf "%s\n" ' --block-drv-ro-whitelist=3DVALUE' + printf "%s\n" ' set block driver read-only whi= telist (by default' + printf "%s\n" ' affects only QEMU, not tools l= ike qemu-img)' + printf "%s\n" ' --block-drv-rw-whitelist=3DVALUE' + printf "%s\n" ' set block driver read-write wh= itelist (by default' + printf "%s\n" ' affects only QEMU, not tools l= ike qemu-img)' printf "%s\n" ' --disable-coroutine-pool coroutine freelist (better per= formance)' printf "%s\n" ' --disable-install-blobs install provided firmware blob= s' printf "%s\n" ' --enable-block-drv-whitelist-in-tools' @@ -161,6 +167,8 @@ _meson_option_parse() { --disable-avx2) printf "%s" -Davx2=3Ddisabled ;; --enable-avx512f) printf "%s" -Davx512f=3Denabled ;; --disable-avx512f) printf "%s" -Davx512f=3Ddisabled ;; + --block-drv-ro-whitelist=3D*) quote_sh "-Dblock_drv_ro_whitelist=3D$2"= ;; + --block-drv-rw-whitelist=3D*) quote_sh "-Dblock_drv_rw_whitelist=3D$2"= ;; --enable-block-drv-whitelist-in-tools) printf "%s" -Dblock_drv_whiteli= st_in_tools=3Dtrue ;; --disable-block-drv-whitelist-in-tools) printf "%s" -Dblock_drv_whitel= ist_in_tools=3Dfalse ;; --enable-bochs) printf "%s" -Dbochs=3Denabled ;; --=20 2.35.1 From nobody Sat May 4 20:14:55 2024 Delivered-To: importer2@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer2=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1651247018331537.91053984227; Fri, 29 Apr 2022 08:43:38 -0700 (PDT) Received: from localhost ([::1]:45900 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nkSmP-0007b8-5K for importer2@patchew.org; Fri, 29 Apr 2022 11:43:37 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:44110) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nkSSs-00026h-0f for qemu-devel@nongnu.org; Fri, 29 Apr 2022 11:23:26 -0400 Received: from mail-ej1-x62a.google.com ([2a00:1450:4864:20::62a]:37404) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nkSSp-00069M-VK for qemu-devel@nongnu.org; Fri, 29 Apr 2022 11:23:25 -0400 Received: by mail-ej1-x62a.google.com with SMTP id kq17so16104062ejb.4 for ; Fri, 29 Apr 2022 08:23:23 -0700 (PDT) Received: from avogadro.redhat.com ([2001:b07:6468:f312:1c09:f536:3de6:228c]) by smtp.gmail.com with ESMTPSA id w25-20020a170907271900b006f3ef214dd6sm736395ejk.60.2022.04.29.08.23.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 29 Apr 2022 08:23:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=xPJ954Hz/1AlFJ5/uy7qLvpZoFrySyi6dm6cXN+IsZ0=; b=qkdk3cMoX/0XBAT7o6SVsgYusZKUFNVgmZu9Kg65CjgA7bQ77IfiuwbCrnX23UDYLH U//b+zaeX3VgMNf4ClEDOFYbmA5Q8YdTk3f8Q/HqlFetrEpeOzvGkflAjjU/UZg9AKFs yej1MHcI/FrLSrC+OiFQTnOwfs4qWZ5U405a+d4jT20Q1P0sp4h9n1rRFBlP34W90MPp pItIJvM4g1e5kbKXUOS1ydNdzmh/dvkGC+KodglIOlKYKnegdpGrH8Rnq+Y8CA2Z4rHv t0Z0OE/aSGLICe2tu1DxUtwv0jLZU2grMccsWJA2hQc5T/gLZkc9K7O0HOE38KGaNWFH k/+Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=xPJ954Hz/1AlFJ5/uy7qLvpZoFrySyi6dm6cXN+IsZ0=; b=6sDqABmd8/SB9cjmmRFv4mMvPT93DSwDnS45TfNvhXTFbD/ADUnayuPzxZtFmQlW21 vtZOsgh3X40pGkCHg287YbC+l7MrX7Do7g37yxpr0TVDKqx8tnAhC4kq2X7GH7dXy772 qx0dXaa+W8j3Bvp3A6rJgZ4kVQAd4Yq+mbYdAOKosYJzOtMZlEBk8Ylsdjr6QpAPru2Y Pz6eA9mROmddWdTNFr60gcQ5KXSdNw0SMM3FTWPR9mhznETLalHTqqpAymAfp6NaDiZj y/h3sKC+mZfXYEah01NhWifT7s+6bNFrDKbdTfEgfYTZVni1lAgdQhQ+x8nGicbeqbRw a1Fw== X-Gm-Message-State: AOAM533Wj01hnPGTiJqYm1yr+pY9r6swTMwG6ycEB9hIbAJYa/5ck72Z oltrJjmzfE5MxZCjKS2hc+ykOUpz7o6/vQ== X-Google-Smtp-Source: ABdhPJyURtBqG0ZC4mOwDQKaXrWZodnUwwlN9kkr6bF7rIb1Ldn3DFOJWzezo6lm/GvPe9b3x3+2og== X-Received: by 2002:a17:907:2cc6:b0:6f0:2de3:9446 with SMTP id hg6-20020a1709072cc600b006f02de39446mr36099616ejc.690.1651245802660; Fri, 29 Apr 2022 08:23:22 -0700 (PDT) From: Paolo Bonzini To: qemu-devel@nongnu.org Subject: [PULL 11/25] meson, configure: move --with-pkgversion, CONFIG_STAMP to meson Date: Fri, 29 Apr 2022 17:22:58 +0200 Message-Id: <20220429152312.335715-12-pbonzini@redhat.com> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220429152312.335715-1-pbonzini@redhat.com> References: <20220429152312.335715-1-pbonzini@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Type: text/plain Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer2=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::62a; envelope-from=paolo.bonzini@gmail.com; helo=mail-ej1-x62a.google.com X-Spam_score_int: -4 X-Spam_score: -0.5 X-Spam_bar: / X-Spam_report: (-0.5 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FORGED_FROMDOMAIN=0.249, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.249, PP_MIME_FAKE_ASCII_TEXT=0.999, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= Errors-To: qemu-devel-bounces+importer2=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZM-MESSAGEID: 1651247019061100001 The hash is now generated with a Python script. Reviewed-by: Marc-Andr=C3=A9 Lureau Signed-off-by: Paolo Bonzini --- configure | 23 ----------------------- docs/meson.build | 2 +- meson.build | 10 +++++++++- meson_options.txt | 2 ++ scripts/meson-buildoptions.py | 1 + scripts/meson-buildoptions.sh | 3 +++ scripts/qemu-stamp.py | 24 ++++++++++++++++++++++++ 7 files changed, 40 insertions(+), 25 deletions(-) create mode 100644 scripts/qemu-stamp.py diff --git a/configure b/configure index e81ea490da..b8d3d04072 100755 --- a/configure +++ b/configure @@ -306,7 +306,6 @@ qemu_suffix=3D"qemu" softmmu=3D"yes" linux_user=3D"" bsd_user=3D"" -pkgversion=3D"" pie=3D"" coroutine=3D"" plugins=3D"$default_feature" @@ -897,8 +896,6 @@ for opt do ;; --enable-fdt=3D*) fdt=3D"$optarg" ;; - --with-pkgversion=3D*) pkgversion=3D"$optarg" - ;; --with-coroutine=3D*) coroutine=3D"$optarg" ;; --disable-vhost-net) vhost_net=3D"no" @@ -1136,7 +1133,6 @@ Advanced options (experts only): --firmwarepath=3DPATH search PATH for firmware files --efi-aarch64=3DPATH PATH of efi file to use for aarch64 VMs. --with-suffix=3DSUFFIX suffix for QEMU data inside datadir/libdir/sy= sconfdir/docdir [$qemu_suffix] - --with-pkgversion=3DVERS use specified string as sub-version of the pa= ckage --without-default-features default all --enable-* options to "disabled" --without-default-devices do not include any device that is not needed = to start the emulator (only use if you are includi= ng @@ -1723,21 +1719,6 @@ if ! compile_prog "$glib_cflags -Werror" "$glib_libs= " ; then fi fi =20 -########################################## -# SHA command probe for modules -if test "$modules" =3D yes; then - shacmd_probe=3D"sha1sum sha1 shasum" - for c in $shacmd_probe; do - if has $c; then - shacmd=3D"$c" - break - fi - done - if test "$shacmd" =3D ""; then - error_exit "one of the checksum commands is required to enable mod= ules: $shacmd_probe" - fi -fi - ########################################## # fdt probe =20 @@ -2174,13 +2155,9 @@ if test "$static" =3D "yes" ; then echo "CONFIG_STATIC=3Dy" >> $config_host_mak fi qemu_version=3D$(head $source_path/VERSION) -echo "PKGVERSION=3D$pkgversion" >>$config_host_mak echo "SRC_PATH=3D$source_path" >> $config_host_mak echo "TARGET_DIRS=3D$target_list" >> $config_host_mak if test "$modules" =3D "yes"; then - # $shacmd can generate a hash started with digit, which the compiler doe= sn't - # like as an symbol. So prefix it with an underscore - echo "CONFIG_STAMP=3D_$( (echo $qemu_version; echo $pkgversion; cat $0) = | $shacmd - | cut -f1 -d\ )" >> $config_host_mak echo "CONFIG_MODULES=3Dy" >> $config_host_mak fi =20 diff --git a/docs/meson.build b/docs/meson.build index 831d4aea2b..9136fed3b7 100644 --- a/docs/meson.build +++ b/docs/meson.build @@ -35,7 +35,7 @@ if sphinx_build.found() endif =20 if build_docs - SPHINX_ARGS +=3D ['-Dversion=3D' + meson.project_version(), '-Drelease= =3D' + config_host['PKGVERSION']] + SPHINX_ARGS +=3D ['-Dversion=3D' + meson.project_version(), '-Drelease= =3D' + get_option('pkgversion')] =20 man_pages =3D { 'qemu-ga.8': (have_ga ? 'man8' : ''), diff --git a/meson.build b/meson.build index 750840a0e9..0ff752343a 100644 --- a/meson.build +++ b/meson.build @@ -1628,6 +1628,14 @@ config_host_data.set_quoted('CONFIG_QEMU_LOCALSTATED= IR', get_option('prefix') / config_host_data.set_quoted('CONFIG_QEMU_MODDIR', get_option('prefix') / q= emu_moddir) config_host_data.set_quoted('CONFIG_SYSCONFDIR', get_option('prefix') / ge= t_option('sysconfdir')) =20 +if config_host.has_key('CONFIG_MODULES') + config_host_data.set('CONFIG_STAMP', run_command( + meson.current_source_dir() / 'scripts/qemu-stamp.py', + meson.project_version(), get_option('pkgversion'), '--', + meson.current_source_dir() / 'configure', + capture: true, check: true).stdout().strip()) +endif + have_slirp_smbd =3D get_option('slirp_smbd') \ .require(targetos !=3D 'windows', error_message: 'Host smbd not supporte= d on this platform.') \ .allowed() @@ -2798,7 +2806,7 @@ tracetool_depends =3D files( =20 qemu_version_cmd =3D [find_program('scripts/qemu-version.sh'), meson.current_source_dir(), - config_host['PKGVERSION'], meson.project_version()] + get_option('pkgversion'), meson.project_version()] qemu_version =3D custom_target('qemu-version.h', output: 'qemu-version.h', command: qemu_version_cmd, diff --git a/meson_options.txt b/meson_options.txt index 430674522f..bdb45092ca 100644 --- a/meson_options.txt +++ b/meson_options.txt @@ -8,6 +8,8 @@ option('docdir', type : 'string', value : 'doc', description: 'Base directory for documentation installation (can be= empty)') option('qemu_firmwarepath', type : 'string', value : '', description: 'search PATH for firmware files') +option('pkgversion', type : 'string', value : '', + description: 'use specified string as sub-version of the package') option('smbd', type : 'string', value : '', description: 'Path to smbd for slirp networking') option('sphinx_build', type : 'string', value : '', diff --git a/scripts/meson-buildoptions.py b/scripts/meson-buildoptions.py index 3e540e8bb3..0f9603a7f6 100755 --- a/scripts/meson-buildoptions.py +++ b/scripts/meson-buildoptions.py @@ -36,6 +36,7 @@ =20 OPTION_NAMES =3D { "malloc": "enable-malloc", + "pkgversion": "with-pkgversion", "trace_backends": "enable-trace-backends", "trace_file": "with-trace-file", } diff --git a/scripts/meson-buildoptions.sh b/scripts/meson-buildoptions.sh index d5cba2638a..3a86dd7271 100644 --- a/scripts/meson-buildoptions.sh +++ b/scripts/meson-buildoptions.sh @@ -44,6 +44,8 @@ meson_options_help() { printf "%s\n" ' --sphinx-build=3DVALUE Use specified sphinx-build f= or building document' printf "%s\n" ' --tls-priority=3DVALUE Default TLS protocol/cipher = priority string' printf "%s\n" ' [NORMAL]' + printf "%s\n" ' --with-pkgversion=3DVALUE use specified string as sub-= version of the' + printf "%s\n" ' package' printf "%s\n" ' --with-trace-file=3DVALUE Trace file prefix for simple= backend [trace]' printf "%s\n" '' printf "%s\n" 'Optional features, enabled with --enable-FEATURE and' @@ -309,6 +311,7 @@ _meson_option_parse() { --disable-pa) printf "%s" -Dpa=3Ddisabled ;; --enable-parallels) printf "%s" -Dparallels=3Denabled ;; --disable-parallels) printf "%s" -Dparallels=3Ddisabled ;; + --with-pkgversion=3D*) quote_sh "-Dpkgversion=3D$2" ;; --enable-png) printf "%s" -Dpng=3Denabled ;; --disable-png) printf "%s" -Dpng=3Ddisabled ;; --enable-profiler) printf "%s" -Dprofiler=3Dtrue ;; diff --git a/scripts/qemu-stamp.py b/scripts/qemu-stamp.py new file mode 100644 index 0000000000..7beeeb07ed --- /dev/null +++ b/scripts/qemu-stamp.py @@ -0,0 +1,24 @@ +#! /usr/bin/env python3 + +# Usage: scripts/qemu-stamp.py STRING1 STRING2... -- FILE1 FILE2... +import hashlib +import os +import sys + +sha =3D hashlib.sha1() +is_file =3D False +for arg in sys.argv[1:]: + if arg =3D=3D '--': + is_file =3D True + continue + if is_file: + with open(arg, 'rb') as f: + for chunk in iter(lambda: f.read(65536), b''): + sha.update(chunk) + else: + sha.update(os.fsencode(arg)) + sha.update(b'\n') + +# The hash can start with a digit, which the compiler doesn't +# like as an symbol. So prefix it with an underscore +print("_" + sha.hexdigest()) --=20 2.35.1 From nobody Sat May 4 20:14:55 2024 Delivered-To: importer2@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer2=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1651247734842374.98609276009324; Fri, 29 Apr 2022 08:55:34 -0700 (PDT) Received: from localhost ([::1]:53152 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nkSxx-0006DM-RM for importer2@patchew.org; Fri, 29 Apr 2022 11:55:33 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:44114) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nkSSs-00028M-ED for qemu-devel@nongnu.org; Fri, 29 Apr 2022 11:23:26 -0400 Received: from mail-ej1-x631.google.com ([2a00:1450:4864:20::631]:41603) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nkSSq-00069b-Nc for qemu-devel@nongnu.org; Fri, 29 Apr 2022 11:23:26 -0400 Received: by mail-ej1-x631.google.com with SMTP id dk23so16093906ejb.8 for ; Fri, 29 Apr 2022 08:23:24 -0700 (PDT) Received: from avogadro.redhat.com ([2001:b07:6468:f312:1c09:f536:3de6:228c]) by smtp.gmail.com with ESMTPSA id w25-20020a170907271900b006f3ef214dd6sm736395ejk.60.2022.04.29.08.23.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 29 Apr 2022 08:23:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=eZe5XfwXTVI3O5zGujNaKUL1PtQPp4bviw9gZAV8t6c=; b=HK3gafuq1yYsLJFYVEoXShAVIBIB5EmufcZ0UOd/6iJPtU7/8pu4CGMKCt0UmSoiE4 5AzOTX+l0RwayXUc3EwbHw2wKRCHQ/X0asRYlJvY8puIzVq/W/V48cLuH0ORQKUZ4vwY pUxPWj7HCuxw12tEtr8KS7dWNyW2Lb4fzQeuAIuYT9oID4EyC0n6YxVVM2fRE0/ty4dc 02lte0CVpOMZbvIjMBweSAERk1anTKdIzTGli6DwgZrluHJ1N3Ms8871/OhrOOVDCL2G E6wELsalPs9CNsNaAsfRPv1Xbim2r3eUkHEEadODxaAYlOpiNApUvUhe/WJXljNnajrk 0O0Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=eZe5XfwXTVI3O5zGujNaKUL1PtQPp4bviw9gZAV8t6c=; b=2iortfQkr8OKjOGCR2z41CBZMR3ejPa22p/Wcl1AHhCljr7ZqNTfd3l5N3cDSc6XS6 VGpFb6MsXt4YinjjjdIH88IpBA0jWsAp1NEJkktqyD4xjpwLzpVqPf5KtxBU7n149S7K v5cT4tH92NgHi9QmsDzUeRFSp8VVypZ4luWuQ5Q7MSOd1Jj3XVRoTpqzbohYeMEyGppS VITywhaXjynSfHkmEISweuVHf7ysr8vLkYZXdYD8Qbdarl/dSbb10+79hUk3l2fqC2ZJ SDieQMXwS9we6doazXVuuTwQhN7WsRHSxTFh7kxMTt6YedJsR+nSgI7HzlTwbJkiwtKs xFZg== X-Gm-Message-State: AOAM530/zARwd7gnUedouMzisSbYSf9eXkcNYtC021Tn1BCPwWBPaJKb DxEcArwGdxJLYWSKeXuznHzpRL3DyTtQ3A== X-Google-Smtp-Source: ABdhPJz4uKSC9Zd27lyGIntNOoDkqDaFxACIDWshgEMrzcEfOnW+3AUCAhGuArniFG0M/idZBrherQ== X-Received: by 2002:a17:906:a08b:b0:6cf:65bc:e7de with SMTP id q11-20020a170906a08b00b006cf65bce7demr37415885ejy.220.1651245803465; Fri, 29 Apr 2022 08:23:23 -0700 (PDT) From: Paolo Bonzini To: qemu-devel@nongnu.org Subject: [PULL 12/25] meson, configure: move --interp-prefix to meson Date: Fri, 29 Apr 2022 17:22:59 +0200 Message-Id: <20220429152312.335715-13-pbonzini@redhat.com> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220429152312.335715-1-pbonzini@redhat.com> References: <20220429152312.335715-1-pbonzini@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Type: text/plain Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer2=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::631; envelope-from=paolo.bonzini@gmail.com; helo=mail-ej1-x631.google.com X-Spam_score_int: -4 X-Spam_score: -0.5 X-Spam_bar: / X-Spam_report: (-0.5 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FORGED_FROMDOMAIN=0.249, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.249, PP_MIME_FAKE_ASCII_TEXT=0.999, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= Errors-To: qemu-devel-bounces+importer2=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZM-MESSAGEID: 1651247735866100001 This is the last CONFIG_* entry in config-host.mak that had to be special cased. Reviewed-by: Marc-Andr=C3=A9 Lureau Signed-off-by: Paolo Bonzini --- configure | 6 ------ meson.build | 6 ++---- meson_options.txt | 2 ++ scripts/meson-buildoptions.sh | 3 +++ 4 files changed, 7 insertions(+), 10 deletions(-) diff --git a/configure b/configure index b8d3d04072..4102683d75 100755 --- a/configure +++ b/configure @@ -231,7 +231,6 @@ fi =20 # default parameters cpu=3D"" -interp_prefix=3D"/usr/gnemul/qemu-%M" static=3D"no" cross_compile=3D"no" cross_prefix=3D"" @@ -697,8 +696,6 @@ for opt do ;; --prefix=3D*) prefix=3D"$optarg" ;; - --interp-prefix=3D*) interp_prefix=3D"$optarg" - ;; --cross-prefix=3D*) ;; --cc=3D*) @@ -1091,8 +1088,6 @@ Options: [defaults in brackets after descriptions] Standard options: --help print this message --prefix=3DPREFIX install in PREFIX [$prefix] - --interp-prefix=3DPREFIX where to find shared libraries, etc. - use %M for cpu name [$interp_prefix] --target-list=3DLIST set target list (default: build all) $(echo Available targets: $default_target_list | \ fold -s -w 53 | sed -e 's/^/ /') @@ -2289,7 +2284,6 @@ for target in $target_list; do esac done =20 -echo "CONFIG_QEMU_INTERP_PREFIX=3D$interp_prefix" | sed 's/%M/@0@/' >> $co= nfig_host_mak if test "$default_targets" =3D "yes"; then echo "CONFIG_DEFAULT_TARGETS=3Dy" >> $config_host_mak fi diff --git a/meson.build b/meson.build index 0ff752343a..83b06ca611 100644 --- a/meson.build +++ b/meson.build @@ -2227,10 +2227,8 @@ if targetos =3D=3D 'windows' and link_language =3D= =3D 'cpp' endif config_host_data.set('HAVE_VSS_SDK', have_vss_sdk) =20 -ignored =3D ['CONFIG_QEMU_INTERP_PREFIX', # actually per-target - 'HAVE_GDB_BIN'] foreach k, v: config_host - if k.startswith('CONFIG_') and not ignored.contains(k) + if k.startswith('CONFIG_') config_host_data.set(k, v =3D=3D 'y' ? 1 : v) endif endforeach @@ -2336,7 +2334,7 @@ foreach target : target_dirs config_target +=3D { 'CONFIG_USER_ONLY': 'y', 'CONFIG_QEMU_INTERP_PREFIX': - config_host['CONFIG_QEMU_INTERP_PREFIX'].format(config_target['TAR= GET_NAME']) + get_option('interp_prefix').replace('%M', config_target['TARGET_NA= ME']) } endif =20 diff --git a/meson_options.txt b/meson_options.txt index bdb45092ca..ae6c4b2475 100644 --- a/meson_options.txt +++ b/meson_options.txt @@ -27,6 +27,8 @@ option('block_drv_rw_whitelist', type : 'string', value := '', description: 'set block driver read-write whitelist (by default aff= ects only QEMU, not tools like qemu-img)') option('block_drv_ro_whitelist', type : 'string', value : '', description: 'set block driver read-only whitelist (by default affe= cts only QEMU, not tools like qemu-img)') +option('interp_prefix', type : 'string', value : '/usr/gnemul/qemu-%M', + description: 'where to find shared libraries etc., use %M for cpu n= ame') option('fuzzing_engine', type : 'string', value : '', description: 'fuzzing engine library for OSS-Fuzz') option('trace_file', type: 'string', value: 'trace', diff --git a/scripts/meson-buildoptions.sh b/scripts/meson-buildoptions.sh index 3a86dd7271..59c4a27c5a 100644 --- a/scripts/meson-buildoptions.sh +++ b/scripts/meson-buildoptions.sh @@ -41,6 +41,8 @@ meson_options_help() { printf "%s\n" ' Set available tracing backends= [log] (choices:' printf "%s\n" ' dtrace/ftrace/log/nop/simple/s= yslog/ust)' printf "%s\n" ' --iasl=3DVALUE Path to ACPI disassembler' + printf "%s\n" ' --interp-prefix=3DVALUE where to find shared librari= es etc., use %M for' + printf "%s\n" ' cpu name [/usr/gnemul/qemu-%M]' printf "%s\n" ' --sphinx-build=3DVALUE Use specified sphinx-build f= or building document' printf "%s\n" ' --tls-priority=3DVALUE Default TLS protocol/cipher = priority string' printf "%s\n" ' [NORMAL]' @@ -252,6 +254,7 @@ _meson_option_parse() { --disable-iconv) printf "%s" -Diconv=3Ddisabled ;; --enable-install-blobs) printf "%s" -Dinstall_blobs=3Dtrue ;; --disable-install-blobs) printf "%s" -Dinstall_blobs=3Dfalse ;; + --interp-prefix=3D*) quote_sh "-Dinterp_prefix=3D$2" ;; --enable-jack) printf "%s" -Djack=3Denabled ;; --disable-jack) printf "%s" -Djack=3Ddisabled ;; --enable-keyring) printf "%s" -Dkeyring=3Denabled ;; --=20 2.35.1 From nobody Sat May 4 20:14:55 2024 Delivered-To: importer2@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer2=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1651247872347585.8006735300687; Fri, 29 Apr 2022 08:57:52 -0700 (PDT) Received: from localhost ([::1]:59982 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nkT0A-0002Q9-Uw for importer2@patchew.org; Fri, 29 Apr 2022 11:57:50 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:44126) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nkSSt-0002C9-Bb for qemu-devel@nongnu.org; Fri, 29 Apr 2022 11:23:27 -0400 Received: from mail-ej1-x630.google.com ([2a00:1450:4864:20::630]:39558) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nkSSr-00069l-Mj for qemu-devel@nongnu.org; Fri, 29 Apr 2022 11:23:27 -0400 Received: by mail-ej1-x630.google.com with SMTP id bv19so16099763ejb.6 for ; Fri, 29 Apr 2022 08:23:25 -0700 (PDT) Received: from avogadro.redhat.com ([2001:b07:6468:f312:1c09:f536:3de6:228c]) by smtp.gmail.com with ESMTPSA id w25-20020a170907271900b006f3ef214dd6sm736395ejk.60.2022.04.29.08.23.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 29 Apr 2022 08:23:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=mWAwsqKOe3j1GZap7a55orVSPdGjnlY3ix6FNOt7dY4=; b=J2j/ou3a8c/diMO5wb6VbaJ9NjzKznn2qo5zlYURLbNRN20eIxvk+7IukH8wz2MHtv xIwn23OvWGsubuxP7iIPB7CE3o8HmwbZlCntVnMt7wqKjCLs9zWE+E+7uTPba1FUXq6q HsfqberLfPEUwBso9j0I5NA7bGr5rdQHuLGbISgUqdodjQ2jldNORXQY6fE9uxQMXAnA VJ0dd8VvAH1qatUE/Ud6OymMUZQrUkT4LQypCPaC8iU4jufZi90596sSPyEXlLkLFDje fdhd1LUrKBGRf/61ER3yJT0cqZ/RIxAjIeyQr39+qfzLL1NyWu6NRgk0fRTv3IA6cLJt /neg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=mWAwsqKOe3j1GZap7a55orVSPdGjnlY3ix6FNOt7dY4=; b=4iMvshFWPduWiRGQFAghQ32ko+satch3hy61grFijJak/UI0qSRbkjPyJ3wDJlhbWp w+jSrvaRRbnj1Mlg2W102FrWdMvzNP3cPS6nOZG8hfU0P3uNuvouNfe8MpUU4TlvrvcR uClDL1mHcvHBahOugHUYKh/7nZWVS/SeWJZ98yiH1H+Eqbyt5dVM+vRU9SeYiZgM0y3i VtA/3PoIQfH6OEMR4RWLVfZN6B2SsWwekHUQXqTzVczOPSruZ1j4BSYc5bnKlaQ363nR 3IhjVLej6BUz0V/LnYb75/utc1+sSRtX1NTXrKNZ2O9yLQRNLDxylh5YWZHQeZtNybUh v8Hg== X-Gm-Message-State: AOAM531DO5D6uA3JLD3+FJb8r2lIcZgwEWxygubxtc7My7Z2Gxj/icWW GGnVlNJ+DWg0BhgJx2hmJ5vyBqYFpkQfrQ== X-Google-Smtp-Source: ABdhPJzUSBLkuWDKB46EtGU5On6FhiAO76ldXbuzs9dO/rTI7jeQ4c6NzFJD4rQDoV2NRsMWGLYAUw== X-Received: by 2002:a17:907:6286:b0:6da:6e24:5e43 with SMTP id nd6-20020a170907628600b006da6e245e43mr36310600ejc.449.1651245804344; Fri, 29 Apr 2022 08:23:24 -0700 (PDT) From: Paolo Bonzini To: qemu-devel@nongnu.org Subject: [PULL 13/25] meson: always combine directories with prefix Date: Fri, 29 Apr 2022 17:23:00 +0200 Message-Id: <20220429152312.335715-14-pbonzini@redhat.com> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220429152312.335715-1-pbonzini@redhat.com> References: <20220429152312.335715-1-pbonzini@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Type: text/plain Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer2=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::630; envelope-from=paolo.bonzini@gmail.com; helo=mail-ej1-x630.google.com X-Spam_score_int: -4 X-Spam_score: -0.5 X-Spam_bar: / X-Spam_report: (-0.5 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FORGED_FROMDOMAIN=0.249, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.249, PP_MIME_FAKE_ASCII_TEXT=0.999, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= Errors-To: qemu-devel-bounces+importer2=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZM-MESSAGEID: 1651247872828100001 Meson allows directories such as "bindir" to be relative to the prefix. Ri= ght now configure is forcing an absolute path, but that is not really necessary: just make sure all uses of the directory variables are prefixed appropriate= ly. Do the same also for the options that are custom for QEMU, i.e. docdir and qemu_firmwarepath. Reviewed-by: Marc-Andr=C3=A9 Lureau Signed-off-by: Paolo Bonzini --- meson.build | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/meson.build b/meson.build index 83b06ca611..21135fbc52 100644 --- a/meson.build +++ b/meson.build @@ -1620,7 +1620,7 @@ config_host_data.set_quoted('CONFIG_PREFIX', get_opti= on('prefix')) config_host_data.set_quoted('CONFIG_QEMU_CONFDIR', get_option('prefix') / = qemu_confdir) config_host_data.set_quoted('CONFIG_QEMU_DATADIR', get_option('prefix') / = qemu_datadir) config_host_data.set_quoted('CONFIG_QEMU_DESKTOPDIR', get_option('prefix')= / qemu_desktopdir) -config_host_data.set_quoted('CONFIG_QEMU_FIRMWAREPATH', get_option('qemu_f= irmwarepath')) +config_host_data.set_quoted('CONFIG_QEMU_FIRMWAREPATH', get_option('prefix= ') / get_option('qemu_firmwarepath')) config_host_data.set_quoted('CONFIG_QEMU_HELPERDIR', get_option('prefix') = / get_option('libexecdir')) config_host_data.set_quoted('CONFIG_QEMU_ICONDIR', get_option('prefix') / = qemu_icondir) config_host_data.set_quoted('CONFIG_QEMU_LOCALEDIR', get_option('prefix') = / get_option('localedir')) @@ -3628,20 +3628,20 @@ endif summary_info =3D {} summary_info +=3D {'Install prefix': get_option('prefix')} summary_info +=3D {'BIOS directory': qemu_datadir} -summary_info +=3D {'firmware path': get_option('qemu_firmwarepath')} -summary_info +=3D {'binary directory': get_option('bindir')} -summary_info +=3D {'library directory': get_option('libdir')} +summary_info +=3D {'firmware path': get_option('prefix') / get_option(= 'qemu_firmwarepath')} +summary_info +=3D {'binary directory': get_option('prefix') / get_option(= 'bindir')} +summary_info +=3D {'library directory': get_option('prefix') / get_option(= 'libdir')} summary_info +=3D {'module directory': qemu_moddir} -summary_info +=3D {'libexec directory': get_option('libexecdir')} -summary_info +=3D {'include directory': get_option('includedir')} -summary_info +=3D {'config directory': get_option('sysconfdir')} +summary_info +=3D {'libexec directory': get_option('prefix') / get_option(= 'libexecdir')} +summary_info +=3D {'include directory': get_option('prefix') / get_option(= 'includedir')} +summary_info +=3D {'config directory': get_option('prefix') / get_option(= 'sysconfdir')} if targetos !=3D 'windows' - summary_info +=3D {'local state directory': get_option('localstatedir')} - summary_info +=3D {'Manual directory': get_option('mandir')} + summary_info +=3D {'local state directory': get_option('prefix') / get_o= ption('localstatedir')} + summary_info +=3D {'Manual directory': get_option('prefix') / get_o= ption('mandir')} else summary_info +=3D {'local state directory': 'queried at runtime'} endif -summary_info +=3D {'Doc directory': get_option('docdir')} +summary_info +=3D {'Doc directory': get_option('prefix') / get_option(= 'docdir')} summary_info +=3D {'Build directory': meson.current_build_dir()} summary_info +=3D {'Source path': meson.current_source_dir()} summary_info +=3D {'GIT submodules': config_host['GIT_SUBMODULES']} --=20 2.35.1 From nobody Sat May 4 20:14:55 2024 Delivered-To: importer2@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer2=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1651247277364864.3792515480669; Fri, 29 Apr 2022 08:47:57 -0700 (PDT) Received: from localhost ([::1]:54622 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nkSqa-00054a-9l for importer2@patchew.org; Fri, 29 Apr 2022 11:47:56 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:44154) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nkSSu-0002G9-Tv for qemu-devel@nongnu.org; Fri, 29 Apr 2022 11:23:29 -0400 Received: from mail-ej1-x633.google.com ([2a00:1450:4864:20::633]:39561) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nkSSs-00069u-Ia for qemu-devel@nongnu.org; Fri, 29 Apr 2022 11:23:28 -0400 Received: by mail-ej1-x633.google.com with SMTP id bv19so16099861ejb.6 for ; Fri, 29 Apr 2022 08:23:26 -0700 (PDT) Received: from avogadro.redhat.com ([2001:b07:6468:f312:1c09:f536:3de6:228c]) by smtp.gmail.com with ESMTPSA id w25-20020a170907271900b006f3ef214dd6sm736395ejk.60.2022.04.29.08.23.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 29 Apr 2022 08:23:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=2f9uXX8hJh2Yeik6YtTCHREtvrtSOCDd6WqZ59wpQFE=; b=EdADpeaY8KBp+kSUctWPKw8rKAotqIRW7PdoxDLlrzLsQIU3yrkleXMkQJKnx4nEi1 JTBcfsT+Mw2AvmDmhT/en/K+RuqgTN/rWB8hJ0pIlZBY2wcmcT5c905tpTXzS7zcvVYr kuvQYL+XbbFhUEGbvN7NrGzNLFIa3pzj3Bc1D5Atb4bLRBxCjfzqdopoY1Wr85x/P4gy X6ALt667Q8OG5XUYlrx63sxhcYKlvvVTguVZJvyyTOdG3hGhQ3c3p7dBBpzaPVXqwdZ0 BgcER7ZSzzdd206i8m6kuhR0O9h5uJDz5PL4JtlUyTJ0C/zT/DRiTdDJE1PTLA3q1MZX 6Zyw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=2f9uXX8hJh2Yeik6YtTCHREtvrtSOCDd6WqZ59wpQFE=; b=WYclnmOtaYX1HpOmqZYZ60giO+ZqoXl/lUXZUrPD6scr5lNj3fgkrz2N7B5cRuU6eM jleEZP+neX38K8crZlp6/Jw8bMNvl0uATn3Y+AV0xX6XEo1hALitfguVzguoSF8J9w8F v2knQByAatRoNzxMWFpShHvVO4BfUI1SQGGbr5FPOuTquRj0WmgRMLVFaC3RpcQCZa02 CoDhxV7mDx6tE6lh6asCeNYFl+PKsk5Qktx/KnKEhMqlW27o7TQBLdVFdzCLdoA1nsvV e3ISNIAIF0WjBUI8eu7IsIGCzdLlMcvIXpQaIgEg4z+LNkBimVgsATyvhZNQdiwg0aLi x5Pw== X-Gm-Message-State: AOAM5329gRwqa1oCJA0Mg/ji8/Os7oAXj4+d3FigSwRSkSWV5xZpH7Dg 3zdb19R7ibL7GeMjm/OYuOhqehWD2VBRRA== X-Google-Smtp-Source: ABdhPJy+CxqcJATOWrSRjTBW2Vu+1Fqhwym1nrU0jAjHvzP3Ql907dhNrMNHVkRkKvwMEUeSv0pKDA== X-Received: by 2002:a17:907:7254:b0:6db:ad8f:27b4 with SMTP id ds20-20020a170907725400b006dbad8f27b4mr37096498ejc.599.1651245805202; Fri, 29 Apr 2022 08:23:25 -0700 (PDT) From: Paolo Bonzini To: qemu-devel@nongnu.org Subject: [PULL 14/25] configure: switch directory options to automatic parsing Date: Fri, 29 Apr 2022 17:23:01 +0200 Message-Id: <20220429152312.335715-15-pbonzini@redhat.com> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220429152312.335715-1-pbonzini@redhat.com> References: <20220429152312.335715-1-pbonzini@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Type: text/plain Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer2=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::633; envelope-from=paolo.bonzini@gmail.com; helo=mail-ej1-x633.google.com X-Spam_score_int: -4 X-Spam_score: -0.5 X-Spam_bar: / X-Spam_report: (-0.5 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FORGED_FROMDOMAIN=0.249, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.249, PP_MIME_FAKE_ASCII_TEXT=0.999, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= Errors-To: qemu-devel-bounces+importer2=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZM-MESSAGEID: 1651247279229100001 While prefix, bindir and qemu_suffix needs special treatment due to differences between Windows and POSIX systems, everything else needs no extra code in configure. Reviewed-by: Marc-Andr=C3=A9 Lureau Signed-off-by: Paolo Bonzini --- configure | 58 ++--------------------------------- meson_options.txt | 4 +-- scripts/meson-buildoptions.py | 11 +++++-- scripts/meson-buildoptions.sh | 21 +++++++++++++ 4 files changed, 34 insertions(+), 60 deletions(-) diff --git a/configure b/configure index 4102683d75..b8e3176808 100755 --- a/configure +++ b/configure @@ -311,6 +311,7 @@ plugins=3D"$default_feature" meson=3D"" meson_args=3D"" ninja=3D"" +bindir=3D"bin" skip_meson=3Dno =20 # The following Meson options are handled manually (still they @@ -670,6 +671,7 @@ if test "$mingw32" =3D "yes" ; then CONFIGURE_CFLAGS=3D"-mthreads $CONFIGURE_CFLAGS" write_c_skeleton; prefix=3D"/qemu" + bindir=3D"" qemu_suffix=3D"" fi =20 @@ -776,30 +778,10 @@ for opt do static=3D"yes" QEMU_PKG_CONFIG_FLAGS=3D"--static $QEMU_PKG_CONFIG_FLAGS" ;; - --mandir=3D*) mandir=3D"$optarg" - ;; --bindir=3D*) bindir=3D"$optarg" ;; - --libdir=3D*) libdir=3D"$optarg" - ;; - --libexecdir=3D*) libexecdir=3D"$optarg" - ;; - --includedir=3D*) includedir=3D"$optarg" - ;; - --datadir=3D*) datadir=3D"$optarg" - ;; --with-suffix=3D*) qemu_suffix=3D"$optarg" ;; - --docdir=3D*) docdir=3D"$optarg" - ;; - --localedir=3D*) localedir=3D"$optarg" - ;; - --sysconfdir=3D*) sysconfdir=3D"$optarg" - ;; - --localstatedir=3D*) local_statedir=3D"$optarg" - ;; - --firmwarepath=3D*) firmwarepath=3D"$optarg" - ;; --host=3D*|--build=3D*|\ --disable-dependency-tracking|\ --sbindir=3D*|--sharedstatedir=3D*|\ @@ -1022,23 +1004,6 @@ case $git_submodules_action in ;; esac =20 -libdir=3D"${libdir:-$prefix/lib}" -libexecdir=3D"${libexecdir:-$prefix/libexec}" -includedir=3D"${includedir:-$prefix/include}" - -if test "$mingw32" =3D "yes" ; then - bindir=3D"${bindir:-$prefix}" -else - bindir=3D"${bindir:-$prefix/bin}" -fi -mandir=3D"${mandir:-$prefix/share/man}" -datadir=3D"${datadir:-$prefix/share}" -docdir=3D"${docdir:-$prefix/share/doc}" -sysconfdir=3D"${sysconfdir:-$prefix/etc}" -local_statedir=3D"${local_statedir:-$prefix/var}" -firmwarepath=3D"${firmwarepath:-$datadir/qemu-firmware}" -localedir=3D"${localedir:-$datadir/locale}" - if eval test -z "\${cross_cc_$cpu}"; then eval "cross_cc_${cpu}=3D\$cc" cross_cc_vars=3D"$cross_cc_vars cross_cc_${cpu}" @@ -1116,16 +1081,7 @@ Advanced options (experts only): --with-git-submodules=3Dvalidate fail if git submodules are not up to da= te --with-git-submodules=3Dignore do not update or check git submodules (= default if no .git dir) --static enable static build [$static] - --mandir=3DPATH install man pages in PATH - --datadir=3DPATH install firmware in PATH/$qemu_suffix - --localedir=3DPATH install translation in PATH/$qemu_suffix - --docdir=3DPATH install documentation in PATH/$qemu_suffix --bindir=3DPATH install binaries in PATH - --libdir=3DPATH install libraries in PATH - --libexecdir=3DPATH install helper binaries in PATH - --sysconfdir=3DPATH install config in PATH/$qemu_suffix - --localstatedir=3DPATH install local state in PATH (set at runtime o= n win32) - --firmwarepath=3DPATH search PATH for firmware files --efi-aarch64=3DPATH PATH of efi file to use for aarch64 VMs. --with-suffix=3DSUFFIX suffix for QEMU data inside datadir/libdir/sy= sconfdir/docdir [$qemu_suffix] --without-default-features default all --enable-* options to "disabled" @@ -2410,18 +2366,8 @@ if test "$skip_meson" =3D no; then run_meson() { NINJA=3D$ninja $meson setup \ --prefix "$prefix" \ - --libdir "$libdir" \ - --libexecdir "$libexecdir" \ --bindir "$bindir" \ - --includedir "$includedir" \ - --datadir "$datadir" \ - --mandir "$mandir" \ - --sysconfdir "$sysconfdir" \ - --localedir "$localedir" \ - --localstatedir "$local_statedir" \ -Ddefault_devices=3D$default_devices \ - -Ddocdir=3D"$docdir" \ - -Dqemu_firmwarepath=3D"$firmwarepath" \ -Dqemu_suffix=3D"$qemu_suffix" \ -Dsmbd=3D"$smbd" \ -Doptimization=3D$(if test "$debug" =3D yes; then echo 0; else ech= o 2; fi) \ diff --git a/meson_options.txt b/meson_options.txt index ae6c4b2475..15fe40c700 100644 --- a/meson_options.txt +++ b/meson_options.txt @@ -4,9 +4,9 @@ =20 option('qemu_suffix', type : 'string', value: 'qemu', description: 'Suffix for QEMU data/modules/config directories (can = be empty)') -option('docdir', type : 'string', value : 'doc', +option('docdir', type : 'string', value : 'share/doc', description: 'Base directory for documentation installation (can be= empty)') -option('qemu_firmwarepath', type : 'string', value : '', +option('qemu_firmwarepath', type : 'string', value : 'qemu-firmware', description: 'search PATH for firmware files') option('pkgversion', type : 'string', value : '', description: 'use specified string as sub-version of the package') diff --git a/scripts/meson-buildoptions.py b/scripts/meson-buildoptions.py index 0f9603a7f6..45cda8cd84 100755 --- a/scripts/meson-buildoptions.py +++ b/scripts/meson-buildoptions.py @@ -27,9 +27,7 @@ =20 SKIP_OPTIONS =3D { "default_devices", - "docdir", "fuzzing_engine", - "qemu_firmwarepath", "qemu_suffix", "smbd", } @@ -37,12 +35,21 @@ OPTION_NAMES =3D { "malloc": "enable-malloc", "pkgversion": "with-pkgversion", + "qemu_firmwarepath": "firmwarepath", "trace_backends": "enable-trace-backends", "trace_file": "with-trace-file", } =20 BUILTIN_OPTIONS =3D { + "datadir", + "includedir", + "libdir", + "libexecdir", + "localedir", + "localstatedir", + "mandir", "strip", + "sysconfdir", } =20 LINE_WIDTH =3D 76 diff --git a/scripts/meson-buildoptions.sh b/scripts/meson-buildoptions.sh index 59c4a27c5a..f6a9b05c40 100644 --- a/scripts/meson-buildoptions.sh +++ b/scripts/meson-buildoptions.sh @@ -8,8 +8,11 @@ meson_options_help() { printf "%s\n" ' --block-drv-rw-whitelist=3DVALUE' printf "%s\n" ' set block driver read-write wh= itelist (by default' printf "%s\n" ' affects only QEMU, not tools l= ike qemu-img)' + printf "%s\n" ' --datadir=3DVALUE Data file directory [share]' printf "%s\n" ' --disable-coroutine-pool coroutine freelist (better per= formance)' printf "%s\n" ' --disable-install-blobs install provided firmware blob= s' + printf "%s\n" ' --docdir=3DVALUE Base directory for documenta= tion installation' + printf "%s\n" ' (can be empty) [share/doc]' printf "%s\n" ' --enable-block-drv-whitelist-in-tools' printf "%s\n" ' use block whitelist also in to= ols instead of only' printf "%s\n" ' QEMU' @@ -40,10 +43,18 @@ meson_options_help() { printf "%s\n" ' --enable-trace-backends=3DCHOICES' printf "%s\n" ' Set available tracing backends= [log] (choices:' printf "%s\n" ' dtrace/ftrace/log/nop/simple/s= yslog/ust)' + printf "%s\n" ' --firmwarepath=3DVALUE search PATH for firmware fil= es [qemu-firmware]' printf "%s\n" ' --iasl=3DVALUE Path to ACPI disassembler' + printf "%s\n" ' --includedir=3DVALUE Header file directory [inclu= de]' printf "%s\n" ' --interp-prefix=3DVALUE where to find shared librari= es etc., use %M for' printf "%s\n" ' cpu name [/usr/gnemul/qemu-%M]' + printf "%s\n" ' --libdir=3DVALUE Library directory [lib64]' + printf "%s\n" ' --libexecdir=3DVALUE Library executable directory= [libexec]' + printf "%s\n" ' --localedir=3DVALUE Locale data directory [share= /locale]' + printf "%s\n" ' --localstatedir=3DVALUE Localstate data directory [/= var/local]' + printf "%s\n" ' --mandir=3DVALUE Manual page directory [share= /man]' printf "%s\n" ' --sphinx-build=3DVALUE Use specified sphinx-build f= or building document' + printf "%s\n" ' --sysconfdir=3DVALUE Sysconf data directory [etc]' printf "%s\n" ' --tls-priority=3DVALUE Default TLS protocol/cipher = priority string' printf "%s\n" ' [NORMAL]' printf "%s\n" ' --with-pkgversion=3DVALUE use specified string as sub-= version of the' @@ -206,6 +217,7 @@ _meson_option_parse() { --disable-curl) printf "%s" -Dcurl=3Ddisabled ;; --enable-curses) printf "%s" -Dcurses=3Denabled ;; --disable-curses) printf "%s" -Dcurses=3Ddisabled ;; + --datadir=3D*) quote_sh "-Ddatadir=3D$2" ;; --enable-dbus-display) printf "%s" -Ddbus_display=3Denabled ;; --disable-dbus-display) printf "%s" -Ddbus_display=3Ddisabled ;; --enable-debug-mutex) printf "%s" -Ddebug_mutex=3Dtrue ;; @@ -214,6 +226,7 @@ _meson_option_parse() { --disable-debug-stack-usage) printf "%s" -Ddebug_stack_usage=3Dfalse ;; --enable-dmg) printf "%s" -Ddmg=3Denabled ;; --disable-dmg) printf "%s" -Ddmg=3Ddisabled ;; + --docdir=3D*) quote_sh "-Ddocdir=3D$2" ;; --enable-docs) printf "%s" -Ddocs=3Denabled ;; --disable-docs) printf "%s" -Ddocs=3Ddisabled ;; --enable-dsound) printf "%s" -Ddsound=3Denabled ;; @@ -252,6 +265,7 @@ _meson_option_parse() { --iasl=3D*) quote_sh "-Diasl=3D$2" ;; --enable-iconv) printf "%s" -Diconv=3Denabled ;; --disable-iconv) printf "%s" -Diconv=3Ddisabled ;; + --includedir=3D*) quote_sh "-Dincludedir=3D$2" ;; --enable-install-blobs) printf "%s" -Dinstall_blobs=3Dtrue ;; --disable-install-blobs) printf "%s" -Dinstall_blobs=3Dfalse ;; --interp-prefix=3D*) quote_sh "-Dinterp_prefix=3D$2" ;; @@ -265,6 +279,8 @@ _meson_option_parse() { --disable-l2tpv3) printf "%s" -Dl2tpv3=3Ddisabled ;; --enable-libdaxctl) printf "%s" -Dlibdaxctl=3Denabled ;; --disable-libdaxctl) printf "%s" -Dlibdaxctl=3Ddisabled ;; + --libdir=3D*) quote_sh "-Dlibdir=3D$2" ;; + --libexecdir=3D*) quote_sh "-Dlibexecdir=3D$2" ;; --enable-libiscsi) printf "%s" -Dlibiscsi=3Denabled ;; --disable-libiscsi) printf "%s" -Dlibiscsi=3Ddisabled ;; --enable-libnfs) printf "%s" -Dlibnfs=3Denabled ;; @@ -283,6 +299,8 @@ _meson_option_parse() { --disable-linux-io-uring) printf "%s" -Dlinux_io_uring=3Ddisabled ;; --enable-live-block-migration) printf "%s" -Dlive_block_migration=3Den= abled ;; --disable-live-block-migration) printf "%s" -Dlive_block_migration=3Dd= isabled ;; + --localedir=3D*) quote_sh "-Dlocaledir=3D$2" ;; + --localstatedir=3D*) quote_sh "-Dlocalstatedir=3D$2" ;; --enable-lzfse) printf "%s" -Dlzfse=3Denabled ;; --disable-lzfse) printf "%s" -Dlzfse=3Ddisabled ;; --enable-lzo) printf "%s" -Dlzo=3Denabled ;; @@ -290,6 +308,7 @@ _meson_option_parse() { --enable-malloc=3D*) quote_sh "-Dmalloc=3D$2" ;; --enable-malloc-trim) printf "%s" -Dmalloc_trim=3Denabled ;; --disable-malloc-trim) printf "%s" -Dmalloc_trim=3Ddisabled ;; + --mandir=3D*) quote_sh "-Dmandir=3D$2" ;; --enable-membarrier) printf "%s" -Dmembarrier=3Denabled ;; --disable-membarrier) printf "%s" -Dmembarrier=3Ddisabled ;; --enable-module-upgrades) printf "%s" -Dmodule_upgrades=3Dtrue ;; @@ -325,6 +344,7 @@ _meson_option_parse() { --disable-qcow1) printf "%s" -Dqcow1=3Ddisabled ;; --enable-qed) printf "%s" -Dqed=3Denabled ;; --disable-qed) printf "%s" -Dqed=3Ddisabled ;; + --firmwarepath=3D*) quote_sh "-Dqemu_firmwarepath=3D$2" ;; --enable-qga-vss) printf "%s" -Dqga_vss=3Denabled ;; --disable-qga-vss) printf "%s" -Dqga_vss=3Ddisabled ;; --enable-qom-cast-debug) printf "%s" -Dqom_cast_debug=3Dtrue ;; @@ -363,6 +383,7 @@ _meson_option_parse() { --disable-spice-protocol) printf "%s" -Dspice_protocol=3Ddisabled ;; --enable-strip) printf "%s" -Dstrip=3Dtrue ;; --disable-strip) printf "%s" -Dstrip=3Dfalse ;; + --sysconfdir=3D*) quote_sh "-Dsysconfdir=3D$2" ;; --enable-tcg) printf "%s" -Dtcg=3Denabled ;; --disable-tcg) printf "%s" -Dtcg=3Ddisabled ;; --enable-tcg-interpreter) printf "%s" -Dtcg_interpreter=3Dtrue ;; --=20 2.35.1 From nobody Sat May 4 20:14:55 2024 Delivered-To: importer2@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer2=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1651247410871191.88487089269904; Fri, 29 Apr 2022 08:50:10 -0700 (PDT) Received: from localhost ([::1]:34842 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nkSsj-0002O4-HR for importer2@patchew.org; Fri, 29 Apr 2022 11:50:09 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:44166) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nkSSv-0002Hd-Dy for qemu-devel@nongnu.org; Fri, 29 Apr 2022 11:23:29 -0400 Received: from mail-ej1-x636.google.com ([2a00:1450:4864:20::636]:35624) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nkSSt-0006A8-Gz for qemu-devel@nongnu.org; Fri, 29 Apr 2022 11:23:29 -0400 Received: by mail-ej1-x636.google.com with SMTP id l7so16128958ejn.2 for ; Fri, 29 Apr 2022 08:23:27 -0700 (PDT) Received: from avogadro.redhat.com ([2001:b07:6468:f312:1c09:f536:3de6:228c]) by smtp.gmail.com with ESMTPSA id w25-20020a170907271900b006f3ef214dd6sm736395ejk.60.2022.04.29.08.23.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 29 Apr 2022 08:23:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=TDKgpDUBJFawzQptchyXNMTmHIswdR7OJFhEI4kP5hs=; b=CATcjtHnDB3jyLTROmAZCpXxWpz0+YIuOhRr/c6d0VtAcn2pzKGmeV26Gr4Fa3st71 uZEwjnOjMjGFuRzVncnA9ADhLMpPcYri0vXbpx9htj+qKcu7qFYpP9M7W19UQErFJxJ5 WEfBajOTqikSgAP4oYyTN72p2NdUMvYv/8O7ezi/HMhUODbuNaswOImzqOmeKVqeheyl xRRvb9dSEBjRotdefArKEhupijz2u/8lpqEnB2xf9cLefzlkcPCFniuLuApyqSBUY5wC CqCpcH02AIA9+qxRb6aG8PwjqlLS+r/0QAVZRfQWmsJqrirM/pwvfmZxEnIVmyDBEvOT +pNg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=TDKgpDUBJFawzQptchyXNMTmHIswdR7OJFhEI4kP5hs=; b=6wQTEb1VhoQgtvhd2wkZuB7umYhOiXavHYeFw6F25oPlLK2B2k7Pr2h2rWIOtVIkyw V74JyJqDfMNsuXfek0QV6wVPjYime14YBD2fcfeYXg7k4o23ztPvL5Qhipv1zpwlUh8F Ocu/+UJRDDulRj5nX7iZAo0mpGWxJJSVsdYUCm7OUnvZxN3Bz9uqYkSsJdv6CLD3low4 2Y/nRkMc+4BVJgxQnljS53FzMVrjF3OzRIPNs0kN0/PSs/1tfSNjc0R1ex5awgIOchfR 5adblrx0nvy2Bm7LhYU/IGuLGARKBQDOVMs6pA9PoHid9QxTwj39AKDkVYrhmY8Tcn53 CgJg== X-Gm-Message-State: AOAM530UNNgAYvOxpt/Lh7LiWTxSFmkpb9XQuj6+Yb+fsAQxhAwPzpuY 4kpSms+jaDoq1d98Ho/pMi395w9A6NaRsA== X-Google-Smtp-Source: ABdhPJwyp6mf8WDkB/6on1N4oSUKs4vD88UxfkttluJZNpXzNP7ty4m2nAxs/51/Wpxu0gl3vKArGg== X-Received: by 2002:a17:907:168a:b0:6e8:d125:1d24 with SMTP id hc10-20020a170907168a00b006e8d1251d24mr35896942ejc.508.1651245806103; Fri, 29 Apr 2022 08:23:26 -0700 (PDT) From: Paolo Bonzini To: qemu-devel@nongnu.org Subject: [PULL 15/25] meson: pass more options directly as -D Date: Fri, 29 Apr 2022 17:23:02 +0200 Message-Id: <20220429152312.335715-16-pbonzini@redhat.com> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220429152312.335715-1-pbonzini@redhat.com> References: <20220429152312.335715-1-pbonzini@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Type: text/plain Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer2=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::636; envelope-from=paolo.bonzini@gmail.com; helo=mail-ej1-x636.google.com X-Spam_score_int: -4 X-Spam_score: -0.5 X-Spam_bar: / X-Spam_report: (-0.5 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FORGED_FROMDOMAIN=0.249, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.249, PP_MIME_FAKE_ASCII_TEXT=0.999, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= Errors-To: qemu-devel-bounces+importer2=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZM-MESSAGEID: 1651247412029100001 If an option is not used anywhere by the configure script, it can be just added to $meson_options even if it is not parsed by the automatically generated bits in scripts/meson-buildoptions.sh. The only slightly tricky case is $debug, where the if test "$fortify_source" =3D "yes" ; then QEMU_CFLAGS=3D"-U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=3D2 $QEMU_CFLAGS" debug=3Dno fi assignment is dead; configure sets fortify_source=3Dno whenever debug=3Dyes. Reviewed-by: Marc-Andr=C3=A9 Lureau Signed-off-by: Paolo Bonzini --- configure | 39 ++++++++++------------------------- meson.build | 2 +- scripts/meson-buildoptions.py | 4 ++++ scripts/meson-buildoptions.sh | 6 ++++++ 4 files changed, 22 insertions(+), 29 deletions(-) diff --git a/configure b/configure index b8e3176808..fc7868948b 100755 --- a/configure +++ b/configure @@ -235,7 +235,6 @@ static=3D"no" cross_compile=3D"no" cross_prefix=3D"" host_cc=3D"cc" -lto=3D"false" stack_protector=3D"" safe_stack=3D"" use_containers=3D"yes" @@ -291,13 +290,10 @@ vhost_vsock=3D"$default_feature" vhost_user=3D"no" vhost_user_fs=3D"$default_feature" vhost_vdpa=3D"$default_feature" -debug_info=3D"yes" debug_tcg=3D"no" -debug=3D"no" sanitizers=3D"no" tsan=3D"no" fortify_source=3D"yes" -gcov=3D"no" EXESUF=3D"" modules=3D"no" prefix=3D"/usr/local" @@ -327,10 +323,7 @@ else fi fdt=3D"auto" =20 -# 2. Support --with/--without option -default_devices=3D"true" - -# 3. Automatically enable/disable other options +# 2. Automatically enable/disable other options tcg=3D"enabled" cfi=3D"false" =20 @@ -680,6 +673,9 @@ werror=3D"" . $source_path/scripts/meson-buildoptions.sh =20 meson_options=3D +meson_option_add() { + meson_options=3D"$meson_options $(quote_sh "$1")" +} meson_option_parse() { meson_options=3D"$meson_options $(_meson_option_parse "$@")" if test $? -eq 1; then @@ -732,9 +728,9 @@ for opt do ;; --cross-cc-*) ;; - --enable-debug-info) debug_info=3D"yes" + --enable-debug-info) meson_option_add -Ddebug=3Dtrue ;; - --disable-debug-info) debug_info=3D"no" + --disable-debug-info) meson_option_add -Ddebug=3Dfalse ;; --enable-modules) modules=3D"yes" @@ -754,9 +750,9 @@ for opt do error_exit "Can't mix --target-list-exclude with --= target-list" fi ;; - --with-default-devices) default_devices=3D"true" + --with-default-devices) meson_option_add -Ddefault_devices=3Dtrue ;; - --without-default-devices) default_devices=3D"false" + --without-default-devices) meson_option_add -Ddefault_devices=3Dfalse ;; --with-devices-*[!a-zA-Z0-9_-]*=3D*) error_exit "Passed bad --with-devic= es-FOO option" ;; @@ -772,8 +768,6 @@ for opt do ;; --without-default-features) # processed above ;; - --enable-gcov) gcov=3D"yes" - ;; --static) static=3D"yes" QEMU_PKG_CONFIG_FLAGS=3D"--static $QEMU_PKG_CONFIG_FLAGS" @@ -800,7 +794,7 @@ for opt do # Enable debugging options that aren't excessively noisy debug_tcg=3D"yes" meson_option_parse --enable-debug-mutex "" - debug=3D"yes" + meson_option_add -Doptimization=3D0 fortify_source=3D"no" ;; --enable-sanitizers) sanitizers=3D"yes" @@ -849,10 +843,6 @@ for opt do ;; --disable-werror) werror=3D"no" ;; - --enable-lto) lto=3D"true" - ;; - --disable-lto) lto=3D"false" - ;; --enable-stack-protector) stack_protector=3D"yes" ;; --disable-stack-protector) stack_protector=3D"no" @@ -863,7 +853,7 @@ for opt do ;; --enable-cfi) cfi=3D"true"; - lto=3D"true"; + meson_option_add -Db_lto=3Dtrue ;; --disable-cfi) cfi=3D"false" ;; @@ -1101,7 +1091,6 @@ Advanced options (experts only): --cpu=3DCPU Build for host CPU [$cpu] --with-coroutine=3DBACKEND coroutine backend. Supported options: ucontext, sigaltstack, windows - --enable-gcov enable test coverage analysis with gcov --enable-plugins enable plugins via shared library loading --disable-containers don't use containers for cross-building @@ -1117,7 +1106,6 @@ cat << EOF modules modules support (non-Windows) debug-tcg TCG debugging (default is disabled) debug-info debugging information - lto Enable Link-Time Optimization. safe-stack SafeStack Stack Smash Protection. Depends on clang/llvm >=3D 3.7 and requires coroutine backend ucont= ext. vhost-net vhost-net kernel acceleration support @@ -1938,7 +1926,6 @@ write_c_skeleton =20 if test "$fortify_source" =3D "yes" ; then QEMU_CFLAGS=3D"-U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=3D2 $QEMU_CFLAGS" - debug=3Dno fi =20 case "$ARCH" in @@ -2367,15 +2354,11 @@ if test "$skip_meson" =3D no; then NINJA=3D$ninja $meson setup \ --prefix "$prefix" \ --bindir "$bindir" \ - -Ddefault_devices=3D$default_devices \ -Dqemu_suffix=3D"$qemu_suffix" \ -Dsmbd=3D"$smbd" \ - -Doptimization=3D$(if test "$debug" =3D yes; then echo 0; else ech= o 2; fi) \ - -Ddebug=3D$(if test "$debug_info" =3D yes; then echo true; else ec= ho false; fi) \ -Dwerror=3D$(if test "$werror" =3D yes; then echo true; else echo = false; fi) \ -Db_pie=3D$(if test "$pie" =3D yes; then echo true; else echo fals= e; fi) \ - -Db_coverage=3D$(if test "$gcov" =3D yes; then echo true; else ech= o false; fi) \ - -Db_lto=3D$lto -Dcfi=3D$cfi -Dtcg=3D$tcg \ + -Dcfi=3D$cfi -Dtcg=3D$tcg \ -Dcapstone=3D$capstone -Dfdt=3D$fdt -Dslirp=3D$slirp \ $(test -n "${LIB_FUZZING_ENGINE+xxx}" && echo "-Dfuzzing_engine=3D= $LIB_FUZZING_ENGINE") \ $(if test "$default_feature" =3D no; then echo "-Dauto_features=3D= disabled"; fi) \ diff --git a/meson.build b/meson.build index 21135fbc52..19966e0a5a 100644 --- a/meson.build +++ b/meson.build @@ -1,6 +1,6 @@ project('qemu', ['c'], meson_version: '>=3D0.59.3', default_options: ['warning_level=3D1', 'c_std=3Dgnu11', 'cpp_std= =3Dgnu++11', 'b_colorout=3Dauto', - 'b_staticpic=3Dfalse', 'stdsplit=3Dfalse'], + 'b_staticpic=3Dfalse', 'stdsplit=3Dfalse', 'opti= mization=3D2'], version: files('VERSION')) =20 add_test_setup('quick', exclude_suites: ['slow', 'thorough'], is_default: = true) diff --git a/scripts/meson-buildoptions.py b/scripts/meson-buildoptions.py index 45cda8cd84..e624c16b01 100755 --- a/scripts/meson-buildoptions.py +++ b/scripts/meson-buildoptions.py @@ -33,6 +33,8 @@ } =20 OPTION_NAMES =3D { + "b_coverage": "gcov", + "b_lto": "lto", "malloc": "enable-malloc", "pkgversion": "with-pkgversion", "qemu_firmwarepath": "firmwarepath", @@ -41,6 +43,8 @@ } =20 BUILTIN_OPTIONS =3D { + "b_coverage", + "b_lto", "datadir", "includedir", "libdir", diff --git a/scripts/meson-buildoptions.sh b/scripts/meson-buildoptions.sh index f6a9b05c40..4b0770a9e0 100644 --- a/scripts/meson-buildoptions.sh +++ b/scripts/meson-buildoptions.sh @@ -27,7 +27,9 @@ meson_options_help() { printf "%s\n" ' --enable-fdt[=3DCHOICE] Whether and how to find the = libfdt library' printf "%s\n" ' (choices: auto/disabled/enable= d/internal/system)' printf "%s\n" ' --enable-fuzzing build fuzzing targets' + printf "%s\n" ' --enable-gcov Enable coverage tracking.' printf "%s\n" ' --enable-gprof QEMU profiling with gprof' + printf "%s\n" ' --enable-lto Use link time optimization' printf "%s\n" ' --enable-malloc=3DCHOICE choose memory allocator to u= se [system] (choices:' printf "%s\n" ' jemalloc/system/tcmalloc)' printf "%s\n" ' --enable-module-upgrades try to load modules from alter= nate paths for' @@ -182,6 +184,10 @@ _meson_option_parse() { --disable-avx2) printf "%s" -Davx2=3Ddisabled ;; --enable-avx512f) printf "%s" -Davx512f=3Denabled ;; --disable-avx512f) printf "%s" -Davx512f=3Ddisabled ;; + --enable-gcov) printf "%s" -Db_coverage=3Dtrue ;; + --disable-gcov) printf "%s" -Db_coverage=3Dfalse ;; + --enable-lto) printf "%s" -Db_lto=3Dtrue ;; + --disable-lto) printf "%s" -Db_lto=3Dfalse ;; --block-drv-ro-whitelist=3D*) quote_sh "-Dblock_drv_ro_whitelist=3D$2"= ;; --block-drv-rw-whitelist=3D*) quote_sh "-Dblock_drv_rw_whitelist=3D$2"= ;; --enable-block-drv-whitelist-in-tools) printf "%s" -Dblock_drv_whiteli= st_in_tools=3Dtrue ;; --=20 2.35.1 From nobody Sat May 4 20:14:55 2024 Delivered-To: importer2@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer2=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1651248099627661.6380077651453; Fri, 29 Apr 2022 09:01:39 -0700 (PDT) Received: from localhost ([::1]:37362 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nkT3p-0006Ed-Gf for importer2@patchew.org; Fri, 29 Apr 2022 12:01:37 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:44178) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nkSSv-0002JA-S9 for qemu-devel@nongnu.org; Fri, 29 Apr 2022 11:23:29 -0400 Received: from mail-ej1-x62f.google.com ([2a00:1450:4864:20::62f]:38690) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nkSSu-0006AG-7D for qemu-devel@nongnu.org; Fri, 29 Apr 2022 11:23:29 -0400 Received: by mail-ej1-x62f.google.com with SMTP id r13so16100819ejd.5 for ; Fri, 29 Apr 2022 08:23:27 -0700 (PDT) Received: from avogadro.redhat.com ([2001:b07:6468:f312:1c09:f536:3de6:228c]) by smtp.gmail.com with ESMTPSA id w25-20020a170907271900b006f3ef214dd6sm736395ejk.60.2022.04.29.08.23.26 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 29 Apr 2022 08:23:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=F19SAoaTS/smwDU4AeRev/lxRTDzIZXIAnLP7Rv2lMI=; b=dLbF/7C43nP13dVnt1Lf/ufZqfeVdP/7yxvxlmA0roLIMQLTr6wwv/EqnHSI7ZXlZO J0WMs9lummGjj54k/BmTHzo928R3hy3LgFbVo2clUESMCUo1OCVuxUv7WIsX1mQIpQIm lk/H7W8B/C9QUA3G47/9lF19diY9tRgLMT7wPO7cNfKzJTaSeO+BkZ6qoYbGWjmfxtNJ 62hpFeoTuNAMiqnS7XsEiNg4W6iVeYeMlenPHKHYavoyHfe7q0NbYg4zkDlv8JKS59kd +iocOzLfTR5M6OvN2cLXUreZUsEQM3xT5d0b3JGnpX3033nPgPnkntxv2o1qNcTFQNuE msNQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=F19SAoaTS/smwDU4AeRev/lxRTDzIZXIAnLP7Rv2lMI=; b=f+d8W8cBM/CJYtQoNVOTEBxDc7gWKhVn3iZHVR3/PtSUOtfMO8TTNPZcKjVgdjf+TB wrg/J4BT38BP1tG3Wex5I6t9+Yh03WdiWwiijlRM+P44siXLjt5jcXBid4aIU3LYe4fm PQP/h7FyUpFXbEZZV99Ss/calQOgLea1LoCGS+sbcWlnPGenNP5ZxB8VLCLO2cUBCnmi OtPv0xfKr6n937GF8oJmbSjmuM9V4uE+fKCh20bg0QwsZes92Q54U68z1NQlxpnwFqOK DGsk4fY8sksYZpkv7svIaj1CCeUxdcKe7qHijMTxbwSmWAOpVIGb247Qb7EmGWp+O/Ze Aa7Q== X-Gm-Message-State: AOAM531hI2ROoVnP7u+26cNQv9Yu/bcqwwBXsVQ79hc3ndCV0VBRKkEO KDMwka3QAvCAEMGbRJSpFMehjn8sYdOCPA== X-Google-Smtp-Source: ABdhPJxsglQVFQmbpaOLTzHYdh0bxH67nSPdISIbUtJx8XjMssLWQmmeCziEAUqnxnIaHfrJUmfZ5g== X-Received: by 2002:a17:906:e87:b0:6df:8602:5801 with SMTP id p7-20020a1709060e8700b006df86025801mr37123760ejf.140.1651245806838; Fri, 29 Apr 2022 08:23:26 -0700 (PDT) From: Paolo Bonzini To: qemu-devel@nongnu.org Subject: [PULL 16/25] configure: omit options with default values from meson command line Date: Fri, 29 Apr 2022 17:23:03 +0200 Message-Id: <20220429152312.335715-17-pbonzini@redhat.com> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220429152312.335715-1-pbonzini@redhat.com> References: <20220429152312.335715-1-pbonzini@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Type: text/plain Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer2=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::62f; envelope-from=paolo.bonzini@gmail.com; helo=mail-ej1-x62f.google.com X-Spam_score_int: -4 X-Spam_score: -0.5 X-Spam_bar: / X-Spam_report: (-0.5 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FORGED_FROMDOMAIN=0.249, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.249, PP_MIME_FAKE_ASCII_TEXT=0.999, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= Errors-To: qemu-devel-bounces+importer2=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZM-MESSAGEID: 1651248102586100001 This has no functional change, it only makes the command line shorter and nicer. Reviewed-by: Marc-Andr=C3=A9 Lureau Signed-off-by: Paolo Bonzini --- configure | 29 +++++++++++++++++------------ meson.build | 2 +- meson_options.txt | 2 +- 3 files changed, 19 insertions(+), 14 deletions(-) diff --git a/configure b/configure index fc7868948b..1c88e697c5 100755 --- a/configure +++ b/configure @@ -2350,19 +2350,24 @@ if test "$skip_meson" =3D no; then mv $cross config-meson.cross =20 rm -rf meson-private meson-info meson-logs + + # Built-in options + test "$bindir" !=3D "bin" && meson_option_add "-Dbindir=3D$bindir" + test "$default_feature" =3D no && meson_option_add -Dauto_features=3Ddis= abled + test "$pie" =3D no && meson_option_add -Db_pie=3Dfalse + test "$werror" =3D yes && meson_option_add -Dwerror=3Dtrue + + # QEMU options + test "$capstone" !=3D auto && meson_option_add "-Dcapstone=3D$capstone" + test "$cfi" !=3D false && meson_option_add "-Dcfi=3D$cfi" + test "$fdt" !=3D auto && meson_option_add "-Dfdt=3D$fdt" + test -n "${LIB_FUZZING_ENGINE+xxx}" && meson_option_add "-Dfuzzing_engin= e=3D$LIB_FUZZING_ENGINE" + test "$qemu_suffix" !=3D qemu && meson_option_add "-Dqemu_suffix=3D$qemu= _suffix" + test "$slirp" !=3D auto && meson_option_add "-Dslirp=3D$slirp" + test "$smbd" !=3D '' && meson_option_add "-Dsmbd=3D$smbd" + test "$tcg" !=3D enabled && meson_option_add "-Dtcg=3D$tcg" run_meson() { - NINJA=3D$ninja $meson setup \ - --prefix "$prefix" \ - --bindir "$bindir" \ - -Dqemu_suffix=3D"$qemu_suffix" \ - -Dsmbd=3D"$smbd" \ - -Dwerror=3D$(if test "$werror" =3D yes; then echo true; else echo = false; fi) \ - -Db_pie=3D$(if test "$pie" =3D yes; then echo true; else echo fals= e; fi) \ - -Dcfi=3D$cfi -Dtcg=3D$tcg \ - -Dcapstone=3D$capstone -Dfdt=3D$fdt -Dslirp=3D$slirp \ - $(test -n "${LIB_FUZZING_ENGINE+xxx}" && echo "-Dfuzzing_engine=3D= $LIB_FUZZING_ENGINE") \ - $(if test "$default_feature" =3D no; then echo "-Dauto_features=3D= disabled"; fi) \ - "$@" $cross_arg "$PWD" "$source_path" + NINJA=3D$ninja $meson setup --prefix "$prefix" "$@" $cross_arg "$PWD" = "$source_path" } eval run_meson $meson_options if test "$?" -ne 0 ; then diff --git a/meson.build b/meson.build index 19966e0a5a..7c52ef135c 100644 --- a/meson.build +++ b/meson.build @@ -1,6 +1,6 @@ project('qemu', ['c'], meson_version: '>=3D0.59.3', default_options: ['warning_level=3D1', 'c_std=3Dgnu11', 'cpp_std= =3Dgnu++11', 'b_colorout=3Dauto', - 'b_staticpic=3Dfalse', 'stdsplit=3Dfalse', 'opti= mization=3D2'], + 'b_staticpic=3Dfalse', 'stdsplit=3Dfalse', 'opti= mization=3D2', 'b_pie=3Dtrue'], version: files('VERSION')) =20 add_test_setup('quick', exclude_suites: ['slow', 'thorough'], is_default: = true) diff --git a/meson_options.txt b/meson_options.txt index 15fe40c700..35f5a72507 100644 --- a/meson_options.txt +++ b/meson_options.txt @@ -78,7 +78,7 @@ option('xen', type: 'feature', value: 'auto', description: 'Xen backend support') option('xen_pci_passthrough', type: 'feature', value: 'auto', description: 'Xen PCI passthrough support') -option('tcg', type: 'feature', value: 'auto', +option('tcg', type: 'feature', value: 'enabled', description: 'TCG support') option('tcg_interpreter', type: 'boolean', value: false, description: 'TCG with bytecode interpreter (slow)') --=20 2.35.1 From nobody Sat May 4 20:14:55 2024 Delivered-To: importer2@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer2=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1651246636919669.6367556441265; Fri, 29 Apr 2022 08:37:16 -0700 (PDT) Received: from localhost ([::1]:49438 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nkSgF-0007r3-Qn for importer2@patchew.org; Fri, 29 Apr 2022 11:37:15 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:44188) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nkSSw-0002Ka-I8 for qemu-devel@nongnu.org; Fri, 29 Apr 2022 11:23:30 -0400 Received: from mail-ej1-x62b.google.com ([2a00:1450:4864:20::62b]:39554) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nkSSu-0006AM-Sz for qemu-devel@nongnu.org; Fri, 29 Apr 2022 11:23:30 -0400 Received: by mail-ej1-x62b.google.com with SMTP id bv19so16100074ejb.6 for ; Fri, 29 Apr 2022 08:23:28 -0700 (PDT) Received: from avogadro.redhat.com ([2001:b07:6468:f312:1c09:f536:3de6:228c]) by smtp.gmail.com with ESMTPSA id w25-20020a170907271900b006f3ef214dd6sm736395ejk.60.2022.04.29.08.23.26 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 29 Apr 2022 08:23:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=pVIHrWb0QymKV8unddHVw3luRnSSMYN+wzhu25/ExSM=; b=e6tWqpywTB0lCofPQx54gY+0ZpKz5nCs9+lP/lg9UpPuO4LuvlV2HujBU4kJPS0Jhr PTMryi2jPtcFoIh3Yu6c3Wi84buwXOika4wG/KlLyaUvrKy4tXXkGmtPhSMymXHdHTsY lh/zJkkdB10bW2UFmcFCPME+SGK7ICrRYyv/zL1g2wRHOqVUu3hVg5Id032qCZmPMuKI YoFXz+2s5PutQ9qK+D+W7tVAhyXhwCjcGDIuR6Wo1smqPRR6IFt3omztIRUJnhGe8nmO sAZiSw3NYKp+YExynfPt+ReMVq/0zTP22nWKswKV8hNpyE4qSLMryK1+ANC2zKXsXmYv d6dw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=pVIHrWb0QymKV8unddHVw3luRnSSMYN+wzhu25/ExSM=; b=I4O92HnzgFuM/1bON3X8VdTIWxzrYoBVtMDD7P037kfG8S5UbLLUFy4RgUDbN3/rR7 Nw0b5aKhScsO8CAiaBNm/S+Ftd1jAoPV9qT6pm1XiWcuiPVjkTFTuFjZp1a0pSx5a2MS GzhY0UvGyvRGCpt4wAb+jIaAiD3A11F5iQq3li9vnHwdbLXXrbtGx7WMvTdRAMSBssQ3 dqCD3FMuLHvJkdPzazCFp61ki7SN5XlzH/BbgHZ615eIOpUUoHmdiwhvjfKmGThMFzBf D/D6ItInr9CvTva7m4zgprx1htn12Bynsq1Uj5atK4OL39610uavzWZfzBqJu6nQLCMk g86A== X-Gm-Message-State: AOAM533/mmTMMm9wMZG1d6ktmX/RITIYS9DQNMJDbFcV5pwQMsC6prO9 HgPhvLTkxYYuYe7fwfxf4lAnLBYoGqc56Q== X-Google-Smtp-Source: ABdhPJxEH+HV6h1Tx/aTRSjOCR3pc/rW7piCfdL7IWAUoMI/KUFOpHk2uLtsxzunrDoroYiO7u5o2w== X-Received: by 2002:a17:906:594a:b0:6f3:d242:8d64 with SMTP id g10-20020a170906594a00b006f3d2428d64mr11173342ejr.34.1651245807584; Fri, 29 Apr 2022 08:23:27 -0700 (PDT) From: Paolo Bonzini To: qemu-devel@nongnu.org Subject: [PULL 17/25] meson, virtio: place all virtio-pci devices under virtio_pci_ss Date: Fri, 29 Apr 2022 17:23:04 +0200 Message-Id: <20220429152312.335715-18-pbonzini@redhat.com> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220429152312.335715-1-pbonzini@redhat.com> References: <20220429152312.335715-1-pbonzini@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Type: text/plain Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer2=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::62b; envelope-from=paolo.bonzini@gmail.com; helo=mail-ej1-x62b.google.com X-Spam_score_int: -4 X-Spam_score: -0.5 X-Spam_bar: / X-Spam_report: (-0.5 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FORGED_FROMDOMAIN=0.249, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.249, PP_MIME_FAKE_ASCII_TEXT=0.999, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= Errors-To: qemu-devel-bounces+importer2=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZM-MESSAGEID: 1651246637615100001 Since a sourceset already exists for this, avoid unnecessary repeat of CONFIG_VIRTIO_PCI. Reviewed-by: Marc-Andr=C3=A9 Lureau Signed-off-by: Paolo Bonzini --- hw/virtio/meson.build | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/hw/virtio/meson.build b/hw/virtio/meson.build index 67dc77e00f..f371404b04 100644 --- a/hw/virtio/meson.build +++ b/hw/virtio/meson.build @@ -16,9 +16,7 @@ virtio_ss.add(when: 'CONFIG_VHOST_USER', if_true: files('= vhost-user.c')) virtio_ss.add(when: 'CONFIG_VHOST_VDPA', if_true: files('vhost-shadow-virt= queue.c', 'vhost-vdpa.c')) virtio_ss.add(when: 'CONFIG_VIRTIO_BALLOON', if_true: files('virtio-balloo= n.c')) virtio_ss.add(when: 'CONFIG_VIRTIO_CRYPTO', if_true: files('virtio-crypto.= c')) -virtio_ss.add(when: ['CONFIG_VIRTIO_CRYPTO', 'CONFIG_VIRTIO_PCI'], if_true= : files('virtio-crypto-pci.c')) virtio_ss.add(when: 'CONFIG_VHOST_USER_FS', if_true: files('vhost-user-fs.= c')) -virtio_ss.add(when: ['CONFIG_VHOST_USER_FS', 'CONFIG_VIRTIO_PCI'], if_true= : files('vhost-user-fs-pci.c')) virtio_ss.add(when: 'CONFIG_VIRTIO_PMEM', if_true: files('virtio-pmem.c')) virtio_ss.add(when: 'CONFIG_VHOST_VSOCK', if_true: files('vhost-vsock.c', = 'vhost-vsock-common.c')) virtio_ss.add(when: 'CONFIG_VHOST_USER_VSOCK', if_true: files('vhost-user-= vsock.c', 'vhost-vsock-common.c')) @@ -26,17 +24,20 @@ virtio_ss.add(when: 'CONFIG_VIRTIO_RNG', if_true: files= ('virtio-rng.c')) virtio_ss.add(when: 'CONFIG_VIRTIO_IOMMU', if_true: files('virtio-iommu.c'= )) virtio_ss.add(when: 'CONFIG_VIRTIO_MEM', if_true: files('virtio-mem.c')) virtio_ss.add(when: 'CONFIG_VHOST_USER_I2C', if_true: files('vhost-user-i2= c.c')) -virtio_ss.add(when: ['CONFIG_VIRTIO_PCI', 'CONFIG_VHOST_USER_I2C'], if_tru= e: files('vhost-user-i2c-pci.c')) virtio_ss.add(when: 'CONFIG_VHOST_USER_RNG', if_true: files('vhost-user-rn= g.c')) -virtio_ss.add(when: ['CONFIG_VHOST_USER_RNG', 'CONFIG_VIRTIO_PCI'], if_tru= e: files('vhost-user-rng-pci.c')) =20 virtio_pci_ss =3D ss.source_set() virtio_pci_ss.add(when: 'CONFIG_VHOST_VSOCK', if_true: files('vhost-vsock-= pci.c')) virtio_pci_ss.add(when: 'CONFIG_VHOST_USER_VSOCK', if_true: files('vhost-u= ser-vsock-pci.c')) virtio_pci_ss.add(when: 'CONFIG_VHOST_USER_BLK', if_true: files('vhost-use= r-blk-pci.c')) +virtio_pci_ss.add(when: 'CONFIG_VHOST_USER_I2C', if_true: files('vhost-use= r-i2c-pci.c')) virtio_pci_ss.add(when: 'CONFIG_VHOST_USER_INPUT', if_true: files('vhost-u= ser-input-pci.c')) +virtio_pci_ss.add(when: 'CONFIG_VHOST_USER_RNG', if_true: files('vhost-use= r-rng-pci.c')) virtio_pci_ss.add(when: 'CONFIG_VHOST_USER_SCSI', if_true: files('vhost-us= er-scsi-pci.c')) virtio_pci_ss.add(when: 'CONFIG_VHOST_SCSI', if_true: files('vhost-scsi-pc= i.c')) +virtio_pci_ss.add(when: 'CONFIG_VHOST_USER_FS', if_true: files('vhost-user= -fs-pci.c')) + +virtio_pci_ss.add(when: 'CONFIG_VIRTIO_CRYPTO', if_true: files('virtio-cry= pto-pci.c')) virtio_pci_ss.add(when: 'CONFIG_VIRTIO_INPUT_HOST', if_true: files('virtio= -input-host-pci.c')) virtio_pci_ss.add(when: 'CONFIG_VIRTIO_INPUT', if_true: files('virtio-inpu= t-pci.c')) virtio_pci_ss.add(when: 'CONFIG_VIRTIO_RNG', if_true: files('virtio-rng-pc= i.c')) --=20 2.35.1 From nobody Sat May 4 20:14:55 2024 Delivered-To: importer2@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer2=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1651248478679610.2665687900995; Fri, 29 Apr 2022 09:07:58 -0700 (PDT) Received: from localhost ([::1]:45570 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nkT9x-0003Xk-7e for importer2@patchew.org; Fri, 29 Apr 2022 12:07:57 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:44198) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nkSSx-0002MD-B0 for qemu-devel@nongnu.org; Fri, 29 Apr 2022 11:23:31 -0400 Received: from mail-ed1-x52b.google.com ([2a00:1450:4864:20::52b]:39438) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nkSSv-0006AS-LD for qemu-devel@nongnu.org; Fri, 29 Apr 2022 11:23:30 -0400 Received: by mail-ed1-x52b.google.com with SMTP id g20so9456143edw.6 for ; Fri, 29 Apr 2022 08:23:29 -0700 (PDT) Received: from avogadro.redhat.com ([2001:b07:6468:f312:1c09:f536:3de6:228c]) by smtp.gmail.com with ESMTPSA id w25-20020a170907271900b006f3ef214dd6sm736395ejk.60.2022.04.29.08.23.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 29 Apr 2022 08:23:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=yyMUsE17gssDDV3IZZB5UBisTN7P3ts18R3UmNR6bDU=; b=j2UaWtQtN/z531qX71c4PB6FOs0llO0AAN7WORUvx2mMXeheHmojwvtUJFFwDOoVDY +/w/vAvrpVqNBk+BXawoexgNxJj8S/0jwm6wjQguvJnBcTWfXZj8mQc/kYdqBThKm89Z WtMdahHXyTKVFhDTEZpoh6t8okG1SxrdedfKnc29Kf2+NcrFLBCwWGQ2PwXL9807uwtp hi08Waf38+tXGjQ0ZMQYUEYbAObAys4e133Z0uHnJSa+hMK/2T0npkbrnETJjCgtQ8C2 Hg7CFp4QGGASwxsSiJXU1NTukhzuTEQqaSd1KvQn5h8jEraxQDFEP777dsLTwJVMCSvc +q4w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=yyMUsE17gssDDV3IZZB5UBisTN7P3ts18R3UmNR6bDU=; b=HEw+L0KWk/hYewELtxGk1RSLdnxMvVVGNT+jYbm+Czkulhtdl70Eauc7ppew27Iy4W jo4uTd9d9cCDin0JquneK7YFvw59bltQao83CrL6OG7s6S9ij5vQhwsVQu2hXG4Yd5jO xrXOEDLJYhXMEPepX0jJg3tI7+XqT5TlUrlhGGP4CZ7ry3Nm9GuA0oXsHe8nXzEr7Srt QolhGqkRrO0zAfETDOUIPH566kH7Px51Py65/ZZ6PVIzLkVcwYmRdwtaQffbB2NipDof cfJxNwpENWNiEf0fZkqZEoxPvDTEdidWKiucEPTOWI7HDscZqEmmRtzoZybqEDlO2z/M jIYw== X-Gm-Message-State: AOAM531U185/xdmOv/6/A/BYgkxALcmRraEatgd+T7hxrk2yCzKXTVi7 t9fJmLtaAxwlZ8CMwjXTyZleOzEt7z/KDQ== X-Google-Smtp-Source: ABdhPJxMr9WAnMAyG6ZXUNZiYctzyrUXKrwuEOG5uk0DVvKosfuxSiUy2EpWRf0mMdbCFSi2j+2/ew== X-Received: by 2002:a50:bae7:0:b0:425:c0fa:e0a7 with SMTP id x94-20020a50bae7000000b00425c0fae0a7mr39621444ede.104.1651245808369; Fri, 29 Apr 2022 08:23:28 -0700 (PDT) From: Paolo Bonzini To: qemu-devel@nongnu.org Subject: [PULL 18/25] configure: simplify vhost-net-{user, vdpa} configuration Date: Fri, 29 Apr 2022 17:23:05 +0200 Message-Id: <20220429152312.335715-19-pbonzini@redhat.com> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220429152312.335715-1-pbonzini@redhat.com> References: <20220429152312.335715-1-pbonzini@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Type: text/plain Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer2=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::52b; envelope-from=paolo.bonzini@gmail.com; helo=mail-ed1-x52b.google.com X-Spam_score_int: -4 X-Spam_score: -0.5 X-Spam_bar: / X-Spam_report: (-0.5 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FORGED_FROMDOMAIN=0.249, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.249, PP_MIME_FAKE_ASCII_TEXT=0.999, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= Errors-To: qemu-devel-bounces+importer2=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZM-MESSAGEID: 1651248480205100001 Cleanup to ease review of the conversion to meson. vhost_net_user and vhost_net_vdpa are never assigned anything in the command line parsing loop, so they are always equal to $vhost_user and $vhost_vdpa. Reviewed-by: Marc-Andr=C3=A9 Lureau Signed-off-by: Paolo Bonzini --- configure | 17 ++++------------- 1 file changed, 4 insertions(+), 13 deletions(-) diff --git a/configure b/configure index 1c88e697c5..d6ddd4f05f 100755 --- a/configure +++ b/configure @@ -1555,10 +1555,6 @@ if test "$vhost_vsock" =3D "yes" && test "$vhost_ker= nel" !=3D "yes"; then fi =20 # vhost-user backends -test "$vhost_net_user" =3D "" && vhost_net_user=3D$vhost_user -if test "$vhost_net_user" =3D "yes" && test "$vhost_user" =3D "no"; then - error_exit "--enable-vhost-net-user requires --enable-vhost-user" -fi test "$vhost_crypto" =3D "" && vhost_crypto=3D$vhost_user if test "$vhost_crypto" =3D "yes" && test "$vhost_user" =3D "no"; then error_exit "--enable-vhost-crypto requires --enable-vhost-user" @@ -1567,16 +1563,11 @@ test "$vhost_user_fs" =3D "" && vhost_user_fs=3D$vh= ost_user if test "$vhost_user_fs" =3D "yes" && test "$vhost_user" =3D "no"; then error_exit "--enable-vhost-user-fs requires --enable-vhost-user" fi -#vhost-vdpa backends -test "$vhost_net_vdpa" =3D "" && vhost_net_vdpa=3D$vhost_vdpa -if test "$vhost_net_vdpa" =3D "yes" && test "$vhost_vdpa" =3D "no"; then - error_exit "--enable-vhost-net-vdpa requires --enable-vhost-vdpa" -fi =20 # OR the vhost-kernel, vhost-vdpa and vhost-user values for simplicity if test "$vhost_net" =3D ""; then - test "$vhost_net_user" =3D "yes" && vhost_net=3Dyes - test "$vhost_net_vdpa" =3D "yes" && vhost_net=3Dyes + test "$vhost_user" =3D "yes" && vhost_net=3Dyes + test "$vhost_vdpa" =3D "yes" && vhost_net=3Dyes test "$vhost_kernel" =3D "yes" && vhost_net=3Dyes fi =20 @@ -2105,10 +2096,10 @@ fi if test "$vhost_net" =3D "yes" ; then echo "CONFIG_VHOST_NET=3Dy" >> $config_host_mak fi -if test "$vhost_net_user" =3D "yes" ; then +if test "$vhost_user" =3D "yes" ; then echo "CONFIG_VHOST_NET_USER=3Dy" >> $config_host_mak fi -if test "$vhost_net_vdpa" =3D "yes" ; then +if test "$vhost_vdpa" =3D "yes" ; then echo "CONFIG_VHOST_NET_VDPA=3Dy" >> $config_host_mak fi if test "$vhost_crypto" =3D "yes" ; then --=20 2.35.1 From nobody Sat May 4 20:14:55 2024 Delivered-To: importer2@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer2=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1651247553428947.3255359845873; Fri, 29 Apr 2022 08:52:33 -0700 (PDT) Received: from localhost ([::1]:43406 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nkSv2-00089z-ET for importer2@patchew.org; Fri, 29 Apr 2022 11:52:32 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:44210) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nkSSy-0002Np-65 for qemu-devel@nongnu.org; Fri, 29 Apr 2022 11:23:32 -0400 Received: from mail-ed1-x536.google.com ([2a00:1450:4864:20::536]:45924) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nkSSw-0006Ai-JP for qemu-devel@nongnu.org; Fri, 29 Apr 2022 11:23:31 -0400 Received: by mail-ed1-x536.google.com with SMTP id be20so9446432edb.12 for ; Fri, 29 Apr 2022 08:23:30 -0700 (PDT) Received: from avogadro.redhat.com ([2001:b07:6468:f312:1c09:f536:3de6:228c]) by smtp.gmail.com with ESMTPSA id w25-20020a170907271900b006f3ef214dd6sm736395ejk.60.2022.04.29.08.23.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 29 Apr 2022 08:23:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=zIP/FpIDyeAUa2Urappf0zBnARGkdksC+WXOMtSPtO0=; b=D/C8hGNe7HNYTD68BrrmSM7XINo96GeeR5VX+I7FyM8Uqt3TBTo7CG8/CD8wTupaNI GMHPBPxoQ4ThohfgOuPlz0dfL34t6b3RHRbZ0H5qMVjCyEGZdLdHVGfXXiPAh3g1n9g2 CgAgSnpXqyM+3CD+7OLo3+XADn6uoz/TSL770Bk2RS+Q5jMZcUxDXZUr6klCzoaUctuo MUzwNe1+pQuZYcLc/S1jsjEi5LxdBHRWefxERPsN7MZaXUocE61G1I/w7dcMNTTVpVS3 OZsUPAOTo4hufZzn8cxDIY5gcMaayQkU6k/7efuQRSNmDNLreAkDg37Ji7+cD1Fexqln 6WQw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=zIP/FpIDyeAUa2Urappf0zBnARGkdksC+WXOMtSPtO0=; b=vVXec5zHXjSLesIKcNSDNb4ETzDsB8zLTVmai4GrRkGHdLgsstlYxvKSXR5OHgev1d o/MeBW+xwP+zGwESfSyVi0wycGcFcGEWlrmf/k98h6DAyCMFdQ3nahaZifa9NqxRRW+R N7CdnYtI0v4SMGe0t8+pCVaJX16/wkzSXs0Z2VrXSzFEhxtYrglRlEMa/EJClZa5x97T 2iK6nhDU1grSD3tZUGwR1KloF3a11Ycqpvl6lVSmNjpvaTWaL78iFCp2vA3k2SoOnX+s uA9/ahBF6yukohLFgENJVQJcwLQTxHXV9svX0XNSYkE8ODFBgzQs/9XvBghmOTWgqJDw EJbw== X-Gm-Message-State: AOAM5300WvgEQhQeK8VleyEXqkKtDLASrWXOOr9X06QYbTmxTiO+DnUE WRuc87JVhsZgfy6hQH98+g2b64SejdY0TA== X-Google-Smtp-Source: ABdhPJzPPLkktQXtFzRVuBl+DgVFk6JNC+QKeY6Frj95+Cs10cie9QpBknBWE4KsELUJ3NwuRvMczw== X-Received: by 2002:a50:d65c:0:b0:425:ea34:7dd7 with SMTP id c28-20020a50d65c000000b00425ea347dd7mr27002673edj.18.1651245809241; Fri, 29 Apr 2022 08:23:29 -0700 (PDT) From: Paolo Bonzini To: qemu-devel@nongnu.org Subject: [PULL 19/25] build: move vhost-vsock configuration to Kconfig Date: Fri, 29 Apr 2022 17:23:06 +0200 Message-Id: <20220429152312.335715-20-pbonzini@redhat.com> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220429152312.335715-1-pbonzini@redhat.com> References: <20220429152312.335715-1-pbonzini@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Type: text/plain Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer2=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::536; envelope-from=paolo.bonzini@gmail.com; helo=mail-ed1-x536.google.com X-Spam_score_int: -4 X-Spam_score: -0.5 X-Spam_bar: / X-Spam_report: (-0.5 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FORGED_FROMDOMAIN=0.249, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.249, PP_MIME_FAKE_ASCII_TEXT=0.999, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= Errors-To: qemu-devel-bounces+importer2=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZM-MESSAGEID: 1651247554810100002 vhost-vsock and vhost-user-vsock are two devices of their own; it should be possible to enable/disable them with --without-default-devices, not --without-default-features. Compute their default value in Kconfig to obtain the more intuitive behavior. Reviewed-by: Marc-Andr=C3=A9 Lureau Signed-off-by: Paolo Bonzini --- configure | 16 ---------------- hw/virtio/Kconfig | 10 ++++++++++ meson.build | 1 - 3 files changed, 10 insertions(+), 17 deletions(-) diff --git a/configure b/configure index d6ddd4f05f..603434fc7f 100755 --- a/configure +++ b/configure @@ -286,7 +286,6 @@ vhost_kernel=3D"$default_feature" vhost_net=3D"$default_feature" vhost_crypto=3D"$default_feature" vhost_scsi=3D"$default_feature" -vhost_vsock=3D"$default_feature" vhost_user=3D"no" vhost_user_fs=3D"$default_feature" vhost_vdpa=3D"$default_feature" @@ -879,10 +878,6 @@ for opt do ;; --enable-vhost-scsi) vhost_scsi=3D"yes" ;; - --disable-vhost-vsock) vhost_vsock=3D"no" - ;; - --enable-vhost-vsock) vhost_vsock=3D"yes" - ;; --disable-vhost-user-fs) vhost_user_fs=3D"no" ;; --enable-vhost-user-fs) vhost_user_fs=3D"yes" @@ -1109,7 +1104,6 @@ cat << EOF safe-stack SafeStack Stack Smash Protection. Depends on clang/llvm >=3D 3.7 and requires coroutine backend ucont= ext. vhost-net vhost-net kernel acceleration support - vhost-vsock virtio sockets device support vhost-scsi vhost-scsi kernel target support vhost-crypto vhost-user-crypto backend support vhost-kernel vhost kernel backend support @@ -1549,10 +1543,6 @@ test "$vhost_scsi" =3D "" && vhost_scsi=3D$vhost_ker= nel if test "$vhost_scsi" =3D "yes" && test "$vhost_kernel" !=3D "yes"; then error_exit "--enable-vhost-scsi requires --enable-vhost-kernel" fi -test "$vhost_vsock" =3D "" && vhost_vsock=3D$vhost_kernel -if test "$vhost_vsock" =3D "yes" && test "$vhost_kernel" !=3D "yes"; then - error_exit "--enable-vhost-vsock requires --enable-vhost-kernel" -fi =20 # vhost-user backends test "$vhost_crypto" =3D "" && vhost_crypto=3D$vhost_user @@ -2105,12 +2095,6 @@ fi if test "$vhost_crypto" =3D "yes" ; then echo "CONFIG_VHOST_CRYPTO=3Dy" >> $config_host_mak fi -if test "$vhost_vsock" =3D "yes" ; then - echo "CONFIG_VHOST_VSOCK=3Dy" >> $config_host_mak - if test "$vhost_user" =3D "yes" ; then - echo "CONFIG_VHOST_USER_VSOCK=3Dy" >> $config_host_mak - fi -fi if test "$vhost_kernel" =3D "yes" ; then echo "CONFIG_VHOST_KERNEL=3Dy" >> $config_host_mak fi diff --git a/hw/virtio/Kconfig b/hw/virtio/Kconfig index c144d42f9b..b642ae1081 100644 --- a/hw/virtio/Kconfig +++ b/hw/virtio/Kconfig @@ -59,6 +59,16 @@ config VIRTIO_MEM depends on VIRTIO_MEM_SUPPORTED select MEM_DEVICE =20 +config VHOST_VSOCK + bool + default y + depends on VIRTIO && VHOST_KERNEL + +config VHOST_USER_VSOCK + bool + default y + depends on VIRTIO && VHOST_USER + config VHOST_USER_I2C bool default y diff --git a/meson.build b/meson.build index 7c52ef135c..8621f84916 100644 --- a/meson.build +++ b/meson.build @@ -3691,7 +3691,6 @@ summary_info +=3D {'vhost-kernel support': config_hos= t.has_key('CONFIG_VHOST_KERNE summary_info +=3D {'vhost-net support': config_host.has_key('CONFIG_VHOST_= NET')} summary_info +=3D {'vhost-crypto support': config_host.has_key('CONFIG_VHO= ST_CRYPTO')} 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= _USER')} 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')} --=20 2.35.1 From nobody Sat May 4 20:14:55 2024 Delivered-To: importer2@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer2=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1651247684771718.1476797617405; Fri, 29 Apr 2022 08:54:44 -0700 (PDT) Received: from localhost ([::1]:50970 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nkSx9-0004jA-HE for importer2@patchew.org; Fri, 29 Apr 2022 11:54:43 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:44238) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nkSSz-0002QB-9C for qemu-devel@nongnu.org; Fri, 29 Apr 2022 11:23:39 -0400 Received: from mail-ej1-x62e.google.com ([2a00:1450:4864:20::62e]:41602) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nkSSx-0006Aw-Id for qemu-devel@nongnu.org; Fri, 29 Apr 2022 11:23:33 -0400 Received: by mail-ej1-x62e.google.com with SMTP id dk23so16094508ejb.8 for ; Fri, 29 Apr 2022 08:23:31 -0700 (PDT) Received: from avogadro.redhat.com ([2001:b07:6468:f312:1c09:f536:3de6:228c]) by smtp.gmail.com with ESMTPSA id w25-20020a170907271900b006f3ef214dd6sm736395ejk.60.2022.04.29.08.23.29 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 29 Apr 2022 08:23:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=/18lXHZZ+IfJB2of/Nxw+vWT4xDhKdMnNhc/M3EslhI=; b=MZW8nictPiVq4XudMnBnWhL4URutv730x/qXBfgoiymkj+LoAzaw3QVlaMIozGAH7+ gaD2fwHYgAIMcc5DTCABKvR3jt/axcluOiHbkmTgmNgSaiZNVWecNgANRiIv4dX4ac9q tpsxggemEaNyeRR0arstsBF8hYKYMx8ly6APJ0VvKKhlk2lJrJxC3JA3MeYfNS2YY3D3 y28eV7/TCCP7SdIjYi9uYpkEl6256mnYPuFinKHRUlku9M3x7VEGloHtWQtIy6FvmrNF PW1WDEtcPVlkQXBw0A/hnsv1xOygwIvYa6N0hSWOyCeZnVsQ+GhTlzcIBnaeeH4jfyXa jlyw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=/18lXHZZ+IfJB2of/Nxw+vWT4xDhKdMnNhc/M3EslhI=; b=xCuRlxYT6nPErM8AtbB+xIEV5wO8pvWynUXiP6cW6kRP2xG1xD6kZoxH+ZynlkhC0b OUqJhQ8qmKCf+7gqz6SfZ8NIhcMwOu3F0e3aPhhyXQqFmUnbHY/6r02RnkSOnsiNXRwp gWeFbRxYeQArnvan60bvBTkeYKnlCnBqcSxSNskzJHdna/tBN80BMQ2R108/CLU8vpiI ni8aRCmnsVJ7cmImDOTndg8Kk9l4rC/jFHrFEv1A4vVGbuXlXekUUHrFsmsA0Dxq9172 Pomr/5DY7M08ctZcxyAqVB+O5csOxnR57QWnkiJj5Ynki7KRMoqHD6OjUON6sp/T9KeC zdiQ== X-Gm-Message-State: AOAM532+GswyR7b+PLRIi1tvytceJo1HdeczD30ht84L6JRXMCiejvjt e9+4KgBVQjd3wWx60/dUvsChNOer3Dp0/A== X-Google-Smtp-Source: ABdhPJxw3j4+76UsS8rKXnTtXM57Siak17t5FT+FMhADVA4LvUzh4s8pc+fx9EkvnsUhgeIbyDx1Xg== X-Received: by 2002:a17:906:948:b0:6d6:e479:1fe4 with SMTP id j8-20020a170906094800b006d6e4791fe4mr36274166ejd.240.1651245810244; Fri, 29 Apr 2022 08:23:30 -0700 (PDT) From: Paolo Bonzini To: qemu-devel@nongnu.org Subject: [PULL 20/25] build: move vhost-scsi configuration to Kconfig Date: Fri, 29 Apr 2022 17:23:07 +0200 Message-Id: <20220429152312.335715-21-pbonzini@redhat.com> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220429152312.335715-1-pbonzini@redhat.com> References: <20220429152312.335715-1-pbonzini@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Type: text/plain Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer2=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::62e; envelope-from=paolo.bonzini@gmail.com; helo=mail-ej1-x62e.google.com X-Spam_score_int: -4 X-Spam_score: -0.5 X-Spam_bar: / X-Spam_report: (-0.5 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FORGED_FROMDOMAIN=0.249, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.249, PP_MIME_FAKE_ASCII_TEXT=0.999, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= Errors-To: qemu-devel-bounces+importer2=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZM-MESSAGEID: 1651247685609100001 vhost-scsi and vhost-user-scsi are two devices of their own; it should be possible to enable/disable them with --without-default-devices, not --without-default-features. Compute their default value in Kconfig to obtain the more intuitive behavior. Reviewed-by: Marc-Andr=C3=A9 Lureau Signed-off-by: Paolo Bonzini --- configure | 15 --------------- hw/scsi/Kconfig | 5 +++++ include/hw/virtio/virtio-scsi.h | 2 -- meson.build | 1 - 4 files changed, 5 insertions(+), 18 deletions(-) diff --git a/configure b/configure index 603434fc7f..d268a9cf49 100755 --- a/configure +++ b/configure @@ -285,7 +285,6 @@ EXTRA_LDFLAGS=3D"" vhost_kernel=3D"$default_feature" vhost_net=3D"$default_feature" vhost_crypto=3D"$default_feature" -vhost_scsi=3D"$default_feature" vhost_user=3D"no" vhost_user_fs=3D"$default_feature" vhost_vdpa=3D"$default_feature" @@ -874,10 +873,6 @@ for opt do ;; --enable-vhost-crypto) vhost_crypto=3D"yes" ;; - --disable-vhost-scsi) vhost_scsi=3D"no" - ;; - --enable-vhost-scsi) vhost_scsi=3D"yes" - ;; --disable-vhost-user-fs) vhost_user_fs=3D"no" ;; --enable-vhost-user-fs) vhost_user_fs=3D"yes" @@ -1104,7 +1099,6 @@ cat << EOF safe-stack SafeStack Stack Smash Protection. Depends on clang/llvm >=3D 3.7 and requires coroutine backend ucont= ext. vhost-net vhost-net kernel acceleration support - vhost-scsi vhost-scsi kernel target support vhost-crypto vhost-user-crypto backend support vhost-kernel vhost kernel backend support vhost-user vhost-user backend support @@ -1538,12 +1532,6 @@ if test "$vhost_kernel" =3D "yes" && test "$linux" != =3D "yes"; then error_exit "vhost-kernel is only available on Linux" fi =20 -# vhost-kernel devices -test "$vhost_scsi" =3D "" && vhost_scsi=3D$vhost_kernel -if test "$vhost_scsi" =3D "yes" && test "$vhost_kernel" !=3D "yes"; then - error_exit "--enable-vhost-scsi requires --enable-vhost-kernel" -fi - # vhost-user backends test "$vhost_crypto" =3D "" && vhost_crypto=3D$vhost_user if test "$vhost_crypto" =3D "yes" && test "$vhost_user" =3D "no"; then @@ -2080,9 +2068,6 @@ if test "$modules" =3D "yes"; then echo "CONFIG_MODULES=3Dy" >> $config_host_mak fi =20 -if test "$vhost_scsi" =3D "yes" ; then - echo "CONFIG_VHOST_SCSI=3Dy" >> $config_host_mak -fi if test "$vhost_net" =3D "yes" ; then echo "CONFIG_VHOST_NET=3Dy" >> $config_host_mak fi diff --git a/hw/scsi/Kconfig b/hw/scsi/Kconfig index 77d397c949..e7b34dc8e2 100644 --- a/hw/scsi/Kconfig +++ b/hw/scsi/Kconfig @@ -48,6 +48,11 @@ config VIRTIO_SCSI depends on VIRTIO select SCSI =20 +config VHOST_SCSI + bool + default y + depends on VIRTIO && VHOST_KERNEL + config VHOST_USER_SCSI bool # Only PCI devices are provided for now diff --git a/include/hw/virtio/virtio-scsi.h b/include/hw/virtio/virtio-scs= i.h index 543681bc18..0997313f0a 100644 --- a/include/hw/virtio/virtio-scsi.h +++ b/include/hw/virtio/virtio-scsi.h @@ -55,10 +55,8 @@ struct VirtIOSCSIConf { bool seg_max_adjust; uint32_t max_sectors; uint32_t cmd_per_lun; -#ifdef CONFIG_VHOST_SCSI char *vhostfd; char *wwpn; -#endif CharBackend chardev; uint32_t boot_tpgt; IOThread *iothread; diff --git a/meson.build b/meson.build index 8621f84916..db585832a4 100644 --- a/meson.build +++ b/meson.build @@ -3690,7 +3690,6 @@ summary_info +=3D {'QOM debugging': get_option('q= om_cast_debug')} summary_info +=3D {'vhost-kernel support': config_host.has_key('CONFIG_VHO= ST_KERNEL')} summary_info +=3D {'vhost-net support': config_host.has_key('CONFIG_VHOST_= NET')} summary_info +=3D {'vhost-crypto support': config_host.has_key('CONFIG_VHO= ST_CRYPTO')} -summary_info +=3D {'vhost-scsi support': config_host.has_key('CONFIG_VHOST= _SCSI')} summary_info +=3D {'vhost-user support': config_host.has_key('CONFIG_VHOST= _USER')} 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')} --=20 2.35.1 From nobody Sat May 4 20:14:55 2024 Delivered-To: importer2@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer2=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 165124783927513.31292299399854; Fri, 29 Apr 2022 08:57:19 -0700 (PDT) Received: from localhost ([::1]:57432 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nkSze-0000fY-Ah for importer2@patchew.org; Fri, 29 Apr 2022 11:57:18 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:44266) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nkST7-0002QX-1h for qemu-devel@nongnu.org; Fri, 29 Apr 2022 11:23:42 -0400 Received: from mail-ed1-x52d.google.com ([2a00:1450:4864:20::52d]:37468) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nkSSy-0006B6-EQ for qemu-devel@nongnu.org; Fri, 29 Apr 2022 11:23:33 -0400 Received: by mail-ed1-x52d.google.com with SMTP id k27so9463493edk.4 for ; Fri, 29 Apr 2022 08:23:32 -0700 (PDT) Received: from avogadro.redhat.com ([2001:b07:6468:f312:1c09:f536:3de6:228c]) by smtp.gmail.com with ESMTPSA id w25-20020a170907271900b006f3ef214dd6sm736395ejk.60.2022.04.29.08.23.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 29 Apr 2022 08:23:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=5dZfwdJ4KB4Qq58kgohQA1IWa42zobeM0mK5lcpU0t8=; b=PFHMEJx/kM6Jt2NWRUVRJ5PNgAilvlw7ImonAiswbjJu7QnwEeMF7Dqhyt2eGr6F56 sEWFXej4oRCVhjEylucE95xb9Ax2MgdZABrWAtGiUxN44miCCkSOMR9YcpQdNPaywbzA rSTZvP6qFYfSqnTv+X4VFylnbod95Q/NfqoKsPkM0R8LOrTb5QW+ZD3SktHibKQvP1L4 dCKN9k2JPn+EDFSOg98DYLCyrKv5Xu6mF8oVk+xJetY/HZgoiitVAsvCZRwtif6KwPkE wgC3IRQzcEr/q6wOntw1dS8+z0yVOSZSBh/WXshuvenrzC15tMRh1TcGt/wMgZrT52+y OB+A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=5dZfwdJ4KB4Qq58kgohQA1IWa42zobeM0mK5lcpU0t8=; b=qvPeo8T0z56ibaVwXoeejLYlCvHuxHhmKg8WS41zDNoaq1ArYczX5JrHpMigRjR/80 9OqeP7Vrxt/8AqC6JZ1dRZRDeH+jc9GvPUlqgaDS/N4XOb7TKA3zptI0QefbpFlscLN1 2ocQslRXczS86l2ml2aqLP+dp+9+j/X6wvF0pAPGFYDpbGe5TlbYXSEj1DUqSjBeY6/t GDnMaSrmFC/JAEzPCNGERInBDXHYmGLD+iEO0S6PrKIxVxpBGyLFlKVxvKwK6VlLUUXn pPbp1+QxO5gdeIlJuy7fhPIOgczeP6j8TfC1a5IGnHqluXpQs0XRB1gJDqt3+ISV4u3q t7Xg== X-Gm-Message-State: AOAM5304FVJj2af4Ge5qn892y4A71A2ZZiIlGPlPENVwk5UxVLPHLEs7 YnB2kn1VVm3me0ibQRI+qOJMu9/VCZW9fA== X-Google-Smtp-Source: ABdhPJw6YsCVAXtxQhSW4e7iodTqpR8eveb/g5HinNRIiQG/qpFjAJrSD5vxTra+cJsWAiJVFNKFRQ== X-Received: by 2002:a05:6402:358d:b0:426:1804:93eb with SMTP id y13-20020a056402358d00b00426180493ebmr14296289edc.334.1651245811074; Fri, 29 Apr 2022 08:23:31 -0700 (PDT) From: Paolo Bonzini To: qemu-devel@nongnu.org Subject: [PULL 21/25] build: move vhost-user-fs configuration to Kconfig Date: Fri, 29 Apr 2022 17:23:08 +0200 Message-Id: <20220429152312.335715-22-pbonzini@redhat.com> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220429152312.335715-1-pbonzini@redhat.com> References: <20220429152312.335715-1-pbonzini@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Type: text/plain Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer2=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::52d; envelope-from=paolo.bonzini@gmail.com; helo=mail-ed1-x52d.google.com X-Spam_score_int: -4 X-Spam_score: -0.5 X-Spam_bar: / X-Spam_report: (-0.5 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FORGED_FROMDOMAIN=0.249, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.249, PP_MIME_FAKE_ASCII_TEXT=0.999, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= Errors-To: qemu-devel-bounces+importer2=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZM-MESSAGEID: 1651247840504100001 vhost-user-fs is a device and it should be possible to enable/disable it with --without-default-devices, not --without-default-features. Compute its default value in Kconfig to obtain the more intuitive behavior. In this case the configure options were undocumented, too. Reviewed-by: Marc-Andr=C3=A9 Lureau Signed-off-by: Paolo Bonzini --- configure | 12 ------------ hw/virtio/Kconfig | 5 +++++ meson.build | 1 - 3 files changed, 5 insertions(+), 13 deletions(-) diff --git a/configure b/configure index d268a9cf49..9a83d64c9d 100755 --- a/configure +++ b/configure @@ -286,7 +286,6 @@ vhost_kernel=3D"$default_feature" vhost_net=3D"$default_feature" vhost_crypto=3D"$default_feature" vhost_user=3D"no" -vhost_user_fs=3D"$default_feature" vhost_vdpa=3D"$default_feature" debug_tcg=3D"no" sanitizers=3D"no" @@ -873,10 +872,6 @@ for opt do ;; --enable-vhost-crypto) vhost_crypto=3D"yes" ;; - --disable-vhost-user-fs) vhost_user_fs=3D"no" - ;; - --enable-vhost-user-fs) vhost_user_fs=3D"yes" - ;; --disable-zlib-test) ;; --disable-virtio-blk-data-plane|--enable-virtio-blk-data-plane) @@ -1537,10 +1532,6 @@ test "$vhost_crypto" =3D "" && vhost_crypto=3D$vhost= _user if test "$vhost_crypto" =3D "yes" && test "$vhost_user" =3D "no"; then error_exit "--enable-vhost-crypto requires --enable-vhost-user" fi -test "$vhost_user_fs" =3D "" && vhost_user_fs=3D$vhost_user -if test "$vhost_user_fs" =3D "yes" && test "$vhost_user" =3D "no"; then - error_exit "--enable-vhost-user-fs requires --enable-vhost-user" -fi =20 # OR the vhost-kernel, vhost-vdpa and vhost-user values for simplicity if test "$vhost_net" =3D ""; then @@ -2089,9 +2080,6 @@ fi if test "$vhost_vdpa" =3D "yes" ; then echo "CONFIG_VHOST_VDPA=3Dy" >> $config_host_mak fi -if test "$vhost_user_fs" =3D "yes" ; then - echo "CONFIG_VHOST_USER_FS=3Dy" >> $config_host_mak -fi =20 # XXX: suppress that if [ "$bsd" =3D "yes" ] ; then diff --git a/hw/virtio/Kconfig b/hw/virtio/Kconfig index b642ae1081..f8e235f814 100644 --- a/hw/virtio/Kconfig +++ b/hw/virtio/Kconfig @@ -78,3 +78,8 @@ config VHOST_USER_RNG bool default y depends on VIRTIO && VHOST_USER + +config VHOST_USER_FS + bool + default y + depends on VIRTIO && VHOST_USER diff --git a/meson.build b/meson.build index db585832a4..53654fc08e 100644 --- a/meson.build +++ b/meson.build @@ -3692,7 +3692,6 @@ summary_info +=3D {'vhost-net support': config_host.h= as_key('CONFIG_VHOST_NET')} summary_info +=3D {'vhost-crypto support': config_host.has_key('CONFIG_VHO= ST_CRYPTO')} summary_info +=3D {'vhost-user support': config_host.has_key('CONFIG_VHOST= _USER')} 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 {'build guest agent': have_ga} summary(summary_info, bool_yn: true, section: 'Configurable features') --=20 2.35.1 From nobody Sat May 4 20:14:55 2024 Delivered-To: importer2@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer2=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1651246752605366.50121909108884; Fri, 29 Apr 2022 08:39:12 -0700 (PDT) Received: from localhost ([::1]:58138 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nkSi7-0005HU-Fb for importer2@patchew.org; Fri, 29 Apr 2022 11:39:11 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:44288) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nkST8-0002RQ-NB for qemu-devel@nongnu.org; Fri, 29 Apr 2022 11:23:43 -0400 Received: from mail-ej1-x62f.google.com ([2a00:1450:4864:20::62f]:34713) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nkSSz-0006BK-Dm for qemu-devel@nongnu.org; Fri, 29 Apr 2022 11:23:41 -0400 Received: by mail-ej1-x62f.google.com with SMTP id g6so16131457ejw.1 for ; Fri, 29 Apr 2022 08:23:32 -0700 (PDT) Received: from avogadro.redhat.com ([2001:b07:6468:f312:1c09:f536:3de6:228c]) by smtp.gmail.com with ESMTPSA id w25-20020a170907271900b006f3ef214dd6sm736395ejk.60.2022.04.29.08.23.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 29 Apr 2022 08:23:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=MoXDJley6M6J8tvhtFK+iWMtfYto0nsDkqrlcnW/QnQ=; b=ZeYyLBADQqmmKMvzYdRpPBVzEi1Tu6a7xf0SLGBt2B7tRfN9m49cgyA777nY6yapMb XpOU80/u3enB7cMhGV91GfIcazoLUwSyYmtNTUAYPr+WPm1Se7WRQEbVIvxgzx6zzp9E LQ+fpmNjr1tiNmcysvEzS0gkbuQNI+nhGBT3XSHeVIHLVobe1IwhBeKCXgZE/C2OCCNL 8LC9dsXjSEnWpSUDRLR3cQS5H1Sx9m3uKNzRRodQLUtn8du2QJQ7DXWWyWyyEdzjuLiV 86RIRxz9OhTX6PMNS+b7y12xgzKjI7uIze03u0Y9/hSPkadUT97tE3l21qaSGUSYkjnw SGjA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=MoXDJley6M6J8tvhtFK+iWMtfYto0nsDkqrlcnW/QnQ=; b=lK/O9Rq1v26aSNGr0hOJf9DmS/gi58UebGburOj9N0zxS3S/pXe6k+FMqIdUwsUwfv ho0DcfN57AoypmSEiBFqTvxyHlVT+dx9th/Y1LFd98PDvGf4wMWXToy1FJ3+2eL2wniR pq9AbgpbIr5ar9wc7QJVo4iSvF0Nb8T33cMVm1Dyj9pxZZ1iHRNT9EX/KK3Yhs7b4P7V mf8WGtmItAyPJNt4bJZNazfToP1FtjWJXYc0odEWWtzAIly7sTjaf/MAECWTGYto1x/o aHOa1lWeZsn7oou0rMs0ppetpxKpUgMtDsSMGG4E8UR5T1P6bxV4NvZNkHV8YhcXvv7j 7+Uw== X-Gm-Message-State: AOAM531fAyUAGFZ6rPc/8XTI1nFPeJyguwDUN9wkpPZ5A9nALCJ3nSdG yoAgopCsOdYpRj+2ATySeFyUOfbzjrEF/A== X-Google-Smtp-Source: ABdhPJzRv9yMCcleoMxgsa1HZLbIW89KXtDBvZXUOVC4UW/jE16NlwsNNTnC1FQQzpjopPuu4FbrYw== X-Received: by 2002:a17:907:3d92:b0:6f3:dd41:c87 with SMTP id he18-20020a1709073d9200b006f3dd410c87mr8420617ejc.38.1651245811845; Fri, 29 Apr 2022 08:23:31 -0700 (PDT) From: Paolo Bonzini To: qemu-devel@nongnu.org Subject: [PULL 22/25] meson: create have_vhost_* variables Date: Fri, 29 Apr 2022 17:23:09 +0200 Message-Id: <20220429152312.335715-23-pbonzini@redhat.com> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220429152312.335715-1-pbonzini@redhat.com> References: <20220429152312.335715-1-pbonzini@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Type: text/plain Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer2=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::62f; envelope-from=paolo.bonzini@gmail.com; helo=mail-ej1-x62f.google.com X-Spam_score_int: -4 X-Spam_score: -0.5 X-Spam_bar: / X-Spam_report: (-0.5 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FORGED_FROMDOMAIN=0.249, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.249, PP_MIME_FAKE_ASCII_TEXT=0.999, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= Errors-To: qemu-devel-bounces+importer2=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZM-MESSAGEID: 1651246754447100001 When using Meson options rather than config-host.h, the "when" clauses have to be changed to if statements (which is not necessarily great, though at least it highlights which parts of the build are per-target and which are not). Do that before moving vhost logic to meson.build, though for now the variables are just based on config-host.mak data. Reviewed-by: Marc-Andr=C3=A9 Lureau Signed-off-by: Paolo Bonzini --- meson.build | 31 ++++++++++++++++++++----------- tests/meson.build | 2 +- tools/meson.build | 2 +- 3 files changed, 22 insertions(+), 13 deletions(-) diff --git a/meson.build b/meson.build index 53654fc08e..4545905360 100644 --- a/meson.build +++ b/meson.build @@ -312,6 +312,15 @@ have_tpm =3D get_option('tpm') \ .require(targetos !=3D 'windows', error_message: 'TPM emulation only ava= ilable on POSIX systems') \ .allowed() =20 +# vhost +have_vhost_user =3D 'CONFIG_VHOST_USER' in config_host +have_vhost_vdpa =3D 'CONFIG_VHOST_VDPA' in config_host +have_vhost_kernel =3D 'CONFIG_VHOST_KERNEL' in config_host +have_vhost_net_user =3D 'CONFIG_VHOST_NET_USER' in config_host +have_vhost_net_vdpa =3D 'CONFIG_VHOST_NET_VDPA' in config_host +have_vhost_net =3D 'CONFIG_VHOST_NET' in config_host +have_vhost_user_crypto =3D 'CONFIG_VHOST_CRYPTO' in config_host + # Target-specific libraries and flags libm =3D cc.find_library('m', required: false) threads =3D dependency('threads') @@ -1442,7 +1451,7 @@ has_statx_mnt_id =3D cc.links(statx_mnt_id_test) have_vhost_user_blk_server =3D get_option('vhost_user_blk_server') \ .require(targetos =3D=3D 'linux', error_message: 'vhost_user_blk_server requires linux') \ - .require('CONFIG_VHOST_USER' in config_host, + .require(have_vhost_user, error_message: 'vhost_user_blk_server requires vhost-user suppo= rt') \ .disable_auto_if(not have_system) \ .allowed() @@ -2296,9 +2305,9 @@ host_kconfig =3D \ (have_ivshmem ? ['CONFIG_IVSHMEM=3Dy'] : []) + \ (opengl.found() ? ['CONFIG_OPENGL=3Dy'] : []) + \ (x11.found() ? ['CONFIG_X11=3Dy'] : []) + \ - ('CONFIG_VHOST_USER' in config_host ? ['CONFIG_VHOST_USER=3Dy'] : []) + \ - ('CONFIG_VHOST_VDPA' in config_host ? ['CONFIG_VHOST_VDPA=3Dy'] : []) + \ - ('CONFIG_VHOST_KERNEL' in config_host ? ['CONFIG_VHOST_KERNEL=3Dy'] : []= ) + \ + (have_vhost_user ? ['CONFIG_VHOST_USER=3Dy'] : []) + \ + (have_vhost_vdpa ? ['CONFIG_VHOST_VDPA=3Dy'] : []) + \ + (have_vhost_kernel ? ['CONFIG_VHOST_KERNEL=3Dy'] : []) + \ (have_virtfs ? ['CONFIG_VIRTFS=3Dy'] : []) + \ ('CONFIG_LINUX' in config_host ? ['CONFIG_LINUX=3Dy'] : []) + \ (have_pvrdma ? ['CONFIG_PVRDMA=3Dy'] : []) + \ @@ -2980,7 +2989,7 @@ if have_system or have_user endif =20 vhost_user =3D not_found -if targetos =3D=3D 'linux' and 'CONFIG_VHOST_USER' in config_host +if targetos =3D=3D 'linux' and have_vhost_user libvhost_user =3D subproject('libvhost-user') vhost_user =3D libvhost_user.get_variable('vhost_user_dep') endif @@ -3561,7 +3570,7 @@ if have_tools dependencies: qemuutil, install: true) =20 - if 'CONFIG_VHOST_USER' in config_host + if have_vhost_user subdir('contrib/vhost-user-blk') subdir('contrib/vhost-user-gpu') subdir('contrib/vhost-user-input') @@ -3687,12 +3696,12 @@ if 'simple' in get_option('trace_backends') endif summary_info +=3D {'D-Bus display': dbus_display} summary_info +=3D {'QOM debugging': get_option('qom_cast_debug')} -summary_info +=3D {'vhost-kernel support': config_host.has_key('CONFIG_VHO= ST_KERNEL')} -summary_info +=3D {'vhost-net support': config_host.has_key('CONFIG_VHOST_= NET')} -summary_info +=3D {'vhost-crypto support': config_host.has_key('CONFIG_VHO= ST_CRYPTO')} -summary_info +=3D {'vhost-user support': config_host.has_key('CONFIG_VHOST= _USER')} +summary_info +=3D {'vhost-kernel support': have_vhost_kernel} +summary_info +=3D {'vhost-net support': have_vhost_net} +summary_info +=3D {'vhost-user support': have_vhost_user} +summary_info +=3D {'vhost-user-crypto support': have_vhost_user_crypto} summary_info +=3D {'vhost-user-blk server support': have_vhost_user_blk_se= rver} -summary_info +=3D {'vhost-vdpa support': config_host.has_key('CONFIG_VHOST= _VDPA')} +summary_info +=3D {'vhost-vdpa support': have_vhost_vdpa} summary_info +=3D {'build guest agent': have_ga} summary(summary_info, bool_yn: true, section: 'Configurable features') =20 diff --git a/tests/meson.build b/tests/meson.build index 4f691e8465..8e318ec513 100644 --- a/tests/meson.build +++ b/tests/meson.build @@ -68,7 +68,7 @@ test_deps =3D { 'test-qht-par': qht_bench, } =20 -if have_tools and 'CONFIG_VHOST_USER' in config_host and 'CONFIG_LINUX' in= config_host +if have_tools and have_vhost_user and 'CONFIG_LINUX' in config_host executable('vhost-user-bridge', sources: files('vhost-user-bridge.c'), dependencies: [qemuutil, vhost_user]) diff --git a/tools/meson.build b/tools/meson.build index 46977af84f..10eb3a043f 100644 --- a/tools/meson.build +++ b/tools/meson.build @@ -3,7 +3,7 @@ have_virtiofsd =3D get_option('virtiofsd') \ error_message: 'virtiofsd requires Linux') \ .require(seccomp.found() and libcap_ng.found(), error_message: 'virtiofsd requires libcap-ng-devel and seccom= p-devel') \ - .require('CONFIG_VHOST_USER' in config_host, + .require(have_vhost_user, error_message: 'virtiofsd needs vhost-user-support') \ .disable_auto_if(not have_tools and not have_system) \ .allowed() --=20 2.35.1 From nobody Sat May 4 20:14:55 2024 Delivered-To: importer2@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer2=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1651246739505448.13717554287143; Fri, 29 Apr 2022 08:38:59 -0700 (PDT) Received: from localhost ([::1]:57046 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nkShu-0004Yf-FM for importer2@patchew.org; Fri, 29 Apr 2022 11:38:58 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:44294) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nkST9-0002RV-3M for qemu-devel@nongnu.org; Fri, 29 Apr 2022 11:23:43 -0400 Received: from mail-ed1-x534.google.com ([2a00:1450:4864:20::534]:40789) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nkST6-0006BV-Td for qemu-devel@nongnu.org; Fri, 29 Apr 2022 11:23:42 -0400 Received: by mail-ed1-x534.google.com with SMTP id p18so9463060edr.7 for ; Fri, 29 Apr 2022 08:23:33 -0700 (PDT) Received: from avogadro.redhat.com ([2001:b07:6468:f312:1c09:f536:3de6:228c]) by smtp.gmail.com with ESMTPSA id w25-20020a170907271900b006f3ef214dd6sm736395ejk.60.2022.04.29.08.23.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 29 Apr 2022 08:23:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=ZzZIa+wMsezUpmbBheVj3PgXH3GAuO1nd48y4UFRh/8=; b=lXjhHOKkp9OOaBlFvWxAa1xtYi3gCjunZ1qMoBdkzy9lrT/8msSG57hOvGsT/WY+yv FEhkNydlIblqTXMJhZcFAEi6sDOvfn7UrYATGThd5ohuhVgabPvBQIbUsC4SxMnyb0Sw VSEDvVWG6m7k94aOU80JUgtT8nq6tHa9NGtT4glEA3SR8g/Hn7b5255toeydn/Q7+QQv eEmi3tw9MrmUl743QuKP7tajk1xgGZwlvDTrcCGbvGsOhrOtSWRrsf1A0tNipJBMhvq2 ui/TdD92KpmcMvUgxnRPvHLiqZD/4B25ywmk1CJ4ufPx6OMSHKXWE9+UsQQdryfP8Zli Bv2A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=ZzZIa+wMsezUpmbBheVj3PgXH3GAuO1nd48y4UFRh/8=; b=VIfs28lhpk225FoBMfOwrvoLMiv/mH+e9jCFYoooG2EK7rfbP5tUpgaN4ygrgRv29V vBEx9Yc9Wr1kWSMx39XQyg6cRs87lZZnVuRxRtvT0sC32JkNnPc/AWJ/X/jdVmzuJdhN 4peAXdqfhQXbcxO4MK6qm211OI558D/YY7LHdtzjjGRQ+ciCK0tNjqRfswjWH+O6nqcI 3uPtKwFpVeLhiI3CE7+82iQwb8tgo5sVD8JuLtNl0QZCA5kdOG00bESje8sWw474xpOR yHPVTqwWa0Mu5AMV1TVT2DvDll5IeLbv7gVYSple68TbfNx8KxDn7t8oiPy9tRWluBCA lxfQ== X-Gm-Message-State: AOAM533tW0bm0RWVRiv5HuyCT5JEymhyxyJhwmAAqjvK6ITPcr82k9DL 36hE0J+yT31E5NqKsxpi3xX2Vez8MQQqaA== X-Google-Smtp-Source: ABdhPJzH2tQyz/rjjdB4qyu+edYtho+R24EnO9lrh/SdNKKOUAxIa7eWgVvsgc6HqiW4FFVl4S1PNw== X-Received: by 2002:a05:6402:2949:b0:425:a52a:28c5 with SMTP id ed9-20020a056402294900b00425a52a28c5mr41446356edb.389.1651245812738; Fri, 29 Apr 2022 08:23:32 -0700 (PDT) From: Paolo Bonzini To: qemu-devel@nongnu.org Subject: [PULL 23/25] meson: use have_vhost_* variables to pick sources Date: Fri, 29 Apr 2022 17:23:10 +0200 Message-Id: <20220429152312.335715-24-pbonzini@redhat.com> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220429152312.335715-1-pbonzini@redhat.com> References: <20220429152312.335715-1-pbonzini@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Type: text/plain Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer2=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::534; envelope-from=paolo.bonzini@gmail.com; helo=mail-ed1-x534.google.com X-Spam_score_int: -4 X-Spam_score: -0.5 X-Spam_bar: / X-Spam_report: (-0.5 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FORGED_FROMDOMAIN=0.249, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.249, PP_MIME_FAKE_ASCII_TEXT=0.999, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= Errors-To: qemu-devel-bounces+importer2=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZM-MESSAGEID: 1651246740381100001 Reviewed-by: Marc-Andr=C3=A9 Lureau Signed-off-by: Paolo Bonzini --- Kconfig.host | 3 --- backends/meson.build | 8 ++++++-- hw/net/meson.build | 8 ++++++-- hw/virtio/Kconfig | 3 --- hw/virtio/meson.build | 25 ++++++++++++++++--------- meson.build | 1 + net/meson.build | 12 +++++++----- tests/qtest/meson.build | 4 +++- 8 files changed, 39 insertions(+), 25 deletions(-) diff --git a/Kconfig.host b/Kconfig.host index 60b9c07b5e..1165c4eacd 100644 --- a/Kconfig.host +++ b/Kconfig.host @@ -22,15 +22,12 @@ config TPM =20 config VHOST_USER bool - select VHOST =20 config VHOST_VDPA bool - select VHOST =20 config VHOST_KERNEL bool - select VHOST =20 config VIRTFS bool diff --git a/backends/meson.build b/backends/meson.build index 535c3ca7dd..b1884a88ec 100644 --- a/backends/meson.build +++ b/backends/meson.build @@ -12,9 +12,13 @@ softmmu_ss.add([files( softmmu_ss.add(when: 'CONFIG_POSIX', if_true: files('rng-random.c')) softmmu_ss.add(when: 'CONFIG_POSIX', if_true: files('hostmem-file.c')) softmmu_ss.add(when: 'CONFIG_LINUX', if_true: files('hostmem-memfd.c')) -softmmu_ss.add(when: ['CONFIG_VHOST_USER', 'CONFIG_VIRTIO'], if_true: file= s('vhost-user.c')) +if have_vhost_user + softmmu_ss.add(when: 'CONFIG_VIRTIO', if_true: files('vhost-user.c')) +endif softmmu_ss.add(when: 'CONFIG_VIRTIO_CRYPTO', if_true: files('cryptodev-vho= st.c')) -softmmu_ss.add(when: ['CONFIG_VIRTIO_CRYPTO', 'CONFIG_VHOST_CRYPTO'], if_t= rue: files('cryptodev-vhost-user.c')) +if have_vhost_user_crypto + softmmu_ss.add(when: 'CONFIG_VIRTIO_CRYPTO', if_true: files('cryptodev-v= host-user.c')) +endif softmmu_ss.add(when: gio, if_true: files('dbus-vmstate.c')) softmmu_ss.add(when: 'CONFIG_SGX', if_true: files('hostmem-epc.c')) =20 diff --git a/hw/net/meson.build b/hw/net/meson.build index 685b75badb..ebac261542 100644 --- a/hw/net/meson.build +++ b/hw/net/meson.build @@ -46,8 +46,12 @@ specific_ss.add(when: 'CONFIG_XILINX_ETHLITE', if_true: = files('xilinx_ethlite.c' softmmu_ss.add(when: 'CONFIG_VIRTIO_NET', if_true: files('net_rx_pkt.c')) specific_ss.add(when: 'CONFIG_VIRTIO_NET', if_true: files('virtio-net.c')) =20 -softmmu_ss.add(when: ['CONFIG_VIRTIO_NET', 'CONFIG_VHOST_NET'], if_true: f= iles('vhost_net.c'), if_false: files('vhost_net-stub.c')) -softmmu_ss.add(when: 'CONFIG_ALL', if_true: files('vhost_net-stub.c')) +if have_vhost_net + softmmu_ss.add(when: 'CONFIG_VIRTIO_NET', if_true: files('vhost_net.c'),= if_false: files('vhost_net-stub.c')) + softmmu_ss.add(when: 'CONFIG_ALL', if_true: files('vhost_net-stub.c')) +else + softmmu_ss.add(files('vhost_net-stub.c')) +endif =20 softmmu_ss.add(when: 'CONFIG_ETSEC', if_true: files( 'fsl_etsec/etsec.c', diff --git a/hw/virtio/Kconfig b/hw/virtio/Kconfig index f8e235f814..e9ecae1f50 100644 --- a/hw/virtio/Kconfig +++ b/hw/virtio/Kconfig @@ -1,6 +1,3 @@ -config VHOST - bool - config VIRTIO bool =20 diff --git a/hw/virtio/meson.build b/hw/virtio/meson.build index f371404b04..7e8877fd64 100644 --- a/hw/virtio/meson.build +++ b/hw/virtio/meson.build @@ -2,18 +2,22 @@ softmmu_virtio_ss =3D ss.source_set() softmmu_virtio_ss.add(files('virtio-bus.c')) softmmu_virtio_ss.add(when: 'CONFIG_VIRTIO_PCI', if_true: files('virtio-pc= i.c')) softmmu_virtio_ss.add(when: 'CONFIG_VIRTIO_MMIO', if_true: files('virtio-m= mio.c')) -softmmu_virtio_ss.add(when: 'CONFIG_VHOST', if_false: files('vhost-stub.c'= )) - -softmmu_ss.add_all(when: 'CONFIG_VIRTIO', if_true: softmmu_virtio_ss) -softmmu_ss.add(when: 'CONFIG_VIRTIO', if_false: files('vhost-stub.c')) - -softmmu_ss.add(when: 'CONFIG_ALL', if_true: files('vhost-stub.c')) =20 virtio_ss =3D ss.source_set() virtio_ss.add(files('virtio.c')) -virtio_ss.add(when: 'CONFIG_VHOST', if_true: files('vhost.c', 'vhost-backe= nd.c', 'vhost-iova-tree.c')) -virtio_ss.add(when: 'CONFIG_VHOST_USER', if_true: files('vhost-user.c')) -virtio_ss.add(when: 'CONFIG_VHOST_VDPA', if_true: files('vhost-shadow-virt= queue.c', 'vhost-vdpa.c')) + +if have_vhost + virtio_ss.add(files('vhost.c', 'vhost-backend.c', 'vhost-iova-tree.c')) + if have_vhost_user + virtio_ss.add(files('vhost-user.c')) + endif + if have_vhost_vdpa + virtio_ss.add(files('vhost-vdpa.c', 'vhost-shadow-virtqueue.c')) + endif +else + softmmu_virtio_ss.add(files('vhost-stub.c')) +endif + virtio_ss.add(when: 'CONFIG_VIRTIO_BALLOON', if_true: files('virtio-balloo= n.c')) virtio_ss.add(when: 'CONFIG_VIRTIO_CRYPTO', if_true: files('virtio-crypto.= c')) virtio_ss.add(when: 'CONFIG_VHOST_USER_FS', if_true: files('vhost-user-fs.= c')) @@ -54,3 +58,6 @@ virtio_pci_ss.add(when: 'CONFIG_VIRTIO_MEM', if_true: fil= es('virtio-mem-pci.c')) virtio_ss.add_all(when: 'CONFIG_VIRTIO_PCI', if_true: virtio_pci_ss) =20 specific_ss.add_all(when: 'CONFIG_VIRTIO', if_true: virtio_ss) +softmmu_ss.add_all(when: 'CONFIG_VIRTIO', if_true: softmmu_virtio_ss) +softmmu_ss.add(when: 'CONFIG_VIRTIO', if_false: files('vhost-stub.c')) +softmmu_ss.add(when: 'CONFIG_ALL', if_true: files('vhost-stub.c')) diff --git a/meson.build b/meson.build index 4545905360..9486270e8a 100644 --- a/meson.build +++ b/meson.build @@ -319,6 +319,7 @@ have_vhost_kernel =3D 'CONFIG_VHOST_KERNEL' in config_h= ost have_vhost_net_user =3D 'CONFIG_VHOST_NET_USER' in config_host have_vhost_net_vdpa =3D 'CONFIG_VHOST_NET_VDPA' in config_host have_vhost_net =3D 'CONFIG_VHOST_NET' in config_host +have_vhost =3D have_vhost_user or have_vhost_vdpa or have_vhost_kernel have_vhost_user_crypto =3D 'CONFIG_VHOST_CRYPTO' in config_host =20 # Target-specific libraries and flags diff --git a/net/meson.build b/net/meson.build index 847bc2ac85..c965e83b26 100644 --- a/net/meson.build +++ b/net/meson.build @@ -26,10 +26,10 @@ softmmu_ss.add(when: vde, if_true: files('vde.c')) if have_netmap softmmu_ss.add(files('netmap.c')) endif -vhost_user_ss =3D ss.source_set() -vhost_user_ss.add(when: 'CONFIG_VIRTIO_NET', if_true: files('vhost-user.c'= ), if_false: files('vhost-user-stub.c')) -softmmu_ss.add_all(when: 'CONFIG_VHOST_NET_USER', if_true: vhost_user_ss) -softmmu_ss.add(when: 'CONFIG_ALL', if_true: files('vhost-user-stub.c')) +if have_vhost_net_user + softmmu_ss.add(when: 'CONFIG_VIRTIO_NET', if_true: files('vhost-user.c')= , if_false: files('vhost-user-stub.c')) + softmmu_ss.add(when: 'CONFIG_ALL', if_true: files('vhost-user-stub.c')) +endif =20 softmmu_ss.add(when: 'CONFIG_LINUX', if_true: files('tap-linux.c')) softmmu_ss.add(when: 'CONFIG_BSD', if_true: files('tap-bsd.c')) @@ -40,6 +40,8 @@ if not config_host.has_key('CONFIG_LINUX') and not config= _host.has_key('CONFIG_B endif softmmu_ss.add(when: 'CONFIG_POSIX', if_true: files(tap_posix)) softmmu_ss.add(when: 'CONFIG_WIN32', if_true: files('tap-win32.c')) -softmmu_ss.add(when: 'CONFIG_VHOST_NET_VDPA', if_true: files('vhost-vdpa.c= ')) +if have_vhost_net_vdpa + softmmu_ss.add(files('vhost-vdpa.c')) +endif =20 subdir('can') diff --git a/tests/qtest/meson.build b/tests/qtest/meson.build index 6b9807c183..ca12b313e1 100644 --- a/tests/qtest/meson.build +++ b/tests/qtest/meson.build @@ -263,7 +263,9 @@ qos_test_ss.add( if have_virtfs qos_test_ss.add(files('virtio-9p-test.c')) endif -qos_test_ss.add(when: 'CONFIG_VHOST_USER', if_true: files('vhost-user-test= .c')) +if have_vhost_user + qos_test_ss.add(files('vhost-user-test.c')) +endif if have_tools and have_vhost_user_blk_server qos_test_ss.add(files('vhost-user-blk-test.c')) endif --=20 2.35.1 From nobody Sat May 4 20:14:55 2024 Delivered-To: importer2@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer2=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1651248682981799.5283502596382; Fri, 29 Apr 2022 09:11:22 -0700 (PDT) Received: from localhost ([::1]:53780 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nkTDF-0000ew-Rf for importer2@patchew.org; Fri, 29 Apr 2022 12:11:21 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:44312) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nkSTA-0002SN-4g for qemu-devel@nongnu.org; Fri, 29 Apr 2022 11:23:44 -0400 Received: from mail-ej1-x62c.google.com ([2a00:1450:4864:20::62c]:36659) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nkST6-0006Bb-U9 for qemu-devel@nongnu.org; Fri, 29 Apr 2022 11:23:43 -0400 Received: by mail-ej1-x62c.google.com with SMTP id k23so16121200ejd.3 for ; Fri, 29 Apr 2022 08:23:34 -0700 (PDT) Received: from avogadro.redhat.com ([2001:b07:6468:f312:1c09:f536:3de6:228c]) by smtp.gmail.com with ESMTPSA id w25-20020a170907271900b006f3ef214dd6sm736395ejk.60.2022.04.29.08.23.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 29 Apr 2022 08:23:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=91hie4DGY5PF2mmBBVjDRzJ96G5yq1KJLi/xI/cOLd0=; b=QXkrhsEyxheukVWFVNeqyz4BH346AKFFFgCMVSLSVWbXkE6T7aiPRzc4Kdc0J/CYB8 Ry+wpQCq/7a4/wRl1fnUkEmABo9iczr/1U+NNF5ejTc1fL8cNRbtoz82OUDZ+YBhCsg1 hMYXv/QiUFEBGVhVZYcUNQa9yjCznHgJsEGQFemWNIWRWIWm27GYEkgIjHXVQYgpbhAR S+UFahlTj+Ua8+ZmMdkKTiWdnBcC9HgF/atxNdsDHr8ivF9MiJM/fiQLJBY50it9EOXL KE0pTydcNcHdWer++zAJLLAap2MpJWxl0Ge374JX30xkWx4ggYPxQlA85dCmfMFDviy7 qP/Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=91hie4DGY5PF2mmBBVjDRzJ96G5yq1KJLi/xI/cOLd0=; b=b/F9uXrZF43rUfCCSmedozSOobSY8dh/T7OHleWQF1rsChpVyfj1K7E4W1iZ3o0Oa6 ETumT/Vy4mjJM/8ESacfj1vX+OubAhz0V+fAbT0bHlsN/w7k8rlqXEWQxjq36bXPxAwZ KGssOXu5TZoTIxscl1gYWmJGj3O2f7H7FsyOoiAXC9aealFrQXwo3mjIsICKkg8vjveK ZFcnQnp6lkNp1mkgDCOSk1HSvRtZOCRayNQwNO03AebnpK7dh8zVPYYsr4zgQtBP8Se2 PLrMoGjK99oHFiQ6bfF4Ws6DBsrs4Itx+cQlwvxhsBnsQYUSktjMXiz7Zn015TL6V7CD MWnw== X-Gm-Message-State: AOAM531AyYDNrJrlsdEc7KRJUpvW58ZNe5SSvdzd5tai0wSNaAc9TwOX N/JmfsJJotF3o/063oWYLvMeDpXWJgaWAw== X-Google-Smtp-Source: ABdhPJy6djDvTTGd1VtVSw/R+6EUq6X+0HHTqxn+mONdfnsrOnnwaZo7mEVdgfLlAfldU8AZaMWX9g== X-Received: by 2002:a17:907:2ce2:b0:6f3:e531:880a with SMTP id hz2-20020a1709072ce200b006f3e531880amr7009844ejc.43.1651245813438; Fri, 29 Apr 2022 08:23:33 -0700 (PDT) From: Paolo Bonzini To: qemu-devel@nongnu.org Subject: [PULL 24/25] configure, meson: move vhost options to Meson Date: Fri, 29 Apr 2022 17:23:11 +0200 Message-Id: <20220429152312.335715-25-pbonzini@redhat.com> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220429152312.335715-1-pbonzini@redhat.com> References: <20220429152312.335715-1-pbonzini@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Type: text/plain Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer2=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::62c; envelope-from=paolo.bonzini@gmail.com; helo=mail-ej1-x62c.google.com X-Spam_score_int: -4 X-Spam_score: -0.5 X-Spam_bar: / X-Spam_report: (-0.5 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FORGED_FROMDOMAIN=0.249, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.249, PP_MIME_FAKE_ASCII_TEXT=0.999, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= Errors-To: qemu-devel-bounces+importer2=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZM-MESSAGEID: 1651248683465100003 Finish the conversion by moving all the definitions and the constraint checks to meson_options.txt and meson.build respectively. Reviewed-by: Marc-Andr=C3=A9 Lureau Signed-off-by: Paolo Bonzini --- configure | 82 ----------------------------------- meson.build | 33 +++++++++++--- meson_options.txt | 10 +++++ scripts/meson-buildoptions.sh | 15 +++++++ 4 files changed, 51 insertions(+), 89 deletions(-) diff --git a/configure b/configure index 9a83d64c9d..e77b29b093 100755 --- a/configure +++ b/configure @@ -282,11 +282,6 @@ EXTRA_CXXFLAGS=3D"" EXTRA_OBJCFLAGS=3D"" EXTRA_LDFLAGS=3D"" =20 -vhost_kernel=3D"$default_feature" -vhost_net=3D"$default_feature" -vhost_crypto=3D"$default_feature" -vhost_user=3D"no" -vhost_vdpa=3D"$default_feature" debug_tcg=3D"no" sanitizers=3D"no" tsan=3D"no" @@ -527,7 +522,6 @@ haiku) ;; linux) linux=3D"yes" - vhost_user=3D${default_feature:-yes} ;; esac =20 @@ -864,14 +858,6 @@ for opt do ;; --with-coroutine=3D*) coroutine=3D"$optarg" ;; - --disable-vhost-net) vhost_net=3D"no" - ;; - --enable-vhost-net) vhost_net=3D"yes" - ;; - --disable-vhost-crypto) vhost_crypto=3D"no" - ;; - --enable-vhost-crypto) vhost_crypto=3D"yes" - ;; --disable-zlib-test) ;; --disable-virtio-blk-data-plane|--enable-virtio-blk-data-plane) @@ -883,18 +869,6 @@ for opt do --enable-uuid|--disable-uuid) echo "$0: $opt is obsolete, UUID support is always built" >&2 ;; - --disable-vhost-user) vhost_user=3D"no" - ;; - --enable-vhost-user) vhost_user=3D"yes" - ;; - --disable-vhost-vdpa) vhost_vdpa=3D"no" - ;; - --enable-vhost-vdpa) vhost_vdpa=3D"yes" - ;; - --disable-vhost-kernel) vhost_kernel=3D"no" - ;; - --enable-vhost-kernel) vhost_kernel=3D"yes" - ;; --disable-capstone) capstone=3D"disabled" ;; --enable-capstone) capstone=3D"enabled" @@ -1093,11 +1067,6 @@ cat << EOF debug-info debugging information safe-stack SafeStack Stack Smash Protection. Depends on clang/llvm >=3D 3.7 and requires coroutine backend ucont= ext. - vhost-net vhost-net kernel acceleration support - vhost-crypto vhost-user-crypto backend support - vhost-kernel vhost kernel backend support - vhost-user vhost-user backend support - vhost-vdpa vhost-vdpa kernel backend support =20 NOTE: The object files are built at the place where configure is launched EOF @@ -1511,35 +1480,6 @@ else exit 1 fi =20 -######################################### -# vhost interdependencies and host support - -# vhost backends -if test "$vhost_user" =3D "yes" && test "$mingw32" =3D "yes"; then - error_exit "vhost-user is not available on Windows" -fi -test "$vhost_vdpa" =3D "" && vhost_vdpa=3D$linux -if test "$vhost_vdpa" =3D "yes" && test "$linux" !=3D "yes"; then - error_exit "vhost-vdpa is only available on Linux" -fi -test "$vhost_kernel" =3D "" && vhost_kernel=3D$linux -if test "$vhost_kernel" =3D "yes" && test "$linux" !=3D "yes"; then - error_exit "vhost-kernel is only available on Linux" -fi - -# vhost-user backends -test "$vhost_crypto" =3D "" && vhost_crypto=3D$vhost_user -if test "$vhost_crypto" =3D "yes" && test "$vhost_user" =3D "no"; then - error_exit "--enable-vhost-crypto requires --enable-vhost-user" -fi - -# OR the vhost-kernel, vhost-vdpa and vhost-user values for simplicity -if test "$vhost_net" =3D ""; then - test "$vhost_user" =3D "yes" && vhost_net=3Dyes - test "$vhost_vdpa" =3D "yes" && vhost_net=3Dyes - test "$vhost_kernel" =3D "yes" && vhost_net=3Dyes -fi - ########################################## # pkg-config probe =20 @@ -2059,28 +1999,6 @@ if test "$modules" =3D "yes"; then echo "CONFIG_MODULES=3Dy" >> $config_host_mak fi =20 -if test "$vhost_net" =3D "yes" ; then - echo "CONFIG_VHOST_NET=3Dy" >> $config_host_mak -fi -if test "$vhost_user" =3D "yes" ; then - echo "CONFIG_VHOST_NET_USER=3Dy" >> $config_host_mak -fi -if test "$vhost_vdpa" =3D "yes" ; then - echo "CONFIG_VHOST_NET_VDPA=3Dy" >> $config_host_mak -fi -if test "$vhost_crypto" =3D "yes" ; then - echo "CONFIG_VHOST_CRYPTO=3Dy" >> $config_host_mak -fi -if test "$vhost_kernel" =3D "yes" ; then - echo "CONFIG_VHOST_KERNEL=3Dy" >> $config_host_mak -fi -if test "$vhost_user" =3D "yes" ; then - echo "CONFIG_VHOST_USER=3Dy" >> $config_host_mak -fi -if test "$vhost_vdpa" =3D "yes" ; then - echo "CONFIG_VHOST_VDPA=3Dy" >> $config_host_mak -fi - # XXX: suppress that if [ "$bsd" =3D "yes" ] ; then echo "CONFIG_BSD=3Dy" >> $config_host_mak diff --git a/meson.build b/meson.build index 9486270e8a..f6ccc98b4f 100644 --- a/meson.build +++ b/meson.build @@ -313,14 +313,26 @@ have_tpm =3D get_option('tpm') \ .allowed() =20 # vhost -have_vhost_user =3D 'CONFIG_VHOST_USER' in config_host -have_vhost_vdpa =3D 'CONFIG_VHOST_VDPA' in config_host -have_vhost_kernel =3D 'CONFIG_VHOST_KERNEL' in config_host -have_vhost_net_user =3D 'CONFIG_VHOST_NET_USER' in config_host -have_vhost_net_vdpa =3D 'CONFIG_VHOST_NET_VDPA' in config_host -have_vhost_net =3D 'CONFIG_VHOST_NET' in config_host +have_vhost_user =3D get_option('vhost_user') \ + .disable_auto_if(targetos !=3D 'linux') \ + .require(targetos !=3D 'windows', + error_message: 'vhost-user is not available on Windows').allowe= d() +have_vhost_vdpa =3D get_option('vhost_vdpa') \ + .require(targetos =3D=3D 'linux', + error_message: 'vhost-vdpa is only available on Linux').allowed= () +have_vhost_kernel =3D get_option('vhost_kernel') \ + .require(targetos =3D=3D 'linux', + error_message: 'vhost-kernel is only available on Linux').allow= ed() +have_vhost_user_crypto =3D get_option('vhost_crypto') \ + .require(have_vhost_user, + error_message: 'vhost-crypto requires vhost-user to be enabled'= ).allowed() + have_vhost =3D have_vhost_user or have_vhost_vdpa or have_vhost_kernel -have_vhost_user_crypto =3D 'CONFIG_VHOST_CRYPTO' in config_host + +have_vhost_net_user =3D have_vhost_user and get_option('vhost_net').allowe= d() +have_vhost_net_vdpa =3D have_vhost_vdpa and get_option('vhost_net').allowe= d() +have_vhost_net_kernel =3D have_vhost_kernel and get_option('vhost_net').al= lowed() +have_vhost_net =3D have_vhost_net_kernel or have_vhost_net_user or have_vh= ost_net_vdpa =20 # Target-specific libraries and flags libm =3D cc.find_library('m', required: false) @@ -1711,6 +1723,13 @@ config_host_data.set('CONFIG_SNAPPY', snappy.found()) config_host_data.set('CONFIG_TPM', have_tpm) config_host_data.set('CONFIG_USB_LIBUSB', libusb.found()) config_host_data.set('CONFIG_VDE', vde.found()) +config_host_data.set('CONFIG_VHOST_NET', have_vhost_net) +config_host_data.set('CONFIG_VHOST_NET_USER', have_vhost_net_user) +config_host_data.set('CONFIG_VHOST_NET_VDPA', have_vhost_net_vdpa) +config_host_data.set('CONFIG_VHOST_KERNEL', have_vhost_kernel) +config_host_data.set('CONFIG_VHOST_USER', have_vhost_user) +config_host_data.set('CONFIG_VHOST_CRYPTO', have_vhost_user_crypto) +config_host_data.set('CONFIG_VHOST_VDPA', have_vhost_vdpa) config_host_data.set('CONFIG_VHOST_USER_BLK_SERVER', have_vhost_user_blk_s= erver) config_host_data.set('CONFIG_PNG', png.found()) config_host_data.set('CONFIG_VNC', vnc.found()) diff --git a/meson_options.txt b/meson_options.txt index 35f5a72507..29c6b90cec 100644 --- a/meson_options.txt +++ b/meson_options.txt @@ -235,6 +235,16 @@ option('oss', type: 'feature', value: 'auto', option('pa', type: 'feature', value: 'auto', description: 'PulseAudio sound support') =20 +option('vhost_kernel', type: 'feature', value: 'auto', + description: 'vhost kernel backend support') +option('vhost_net', type: 'feature', value: 'auto', + description: 'vhost-net kernel acceleration support') +option('vhost_user', type: 'feature', value: 'auto', + description: 'vhost-user backend support') +option('vhost_crypto', type: 'feature', value: 'auto', + description: 'vhost-user crypto backend support') +option('vhost_vdpa', type: 'feature', value: 'auto', + description: 'vhost-vdpa kernel backend support') option('vhost_user_blk_server', type: 'feature', value: 'auto', description: 'build vhost-user-blk server') option('virtfs', type: 'feature', value: 'auto', diff --git a/scripts/meson-buildoptions.sh b/scripts/meson-buildoptions.sh index 4b0770a9e0..5d2172bfb4 100644 --- a/scripts/meson-buildoptions.sh +++ b/scripts/meson-buildoptions.sh @@ -154,8 +154,13 @@ meson_options_help() { printf "%s\n" ' usb-redir libusbredir support' printf "%s\n" ' vde vde network backend support' printf "%s\n" ' vdi vdi image format support' + printf "%s\n" ' vhost-crypto vhost-user crypto backend support' + printf "%s\n" ' vhost-kernel vhost kernel backend support' + printf "%s\n" ' vhost-net vhost-net kernel acceleration support' + printf "%s\n" ' vhost-user vhost-user backend support' printf "%s\n" ' vhost-user-blk-server' printf "%s\n" ' build vhost-user-blk server' + printf "%s\n" ' vhost-vdpa vhost-vdpa kernel backend support' printf "%s\n" ' virglrenderer virgl rendering support' printf "%s\n" ' virtfs virtio-9p support' printf "%s\n" ' virtiofsd build virtiofs daemon (virtiofsd)' @@ -409,8 +414,18 @@ _meson_option_parse() { --disable-vde) printf "%s" -Dvde=3Ddisabled ;; --enable-vdi) printf "%s" -Dvdi=3Denabled ;; --disable-vdi) printf "%s" -Dvdi=3Ddisabled ;; + --enable-vhost-crypto) printf "%s" -Dvhost_crypto=3Denabled ;; + --disable-vhost-crypto) printf "%s" -Dvhost_crypto=3Ddisabled ;; + --enable-vhost-kernel) printf "%s" -Dvhost_kernel=3Denabled ;; + --disable-vhost-kernel) printf "%s" -Dvhost_kernel=3Ddisabled ;; + --enable-vhost-net) printf "%s" -Dvhost_net=3Denabled ;; + --disable-vhost-net) printf "%s" -Dvhost_net=3Ddisabled ;; + --enable-vhost-user) printf "%s" -Dvhost_user=3Denabled ;; + --disable-vhost-user) printf "%s" -Dvhost_user=3Ddisabled ;; --enable-vhost-user-blk-server) printf "%s" -Dvhost_user_blk_server=3D= enabled ;; --disable-vhost-user-blk-server) printf "%s" -Dvhost_user_blk_server= =3Ddisabled ;; + --enable-vhost-vdpa) printf "%s" -Dvhost_vdpa=3Denabled ;; + --disable-vhost-vdpa) printf "%s" -Dvhost_vdpa=3Ddisabled ;; --enable-virglrenderer) printf "%s" -Dvirglrenderer=3Denabled ;; --disable-virglrenderer) printf "%s" -Dvirglrenderer=3Ddisabled ;; --enable-virtfs) printf "%s" -Dvirtfs=3Denabled ;; --=20 2.35.1 From nobody Sat May 4 20:14:55 2024 Delivered-To: importer2@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer2=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1651246869173208.41152024708265; Fri, 29 Apr 2022 08:41:09 -0700 (PDT) Received: from localhost ([::1]:38486 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nkSjz-0002Yy-Lh for importer2@patchew.org; Fri, 29 Apr 2022 11:41:07 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:44310) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nkSTA-0002SB-21 for qemu-devel@nongnu.org; Fri, 29 Apr 2022 11:23:44 -0400 Received: from mail-ed1-x534.google.com ([2a00:1450:4864:20::534]:38701) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nkST7-0006Be-1M for qemu-devel@nongnu.org; Fri, 29 Apr 2022 11:23:43 -0400 Received: by mail-ed1-x534.google.com with SMTP id z99so9467581ede.5 for ; Fri, 29 Apr 2022 08:23:35 -0700 (PDT) Received: from avogadro.redhat.com ([2001:b07:6468:f312:1c09:f536:3de6:228c]) by smtp.gmail.com with ESMTPSA id w25-20020a170907271900b006f3ef214dd6sm736395ejk.60.2022.04.29.08.23.33 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 29 Apr 2022 08:23:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=sender:from:to:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=fsqERVld/Vgbjv/4b6J7clpMk83aXIOS3f77wbhSlQ0=; b=kbKxR095oUYab7R6g4q3jh3EzhScaTbF1nXSZ/qvN2YwIu/wFcUY7r1fUQ3liDOxkE E3ljJvFlLy8kEkb/W0yTDjdacZkXJ6KE16M/CXElyLAokPRaCZmg71dFFqYx4dfNpD4t 2jwSEKLgNypvcr51Qd2xG1KP7YGFjj8FK8nSWrm1wsfmGHDriydLdI97w7NNF5uowuuf 6w3aOV6MjZRylU6vlXvImqAPus4pgbcosWgMK5qPNUu3AraKBUcdd8by0wLREYda63Q+ 3aPaTrBzfM4BsvOuJPacrzUm1UNBCunrg5d/sSQ6NNP+RM41kFnmmgeq1EbLH/lB2XQQ zGZg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:sender:from:to:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=fsqERVld/Vgbjv/4b6J7clpMk83aXIOS3f77wbhSlQ0=; b=mteoGh89MOhOuSjfqSb3yCMRZs7W/r5mC2gQYVrhhCPMtY0z/bLFX/HLtQJBT62dmx dU4eVR2JAeOpHcQZ534sBHz/U4mhR8u63SLo+xLwgkjJvJCawyRqIjzSweNr+AR8FXIa nlPaP0OoCFysm6NQw5o+yHvMYiZw68mxZyBXq5ej8dkbAMWrscbzEzHdRZJbZVGOGdCq ZU7XupWU0GKqe1g8gZoHB8hhj3oSOaSaWu3oYVdcTOvVE8MvvyaMuQTmg2dPHqwceeWn QteBzr/XTTS16fJr5iG27mIe7p0x/Mz/vhd8OLE8Ybet99wRzopdXQLGBgPwdpHq2yX1 WCRA== X-Gm-Message-State: AOAM531Jqgsz7r6IUtNWHwg5/GLqjSM9+qgQkB1EbbBn2ddR2INDMQ6r jtcSGLpVCzasCELytQEbgMKQeLIAhMKLqA== X-Google-Smtp-Source: ABdhPJzsisWNgu3+r2kQ2e3lCnN9zYVhmXYCIkMHjGdlFeIkj9/1IO9Ic4T1wnkZdFuUypPQVCkzaQ== X-Received: by 2002:a05:6402:516:b0:425:c896:b1b8 with SMTP id m22-20020a056402051600b00425c896b1b8mr35923485edv.212.1651245814117; Fri, 29 Apr 2022 08:23:34 -0700 (PDT) From: Paolo Bonzini To: qemu-devel@nongnu.org Subject: [PULL 25/25] pc: remove -soundhw pcspk Date: Fri, 29 Apr 2022 17:23:12 +0200 Message-Id: <20220429152312.335715-26-pbonzini@redhat.com> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220429152312.335715-1-pbonzini@redhat.com> References: <20220429152312.335715-1-pbonzini@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer2=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::534; envelope-from=paolo.bonzini@gmail.com; helo=mail-ed1-x534.google.com X-Spam_score_int: -14 X-Spam_score: -1.5 X-Spam_bar: - X-Spam_report: (-1.5 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FORGED_FROMDOMAIN=0.249, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.249, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer2=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZM-MESSAGEID: 1651246870034100001 Content-Type: text/plain; charset="utf-8" The pcspk device is the only user of the init_isa function, and the only -soundhw option which does not create a new device (it hacks into the PCSpkState by hand). Remove it, since it was deprecated. Signed-off-by: Paolo Bonzini --- hw/audio/pcspk.c | 10 ---------- hw/audio/soundhw.c | 27 ++++----------------------- include/hw/audio/soundhw.h | 3 --- 3 files changed, 4 insertions(+), 36 deletions(-) diff --git a/hw/audio/pcspk.c b/hw/audio/pcspk.c index dfc7ebca4e..daf92a4ce1 100644 --- a/hw/audio/pcspk.c +++ b/hw/audio/pcspk.c @@ -245,18 +245,8 @@ static const TypeInfo pcspk_info =3D { .class_init =3D pcspk_class_initfn, }; =20 -static int pcspk_audio_init_soundhw(ISABus *bus) -{ - PCSpkState *s =3D pcspk_state; - - warn_report("'-soundhw pcspk' is deprecated, " - "please set a backend using '-machine pcspk-audiodev=3D' instead"); - return pcspk_audio_init(s); -} - static void pcspk_register(void) { type_register_static(&pcspk_info); - isa_register_soundhw("pcspk", "PC speaker", pcspk_audio_init_soundhw); } type_init(pcspk_register) diff --git a/hw/audio/soundhw.c b/hw/audio/soundhw.c index 173b674ff5..f7d94d7dfa 100644 --- a/hw/audio/soundhw.c +++ b/hw/audio/soundhw.c @@ -36,26 +36,12 @@ struct soundhw { const char *typename; int enabled; int isa; - union { - int (*init_isa) (ISABus *bus); - int (*init_pci) (PCIBus *bus); - } init; + int (*init_pci) (PCIBus *bus); }; =20 static struct soundhw soundhw[9]; static int soundhw_count; =20 -void isa_register_soundhw(const char *name, const char *descr, - int (*init_isa)(ISABus *bus)) -{ - assert(soundhw_count < ARRAY_SIZE(soundhw) - 1); - soundhw[soundhw_count].name =3D name; - soundhw[soundhw_count].descr =3D descr; - soundhw[soundhw_count].isa =3D 1; - soundhw[soundhw_count].init.init_isa =3D init_isa; - soundhw_count++; -} - void pci_register_soundhw(const char *name, const char *descr, int (*init_pci)(PCIBus *bus)) { @@ -63,7 +49,7 @@ void pci_register_soundhw(const char *name, const char *d= escr, soundhw[soundhw_count].name =3D name; soundhw[soundhw_count].descr =3D descr; soundhw[soundhw_count].isa =3D 0; - soundhw[soundhw_count].init.init_pci =3D init_pci; + soundhw[soundhw_count].init_pci =3D init_pci; soundhw_count++; } =20 @@ -158,18 +144,13 @@ void soundhw_init(void) } else { pci_create_simple(pci_bus, -1, c->typename); } - } else if (c->isa) { - if (!isa_bus) { - error_report("ISA bus not available for %s", c->name); - exit(1); - } - c->init.init_isa(isa_bus); } else { + assert(!c->isa); if (!pci_bus) { error_report("PCI bus not available for %s", c->name); exit(1); } - c->init.init_pci(pci_bus); + c->init_pci(pci_bus); } } } diff --git a/include/hw/audio/soundhw.h b/include/hw/audio/soundhw.h index f09a297854..e68685fcda 100644 --- a/include/hw/audio/soundhw.h +++ b/include/hw/audio/soundhw.h @@ -1,9 +1,6 @@ #ifndef HW_SOUNDHW_H #define HW_SOUNDHW_H =20 -void isa_register_soundhw(const char *name, const char *descr, - int (*init_isa)(ISABus *bus)); - void pci_register_soundhw(const char *name, const char *descr, int (*init_pci)(PCIBus *bus)); void deprecated_register_soundhw(const char *name, const char *descr, --=20 2.35.1