From nobody Mon Feb 9 09:42:38 2026 Delivered-To: importer@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+importer=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 1644917704719351.91706653499284; Tue, 15 Feb 2022 01:35:04 -0800 (PST) Received: from localhost ([::1]:33528 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nJuEh-0006dy-OK for importer@patchew.org; Tue, 15 Feb 2022 04:35:03 -0500 Received: from eggs.gnu.org ([209.51.188.92]:54648) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nJuCD-0003iy-Fb for qemu-devel@nongnu.org; Tue, 15 Feb 2022 04:32:29 -0500 Received: from [2a00:1450:4864:20::62f] (port=33544 helo=mail-ej1-x62f.google.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nJuCB-0008PO-MW for qemu-devel@nongnu.org; Tue, 15 Feb 2022 04:32:29 -0500 Received: by mail-ej1-x62f.google.com with SMTP id vz16so3427150ejb.0 for ; Tue, 15 Feb 2022 01:32:27 -0800 (PST) Received: from avogadro.lan ([2001:b07:6468:f312:c8dd:75d4:99ab:290a]) by smtp.gmail.com with ESMTPSA id m4sm6634308ejl.45.2022.02.15.01.32.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 15 Feb 2022 01:32:25 -0800 (PST) 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=cZrXMB5tJRusd/ppAGIci5Tvar4CQ/zDlx5H3rnz1Yg=; b=DIy69pqNH7B3VrU6JzWrWyyZws8gJ1yCIEPU5B1b4Ul8KIQdmVZT9yodaajXVunzhE F1fd3QfhPSJHaT/DEYWQSr0UHVxBjL/ozTFKZaa6oylRJNNcQCfsf9aGo9r97VxtDMLm giO7T7a2pdwVLVjkppvNrnS9p9lRACPChIpvizyVzqScBlggT6OngIBk1Q9YIDtcnGRj 3cvcJ/T7PJCRZWWSOdU8QAwpWaYIflLpQxmgPDjK8TGXjXBZZThvFn/Xd/jkWjUioUB1 cUl1Hw580f5a3oJRSZyJmaNINDZlkPxla3WyqI7xqkub+2AgZCCnEDBWd20l4KTbpquQ w7JQ== 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=cZrXMB5tJRusd/ppAGIci5Tvar4CQ/zDlx5H3rnz1Yg=; b=QCJzIa7k98Tm/SwXlqjUHfiBLsRLdlKJaNkrsPKhpjCw2Av6CwNe6PD4Cht3az/GIC se+S87Gkgg95y8NSFllvgDXuvyRh3SMm1pS5OiqBf0FiQVtJVe+kLgE/cYepJ4Ik2yT/ H8ewoZJBvvdml10tkCQBHlpoI6C2EXYHYw7KJjqnFFw4BPYqd3MsNe06lTiYvEKbBJAi n3iwTmcYrwXTEq6iPGTMg65hkXMZlr8u46VPbU0/si4DL2pp6DXKyl7PQ6aMjD5Q4nA2 UEP2v2yHI6gxOl5RZ2FVJTfNptmgXNoGc0d70QAAU32mn6ylfUHO4t5ksHU/Ti0Ny6AU 56mA== X-Gm-Message-State: AOAM532IfqyVDS0L4/MYHvAR5+SjhemgE+pKZ9QY4p3H/NBWyHE66zrA AKFpNH5zhbo2GmEyRASDB51Evd0+3TI= X-Google-Smtp-Source: ABdhPJwFVTqLPgO9C9MGinOrzaPdACh36x6EtHDAMtPx3ELjlbKlj4CKDkiD6+rta3tMyVsPx0VOiQ== X-Received: by 2002:a17:906:794c:: with SMTP id l12mr2304432ejo.304.1644917546122; Tue, 15 Feb 2022 01:32:26 -0800 (PST) From: Paolo Bonzini To: qemu-devel@nongnu.org Subject: [PULL 01/30] target/i386: add TCG support for UMIP Date: Tue, 15 Feb 2022 10:31:54 +0100 Message-Id: <20220215093223.110827-2-pbonzini@redhat.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220215093223.110827-1-pbonzini@redhat.com> References: <20220215093223.110827-1-pbonzini@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Host-Lookup-Failed: Reverse DNS lookup failed for 2a00:1450:4864:20::62f (failed) 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+importer=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: 2 X-Spam_score: 0.2 X-Spam_bar: / X-Spam_report: (0.2 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FORGED_FROMDOMAIN=0.25, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.25, PDS_HP_HELO_NORDNS=0.904, RCVD_IN_DNSWL_NONE=-0.0001, RDNS_NONE=0.793, 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: Gareth Webb Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZM-MESSAGEID: 1644917706675100005 Content-Type: text/plain; charset="utf-8" From: Gareth Webb Signed-off-by: Gareth Webb Message-Id: <164425598317.21902.4257759159329756142-1@git.sr.ht> Signed-off-by: Paolo Bonzini --- target/i386/cpu.c | 2 +- target/i386/cpu.h | 4 +++- target/i386/helper.c | 8 +++++++- target/i386/tcg/translate.c | 15 +++++++++++++++ 4 files changed, 26 insertions(+), 3 deletions(-) diff --git a/target/i386/cpu.c b/target/i386/cpu.c index aa9e636800..20639c375a 100644 --- a/target/i386/cpu.c +++ b/target/i386/cpu.c @@ -645,7 +645,7 @@ void x86_cpu_vendor_words2str(char *dst, uint32_t vendo= r1, CPUID_7_0_EBX_HLE, CPUID_7_0_EBX_AVX2, CPUID_7_0_EBX_INVPCID, CPUID_7_0_EBX_RTM, CPUID_7_0_EBX_RDSEED */ -#define TCG_7_0_ECX_FEATURES (CPUID_7_0_ECX_PKU | \ +#define TCG_7_0_ECX_FEATURES (CPUID_7_0_ECX_UMIP | CPUID_7_0_ECX_PKU | \ /* CPUID_7_0_ECX_OSPKE is dynamic */ \ CPUID_7_0_ECX_LA57 | CPUID_7_0_ECX_PKS) #define TCG_7_0_EDX_FEATURES 0 diff --git a/target/i386/cpu.h b/target/i386/cpu.h index 9911d7c871..e69ab5dd78 100644 --- a/target/i386/cpu.h +++ b/target/i386/cpu.h @@ -167,6 +167,7 @@ typedef enum X86Seg { #define HF_IOBPT_SHIFT 24 /* an io breakpoint enabled */ #define HF_MPX_EN_SHIFT 25 /* MPX Enabled (CR4+XCR0+BNDCFGx) */ #define HF_MPX_IU_SHIFT 26 /* BND registers in-use */ +#define HF_UMIP_SHIFT 27 /* CR4.UMIP */ =20 #define HF_CPL_MASK (3 << HF_CPL_SHIFT) #define HF_INHIBIT_IRQ_MASK (1 << HF_INHIBIT_IRQ_SHIFT) @@ -192,6 +193,7 @@ typedef enum X86Seg { #define HF_IOBPT_MASK (1 << HF_IOBPT_SHIFT) #define HF_MPX_EN_MASK (1 << HF_MPX_EN_SHIFT) #define HF_MPX_IU_MASK (1 << HF_MPX_IU_SHIFT) +#define HF_UMIP_MASK (1 << HF_UMIP_SHIFT) =20 /* hflags2 */ =20 @@ -258,7 +260,7 @@ typedef enum X86Seg { (~(target_ulong)(CR4_VME_MASK | CR4_PVI_MASK | CR4_TSD_MASK \ | CR4_DE_MASK | CR4_PSE_MASK | CR4_PAE_MASK \ | CR4_MCE_MASK | CR4_PGE_MASK | CR4_PCE_MASK \ - | CR4_OSFXSR_MASK | CR4_OSXMMEXCPT_MASK |CR4_UMIP_MASK \ + | CR4_OSFXSR_MASK | CR4_OSXMMEXCPT_MASK | CR4_UMIP_MASK \ | CR4_LA57_MASK \ | CR4_FSGSBASE_MASK | CR4_PCIDE_MASK | CR4_OSXSAVE_MASK \ | CR4_SMEP_MASK | CR4_SMAP_MASK | CR4_PKE_MASK | CR4_PKS_M= ASK)) diff --git a/target/i386/helper.c b/target/i386/helper.c index 533b29cb91..a4315048c0 100644 --- a/target/i386/helper.c +++ b/target/i386/helper.c @@ -174,7 +174,7 @@ void cpu_x86_update_cr4(CPUX86State *env, uint32_t new_= cr4) } =20 /* Clear bits we're going to recompute. */ - hflags =3D env->hflags & ~(HF_OSFXSR_MASK | HF_SMAP_MASK); + hflags =3D env->hflags & ~(HF_OSFXSR_MASK | HF_SMAP_MASK | HF_UMIP_MAS= K); =20 /* SSE handling */ if (!(env->features[FEAT_1_EDX] & CPUID_SSE)) { @@ -190,6 +190,12 @@ void cpu_x86_update_cr4(CPUX86State *env, uint32_t new= _cr4) if (new_cr4 & CR4_SMAP_MASK) { hflags |=3D HF_SMAP_MASK; } + if (!(env->features[FEAT_7_0_ECX] & CPUID_7_0_ECX_UMIP)) { + new_cr4 &=3D ~CR4_UMIP_MASK; + } + if (new_cr4 & CR4_UMIP_MASK) { + hflags |=3D HF_UMIP_MASK; + } =20 if (!(env->features[FEAT_7_0_ECX] & CPUID_7_0_ECX_PKU)) { new_cr4 &=3D ~CR4_PKE_MASK; diff --git a/target/i386/tcg/translate.c b/target/i386/tcg/translate.c index 77878cd832..2a94d33742 100644 --- a/target/i386/tcg/translate.c +++ b/target/i386/tcg/translate.c @@ -7382,6 +7382,9 @@ static target_ulong disas_insn(DisasContext *s, CPUSt= ate *cpu) case 0: /* sldt */ if (!PE(s) || VM86(s)) goto illegal_op; + if (s->flags & HF_UMIP_MASK && !check_cpl0(s)) { + break; + } gen_svm_check_intercept(s, SVM_EXIT_LDTR_READ); tcg_gen_ld32u_tl(s->T0, cpu_env, offsetof(CPUX86State, ldt.selector)); @@ -7401,6 +7404,9 @@ static target_ulong disas_insn(DisasContext *s, CPUSt= ate *cpu) case 1: /* str */ if (!PE(s) || VM86(s)) goto illegal_op; + if (s->flags & HF_UMIP_MASK && !check_cpl0(s)) { + break; + } gen_svm_check_intercept(s, SVM_EXIT_TR_READ); tcg_gen_ld32u_tl(s->T0, cpu_env, offsetof(CPUX86State, tr.selector)); @@ -7439,6 +7445,9 @@ static target_ulong disas_insn(DisasContext *s, CPUSt= ate *cpu) modrm =3D x86_ldub_code(env, s); switch (modrm) { CASE_MODRM_MEM_OP(0): /* sgdt */ + if (s->flags & HF_UMIP_MASK && !check_cpl0(s)) { + break; + } gen_svm_check_intercept(s, SVM_EXIT_GDTR_READ); gen_lea_modrm(env, s, modrm); tcg_gen_ld32u_tl(s->T0, @@ -7495,6 +7504,9 @@ static target_ulong disas_insn(DisasContext *s, CPUSt= ate *cpu) break; =20 CASE_MODRM_MEM_OP(1): /* sidt */ + if (s->flags & HF_UMIP_MASK && !check_cpl0(s)) { + break; + } gen_svm_check_intercept(s, SVM_EXIT_IDTR_READ); gen_lea_modrm(env, s, modrm); tcg_gen_ld32u_tl(s->T0, cpu_env, offsetof(CPUX86State, idt.lim= it)); @@ -7670,6 +7682,9 @@ static target_ulong disas_insn(DisasContext *s, CPUSt= ate *cpu) break; =20 CASE_MODRM_OP(4): /* smsw */ + if (s->flags & HF_UMIP_MASK && !check_cpl0(s)) { + break; + } gen_svm_check_intercept(s, SVM_EXIT_READ_CR0); tcg_gen_ld_tl(s->T0, cpu_env, offsetof(CPUX86State, cr[0])); /* --=20 2.34.1 From nobody Mon Feb 9 09:42:38 2026 Delivered-To: importer@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+importer=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 164491774880070.3799428341963; Tue, 15 Feb 2022 01:35:48 -0800 (PST) Received: from localhost ([::1]:36746 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nJuFP-0000Nv-LK for importer@patchew.org; Tue, 15 Feb 2022 04:35:47 -0500 Received: from eggs.gnu.org ([209.51.188.92]:54686) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nJuCE-0003lP-Ty for qemu-devel@nongnu.org; Tue, 15 Feb 2022 04:32:30 -0500 Received: from [2a00:1450:4864:20::52b] (port=35653 helo=mail-ed1-x52b.google.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nJuCC-0008PS-1F for qemu-devel@nongnu.org; Tue, 15 Feb 2022 04:32:30 -0500 Received: by mail-ed1-x52b.google.com with SMTP id f17so31127843edd.2 for ; Tue, 15 Feb 2022 01:32:27 -0800 (PST) Received: from avogadro.lan ([2001:b07:6468:f312:c8dd:75d4:99ab:290a]) by smtp.gmail.com with ESMTPSA id m4sm6634308ejl.45.2022.02.15.01.32.26 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 15 Feb 2022 01:32:26 -0800 (PST) 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=+u0qUIogaWgGcHOtonrPExWgxK2xNivoZXLutbp5yVI=; b=mZVAGrx3FS07JgSa1YmWfT4qbLg1aofA717S5b5YTciblD4FqUILROU/ZV0r+oaXzv kZWIp0YSoLCh1cMsFHAEF0J57xzFN02eRTZr/CXgejr6ZD3pLl/e4RmPrj0jpDyGTY5J AWxw5HqjUGz4ChVg+KpMZvhNUwiW2TnkpXeMClDYOpDXg3jb+IIvyNXHGbUvwdFTJ4rm GL5YqyesL8klsJXkEcAsd55ZF8+xuJ5mnmkJU7uOuibs5jLjmDYdqk1KzKHGeXU0YOQ/ WM4VCQhEtIWPEZzLiCE0e7BceQ50sizp0WNMZwXkJ4r7WWAhanJE4veQXvHSsrOG6qCs +m2g== 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=+u0qUIogaWgGcHOtonrPExWgxK2xNivoZXLutbp5yVI=; b=HAutR+lcRVp2N6XeO7V5mdhxkoocOCRVqQgwdC8c7yATD1hsLXXptkrBkiTcgxlE06 B/wlIRqi5zYUS7eLkrLrtj0GDELFP1PDDLQgLLWUF1nXqQ9i7LPBMzKUnw1WefPtl4YO rYTOUOSOhFfNfcAP/11XTXT9c5K2tQ4ap9NpatEJzJq8vnwLqF3IMgMqsR8KMpVP4NB8 5GmlleKYiX6vVbc7x6UYwQ39h8GmIPUS1q0v96nbzT2UPuWTxih889B9YIo4COvWH7dw hx6PGIXIrB6MjbwXm1a5C7pYtP2o008oRPDdbIKDhqP3mBo7IM67DCG8lGt7dU+dHSRX J8bA== X-Gm-Message-State: AOAM533rDs9+MirPp2WlD/tS4F/CXtBZ3SsAdHu2DmiPu5JMFJb1diuZ TWAqP6DCC+4R4e2T/URa+XsP1Qnb7sw= X-Google-Smtp-Source: ABdhPJyFmf6tvksKpYoB/tb/67a0yrtzb362MTm94Ng4137K2TPelhkgYknt1bP1ZzL+kH4sJFfxVA== X-Received: by 2002:a05:6402:b23:: with SMTP id bo3mr2927610edb.42.1644917546831; Tue, 15 Feb 2022 01:32:26 -0800 (PST) From: Paolo Bonzini To: qemu-devel@nongnu.org Subject: [PULL 02/30] memory: Fix qemu crash on starting dirty log twice with stopped VM Date: Tue, 15 Feb 2022 10:31:55 +0100 Message-Id: <20220215093223.110827-3-pbonzini@redhat.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220215093223.110827-1-pbonzini@redhat.com> References: <20220215093223.110827-1-pbonzini@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Host-Lookup-Failed: Reverse DNS lookup failed for 2a00:1450:4864:20::52b (failed) 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+importer=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: 2 X-Spam_score: 0.2 X-Spam_bar: / X-Spam_report: (0.2 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FORGED_FROMDOMAIN=0.25, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.25, PDS_HP_HELO_NORDNS=0.904, RCVD_IN_DNSWL_NONE=-0.0001, RDNS_NONE=0.793, 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: Hyman Huang , Peter Xu Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZM-MESSAGEID: 1644917750922100001 Content-Type: text/plain; charset="utf-8" From: Peter Xu QEMU can now easily crash with two continuous migration carried out: (qemu) migrate -d exec:cat>out (qemu) migrate_cancel (qemu) migrate -d exec:cat>out [crash] ../softmmu/memory.c:2782: memory_global_dirty_log_start: Assertion `!(global_dirty_tracking & flags)' failed. It's because memory API provides a way to postpone dirty log stop if the VM= is stopped, and that'll be re-done until the next VM start. It was added in 2= 017 with commit 1931076077 ("migration: optimize the downtime", 2017-08-01). However the recent work on allowing dirty tracking to be bitmask broke it, which is commit 63b41db4bc ("memory: make global_dirty_tracking a bitmask", 2021-11-01). The fix proposed in this patch contains two things: (1) Instead of passing over the flags to postpone stop dirty track, we ad= d a global variable (along with current vmstate_change variable) to record what flags to stop dirty tracking. (2) When start dirty tracking, instead if remove the vmstate hook directl= y, we also execute the postponed stop process so that we make sure all t= he starts and stops will be paired. This procedure is overlooked in the bitmask-ify work in 2021. Cc: Hyman Huang Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=3D2044818 Fixes: 63b41db4bc ("memory: make global_dirty_tracking a bitmask") Signed-off-by: Peter Xu Message-Id: <20220207123019.27223-1-peterx@redhat.com> Signed-off-by: Paolo Bonzini --- softmmu/memory.c | 65 ++++++++++++++++++++++++++++++++++-------------- 1 file changed, 47 insertions(+), 18 deletions(-) diff --git a/softmmu/memory.c b/softmmu/memory.c index 678dc62f06..8060c6de78 100644 --- a/softmmu/memory.c +++ b/softmmu/memory.c @@ -2790,19 +2790,32 @@ void memory_global_after_dirty_log_sync(void) MEMORY_LISTENER_CALL_GLOBAL(log_global_after_sync, Forward); } =20 +/* + * Dirty track stop flags that are postponed due to VM being stopped. Sho= uld + * only be used within vmstate_change hook. + */ +static unsigned int postponed_stop_flags; static VMChangeStateEntry *vmstate_change; +static void memory_global_dirty_log_stop_postponed_run(void); =20 void memory_global_dirty_log_start(unsigned int flags) { - unsigned int old_flags =3D global_dirty_tracking; - - if (vmstate_change) { - qemu_del_vm_change_state_handler(vmstate_change); - vmstate_change =3D NULL; - } + unsigned int old_flags; =20 assert(flags && !(flags & (~GLOBAL_DIRTY_MASK))); - assert(!(global_dirty_tracking & flags)); + + if (vmstate_change) { + /* If there is postponed stop(), operate on it first */ + postponed_stop_flags &=3D ~flags; + memory_global_dirty_log_stop_postponed_run(); + } + + flags &=3D ~global_dirty_tracking; + if (!flags) { + return; + } + + old_flags =3D global_dirty_tracking; global_dirty_tracking |=3D flags; trace_global_dirty_changed(global_dirty_tracking); =20 @@ -2830,29 +2843,45 @@ static void memory_global_dirty_log_do_stop(unsigne= d int flags) } } =20 +/* + * Execute the postponed dirty log stop operations if there is, then reset + * everything (including the flags and the vmstate change hook). + */ +static void memory_global_dirty_log_stop_postponed_run(void) +{ + /* This must be called with the vmstate handler registered */ + assert(vmstate_change); + + /* Note: postponed_stop_flags can be cleared in log start routine */ + if (postponed_stop_flags) { + memory_global_dirty_log_do_stop(postponed_stop_flags); + postponed_stop_flags =3D 0; + } + + qemu_del_vm_change_state_handler(vmstate_change); + vmstate_change =3D NULL; +} + static void memory_vm_change_state_handler(void *opaque, bool running, RunState state) { - unsigned int flags =3D (unsigned int)(uintptr_t)opaque; if (running) { - memory_global_dirty_log_do_stop(flags); - - if (vmstate_change) { - qemu_del_vm_change_state_handler(vmstate_change); - vmstate_change =3D NULL; - } + memory_global_dirty_log_stop_postponed_run(); } } =20 void memory_global_dirty_log_stop(unsigned int flags) { if (!runstate_is_running()) { + /* Postpone the dirty log stop, e.g., to when VM starts again */ if (vmstate_change) { - return; + /* Batch with previous postponed flags */ + postponed_stop_flags |=3D flags; + } else { + postponed_stop_flags =3D flags; + vmstate_change =3D qemu_add_vm_change_state_handler( + memory_vm_change_state_handler, NULL); } - vmstate_change =3D qemu_add_vm_change_state_handler( - memory_vm_change_state_handler, - (void *)(uintptr_t)flags); return; } =20 --=20 2.34.1 From nobody Mon Feb 9 09:42:38 2026 Delivered-To: importer@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+importer=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 1644917872733862.032065942829; Tue, 15 Feb 2022 01:37:52 -0800 (PST) Received: from localhost ([::1]:42210 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nJuHP-0004A5-DX for importer@patchew.org; Tue, 15 Feb 2022 04:37:51 -0500 Received: from eggs.gnu.org ([209.51.188.92]:54684) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nJuCE-0003kW-JU for qemu-devel@nongnu.org; Tue, 15 Feb 2022 04:32:30 -0500 Received: from [2a00:1450:4864:20::52a] (port=46825 helo=mail-ed1-x52a.google.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nJuCC-0008PW-Kd for qemu-devel@nongnu.org; Tue, 15 Feb 2022 04:32:30 -0500 Received: by mail-ed1-x52a.google.com with SMTP id m17so6180620edc.13 for ; Tue, 15 Feb 2022 01:32:28 -0800 (PST) Received: from avogadro.lan ([2001:b07:6468:f312:c8dd:75d4:99ab:290a]) by smtp.gmail.com with ESMTPSA id m4sm6634308ejl.45.2022.02.15.01.32.26 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 15 Feb 2022 01:32:27 -0800 (PST) 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=B9NkiQxutvWo2hPvQYBM/5dxdxvT+GzFQ3unXvy2yF4=; b=eA7qdWdUSHNNSf3Op7k5FvIm+vB79lcZcFkvwTOMgTD6U3+1VEAHRYjyvbZ6gEoAV7 x4bkl0MzYQTSlSIs4nwB7S+5KEZfNBuGWJidjoAtNkfJG2EWD9GF2V0Iu940ztzRG4De N0EcgY4M4a0tAAQ+kpJo2c5AA0Iabyj88Dd9vA0TJ5IL43cfpf6hwb0/zMkIMYq56K7X J9/g9w84/OYkaNO4JdO/gbLQlVlk0vQ4n8MTcK4+rfL/tmueev0Ogm+We0pxTyKuiOjf Y+7e1SD6114Zjjm4W3Cf75y9MXJxSFni6lIFHNq924N0ntZhyxndoXwY2tWZEFEBKirT 5/PA== 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=B9NkiQxutvWo2hPvQYBM/5dxdxvT+GzFQ3unXvy2yF4=; b=qColhWz3kWinxNjJRgxzlQdGXece6FATtysFmPu7pueGPuv2GYzhyjrbJszqq4Inhb aW1hfyhqfDow2L0yCK8U2IIZc8C8DxRFzKIFPcFNzwvgsjNF2E6nGyi8BIaIJI2XgP7G KoNSuBEHpDOuwHQ8Sujs+yWrzhmdfBCyHQK3DqEQaqAgdOpfFIc5/VbDG3o/rAP+wAT4 lKZx2VVA02iEXIoY7RNIYOfwO3JGKMOHT4AkEWP53Dl/3hE/FRgPyXKbLhdHoek9QZhf IJyS8/0qBV5JGjM200RvXqpfChFDGCqg2TrmispDc0u9senxAGQFKGm8BUosdmzuCjXT qp7Q== X-Gm-Message-State: AOAM531AB3T2YfGxVZ/X6ATteVaHrOq5UIG/FY8ep9Unf2Pyh1uAzpS0 NsR+7WcRDwK+azIwve7aVLdAvX6jkS0= X-Google-Smtp-Source: ABdhPJxhNDKm20WglKlBpaA3cVScqkCbZsBQVjbJiP1oIqAaIcAPVnb+2PVdDDcX5zn66tRbZwN2fw== X-Received: by 2002:aa7:dac5:: with SMTP id x5mr769532eds.57.1644917547427; Tue, 15 Feb 2022 01:32:27 -0800 (PST) From: Paolo Bonzini To: qemu-devel@nongnu.org Subject: [PULL 03/30] tests/qemu-iotests/testrunner: Print diff to stderr in TAP mode Date: Tue, 15 Feb 2022 10:31:56 +0100 Message-Id: <20220215093223.110827-4-pbonzini@redhat.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220215093223.110827-1-pbonzini@redhat.com> References: <20220215093223.110827-1-pbonzini@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Host-Lookup-Failed: Reverse DNS lookup failed for 2a00:1450:4864:20::52a (failed) 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+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::52a; envelope-from=paolo.bonzini@gmail.com; helo=mail-ed1-x52a.google.com X-Spam_score_int: 2 X-Spam_score: 0.2 X-Spam_bar: / X-Spam_report: (0.2 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FORGED_FROMDOMAIN=0.25, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.25, PDS_HP_HELO_NORDNS=0.904, RCVD_IN_DNSWL_NONE=-0.0001, RDNS_NONE=0.793, 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: Thomas Huth Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZM-MESSAGEID: 1644917874033100001 Content-Type: text/plain; charset="utf-8" From: Thomas Huth When running in TAP mode, stdout is reserved for the TAP protocol. To see the "diff" of the failed test, we have to print it to stderr instead. Signed-off-by: Thomas Huth Message-Id: <20220209101530.3442837-8-thuth@redhat.com> Signed-off-by: Paolo Bonzini --- tests/qemu-iotests/testrunner.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/tests/qemu-iotests/testrunner.py b/tests/qemu-iotests/testrunn= er.py index 0eace147b8..9a94273975 100644 --- a/tests/qemu-iotests/testrunner.py +++ b/tests/qemu-iotests/testrunner.py @@ -404,7 +404,10 @@ def run_tests(self, tests: List[str], jobs: int =3D 1)= -> bool: if res.status =3D=3D 'fail': failed.append(name) if res.diff: - print('\n'.join(res.diff)) + if self.tap: + print('\n'.join(res.diff), file=3Dsys.stderr) + else: + print('\n'.join(res.diff)) elif res.status =3D=3D 'not run': notrun.append(name) elif res.status =3D=3D 'pass': --=20 2.34.1 From nobody Mon Feb 9 09:42:38 2026 Delivered-To: importer@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+importer=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 1644917906653787.9253701907348; Tue, 15 Feb 2022 01:38:26 -0800 (PST) Received: from localhost ([::1]:45206 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nJuHx-0006FL-Go for importer@patchew.org; Tue, 15 Feb 2022 04:38:25 -0500 Received: from eggs.gnu.org ([209.51.188.92]:54700) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nJuCF-0003mR-8t for qemu-devel@nongnu.org; Tue, 15 Feb 2022 04:32:31 -0500 Received: from [2a00:1450:4864:20::529] (port=44905 helo=mail-ed1-x529.google.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nJuCD-0008Pf-Cm for qemu-devel@nongnu.org; Tue, 15 Feb 2022 04:32:30 -0500 Received: by mail-ed1-x529.google.com with SMTP id w10so12457157edd.11 for ; Tue, 15 Feb 2022 01:32:29 -0800 (PST) Received: from avogadro.lan ([2001:b07:6468:f312:c8dd:75d4:99ab:290a]) by smtp.gmail.com with ESMTPSA id m4sm6634308ejl.45.2022.02.15.01.32.27 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 15 Feb 2022 01:32:27 -0800 (PST) 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=l0lSzYmnjceD5TlBT3DDHL52VR3qBcs3rQSEbockbds=; b=OBVQSuD/FwJP+qFDtwguxGe13MtSDWcua8XGyYc/jQP5RX7zoe1KK1oPQCiLM9epW/ JnoW4x1GrGNWFTzi2/ocdqlqe5eBIsainy4VVJsZFfOcZrMUn4R6W2RuinYukqhrBYaa YzoojGRe2kdKjlDamnxRTSHNez70J7tagpsZlEXW7DAFyAAnSUpwiJY3uvb7kA7ef0CB 3Sz4flq4rXuURiAAV28t8HqPniEdgCZNL+5w0iurcyN38UQpwnZ9MsytfPs82CKeHP3m O5iq9690/cJwUfbBL/Vu55nJ+gRXgJ7E/2GiYgK8YE126PhnzleytRYc6YOabmAYAIff gKRw== 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=l0lSzYmnjceD5TlBT3DDHL52VR3qBcs3rQSEbockbds=; b=6KInhYO4yJRRWYId52K4ntETeKboPaD/dbWstmrONx8QnmgiN0WSvANo+r6Ql6Dow0 UH5QI5zOvmo3y3B1tV0279zzZXBQXzS+nKJ6KG2pDy5t6Zr4xfuwrZ8RLl0YoQl+NqJP mTZsCcBK3ssM8ZUr6eiayrtee/zXBZyQrM8Z010NYe+P37OOs8w95SqZVFIhVS8OIBBK 00HJo1Nm1QsyIBcG00+lGphx4obAZIOUWt/nXwP3FTReUUUr2XvR0Thv4UMZqKn2FVFq C4RQ9Ksgnum0A7lyss/OpCOydShe0zZD2tkac3PwC0ry7y5ndjdb4M6ZRP36+M5Ctw+X U6GA== X-Gm-Message-State: AOAM53018mCisNFlx2HkNugv4jiApJv79/C5yC9JIag6avN2MO2h6KX0 UAvrrkU8vATUi84E3HCRO8zEO4Tsceg= X-Google-Smtp-Source: ABdhPJxV++1xzJ6MKGB647VCJ24MToR94yIYnrbezr3/pmdRso3YQgEN/1aQ7n3ewkSjIXoa43DNhA== X-Received: by 2002:a05:6402:1841:: with SMTP id v1mr2933410edy.190.1644917548122; Tue, 15 Feb 2022 01:32:28 -0800 (PST) From: Paolo Bonzini To: qemu-devel@nongnu.org Subject: [PULL 04/30] meson: use .allowed() method for features Date: Tue, 15 Feb 2022 10:31:57 +0100 Message-Id: <20220215093223.110827-5-pbonzini@redhat.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220215093223.110827-1-pbonzini@redhat.com> References: <20220215093223.110827-1-pbonzini@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Host-Lookup-Failed: Reverse DNS lookup failed for 2a00:1450:4864:20::529 (failed) 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+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::529; envelope-from=paolo.bonzini@gmail.com; helo=mail-ed1-x529.google.com X-Spam_score_int: 2 X-Spam_score: 0.2 X-Spam_bar: / X-Spam_report: (0.2 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FORGED_FROMDOMAIN=0.25, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.25, PDS_HP_HELO_NORDNS=0.904, RCVD_IN_DNSWL_NONE=-0.0001, RDNS_NONE=0.793, 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+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZM-MESSAGEID: 1644917908334100001 Content-Type: text/plain; charset="utf-8" The method is now in 0.59, using it simplifies some boolean conditions. The other new methods .require() and .disable_auto_if() can be used too, but introducing them is not just a matter of search-and-replace. Signed-off-by: Paolo Bonzini --- meson.build | 42 +++++++++++++++++++++--------------------- tests/meson.build | 2 +- 2 files changed, 22 insertions(+), 22 deletions(-) diff --git a/meson.build b/meson.build index ae5f7eec6e..af136b780d 100644 --- a/meson.build +++ b/meson.build @@ -1,4 +1,4 @@ -project('qemu', ['c'], meson_version: '>=3D0.58.2', +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'], version: files('VERSION')) @@ -99,7 +99,7 @@ else endif =20 kvm_targets_c =3D '""' -if not get_option('kvm').disabled() and targetos =3D=3D 'linux' +if get_option('kvm').allowed() and targetos =3D=3D 'linux' kvm_targets_c =3D '"' + '" ,"'.join(kvm_targets) + '"' endif config_host_data.set('CONFIG_KVM_TARGETS', kvm_targets_c) @@ -276,7 +276,7 @@ endif if targetos !=3D 'linux' and get_option('multiprocess').enabled() error('Multiprocess QEMU is supported only on Linux') endif -multiprocess_allowed =3D targetos =3D=3D 'linux' and not get_option('multi= process').disabled() +multiprocess_allowed =3D targetos =3D=3D 'linux' and get_option('multiproc= ess').allowed() =20 # Target-specific libraries and flags libm =3D cc.find_library('m', required: false) @@ -313,7 +313,7 @@ elif targetos =3D=3D 'haiku' cc.find_library('network'), cc.find_library('bsd')] elif targetos =3D=3D 'openbsd' - if not get_option('tcg').disabled() and target_dirs.length() > 0 + if get_option('tcg').allowed() and target_dirs.length() > 0 # Disable OpenBSD W^X if available emulator_link_args =3D cc.get_supported_link_arguments('-Wl,-z,wxneede= d') endif @@ -321,16 +321,16 @@ endif =20 # Target-specific configuration of accelerators accelerators =3D [] -if not get_option('kvm').disabled() and targetos =3D=3D 'linux' +if get_option('kvm').allowed() and targetos =3D=3D 'linux' accelerators +=3D 'CONFIG_KVM' endif -if not get_option('xen').disabled() and 'CONFIG_XEN_BACKEND' in config_host +if get_option('xen').allowed() and 'CONFIG_XEN_BACKEND' in config_host accelerators +=3D 'CONFIG_XEN' - have_xen_pci_passthrough =3D not get_option('xen_pci_passthrough').disab= led() and targetos =3D=3D 'linux' + 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 not get_option('whpx').disabled() and targetos =3D=3D 'windows' +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') elif cc.has_header('WinHvPlatform.h', required: get_option('whpx')) and \ @@ -338,14 +338,14 @@ if not get_option('whpx').disabled() and targetos =3D= =3D 'windows' accelerators +=3D 'CONFIG_WHPX' endif endif -if not get_option('hvf').disabled() +if get_option('hvf').allowed() hvf =3D dependency('appleframeworks', modules: 'Hypervisor', required: get_option('hvf')) if hvf.found() accelerators +=3D 'CONFIG_HVF' endif endif -if not get_option('hax').disabled() +if get_option('hax').allowed() if get_option('hax').enabled() or targetos in ['windows', 'darwin', 'net= bsd'] accelerators +=3D 'CONFIG_HAX' endif @@ -358,7 +358,7 @@ if targetos =3D=3D 'netbsd' endif =20 tcg_arch =3D host_arch -if not get_option('tcg').disabled() +if get_option('tcg').allowed() if host_arch =3D=3D 'unknown' if get_option('tcg_interpreter') warning('Unsupported CPU @0@, will use TCG with TCI (slow)'.format(c= pu)) @@ -472,7 +472,7 @@ libattr_test =3D ''' =20 libattr =3D not_found have_old_libattr =3D false -if not get_option('attr').disabled() +if get_option('attr').allowed() if cc.links(libattr_test) libattr =3D declare_dependency() else @@ -628,7 +628,7 @@ endif mpathlibs =3D [libudev] mpathpersist =3D not_found mpathpersist_new_api =3D false -if targetos =3D=3D 'linux' and have_tools and not get_option('mpath').disa= bled() +if targetos =3D=3D 'linux' and have_tools and get_option('mpath').allowed() mpath_test_source_new =3D ''' #include #include @@ -697,7 +697,7 @@ endif =20 iconv =3D not_found curses =3D not_found -if have_system and not get_option('curses').disabled() +if have_system and get_option('curses').allowed() curses_test =3D ''' #if defined(__APPLE__) || defined(__OpenBSD__) #define _XOPEN_SOURCE_EXTENDED 1 @@ -759,7 +759,7 @@ if have_system and not get_option('curses').disabled() endforeach endif endif - if not get_option('iconv').disabled() + if get_option('iconv').allowed() foreach link_args : [ ['-liconv'], [] ] # Programs will be linked with glib and this will bring in libiconv = on FreeBSD. # We need to use libiconv if available because mixing libiconv's hea= ders with @@ -938,7 +938,7 @@ if liblzfse.found() and not cc.links(''' endif =20 oss =3D not_found -if have_system and not get_option('oss').disabled() +if get_option('oss').allowed() and have_system if not cc.has_header('sys/soundcard.h') # not found elif targetos =3D=3D 'netbsd' @@ -1092,7 +1092,7 @@ vnc =3D not_found png =3D not_found jpeg =3D not_found sasl =3D not_found -if have_system and not get_option('vnc').disabled() +if get_option('vnc').allowed() and have_system vnc =3D declare_dependency() # dummy dependency png =3D dependency('libpng', required: get_option('vnc_png'), method: 'pkg-config', kwargs: static_kwargs) @@ -1236,7 +1236,7 @@ selinux =3D dependency('libselinux', malloc =3D [] if get_option('malloc') =3D=3D 'system' has_malloc_trim =3D \ - not get_option('malloc_trim').disabled() and \ + get_option('malloc_trim').allowed() and \ cc.links('''#include int main(void) { malloc_trim(0); return 0; }''') else @@ -1291,7 +1291,7 @@ fuse =3D dependency('fuse3', required: get_option('fu= se'), kwargs: static_kwargs) =20 fuse_lseek =3D not_found -if not get_option('fuse_lseek').disabled() +if get_option('fuse_lseek').allowed() if fuse.version().version_compare('>=3D3.8') # Dummy dependency fuse_lseek =3D declare_dependency() @@ -1714,7 +1714,7 @@ config_host_data.set('HAVE_MLOCKALL', cc.links(gnu_so= urce_prefix + ''' }''')) =20 have_l2tpv3 =3D false -if not get_option('l2tpv3').disabled() and have_system +if get_option('l2tpv3').allowed() and have_system have_l2tpv3 =3D cc.has_type('struct mmsghdr', prefix: gnu_source_prefix + ''' #include @@ -1723,7 +1723,7 @@ endif config_host_data.set('CONFIG_L2TPV3', have_l2tpv3) =20 have_netmap =3D false -if not get_option('netmap').disabled() and have_system +if get_option('netmap').allowed() and have_system have_netmap =3D cc.compiles(''' #include #include diff --git a/tests/meson.build b/tests/meson.build index 079c8f3727..1d05109eb4 100644 --- a/tests/meson.build +++ b/tests/meson.build @@ -85,7 +85,7 @@ if 'CONFIG_TCG' in config_all subdir('fp') endif =20 -if not get_option('tcg').disabled() +if get_option('tcg').allowed() if 'CONFIG_PLUGIN' in config_host subdir('plugin') endif --=20 2.34.1 From nobody Mon Feb 9 09:42:38 2026 Delivered-To: importer@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+importer=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 16449180987661015.3950042106667; Tue, 15 Feb 2022 01:41:38 -0800 (PST) Received: from localhost ([::1]:52208 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nJuL4-0002ek-RR for importer@patchew.org; Tue, 15 Feb 2022 04:41:38 -0500 Received: from eggs.gnu.org ([209.51.188.92]:54716) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nJuCG-0003pV-4g for qemu-devel@nongnu.org; Tue, 15 Feb 2022 04:32:32 -0500 Received: from [2a00:1450:4864:20::632] (port=39608 helo=mail-ej1-x632.google.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nJuCE-0008Pm-1I for qemu-devel@nongnu.org; Tue, 15 Feb 2022 04:32:31 -0500 Received: by mail-ej1-x632.google.com with SMTP id p9so20020774ejd.6 for ; Tue, 15 Feb 2022 01:32:29 -0800 (PST) Received: from avogadro.lan ([2001:b07:6468:f312:c8dd:75d4:99ab:290a]) by smtp.gmail.com with ESMTPSA id m4sm6634308ejl.45.2022.02.15.01.32.28 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 15 Feb 2022 01:32:28 -0800 (PST) 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=43tWTC/QmGlzNc8eErt+KiOBhEr8qRUI8niGq88khb4=; b=ps4JRhbA9nE/+gDREjIusWiQQXjB753unQI57s4BK72qFTixRnYcth3QIJPUJzxkoE Bx0QINIiypR3G00+M9b8uFZE2NDZexfSfYbSZcL4Agi8wjIBu/MI61++X8/nZjCQMdTn QYLXYeo4Nmn66pjuoTB/mz49RpYIer73f8epLtHI9aql9D0kKCSq6D2gN1LLlz72x1e3 TYYpMYCo9JlXaw9FaNJEsMpkiRiEfWCErFSJVAy3a/bvKdhYYG+pD0wI51KxI4hRCEZ3 FnjZQ77WssIATTOYK+0Pa9BAGsmknt75PIofYst1NAW9LHVJc9TikZnsATWWtPcBCtwc xNBw== 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=43tWTC/QmGlzNc8eErt+KiOBhEr8qRUI8niGq88khb4=; b=Ryw2NeS+EcnDSqBAO5v6APIfv7WKAjY6x2FQ7hboCVQCHLgCdoS7dZb7vlHboOKjuC wzdC2Zr3DlQTuXR61DiFs0Ht4oLyXwfIy0Vuq55JFAFhbd/txsC0smAHDzUghHQqJm+F DszpniJZ8TA50gshMLhFzXGSR3bDtRz9h7I7SmdOTm50H5AXLn49xfNWYfhnbqpgWuUl QTfLVtAYxLBvSUbgg0MszD4PqDniW1p3pCzXIKctdiV8K1nOqHJIu1o+Ke5loo6lKRid CRGoCQz6qihTeOP+sgCjOm5oQeYo1g+d7wVFD+IYAVi+0L7PagDni0gNeTmuhNC21w9n fCsQ== X-Gm-Message-State: AOAM530ViaGksqUPc/iDNN2NBsjhz39QSBFO6N/RFVh2nxymYtWyKp70 3H2iazfhiuvLU/kpqw0vPa98aiso08k= X-Google-Smtp-Source: ABdhPJyszuqNOgUwsxWQ+TKMtl/YJYlc+NfisqyzeEavOfV0lbyRQMg8I8/1siXiG8u42omeRtXQsg== X-Received: by 2002:a17:906:190d:: with SMTP id a13mr2170033eje.339.1644917548737; Tue, 15 Feb 2022 01:32:28 -0800 (PST) From: Paolo Bonzini To: qemu-devel@nongnu.org Subject: [PULL 05/30] meson: use .require() and .disable_auto_if() method for features Date: Tue, 15 Feb 2022 10:31:58 +0100 Message-Id: <20220215093223.110827-6-pbonzini@redhat.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220215093223.110827-1-pbonzini@redhat.com> References: <20220215093223.110827-1-pbonzini@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Host-Lookup-Failed: Reverse DNS lookup failed for 2a00:1450:4864:20::632 (failed) 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+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::632; envelope-from=paolo.bonzini@gmail.com; helo=mail-ej1-x632.google.com X-Spam_score_int: 2 X-Spam_score: 0.2 X-Spam_bar: / X-Spam_report: (0.2 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FORGED_FROMDOMAIN=0.25, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.25, PDS_HP_HELO_NORDNS=0.904, RCVD_IN_DNSWL_NONE=-0.0001, RDNS_NONE=0.793, 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+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZM-MESSAGEID: 1644918119819100001 Content-Type: text/plain; charset="utf-8" The method is now in 0.59, using it simplifies some conditionals. There is a small change, which is to build virtfs-proxy-helper in a tools-only build. This is done for consistency with other tools, which are not culled by the absence of system emulator binaries. .disable_auto_if() would also be useful to check for packages, for example -linux_io_uring =3D not_found -if not get_option('linux_io_uring').auto() or have_block - linux_io_uring =3D dependency('liburing', required: get_option('linux_io= _uring'), - method: 'pkg-config', kwargs: static_kwargs) -endif +linux_io_uring =3D dependency('liburing', + required: get_option('linux_io_uring').disable_auto_if(not have_block), + method: 'pkg-config', kwargs: static_kwargs) This change however is much larger and I am not sure about the improved readability, so I am not performing it right now. Signed-off-by: Paolo Bonzini --- meson.build | 74 ++++++++++++++++++----------------------------- tools/meson.build | 31 ++++++-------------- 2 files changed, 37 insertions(+), 68 deletions(-) diff --git a/meson.build b/meson.build index af136b780d..15dfd66a3e 100644 --- a/meson.build +++ b/meson.build @@ -269,14 +269,12 @@ if 'syslog' in get_option('trace_backends') and not c= c.compiles(''' endif =20 # Miscellaneous Linux-only features -if targetos !=3D 'linux' and get_option('mpath').enabled() - error('Multipath is supported only on Linux') -endif +get_option('mpath') \ + .require(targetos =3D=3D 'linux', error_message: 'Multipath is supported= only on Linux') =20 -if targetos !=3D 'linux' and get_option('multiprocess').enabled() - error('Multiprocess QEMU is supported only on Linux') -endif -multiprocess_allowed =3D targetos =3D=3D 'linux' and get_option('multiproc= ess').allowed() +multiprocess_allowed =3D get_option('multiprocess') \ + .require(targetos =3D=3D 'linux', error_message: 'Multiprocess QEMU is s= upported only on Linux') \ + .allowed() =20 # Target-specific libraries and flags libm =3D cc.find_library('m', required: false) @@ -1268,19 +1266,13 @@ statx_test =3D gnu_source_prefix + ''' =20 has_statx =3D cc.links(statx_test) =20 -have_vhost_user_blk_server =3D (targetos =3D=3D 'linux' and - 'CONFIG_VHOST_USER' in config_host) - -if get_option('vhost_user_blk_server').enabled() - if targetos !=3D 'linux' - error('vhost_user_blk_server requires linux') - elif 'CONFIG_VHOST_USER' not in config_host - error('vhost_user_blk_server requires vhost-user support') - endif -elif get_option('vhost_user_blk_server').disabled() or not have_system - have_vhost_user_blk_server =3D false -endif - +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, + error_message: 'vhost_user_blk_server requires vhost-user suppo= rt') \ + .disable_auto_if(not have_system) \ + .allowed() =20 if get_option('fuse').disabled() and get_option('fuse_lseek').enabled() error('Cannot enable fuse-lseek while fuse is disabled') @@ -1407,36 +1399,26 @@ endif have_host_block_device =3D (targetos !=3D 'darwin' or cc.has_header('IOKit/storage/IOMedia.h')) =20 -dbus_display =3D false -if not get_option('dbus_display').disabled() - # FIXME enable_modules shouldn't be necessary, but: https://github.com/m= esonbuild/meson/issues/8333 - dbus_display =3D gio.version().version_compare('>=3D2.64') and config_ho= st.has_key('GDBUS_CODEGEN') and enable_modules - if get_option('dbus_display').enabled() and not dbus_display - error('Requirements missing to enable -display dbus (glib>=3D2.64 && -= -enable-modules)') - endif -endif +# FIXME enable_modules shouldn't be necessary, but: https://github.com/mes= onbuild/meson/issues/8333 +dbus_display =3D get_option('dbus_display') \ + .require(gio.version().version_compare('>=3D2.64'), + error_message: '-display dbus requires glib>=3D2.64') \ + .require(enable_modules, + error_message: '-display dbus requires --enable-modules') \ + .require(config_host.has_key('GDBUS_CODEGEN'), + error_message: '-display dbus requires gdbus-codegen') \ + .allowed() =20 -have_virtfs =3D (targetos =3D=3D 'linux' and - have_system and - libattr.found() and - libcap_ng.found()) +have_virtfs =3D get_option('virtfs') \ + .require(targetos =3D=3D 'linux', + error_message: 'virtio-9p (virtfs) requires Linux') \ + .require(libattr.found() and libcap_ng.found(), + error_message: 'virtio-9p (virtfs) requires libcap-ng-devel a= nd libattr-devel') \ + .disable_auto_if(not have_tools and not have_system) \ + .allowed() =20 have_virtfs_proxy_helper =3D have_virtfs and have_tools =20 -if get_option('virtfs').enabled() - if not have_virtfs - if targetos !=3D 'linux' - error('virtio-9p (virtfs) requires Linux') - elif not libcap_ng.found() or not libattr.found() - error('virtio-9p (virtfs) requires libcap-ng-devel and libattr-devel= ') - elif not have_system - error('virtio-9p (virtfs) needs system emulation support') - endif - endif -elif get_option('virtfs').disabled() - have_virtfs =3D false -endif - foreach k : get_option('trace_backends') config_host_data.set('CONFIG_TRACE_' + k.to_upper(), true) endforeach diff --git a/tools/meson.build b/tools/meson.build index 3e5a0abfa2..46977af84f 100644 --- a/tools/meson.build +++ b/tools/meson.build @@ -1,25 +1,12 @@ -have_virtiofsd =3D (targetos =3D=3D 'linux' and - have_tools and - seccomp.found() and - libcap_ng.found() and - 'CONFIG_VHOST_USER' in config_host) - -if get_option('virtiofsd').enabled() - if not have_virtiofsd - if targetos !=3D 'linux' - error('virtiofsd requires Linux') - elif not seccomp.found() or not libcap_ng.found() - error('virtiofsd requires libcap-ng-devel and seccomp-devel') - elif 'CONFIG_VHOST_USER' not in config_host - error('virtiofsd needs vhost-user support') - else - # Disabled all the tools but virtiofsd. - have_virtiofsd =3D true - endif - endif -elif get_option('virtiofsd').disabled() or not have_system - have_virtiofsd =3D false -endif +have_virtiofsd =3D get_option('virtiofsd') \ + .require(targetos =3D=3D 'linux', + 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, + error_message: 'virtiofsd needs vhost-user-support') \ + .disable_auto_if(not have_tools and not have_system) \ + .allowed() =20 if have_virtiofsd subdir('virtiofsd') --=20 2.34.1 From nobody Mon Feb 9 09:42:38 2026 Delivered-To: importer@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+importer=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 1644917873452609.3417644013772; Tue, 15 Feb 2022 01:37:53 -0800 (PST) Received: from localhost ([::1]:42162 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nJuHQ-00048F-46 for importer@patchew.org; Tue, 15 Feb 2022 04:37:52 -0500 Received: from eggs.gnu.org ([209.51.188.92]:54728) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nJuCG-0003rE-Nb for qemu-devel@nongnu.org; Tue, 15 Feb 2022 04:32:32 -0500 Received: from [2a00:1450:4864:20::52a] (port=33467 helo=mail-ed1-x52a.google.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nJuCE-0008Q6-Pz for qemu-devel@nongnu.org; Tue, 15 Feb 2022 04:32:32 -0500 Received: by mail-ed1-x52a.google.com with SMTP id b13so31191825edn.0 for ; Tue, 15 Feb 2022 01:32:30 -0800 (PST) Received: from avogadro.lan ([2001:b07:6468:f312:c8dd:75d4:99ab:290a]) by smtp.gmail.com with ESMTPSA id m4sm6634308ejl.45.2022.02.15.01.32.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 15 Feb 2022 01:32:29 -0800 (PST) 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=XVnVeU9E3mpcEroUKHrZf65c5xkFEcPvt7vB9d+yeUw=; b=PCMRx5RFcHmOlXyoHR3ZVFjYEUY+wUe30LK6gjNrWTLAVt3UO9P7zKs+h2xPiOaXmC MdOFQTPUZi9CZ7fpuaCg5BGnR1U3L0b2D2iNBP2rcfw7j6RUeypV7/6at9UHLq80cJ4Q 0ETWHPZVNXQHbrkteuFsxvxdUR+FFjPcx7NmtJ2FQ5VBXpbHn2DKxQBR85ikOzGgMxV0 SBMlTA65fSN8uHw2YeWtN22nxPpJYO/vy6zoROWh8g9qvxin87fPipqAwMM/OJZ3ld4O 1H850dWvQJnbi0HPLkbVsIh4sK7mZyGgDtaXD4t8apijx83hy7GGD/Ge5A3R5Zi4itOs XNBA== 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=XVnVeU9E3mpcEroUKHrZf65c5xkFEcPvt7vB9d+yeUw=; b=6dXLxKktCO+SuG5sYDevDMpl+DO3X12awk7EfvmsXpuBdmUA2eJziYpAAPlcdx1nPZ RUlVYLmRdKoPb/Zb47Xk1IblVVc2TFcOB1GgKeLBC0X7sKBCTaRVFdj6s+ruCL1sAOCv SfJDnrPwAo296hsT13kczSHTaSSDEfK5RZjPyP1ykXkWur/zwKPJp6Db2sG+iXVvVtzN Yc1WdwS9i65Q/fOcIt2FUf/57u+Py0aJJJHq4uWIpDRM6T8kvc+aDyxq4Ghe2xO4qY7O 73R6SlLTO9f59Uc8nEZd31AjpPiqz0AFR7N7QlIGJBCRSpixjT6/lkUKisU9oexVuV/f Ky4Q== X-Gm-Message-State: AOAM530opR0fMyBmNITNK3S7RnKAulcn5kHD6uUy8f9vN4QCTo7lHN85 SOsOwgzIBVPVunqAXvXPENWMsUEbQvs= X-Google-Smtp-Source: ABdhPJz70u6slGtSlA7hOXFdBigQ/C1+C/kinBXevQNUJczSxPKbk073VNfFyi13k84bMGiieJlj2A== X-Received: by 2002:aa7:dc42:: with SMTP id g2mr2941197edu.410.1644917549425; Tue, 15 Feb 2022 01:32:29 -0800 (PST) From: Paolo Bonzini To: qemu-devel@nongnu.org Subject: [PULL 06/30] configure, meson: move AVX tests to meson Date: Tue, 15 Feb 2022 10:31:59 +0100 Message-Id: <20220215093223.110827-7-pbonzini@redhat.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220215093223.110827-1-pbonzini@redhat.com> References: <20220215093223.110827-1-pbonzini@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Host-Lookup-Failed: Reverse DNS lookup failed for 2a00:1450:4864:20::52a (failed) 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+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::52a; envelope-from=paolo.bonzini@gmail.com; helo=mail-ed1-x52a.google.com X-Spam_score_int: 2 X-Spam_score: 0.2 X-Spam_bar: / X-Spam_report: (0.2 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FORGED_FROMDOMAIN=0.25, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.25, PDS_HP_HELO_NORDNS=0.904, RCVD_IN_DNSWL_NONE=-0.0001, RDNS_NONE=0.793, 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: Richard Henderson Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZM-MESSAGEID: 1644917875856100003 Content-Type: text/plain; charset="utf-8" For consistency with other tests, --enable-avx2 and --enable-avx512f fail to compile on x86 systems if cpuid.h is not available. Reviewed-by: Richard Henderson Signed-off-by: Paolo Bonzini --- configure | 103 ---------------------------------- meson.build | 50 ++++++++++++++++- meson_options.txt | 4 ++ scripts/meson-buildoptions.sh | 6 ++ 4 files changed, 58 insertions(+), 105 deletions(-) diff --git a/configure b/configure index 3a29eff5cc..a6a577277f 100755 --- a/configure +++ b/configure @@ -323,8 +323,6 @@ qom_cast_debug=3D"yes" trace_backends=3D"log" trace_file=3D"trace" opengl=3D"$default_feature" -cpuid_h=3D"no" -avx2_opt=3D"$default_feature" guest_agent=3D"$default_feature" vss_win32_sdk=3D"$default_feature" win_sdk=3D"no" @@ -1033,14 +1031,6 @@ for opt do ;; --disable-tools) want_tools=3D"no" ;; - --disable-avx2) avx2_opt=3D"no" - ;; - --enable-avx2) avx2_opt=3D"yes" - ;; - --disable-avx512f) avx512f_opt=3D"no" - ;; - --enable-avx512f) avx512f_opt=3D"yes" - ;; --disable-virtio-blk-data-plane|--enable-virtio-blk-data-plane) echo "$0: $opt is obsolete, virtio-blk data-plane is always on" >&2 ;; @@ -1406,8 +1396,6 @@ cat << EOF coroutine-pool coroutine freelist (better performance) tpm TPM support numa libnuma support - avx2 AVX2 optimization support - avx512f AVX512F optimization support replication replication support opengl opengl support qom-cast-debug cast debugging support @@ -2740,85 +2728,6 @@ else # "$safe_stack" =3D "" fi fi =20 -######################################## -# check if cpuid.h is usable. - -cat > $TMPC << EOF -#include -int main(void) { - unsigned a, b, c, d; - unsigned max =3D __get_cpuid_max(0, 0); - - if (max >=3D 1) { - __cpuid(1, a, b, c, d); - } - - if (max >=3D 7) { - __cpuid_count(7, 0, a, b, c, d); - } - - return 0; -} -EOF -if compile_prog "" "" ; then - cpuid_h=3Dyes -fi - -########################################## -# avx2 optimization requirement check -# -# There is no point enabling this if cpuid.h is not usable, -# since we won't be able to select the new routines. - -if test "$cpuid_h" =3D "yes" && test "$avx2_opt" !=3D "no"; then - cat > $TMPC << EOF -#pragma GCC push_options -#pragma GCC target("avx2") -#include -#include -static int bar(void *a) { - __m256i x =3D *(__m256i *)a; - return _mm256_testz_si256(x, x); -} -int main(int argc, char *argv[]) { return bar(argv[0]); } -EOF - if compile_object "-Werror" ; then - avx2_opt=3D"yes" - else - avx2_opt=3D"no" - fi -fi - -########################################## -# avx512f optimization requirement check -# -# There is no point enabling this if cpuid.h is not usable, -# since we won't be able to select the new routines. -# by default, it is turned off. -# if user explicitly want to enable it, check environment - -if test "$cpuid_h" =3D "yes" && test "$avx512f_opt" =3D "yes"; then - cat > $TMPC << EOF -#pragma GCC push_options -#pragma GCC target("avx512f") -#include -#include -static int bar(void *a) { - __m512i x =3D *(__m512i *)a; - return _mm512_test_epi64_mask(x, x); -} -int main(int argc, char *argv[]) -{ - return bar(argv[0]); -} -EOF - if ! compile_object "-Werror" ; then - avx512f_opt=3D"no" - fi -else - avx512f_opt=3D"no" -fi - ######################################## # check if __[u]int128_t is usable. =20 @@ -3419,14 +3328,6 @@ if test "$opengl" =3D "yes" ; then echo "OPENGL_LIBS=3D$opengl_libs" >> $config_host_mak fi =20 -if test "$avx2_opt" =3D "yes" ; then - echo "CONFIG_AVX2_OPT=3Dy" >> $config_host_mak -fi - -if test "$avx512f_opt" =3D "yes" ; then - echo "CONFIG_AVX512F_OPT=3Dy" >> $config_host_mak -fi - # XXX: suppress that if [ "$bsd" =3D "yes" ] ; then echo "CONFIG_BSD=3Dy" >> $config_host_mak @@ -3459,10 +3360,6 @@ if test "$have_tsan" =3D "yes" && test "$have_tsan_i= face_fiber" =3D "yes" ; then echo "CONFIG_TSAN=3Dy" >> $config_host_mak fi =20 -if test "$cpuid_h" =3D "yes" ; then - echo "CONFIG_CPUID_H=3Dy" >> $config_host_mak -fi - if test "$int128" =3D "yes" ; then echo "CONFIG_INT128=3Dy" >> $config_host_mak fi diff --git a/meson.build b/meson.build index 15dfd66a3e..7a262051b7 100644 --- a/meson.build +++ b/meson.build @@ -1762,6 +1762,52 @@ config_host_data.set('CONFIG_GETAUXVAL', cc.links(gn= u_source_prefix + ''' return getauxval(AT_HWCAP) =3D=3D 0; }''')) =20 +have_cpuid_h =3D cc.links(''' + #include + int main(void) { + unsigned a, b, c, d; + unsigned max =3D __get_cpuid_max(0, 0); + + if (max >=3D 1) { + __cpuid(1, a, b, c, d); + } + + if (max >=3D 7) { + __cpuid_count(7, 0, a, b, c, d); + } + + return 0; + }''') +config_host_data.set('CONFIG_CPUID_H', have_cpuid_h) + +config_host_data.set('CONFIG_AVX2_OPT', get_option('avx2') \ + .require(have_cpuid_h, error_message: 'cpuid.h not available, cannot ena= ble AVX2') \ + .require(cc.links(''' + #pragma GCC push_options + #pragma GCC target("avx2") + #include + #include + static int bar(void *a) { + __m256i x =3D *(__m256i *)a; + return _mm256_testz_si256(x, x); + } + int main(int argc, char *argv[]) { return bar(argv[0]); } + '''), error_message: 'AVX2 not available').allowed()) + +config_host_data.set('CONFIG_AVX512F_OPT', get_option('avx512f') \ + .require(have_cpuid_h, error_message: 'cpuid.h not available, cannot ena= ble AVX512F') \ + .require(cc.links(''' + #pragma GCC push_options + #pragma GCC target("avx512f") + #include + #include + static int bar(void *a) { + __m512i x =3D *(__m512i *)a; + return _mm512_test_epi64_mask(x, x); + } + int main(int argc, char *argv[]) { return bar(argv[0]); } + '''), error_message: 'AVX512F not available').allowed()) + config_host_data.set('CONFIG_AF_VSOCK', cc.compiles(gnu_source_prefix + ''' #include #include @@ -3289,8 +3335,8 @@ summary_info +=3D {'membarrier': config_host.h= as_key('CONFIG_MEMBARRIER')} summary_info +=3D {'debug stack usage': config_host.has_key('CONFIG_DEBUG_= STACK_USAGE')} summary_info +=3D {'mutex debugging': config_host.has_key('CONFIG_DEBUG_= MUTEX')} summary_info +=3D {'memory allocator': get_option('malloc')} -summary_info +=3D {'avx2 optimization': config_host.has_key('CONFIG_AVX2_O= PT')} -summary_info +=3D {'avx512f optimization': config_host.has_key('CONFIG_AVX= 512F_OPT')} +summary_info +=3D {'avx2 optimization': config_host_data.get('CONFIG_AVX2_= OPT')} +summary_info +=3D {'avx512f optimization': config_host_data.get('CONFIG_AV= X512F_OPT')} summary_info +=3D {'gprof enabled': config_host.has_key('CONFIG_GPROF'= )} summary_info +=3D {'gcov': get_option('b_coverage')} summary_info +=3D {'thread sanitizer': config_host.has_key('CONFIG_TSAN')} diff --git a/meson_options.txt b/meson_options.txt index 95d527f773..6ff349023c 100644 --- a/meson_options.txt +++ b/meson_options.txt @@ -68,6 +68,10 @@ option('multiprocess', type: 'feature', value: 'auto', description: 'Out of process device emulation support') option('dbus_display', type: 'feature', value: 'auto', description: '-display dbus support') +option('avx2', type: 'feature', value: 'auto', + description: 'AVX2 optimizations') +option('avx512f', type: 'feature', value: 'disabled', + description: 'AVX512F optimizations') =20 option('attr', type : 'feature', value : 'auto', description: 'attr/xattr support') diff --git a/scripts/meson-buildoptions.sh b/scripts/meson-buildoptions.sh index 48a454cece..dcfc39ec6b 100644 --- a/scripts/meson-buildoptions.sh +++ b/scripts/meson-buildoptions.sh @@ -26,6 +26,8 @@ meson_options_help() { printf "%s\n" ' alsa ALSA sound support' printf "%s\n" ' attr attr/xattr support' printf "%s\n" ' auth-pam PAM access control' + printf "%s\n" ' avx2 AVX2 optimizations' + printf "%s\n" ' avx512f AVX512F optimizations' printf "%s\n" ' bpf eBPF support' printf "%s\n" ' brlapi brlapi character device driver' printf "%s\n" ' bzip2 bzip2 support for DMG images' @@ -109,6 +111,10 @@ _meson_option_parse() { --disable-attr) printf "%s" -Dattr=3Ddisabled ;; --enable-auth-pam) printf "%s" -Dauth_pam=3Denabled ;; --disable-auth-pam) printf "%s" -Dauth_pam=3Ddisabled ;; + --enable-avx2) printf "%s" -Davx2=3Denabled ;; + --disable-avx2) printf "%s" -Davx2=3Ddisabled ;; + --enable-avx512f) printf "%s" -Davx512f=3Denabled ;; + --disable-avx512f) printf "%s" -Davx512f=3Ddisabled ;; --enable-bpf) printf "%s" -Dbpf=3Denabled ;; --disable-bpf) printf "%s" -Dbpf=3Ddisabled ;; --enable-brlapi) printf "%s" -Dbrlapi=3Denabled ;; --=20 2.34.1 From nobody Mon Feb 9 09:42:38 2026 Delivered-To: importer@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+importer=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 1644918033734811.4015286426321; Tue, 15 Feb 2022 01:40:33 -0800 (PST) Received: from localhost ([::1]:49900 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nJuK1-000138-Nc for importer@patchew.org; Tue, 15 Feb 2022 04:40:33 -0500 Received: from eggs.gnu.org ([209.51.188.92]:54752) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nJuCH-0003uw-Gj for qemu-devel@nongnu.org; Tue, 15 Feb 2022 04:32:33 -0500 Received: from [2a00:1450:4864:20::52a] (port=45811 helo=mail-ed1-x52a.google.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nJuCF-0008QG-CI for qemu-devel@nongnu.org; Tue, 15 Feb 2022 04:32:33 -0500 Received: by mail-ed1-x52a.google.com with SMTP id z13so12788773edc.12 for ; Tue, 15 Feb 2022 01:32:30 -0800 (PST) Received: from avogadro.lan ([2001:b07:6468:f312:c8dd:75d4:99ab:290a]) by smtp.gmail.com with ESMTPSA id m4sm6634308ejl.45.2022.02.15.01.32.29 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 15 Feb 2022 01:32:29 -0800 (PST) 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=lgMyPZYrb3nwjXIR9q8COjU2UhZ4fpa1Lv+L1kHYEeA=; b=hWrbhDf7qgwvsF2yURKTQcUs2AR2NYK9eYMDL3+r37tTQZ5L3usKTH6RmXhaRvdNvr oA+iKlDOFf7pT8+I0JoP5Acnu0L6H0wSIqSN5/Yd1Z+WO3B2gUzWJv65wlb3mdzOWp5j EtkSui/97+zfdj3eGin/6PuRzV4JqRrbluAqEq7MnmPBW0ySkhKT+cibh0WEBGtLjadv pi5qDhQMNH6hf1TshkcCmaYZpVubt1gC9OL5c0LIRyHv/2BmdzeRAgUdbdXOedwJDgUB V2TXc0kt6iqeJLovd6yEyqBPvywa+QW//QMxeHNjz1se9zJ9ZCb3IaXQ165aObRkxNYx 7SUA== 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=lgMyPZYrb3nwjXIR9q8COjU2UhZ4fpa1Lv+L1kHYEeA=; b=yhNjTEG02cxAYMxYemOjyex+osu1TTymE36wDJzTIFihudQp8ZboGifJTiTFzd54A4 QSPKzeQ8S2DIgRZaDU2w1dnZFSy2vRhTkedJ0KaRIBo3cWvJOfzyKfr1GDXzc5ilVkJy dqU4B/qZQ3ySS6DiMTxRBXdqfA5/xTvIYMBP27GG2mFV9GCsvvnTMRQBaVsvGVCOEI/L CZ1QDCA220Lc2YcxKSvKzXT+DwanyQU9t3LziN5+lu7ejXbiDKhtox0KkVm/uc6dPLOg VjfxmD1HOtSLrbAoTiKjVMzbd6gW4Qj/jnkcg6iNrICF6S3ji26+yJ+WAVzgQOsK1UlL uD2A== X-Gm-Message-State: AOAM533+Xtp2zJiFQFIR6Mz9ejEGqY3W4YYnUzkw7VNH0/23S/9q8S7o GEND4byFNpESrZCylh/ed4UGVm1cMio= X-Google-Smtp-Source: ABdhPJzu1t14nGQWGn/D7Q+jpHGPkg41BNm4Dsp5Z2VZLop6NbXHjl963SSTg9GFrVlYC4vLoLqj3g== X-Received: by 2002:a05:6402:4313:: with SMTP id m19mr2957229edc.320.1644917550078; Tue, 15 Feb 2022 01:32:30 -0800 (PST) From: Paolo Bonzini To: qemu-devel@nongnu.org Subject: [PULL 07/30] configure, meson: move membarrier test to meson Date: Tue, 15 Feb 2022 10:32:00 +0100 Message-Id: <20220215093223.110827-8-pbonzini@redhat.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220215093223.110827-1-pbonzini@redhat.com> References: <20220215093223.110827-1-pbonzini@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Host-Lookup-Failed: Reverse DNS lookup failed for 2a00:1450:4864:20::52a (failed) 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+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::52a; envelope-from=paolo.bonzini@gmail.com; helo=mail-ed1-x52a.google.com X-Spam_score_int: 2 X-Spam_score: 0.2 X-Spam_bar: / X-Spam_report: (0.2 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FORGED_FROMDOMAIN=0.25, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.25, PDS_HP_HELO_NORDNS=0.904, RCVD_IN_DNSWL_NONE=-0.0001, RDNS_NONE=0.793, 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+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZM-MESSAGEID: 1644918036048100001 Content-Type: text/plain; charset="utf-8" The test is a bit different from the others, in that it does not run if $membarrier is empty. For meson, the default can simply be disabled; if one day we will toggle the default, no change is needed in meson.build. Signed-off-by: Paolo Bonzini --- configure | 40 ----------------------------------- meson.build | 22 ++++++++++++++++++- meson_options.txt | 6 ++++++ scripts/meson-buildoptions.sh | 3 +++ util/meson.build | 4 +++- 5 files changed, 33 insertions(+), 42 deletions(-) diff --git a/configure b/configure index a6a577277f..c49797012d 100755 --- a/configure +++ b/configure @@ -290,7 +290,6 @@ EXTRA_CXXFLAGS=3D"" EXTRA_LDFLAGS=3D"" =20 xen_ctrl_version=3D"$default_feature" -membarrier=3D"$default_feature" vhost_kernel=3D"$default_feature" vhost_net=3D"$default_feature" vhost_crypto=3D"$default_feature" @@ -967,10 +966,6 @@ for opt do ;; --enable-fdt=3D*) fdt=3D"$optarg" ;; - --disable-membarrier) membarrier=3D"no" - ;; - --enable-membarrier) membarrier=3D"yes" - ;; --with-pkgversion=3D*) pkgversion=3D"$optarg" ;; --with-coroutine=3D*) coroutine=3D"$optarg" @@ -1382,7 +1377,6 @@ cat << EOF lto Enable Link-Time Optimization. safe-stack SafeStack Stack Smash Protection. Depends on clang/llvm >=3D 3.7 and requires coroutine backend ucont= ext. - membarrier membarrier system call (for Linux 4.14+ or Windows) rdma Enable RDMA-based migration pvrdma Enable PVRDMA support vhost-net vhost-net kernel acceleration support @@ -2823,37 +2817,6 @@ if test "$fortify_source" !=3D "no"; then fi fi =20 -########################################## -# check for usable membarrier system call -if test "$membarrier" =3D "yes"; then - have_membarrier=3Dno - if test "$mingw32" =3D "yes" ; then - have_membarrier=3Dyes - elif test "$linux" =3D "yes" ; then - cat > $TMPC << EOF - #include - #include - #include - #include - int main(void) { - syscall(__NR_membarrier, MEMBARRIER_CMD_QUERY, 0); - syscall(__NR_membarrier, MEMBARRIER_CMD_SHARED, 0); - exit(0); - } -EOF - if compile_prog "" "" ; then - have_membarrier=3Dyes - fi - fi - if test "$have_membarrier" =3D "no"; then - feature_not_found "membarrier" "membarrier system call not available" - fi -else - # Do not enable it by default even for Mingw32, because it doesn't - # work on Wine. - membarrier=3Dno -fi - ########################################## # check for usable AF_ALG environment have_afalg=3Dno @@ -3315,9 +3278,6 @@ fi if test "$vhost_user_fs" =3D "yes" ; then echo "CONFIG_VHOST_USER_FS=3Dy" >> $config_host_mak fi -if test "$membarrier" =3D "yes" ; then - echo "CONFIG_MEMBARRIER=3Dy" >> $config_host_mak -fi if test "$tcg" =3D "enabled" -a "$tcg_interpreter" =3D "true" ; then echo "CONFIG_TCG_INTERPRETER=3Dy" >> $config_host_mak fi diff --git a/meson.build b/meson.build index 7a262051b7..6dc38a7916 100644 --- a/meson.build +++ b/meson.build @@ -1808,6 +1808,26 @@ config_host_data.set('CONFIG_AVX512F_OPT', get_optio= n('avx512f') \ int main(int argc, char *argv[]) { return bar(argv[0]); } '''), error_message: 'AVX512F not available').allowed()) =20 +if get_option('membarrier').disabled() + have_membarrier =3D false +elif targetos =3D=3D 'windows' + have_membarrier =3D true +elif targetos =3D=3D 'linux' + have_membarrier =3D cc.compiles(''' + #include + #include + #include + #include + int main(void) { + syscall(__NR_membarrier, MEMBARRIER_CMD_QUERY, 0); + syscall(__NR_membarrier, MEMBARRIER_CMD_SHARED, 0); + exit(0); + }''') +endif +config_host_data.set('CONFIG_MEMBARRIER', get_option('membarrier') \ + .require(have_membarrier, error_message: 'membarrier system call not ava= ilable') \ + .allowed()) + config_host_data.set('CONFIG_AF_VSOCK', cc.compiles(gnu_source_prefix + ''' #include #include @@ -3331,7 +3351,7 @@ summary_info +=3D {'link-time optimization (LTO)': ge= t_option('b_lto')} summary_info +=3D {'PIE': get_option('b_pie')} summary_info +=3D {'static build': config_host.has_key('CONFIG_STATIC= ')} summary_info +=3D {'malloc trim support': has_malloc_trim} -summary_info +=3D {'membarrier': config_host.has_key('CONFIG_MEMBAR= RIER')} +summary_info +=3D {'membarrier': have_membarrier} summary_info +=3D {'debug stack usage': config_host.has_key('CONFIG_DEBUG_= STACK_USAGE')} summary_info +=3D {'mutex debugging': config_host.has_key('CONFIG_DEBUG_= MUTEX')} summary_info +=3D {'memory allocator': get_option('malloc')} diff --git a/meson_options.txt b/meson_options.txt index 6ff349023c..49f14f960e 100644 --- a/meson_options.txt +++ b/meson_options.txt @@ -68,6 +68,12 @@ option('multiprocess', type: 'feature', value: 'auto', description: 'Out of process device emulation support') option('dbus_display', type: 'feature', value: 'auto', description: '-display dbus support') + +# Do not enable it by default even for Mingw32, because it doesn't +# work on Wine. +option('membarrier', type: 'feature', value: 'disabled', + description: 'membarrier system call (for Linux 4.14+ or Windows') + option('avx2', type: 'feature', value: 'auto', description: 'AVX2 optimizations') option('avx512f', type: 'feature', value: 'disabled', diff --git a/scripts/meson-buildoptions.sh b/scripts/meson-buildoptions.sh index dcfc39ec6b..c204ede02b 100644 --- a/scripts/meson-buildoptions.sh +++ b/scripts/meson-buildoptions.sh @@ -65,6 +65,7 @@ meson_options_help() { printf "%s\n" ' lzfse lzfse support for DMG images' printf "%s\n" ' lzo lzo compression support' printf "%s\n" ' malloc-trim enable libc malloc_trim() for memory op= timization' + printf "%s\n" ' membarrier membarrier system call (for Linux 4.14+= or Windows' printf "%s\n" ' mpath Multipath persistent reservation passth= rough' printf "%s\n" ' multiprocess Out of process device emulation support' printf "%s\n" ' netmap netmap network backend support' @@ -204,6 +205,8 @@ _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 ;; + --enable-membarrier) printf "%s" -Dmembarrier=3Denabled ;; + --disable-membarrier) printf "%s" -Dmembarrier=3Ddisabled ;; --enable-mpath) printf "%s" -Dmpath=3Denabled ;; --disable-mpath) printf "%s" -Dmpath=3Ddisabled ;; --enable-multiprocess) printf "%s" -Dmultiprocess=3Denabled ;; diff --git a/util/meson.build b/util/meson.build index c9a9cc1cf5..3736988b9f 100644 --- a/util/meson.build +++ b/util/meson.build @@ -35,7 +35,9 @@ util_ss.add(files('crc32c.c')) util_ss.add(files('uuid.c')) util_ss.add(files('getauxval.c')) util_ss.add(files('rcu.c')) -util_ss.add(when: 'CONFIG_MEMBARRIER', if_true: files('sys_membarrier.c')) +if have_membarrier + util_ss.add(files('sys_membarrier.c')) +endif util_ss.add(files('log.c')) util_ss.add(files('pagesize.c')) util_ss.add(files('qdist.c')) --=20 2.34.1 From nobody Mon Feb 9 09:42:38 2026 Delivered-To: importer@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+importer=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 1644918221299471.996783024858; Tue, 15 Feb 2022 01:43:41 -0800 (PST) Received: from localhost ([::1]:56586 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nJuN1-0005f1-QG for importer@patchew.org; Tue, 15 Feb 2022 04:43:39 -0500 Received: from eggs.gnu.org ([209.51.188.92]:54768) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nJuCI-0003wy-CL for qemu-devel@nongnu.org; Tue, 15 Feb 2022 04:32:34 -0500 Received: from [2a00:1450:4864:20::633] (port=37672 helo=mail-ej1-x633.google.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nJuCG-0008Qc-2y for qemu-devel@nongnu.org; Tue, 15 Feb 2022 04:32:33 -0500 Received: by mail-ej1-x633.google.com with SMTP id h8so16382918ejy.4 for ; Tue, 15 Feb 2022 01:32:31 -0800 (PST) Received: from avogadro.lan ([2001:b07:6468:f312:c8dd:75d4:99ab:290a]) by smtp.gmail.com with ESMTPSA id m4sm6634308ejl.45.2022.02.15.01.32.30 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 15 Feb 2022 01:32:30 -0800 (PST) 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=9eEr9vypFvm/GDMW5MF5P0L/9K86tQJ32Kkz70oz/Mk=; b=bF0cwE7zeeD+Se7QQRThBYsohef3+1FvmOVCS2Im5E+iJ+GjwyPJucKq2sesemcCHV loX1zZXk4uNBwpHDE1zLsDU59rGwyrxkIh3NOxVXcza7B5MlqRZT1LDpL5tl830C4mgQ 7XRXW254EwoqhQb+Vn2ceZ66sg5jzXPqnXRXg34P6nA5r564uQJXVv52fpOBN1sI0Ste ADPLsMe5QaAYjc2Vf8utcK7XVgbwF1dz24dIf7TN0tFWGRShRl1cZvVpWU7jpEuFQSlg 6dX9Aup8W/M3yxuqeD7Zwga2+aU45SD8I7mYaIVfaTxpA92OMtlO5OTypMBE8h1i0mCH TSMw== 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=9eEr9vypFvm/GDMW5MF5P0L/9K86tQJ32Kkz70oz/Mk=; b=tHfyniMJhtGA5pYTC5GDnqHS6ZKZQwk2Owt5/IARWjbFDcjvauJitDdOxpbU1DOolG 0Y60pmqFZIoQOscjWVKpALwaxONMYrLpjKtwRJNn+oSDxs7A1JA7bkphXC8MgwFDWoCn +I9o+jeL/ccXQM+DY8OTpEtj/iRiXTQoafGXR3suSsJsnhd+GbwvByUUODtUfpHTlnsn 4R+9qwap+pppLVYOS4ReuBV/LJo8cBqgGxQGoIhxyGIphAxj/HhDIwOVKEkbtD0C21Gs pcHriSXLZdGAIOmkXz+U4HCxU79X+xqY7c9ebVA+lP3t6Ye/LirGN7PUOKcLK5JyxNRM FGaQ== X-Gm-Message-State: AOAM532QUKVaL4sEm9r/TqfvcqJ2ttOaw1g37I3pJPkrct5n7l663ELH gFI9FRunNnH29C1D9BQgmVGhYU0xBog= X-Google-Smtp-Source: ABdhPJw8m5Rmb1jlA1bH3rSyRWzqhmsJXYez9yGUoOcuhrQCeRzrglrwEj6uMa0+pkkj5/k2ajBAZg== X-Received: by 2002:a17:906:8592:: with SMTP id v18mr689703ejx.207.1644917550737; Tue, 15 Feb 2022 01:32:30 -0800 (PST) From: Paolo Bonzini To: qemu-devel@nongnu.org Subject: [PULL 08/30] configure, meson: move AF_ALG test to meson Date: Tue, 15 Feb 2022 10:32:01 +0100 Message-Id: <20220215093223.110827-9-pbonzini@redhat.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220215093223.110827-1-pbonzini@redhat.com> References: <20220215093223.110827-1-pbonzini@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Host-Lookup-Failed: Reverse DNS lookup failed for 2a00:1450:4864:20::633 (failed) 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+importer=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: 2 X-Spam_score: 0.2 X-Spam_bar: / X-Spam_report: (0.2 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FORGED_FROMDOMAIN=0.25, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.25, PDS_HP_HELO_NORDNS=0.904, RCVD_IN_DNSWL_NONE=-0.0001, RDNS_NONE=0.793, 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+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZM-MESSAGEID: 1644918222331100001 Content-Type: text/plain; charset="utf-8" Signed-off-by: Paolo Bonzini --- configure | 36 ----------------------------------- crypto/meson.build | 4 +++- meson.build | 16 +++++++++++++++- meson_options.txt | 2 ++ scripts/meson-buildoptions.sh | 3 +++ 5 files changed, 23 insertions(+), 38 deletions(-) diff --git a/configure b/configure index c49797012d..07ea08cd08 100755 --- a/configure +++ b/configure @@ -329,7 +329,6 @@ want_tools=3D"$default_feature" coroutine=3D"" coroutine_pool=3D"$default_feature" debug_stack_usage=3D"no" -crypto_afalg=3D"no" tls_priority=3D"NORMAL" tpm=3D"$default_feature" live_block_migration=3D${default_feature:-yes} @@ -976,10 +975,6 @@ for opt do ;; --enable-debug-stack-usage) debug_stack_usage=3D"yes" ;; - --enable-crypto-afalg) crypto_afalg=3D"yes" - ;; - --disable-crypto-afalg) crypto_afalg=3D"no" - ;; --disable-vhost-net) vhost_net=3D"no" ;; --enable-vhost-net) vhost_net=3D"yes" @@ -1402,7 +1397,6 @@ cat << EOF vvfat vvfat image format support qed qed image format support parallels parallels image format support - crypto-afalg Linux AF_ALG crypto backend driver debug-mutex mutex debugging support rng-none dummy RNG, avoid using /dev/(u)random and getrandom() gio libgio support @@ -2817,32 +2811,6 @@ if test "$fortify_source" !=3D "no"; then fi fi =20 -########################################## -# check for usable AF_ALG environment -have_afalg=3Dno -cat > $TMPC << EOF -#include -#include -#include -#include -int main(void) { - int sock; - sock =3D socket(AF_ALG, SOCK_SEQPACKET, 0); - return sock; -} -EOF -if compile_prog "" "" ; then - have_afalg=3Dyes -fi -if test "$crypto_afalg" =3D "yes" -then - if test "$have_afalg" !=3D "yes" - then - error_exit "AF_ALG requested but could not be detected" - fi -fi - - ########################################## # checks for sanitizers =20 @@ -3308,10 +3276,6 @@ if test "$debug_stack_usage" =3D "yes" ; then echo "CONFIG_DEBUG_STACK_USAGE=3Dy" >> $config_host_mak fi =20 -if test "$crypto_afalg" =3D "yes" ; then - echo "CONFIG_AF_ALG=3Dy" >> $config_host_mak -fi - if test "$have_asan_iface_fiber" =3D "yes" ; then echo "CONFIG_ASAN_IFACE_FIBER=3Dy" >> $config_host_mak fi diff --git a/crypto/meson.build b/crypto/meson.build index 95a6a83504..9bf3a431fe 100644 --- a/crypto/meson.build +++ b/crypto/meson.build @@ -35,7 +35,9 @@ else endif =20 crypto_ss.add(when: 'CONFIG_SECRET_KEYRING', if_true: files('secret_keyrin= g.c')) -crypto_ss.add(when: 'CONFIG_AF_ALG', if_true: files('afalg.c', 'cipher-afa= lg.c', 'hash-afalg.c')) +if have_afalg + crypto_ss.add(if_true: files('afalg.c', 'cipher-afalg.c', 'hash-afalg.c'= )) +endif crypto_ss.add(when: gnutls, if_true: files('tls-cipher-suites.c')) =20 util_ss.add(files('aes.c')) diff --git a/meson.build b/meson.build index 6dc38a7916..9e1acb98aa 100644 --- a/meson.build +++ b/meson.build @@ -1828,6 +1828,20 @@ config_host_data.set('CONFIG_MEMBARRIER', get_option= ('membarrier') \ .require(have_membarrier, error_message: 'membarrier system call not ava= ilable') \ .allowed()) =20 +have_afalg =3D get_option('crypto_afalg') \ + .require(cc.compiles(gnu_source_prefix + ''' + #include + #include + #include + #include + int main(void) { + int sock; + sock =3D socket(AF_ALG, SOCK_SEQPACKET, 0); + return sock; + } + '''), error_message: 'AF_ALG requested but could not be detected').allow= ed() +config_host_data.set('CONFIG_AF_ALG', have_afalg) + config_host_data.set('CONFIG_AF_VSOCK', cc.compiles(gnu_source_prefix + ''' #include #include @@ -3453,7 +3467,7 @@ summary_info +=3D {'nettle': nettle} if nettle.found() summary_info +=3D {' XTS': xts !=3D 'private'} endif -summary_info +=3D {'crypto afalg': config_host.has_key('CONFIG_AF_ALG= ')} +summary_info +=3D {'AF_ALG support': have_afalg} summary_info +=3D {'rng-none': config_host.has_key('CONFIG_RNG_NO= NE')} summary_info +=3D {'Linux keyring': config_host.has_key('CONFIG_SECRET= _KEYRING')} summary(summary_info, bool_yn: true, section: 'Crypto') diff --git a/meson_options.txt b/meson_options.txt index 49f14f960e..6efad01528 100644 --- a/meson_options.txt +++ b/meson_options.txt @@ -113,6 +113,8 @@ option('nettle', type : 'feature', value : 'auto', description: 'nettle cryptography support') option('gcrypt', type : 'feature', value : 'auto', description: 'libgcrypt cryptography support') +option('crypto_afalg', type : 'feature', value : 'auto', + description: 'Linux AF_ALG crypto backend driver') option('libdaxctl', type : 'feature', value : 'auto', description: 'libdaxctl support') option('libpmem', type : 'feature', value : 'auto', diff --git a/scripts/meson-buildoptions.sh b/scripts/meson-buildoptions.sh index c204ede02b..a20d40e685 100644 --- a/scripts/meson-buildoptions.sh +++ b/scripts/meson-buildoptions.sh @@ -34,6 +34,7 @@ meson_options_help() { printf "%s\n" ' cap-ng cap_ng support' printf "%s\n" ' cocoa Cocoa user interface (macOS only)' printf "%s\n" ' coreaudio CoreAudio sound support' + printf "%s\n" ' crypto-afalg Linux AF_ALG crypto backend driver' printf "%s\n" ' curl CURL block device driver' printf "%s\n" ' curses curses UI' printf "%s\n" ' dbus-display -display dbus support' @@ -135,6 +136,8 @@ _meson_option_parse() { --disable-cocoa) printf "%s" -Dcocoa=3Ddisabled ;; --enable-coreaudio) printf "%s" -Dcoreaudio=3Denabled ;; --disable-coreaudio) printf "%s" -Dcoreaudio=3Ddisabled ;; + --enable-crypto-afalg) printf "%s" -Dcrypto_afalg=3Denabled ;; + --disable-crypto-afalg) printf "%s" -Dcrypto_afalg=3Ddisabled ;; --enable-curl) printf "%s" -Dcurl=3Denabled ;; --disable-curl) printf "%s" -Dcurl=3Ddisabled ;; --enable-curses) printf "%s" -Dcurses=3Denabled ;; --=20 2.34.1 From nobody Mon Feb 9 09:42:38 2026 Delivered-To: importer@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+importer=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 1644918431843404.7182430562541; Tue, 15 Feb 2022 01:47:11 -0800 (PST) Received: from localhost ([::1]:34794 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nJuQQ-000263-Ll for importer@patchew.org; Tue, 15 Feb 2022 04:47:10 -0500 Received: from eggs.gnu.org ([209.51.188.92]:54772) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nJuCI-0003xF-Ec for qemu-devel@nongnu.org; Tue, 15 Feb 2022 04:32:34 -0500 Received: from [2a00:1450:4864:20::635] (port=37674 helo=mail-ej1-x635.google.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nJuCG-0008Qi-L5 for qemu-devel@nongnu.org; Tue, 15 Feb 2022 04:32:34 -0500 Received: by mail-ej1-x635.google.com with SMTP id h8so16382970ejy.4 for ; Tue, 15 Feb 2022 01:32:32 -0800 (PST) Received: from avogadro.lan ([2001:b07:6468:f312:c8dd:75d4:99ab:290a]) by smtp.gmail.com with ESMTPSA id m4sm6634308ejl.45.2022.02.15.01.32.30 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 15 Feb 2022 01:32:31 -0800 (PST) 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=931YQ/n8R//7jvPgZB7qt0my6F42icBbcLTxZP+VAfM=; b=gHJflh9XqrzEWRTmfR5/Ul5ZDaRrMDxb202oO1gVlK2jlrmdaL3vmcp3kU50JvU71J 6M1E7OKUl2sBO0JWXZksyNxw1m9NzY0HZUhbSLIl8XosqhhMuFTm7QWCxzk8ByqDVElu KhsFIA5mMA8unjuWYbxSCJilPsxShhPIIdeZbBI/GHZfZ6qmkj+Nh0V/kpR36Oe3rkF9 p9gFtBQfb4eXM+2icM1XiQHW+wp9IQgsxS8GQhFH6iLWzbQxlOEXohuH+GecXfRwsPAV YUF317W74kttGZ3RWEHqEe39fTZMVMmbqHoYxOOemzuL97BSnrtC0kYD8GhWGFU16nWH QTMA== 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=931YQ/n8R//7jvPgZB7qt0my6F42icBbcLTxZP+VAfM=; b=hG88xwcfqLS1XM+NDl/UnCJY0/r0kwEDP2G+hf6nSOKKdtZaKGmd9EMuB+dpOMpbfK Gsh7uQPpEui8BJPAIYZcY3o6XCnSHztWyWuqDeBkK2xKFhdtiauDaMoY8l0AZlAm2LT8 saXPSdPWgclZvFBNGySPmt1BsI2RiAXj+/cBGpVL/YoHw4IA2reYb+r33c1o+chLEAd/ cvRMiKo1HTjD9pOAZHUpeMkdri//uT8IbUqlpkEi/VjujRu6QvQfgREmaLMpXTRLHDEu BShWDEfOC+mkGAHAiCZAbILc+vzUKTFnlihS3R5K/kVTIBnG7GvsR5Ff5iu89vhpmr5k 7KpQ== X-Gm-Message-State: AOAM531t6+sV30Tg/zcVpTyAgVHGWCTpq2Vok4txwMMWsIlb4yFMXbup /pxaI70jBvQrbhWWMzvBI6Mlm01+4CI= X-Google-Smtp-Source: ABdhPJzBaFQm7uv/D3i+Df74xppaCXK5WmnH9G5Ou7z2y1E9eOOq7Rf3wsWUlWdRUmRYNw2SW9Fkjg== X-Received: by 2002:a17:906:779b:: with SMTP id s27mr2180122ejm.389.1644917551312; Tue, 15 Feb 2022 01:32:31 -0800 (PST) From: Paolo Bonzini To: qemu-devel@nongnu.org Subject: [PULL 09/30] configure, meson: move libnuma detection to meson Date: Tue, 15 Feb 2022 10:32:02 +0100 Message-Id: <20220215093223.110827-10-pbonzini@redhat.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220215093223.110827-1-pbonzini@redhat.com> References: <20220215093223.110827-1-pbonzini@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Host-Lookup-Failed: Reverse DNS lookup failed for 2a00:1450:4864:20::635 (failed) 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+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::635; envelope-from=paolo.bonzini@gmail.com; helo=mail-ej1-x635.google.com X-Spam_score_int: 2 X-Spam_score: 0.2 X-Spam_bar: / X-Spam_report: (0.2 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FORGED_FROMDOMAIN=0.25, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.25, PDS_HP_HELO_NORDNS=0.904, RCVD_IN_DNSWL_NONE=-0.0001, RDNS_NONE=0.793, 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+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZM-MESSAGEID: 1644918432962100001 Content-Type: text/plain; charset="utf-8" Signed-off-by: Paolo Bonzini --- configure | 31 ------------------------------- meson.build | 25 ++++++++++++++++++++----- meson_options.txt | 2 ++ scripts/meson-buildoptions.sh | 3 +++ 4 files changed, 25 insertions(+), 36 deletions(-) diff --git a/configure b/configure index 07ea08cd08..f536f53106 100755 --- a/configure +++ b/configure @@ -332,7 +332,6 @@ debug_stack_usage=3D"no" tls_priority=3D"NORMAL" tpm=3D"$default_feature" live_block_migration=3D${default_feature:-yes} -numa=3D"$default_feature" replication=3D${default_feature:-yes} bochs=3D${default_feature:-yes} cloop=3D${default_feature:-yes} @@ -1048,10 +1047,6 @@ for opt do ;; --enable-live-block-migration) live_block_migration=3D"yes" ;; - --disable-numa) numa=3D"no" - ;; - --enable-numa) numa=3D"yes" - ;; --disable-replication) replication=3D"no" ;; --enable-replication) replication=3D"yes" @@ -1384,7 +1379,6 @@ cat << EOF live-block-migration Block migration in the main migration stream coroutine-pool coroutine freelist (better performance) tpm TPM support - numa libnuma support replication replication support opengl opengl support qom-cast-debug cast debugging support @@ -2455,26 +2449,6 @@ EOF fi fi =20 -########################################## -# libnuma probe - -if test "$numa" !=3D "no" ; then - cat > $TMPC << EOF -#include -int main(void) { return numa_available(); } -EOF - - if compile_prog "" "-lnuma" ; then - numa=3Dyes - numa_libs=3D"-lnuma" - else - if test "$numa" =3D "yes" ; then - feature_not_found "numa" "install numactl devel" - fi - numa=3Dno - fi -fi - # check for usbfs have_usbfs=3Dno if test "$linux_user" =3D "yes"; then @@ -3442,11 +3416,6 @@ if test "$default_targets" =3D "yes"; then echo "CONFIG_DEFAULT_TARGETS=3Dy" >> $config_host_mak fi =20 -if test "$numa" =3D "yes"; then - echo "CONFIG_NUMA=3Dy" >> $config_host_mak - echo "NUMA_LIBS=3D$numa_libs" >> $config_host_mak -fi - if test "$ccache_cpp2" =3D "yes"; then echo "export CCACHE_CPP2=3Dy" >> $config_host_mak fi diff --git a/meson.build b/meson.build index 9e1acb98aa..f8b83f64db 100644 --- a/meson.build +++ b/meson.build @@ -1164,14 +1164,28 @@ if lzo.found() and not cc.links(''' endif endif =20 +numa =3D not_found +if not get_option('numa').auto() or have_system or have_tools + numa =3D cc.find_library('numa', has_headers: ['numa.h'], + required: get_option('numa'), + kwargs: static_kwargs) +endif +if numa.found() and not cc.links(''' + #include + int main(void) { return numa_available(); } + ''', dependencies: numa) + numa =3D not_found + if get_option('numa').enabled() + error('could not link numa') + else + warning('could not link numa, disabling') + endif +endif + rdma =3D not_found if 'CONFIG_RDMA' in config_host rdma =3D declare_dependency(link_args: config_host['RDMA_LIBS'].split()) endif -numa =3D not_found -if 'CONFIG_NUMA' in config_host - numa =3D declare_dependency(link_args: config_host['NUMA_LIBS'].split()) -endif xen =3D not_found if 'CONFIG_XEN_BACKEND' in config_host xen =3D declare_dependency(compile_args: config_host['XEN_CFLAGS'].split= (), @@ -1472,6 +1486,7 @@ config_host_data.set('CONFIG_LIBSSH', libssh.found()) config_host_data.set('CONFIG_LINUX_AIO', libaio.found()) config_host_data.set('CONFIG_LINUX_IO_URING', linux_io_uring.found()) config_host_data.set('CONFIG_LIBPMEM', libpmem.found()) +config_host_data.set('CONFIG_NUMA', numa.found()) config_host_data.set('CONFIG_RBD', rbd.found()) config_host_data.set('CONFIG_SDL', sdl.found()) config_host_data.set('CONFIG_SDL_IMAGE', sdl_image.found()) @@ -3548,7 +3563,7 @@ summary_info +=3D {'snappy support': snappy} summary_info +=3D {'bzip2 support': libbzip2} summary_info +=3D {'lzfse support': liblzfse} summary_info +=3D {'zstd support': zstd} -summary_info +=3D {'NUMA host support': config_host.has_key('CONFIG_NUMA')} +summary_info +=3D {'NUMA host support': numa} summary_info +=3D {'capstone': capstone_opt =3D=3D 'internal' ? c= apstone_opt : capstone} summary_info +=3D {'libpmem support': libpmem} summary_info +=3D {'libdaxctl support': libdaxctl} diff --git a/meson_options.txt b/meson_options.txt index 6efad01528..bb443023b5 100644 --- a/meson_options.txt +++ b/meson_options.txt @@ -103,6 +103,8 @@ option('libnfs', type : 'feature', value : 'auto', description: 'libnfs block device driver') option('mpath', type : 'feature', value : 'auto', description: 'Multipath persistent reservation passthrough') +option('numa', type : 'feature', value : 'auto', + description: 'libnuma support') option('iconv', type : 'feature', value : 'auto', description: 'Font glyph conversion support') option('curses', type : 'feature', value : 'auto', diff --git a/scripts/meson-buildoptions.sh b/scripts/meson-buildoptions.sh index a20d40e685..d46d7181e7 100644 --- a/scripts/meson-buildoptions.sh +++ b/scripts/meson-buildoptions.sh @@ -71,6 +71,7 @@ meson_options_help() { printf "%s\n" ' multiprocess Out of process device emulation support' printf "%s\n" ' netmap netmap network backend support' printf "%s\n" ' nettle nettle cryptography support' + printf "%s\n" ' numa libnuma support' printf "%s\n" ' nvmm NVMM acceleration support' printf "%s\n" ' oss OSS sound support' printf "%s\n" ' pa PulseAudio sound support' @@ -218,6 +219,8 @@ _meson_option_parse() { --disable-netmap) printf "%s" -Dnetmap=3Ddisabled ;; --enable-nettle) printf "%s" -Dnettle=3Denabled ;; --disable-nettle) printf "%s" -Dnettle=3Ddisabled ;; + --enable-numa) printf "%s" -Dnuma=3Denabled ;; + --disable-numa) printf "%s" -Dnuma=3Ddisabled ;; --enable-nvmm) printf "%s" -Dnvmm=3Denabled ;; --disable-nvmm) printf "%s" -Dnvmm=3Ddisabled ;; --enable-oss) printf "%s" -Doss=3Denabled ;; --=20 2.34.1 From nobody Mon Feb 9 09:42:38 2026 Delivered-To: importer@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+importer=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 1644918036984869.51760555417; Tue, 15 Feb 2022 01:40:36 -0800 (PST) Received: from localhost ([::1]:50024 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nJuK3-00018e-Jk for importer@patchew.org; Tue, 15 Feb 2022 04:40:35 -0500 Received: from eggs.gnu.org ([209.51.188.92]:54792) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nJuCJ-000425-IU for qemu-devel@nongnu.org; Tue, 15 Feb 2022 04:32:35 -0500 Received: from [2a00:1450:4864:20::62d] (port=42826 helo=mail-ej1-x62d.google.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nJuCH-0008Qt-6p for qemu-devel@nongnu.org; Tue, 15 Feb 2022 04:32:35 -0500 Received: by mail-ej1-x62d.google.com with SMTP id hw13so14354374ejc.9 for ; Tue, 15 Feb 2022 01:32:32 -0800 (PST) Received: from avogadro.lan ([2001:b07:6468:f312:c8dd:75d4:99ab:290a]) by smtp.gmail.com with ESMTPSA id m4sm6634308ejl.45.2022.02.15.01.32.31 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 15 Feb 2022 01:32:31 -0800 (PST) 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=iCDUNjf44S0gmQlhAow9hp61ImWk+aCFVeZk76vSUJQ=; b=bQCwlqJdhVz6P3Ul3gtWOKMUaGslDym33iRwLonoBhuMC4NV81ZCKZkDjSLHrFZ2PB RCuQA0kVpeTaqT6C5z+Aiy3g4iuL+jceMeP5tD8iBUEUx4kjNV7n6WqufTnB7bWgw4r2 oXrWRHIXGyJmZbE0zuZXmgdxKwWlwZNQ+pknCe4BS5MS6PoGkoMN9cGwW1sZ1hJOlRmq BkYfEc5OhEPH/hPS/6ENGVgnrgJuNRMkrOrKDkPHZwZ97GTs4qgAHjJVFFQKUw2X7XmN itaBhEO6pySBQ/7ru4Wgmk/5PHGeMSBswMVE4Lt+y5kr+ndlGyk/NnmHuJm475CLin8L Jxew== 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=iCDUNjf44S0gmQlhAow9hp61ImWk+aCFVeZk76vSUJQ=; b=VvRi34asSNkv1bzeGK7dbYwP328oDM73QQ+TmkuCWCJTtadPn1xAqvrZgxOUx3XQm8 M7m7aTX+d0gvVWbmET41lq/xk14ebfHCh9v52B1yyKct2NMZU19DRIaUdWFwLC9uy76U kaqy0aKUpO1xw7WCCuWPGku2txqqkair6M2/8U9/ow2iJJkYpru7s6iWgrZ4woBbJIOR LZDGhnWdTo46aprwC/2YxoFpZU8F6OVjSnXFfDlQ0YcYX+GR7FM6tJ+Q8fbc0mA+LIxY BgvtZs/a2yPNpg6Cp82pCfbud8hYkbj/WdYpioNqhPfKeABFDNLppnVqkxl2boiVdukh 8g8g== X-Gm-Message-State: AOAM532R/roG1DFMFqxJh2S/Fh42nacDM43Hi70CYX18qzlrPry2kVlA Y0Jl9HDcKWSd2+kv1DG1G0pz4tAgcrg= X-Google-Smtp-Source: ABdhPJzHqmgyUf23n5SRSTOecJElrwBAzQFDgwkyQptZR6WVRQU09n5STqTns57I+mUdRo1qKqFAKg== X-Received: by 2002:a17:906:7a09:: with SMTP id d9mr2140163ejo.103.1644917552001; Tue, 15 Feb 2022 01:32:32 -0800 (PST) From: Paolo Bonzini To: qemu-devel@nongnu.org Subject: [PULL 10/30] configure, meson: move TPM check to meson Date: Tue, 15 Feb 2022 10:32:03 +0100 Message-Id: <20220215093223.110827-11-pbonzini@redhat.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220215093223.110827-1-pbonzini@redhat.com> References: <20220215093223.110827-1-pbonzini@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Host-Lookup-Failed: Reverse DNS lookup failed for 2a00:1450:4864:20::62d (failed) 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+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::62d; envelope-from=paolo.bonzini@gmail.com; helo=mail-ej1-x62d.google.com X-Spam_score_int: 2 X-Spam_score: 0.2 X-Spam_bar: / X-Spam_report: (0.2 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FORGED_FROMDOMAIN=0.25, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.25, PDS_HP_HELO_NORDNS=0.904, RCVD_IN_DNSWL_NONE=-0.0001, RDNS_NONE=0.793, 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+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZM-MESSAGEID: 1644918039861100001 Content-Type: text/plain; charset="utf-8" The check is simply for a POSIX system. Signed-off-by: Paolo Bonzini --- backends/tpm/meson.build | 14 ++++++-------- configure | 25 ------------------------- docs/devel/kconfig.rst | 2 +- hw/acpi/meson.build | 4 +++- meson.build | 9 +++++++-- meson_options.txt | 2 ++ scripts/meson-buildoptions.sh | 3 +++ softmmu/meson.build | 5 ++++- 8 files changed, 26 insertions(+), 38 deletions(-) diff --git a/backends/tpm/meson.build b/backends/tpm/meson.build index 857929082e..7f2503f84e 100644 --- a/backends/tpm/meson.build +++ b/backends/tpm/meson.build @@ -1,8 +1,6 @@ -tpm_ss =3D ss.source_set() - -tpm_ss.add(files('tpm_backend.c')) -tpm_ss.add(files('tpm_util.c')) -tpm_ss.add(when: 'CONFIG_TPM_PASSTHROUGH', if_true: files('tpm_passthrough= .c')) -tpm_ss.add(when: 'CONFIG_TPM_EMULATOR', if_true: files('tpm_emulator.c')) - -softmmu_ss.add_all(when: 'CONFIG_TPM', if_true: tpm_ss) +if have_tpm + softmmu_ss.add(files('tpm_backend.c')) + softmmu_ss.add(files('tpm_util.c')) + softmmu_ss.add(when: 'CONFIG_TPM_PASSTHROUGH', if_true: files('tpm_passt= hrough.c')) + softmmu_ss.add(when: 'CONFIG_TPM_EMULATOR', if_true: files('tpm_emulator= .c')) +endif diff --git a/configure b/configure index f536f53106..54eb954296 100755 --- a/configure +++ b/configure @@ -330,7 +330,6 @@ coroutine=3D"" coroutine_pool=3D"$default_feature" debug_stack_usage=3D"no" tls_priority=3D"NORMAL" -tpm=3D"$default_feature" live_block_migration=3D${default_feature:-yes} replication=3D${default_feature:-yes} bochs=3D${default_feature:-yes} @@ -1039,10 +1038,6 @@ for opt do ;; --disable-pvrdma) pvrdma=3D"no" ;; - --disable-tpm) tpm=3D"no" - ;; - --enable-tpm) tpm=3D"yes" - ;; --disable-live-block-migration) live_block_migration=3D"no" ;; --enable-live-block-migration) live_block_migration=3D"yes" @@ -1378,7 +1373,6 @@ cat << EOF vhost-vdpa vhost-vdpa kernel backend support live-block-migration Block migration in the main migration stream coroutine-pool coroutine freelist (better performance) - tpm TPM support replication replication support opengl opengl support qom-cast-debug cast debugging support @@ -2395,21 +2389,6 @@ if test "$modules" =3D yes; then fi fi =20 -########################################## -# TPM emulation is only on POSIX - -if test "$tpm" =3D ""; then - if test "$mingw32" =3D "yes"; then - tpm=3Dno - else - tpm=3Dyes - fi -elif test "$tpm" =3D "yes"; then - if test "$mingw32" =3D "yes" ; then - error_exit "TPM emulation only available on POSIX systems" - fi -fi - ########################################## # fdt probe =20 @@ -3274,10 +3253,6 @@ if test "$live_block_migration" =3D "yes" ; then echo "CONFIG_LIVE_BLOCK_MIGRATION=3Dy" >> $config_host_mak fi =20 -if test "$tpm" =3D "yes"; then - echo 'CONFIG_TPM=3Dy' >> $config_host_mak -fi - if test "$rdma" =3D "yes" ; then echo "CONFIG_RDMA=3Dy" >> $config_host_mak echo "RDMA_LIBS=3D$rdma_libs" >> $config_host_mak diff --git a/docs/devel/kconfig.rst b/docs/devel/kconfig.rst index a1cdbec751..d6b55a6fe0 100644 --- a/docs/devel/kconfig.rst +++ b/docs/devel/kconfig.rst @@ -301,7 +301,7 @@ and also listed as follows in the top-level meson.build= 's host_kconfig variable:: =20 host_kconfig =3D \ - ('CONFIG_TPM' in config_host ? ['CONFIG_TPM=3Dy'] : []) + \ + (have_tpm ? ['CONFIG_TPM=3Dy'] : []) + \ ('CONFIG_SPICE' in config_host ? ['CONFIG_SPICE=3Dy'] : []) + \ (have_ivshmem ? ['CONFIG_IVSHMEM=3Dy'] : []) + \ ... diff --git a/hw/acpi/meson.build b/hw/acpi/meson.build index f5b22983bb..8bea2e6933 100644 --- a/hw/acpi/meson.build +++ b/hw/acpi/meson.build @@ -25,7 +25,9 @@ acpi_ss.add(when: 'CONFIG_ACPI_X86_ICH', if_true: files('= ich9.c', 'tco.c')) acpi_ss.add(when: 'CONFIG_ACPI_ERST', if_true: files('erst.c')) acpi_ss.add(when: 'CONFIG_IPMI', if_true: files('ipmi.c'), if_false: files= ('ipmi-stub.c')) acpi_ss.add(when: 'CONFIG_PC', if_false: files('acpi-x86-stub.c')) -acpi_ss.add(when: 'CONFIG_TPM', if_true: files('tpm.c')) +if have_tpm + acpi_ss.add(files('tpm.c')) +endif softmmu_ss.add(when: 'CONFIG_ACPI', if_false: files('acpi-stub.c', 'aml-bu= ild-stub.c', 'ghes-stub.c')) softmmu_ss.add_all(when: 'CONFIG_ACPI', if_true: acpi_ss) softmmu_ss.add(when: 'CONFIG_ALL', if_true: files('acpi-stub.c', 'aml-buil= d-stub.c', diff --git a/meson.build b/meson.build index f8b83f64db..02137be91e 100644 --- a/meson.build +++ b/meson.build @@ -276,6 +276,10 @@ multiprocess_allowed =3D get_option('multiprocess') \ .require(targetos =3D=3D 'linux', error_message: 'Multiprocess QEMU is s= upported only on Linux') \ .allowed() =20 +have_tpm =3D get_option('tpm') \ + .require(targetos !=3D 'windows', error_message: 'TPM emulation only ava= ilable on POSIX systems') \ + .allowed() + # Target-specific libraries and flags libm =3D cc.find_library('m', required: false) threads =3D dependency('threads') @@ -1492,6 +1496,7 @@ config_host_data.set('CONFIG_SDL', sdl.found()) config_host_data.set('CONFIG_SDL_IMAGE', sdl_image.found()) config_host_data.set('CONFIG_SECCOMP', seccomp.found()) 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_USER_BLK_SERVER', have_vhost_user_blk_s= erver) @@ -1942,7 +1947,7 @@ endif have_ivshmem =3D config_host_data.get('CONFIG_EVENTFD') host_kconfig =3D \ (get_option('fuzzing') ? ['CONFIG_FUZZ=3Dy'] : []) + \ - ('CONFIG_TPM' in config_host ? ['CONFIG_TPM=3Dy'] : []) + \ + (have_tpm ? ['CONFIG_TPM=3Dy'] : []) + \ (spice.found() ? ['CONFIG_SPICE=3Dy'] : []) + \ (have_ivshmem ? ['CONFIG_IVSHMEM=3Dy'] : []) + \ ('CONFIG_OPENGL' in config_host ? ['CONFIG_OPENGL=3Dy'] : []) + \ @@ -3556,7 +3561,7 @@ if targetos =3D=3D 'windows' endif summary_info +=3D {'seccomp support': seccomp} summary_info +=3D {'GlusterFS support': glusterfs} -summary_info +=3D {'TPM support': config_host.has_key('CONFIG_TPM')} +summary_info +=3D {'TPM support': have_tpm} summary_info +=3D {'libssh support': libssh} summary_info +=3D {'lzo support': lzo} summary_info +=3D {'snappy support': snappy} diff --git a/meson_options.txt b/meson_options.txt index bb443023b5..1b44b4e666 100644 --- a/meson_options.txt +++ b/meson_options.txt @@ -68,6 +68,8 @@ option('multiprocess', type: 'feature', value: 'auto', description: 'Out of process device emulation support') option('dbus_display', type: 'feature', value: 'auto', description: '-display dbus support') +option('tpm', type : 'feature', value : 'auto', + description: 'TPM support') =20 # Do not enable it by default even for Mingw32, because it doesn't # work on Wine. diff --git a/scripts/meson-buildoptions.sh b/scripts/meson-buildoptions.sh index d46d7181e7..3f107e5724 100644 --- a/scripts/meson-buildoptions.sh +++ b/scripts/meson-buildoptions.sh @@ -86,6 +86,7 @@ meson_options_help() { printf "%s\n" ' spice Spice server support' printf "%s\n" ' spice-protocol Spice protocol support' printf "%s\n" ' tcg TCG support' + printf "%s\n" ' tpm TPM support' printf "%s\n" ' u2f U2F emulation support' printf "%s\n" ' usb-redir libusbredir support' printf "%s\n" ' vde vde network backend support' @@ -256,6 +257,8 @@ _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 ;; + --enable-tpm) printf "%s" -Dtpm=3Denabled ;; + --disable-tpm) printf "%s" -Dtpm=3Ddisabled ;; --enable-trace-backends=3D*) quote_sh "-Dtrace_backends=3D$2" ;; --enable-u2f) printf "%s" -Du2f=3Denabled ;; --disable-u2f) printf "%s" -Du2f=3Ddisabled ;; diff --git a/softmmu/meson.build b/softmmu/meson.build index d8e03018ab..39f766ce7c 100644 --- a/softmmu/meson.build +++ b/softmmu/meson.build @@ -27,6 +27,9 @@ softmmu_ss.add(files( 'qdev-monitor.c', ), sdl, libpmem, libdaxctl) =20 -softmmu_ss.add(when: 'CONFIG_TPM', if_true: files('tpm.c')) +if have_tpm + softmmu_ss.add(files('tpm.c')) +endif + softmmu_ss.add(when: seccomp, if_true: files('qemu-seccomp.c')) softmmu_ss.add(when: fdt, if_true: files('device_tree.c')) --=20 2.34.1 From nobody Mon Feb 9 09:42:38 2026 Delivered-To: importer@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+importer=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 1644918546228486.4012113151067; Tue, 15 Feb 2022 01:49:06 -0800 (PST) Received: from localhost ([::1]:41102 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nJuSG-0006du-RE for importer@patchew.org; Tue, 15 Feb 2022 04:49:04 -0500 Received: from eggs.gnu.org ([209.51.188.92]:54786) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nJuCJ-00041n-Bl for qemu-devel@nongnu.org; Tue, 15 Feb 2022 04:32:35 -0500 Received: from [2a00:1450:4864:20::635] (port=38628 helo=mail-ej1-x635.google.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nJuCH-0008R2-O1 for qemu-devel@nongnu.org; Tue, 15 Feb 2022 04:32:35 -0500 Received: by mail-ej1-x635.google.com with SMTP id k25so42890244ejp.5 for ; Tue, 15 Feb 2022 01:32:33 -0800 (PST) Received: from avogadro.lan ([2001:b07:6468:f312:c8dd:75d4:99ab:290a]) by smtp.gmail.com with ESMTPSA id m4sm6634308ejl.45.2022.02.15.01.32.32 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 15 Feb 2022 01:32:32 -0800 (PST) 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=3i4ZWFXWf5ojMIOfmpbxSRdcnviej/ulhAlrMSnov5o=; b=MTAlC/e7+4l7eKTsyhWCjxeQ1ofvlBiOqOXafCfEYg8ZK4bx6Tb490IMuYqwOEF/iY VuCspbiV/wmawTatpL0bjYEyRV4OEIe4R99kb3w2plfvmgpV8U8Qbzv6TqeVFqyTTthw LJ+qgu8PfrWjC7t6+pRHmhmnhWXTHFI18XXU/L+9ZWwdHnPah+u0qVmxos6AXUEZs4Vx pfsQjgGQt1weIzW3ygsSialxiSQHLRuSPOxDs/sgJyoSv8FuP5onzmYi3WcDZzh2/h2L 1SfkN6fXgn5b7PK6MWc93l0H4amtbvpjk6DJrusKaKgNg8vCcd8DrUVJyxHxlB3J1pVj 3ctQ== 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=3i4ZWFXWf5ojMIOfmpbxSRdcnviej/ulhAlrMSnov5o=; b=Yx8xOCkFVG4/w+6sU8mjI7Q56zoxxdMMgVr/8jKc+n108BdB3Dt65rmQ+LzyZEJBbd WVDDfM9gUHYaoxHXlbSCeJFh0b68TRZECRkynoAuTS980Z8OUfhe7/URA7id3d3CauTj 3dN9ZZD8SikgppbJ366LcZEFalE68n6EM6uKOF2CwKaJrizz4Yx2TkNQFgFe8kT9LSoB Wcyuj0d1oHHH+tahlsdFH0njpNsoRdQfinabPc5Ex2Z5sh38lHSHqfm3BCsb/0LF/x/u BaYKrySqCZ9NvsVDxM2YKTc2G13fCxncF9PqJ+HmqKFo85mywMA7/JOz7Kh1DQfyr15S tf/A== X-Gm-Message-State: AOAM533xmLwYHSqf+TyfAWeo8pwWJlTNW1pFocX5opy6lcUYnjQMF2sv Y2U7blUa/I/gR4+bembheIxWN89zyc0= X-Google-Smtp-Source: ABdhPJz3q7ZA3nFGEmylAz0lxvteARoDelcoQhCrbKaHUh5DUczEpEsGwDF0xB/M+8rMHr1pFue6ow== X-Received: by 2002:a17:906:43c8:: with SMTP id j8mr2270444ejn.293.1644917552576; Tue, 15 Feb 2022 01:32:32 -0800 (PST) From: Paolo Bonzini To: qemu-devel@nongnu.org Subject: [PULL 11/30] configure, meson: cleanup qemu-ga libraries Date: Tue, 15 Feb 2022 10:32:04 +0100 Message-Id: <20220215093223.110827-12-pbonzini@redhat.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220215093223.110827-1-pbonzini@redhat.com> References: <20220215093223.110827-1-pbonzini@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Host-Lookup-Failed: Reverse DNS lookup failed for 2a00:1450:4864:20::635 (failed) 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+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::635; envelope-from=paolo.bonzini@gmail.com; helo=mail-ej1-x635.google.com X-Spam_score_int: 2 X-Spam_score: 0.2 X-Spam_bar: / X-Spam_report: (0.2 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FORGED_FROMDOMAIN=0.25, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.25, PDS_HP_HELO_NORDNS=0.904, RCVD_IN_DNSWL_NONE=-0.0001, RDNS_NONE=0.793, 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+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZM-MESSAGEID: 1644918547359100001 Content-Type: text/plain; charset="utf-8" Move LIBS_QGA to meson.build, remove dead QGA_VSS_PROVIDER variable. Signed-off-by: Paolo Bonzini --- configure | 7 ------- qga/meson.build | 25 +++++++++++++++++-------- 2 files changed, 17 insertions(+), 15 deletions(-) diff --git a/configure b/configure index 54eb954296..ee7c4aed0a 100755 --- a/configure +++ b/configure @@ -240,7 +240,6 @@ block_drv_rw_whitelist=3D"" block_drv_ro_whitelist=3D"" block_drv_whitelist_tools=3D"no" host_cc=3D"cc" -libs_qga=3D"" debug_info=3D"yes" lto=3D"false" stack_protector=3D"" @@ -708,7 +707,6 @@ if test "$mingw32" =3D "yes" ; then write_c_skeleton; prefix=3D"/qemu" qemu_suffix=3D"" - libs_qga=3D"-lws2_32 -lwinmm -lpowrprof -lwtsapi32 -lwininet -liphlpapi = -lnetapi32 $libs_qga" fi =20 werror=3D"" @@ -2475,8 +2473,6 @@ EOF if compile_prog "$vss_win32_include" "" ; then guest_agent_with_vss=3D"yes" QEMU_CFLAGS=3D"$QEMU_CFLAGS $vss_win32_include" - libs_qga=3D"-lole32 -loleaut32 -lshlwapi -lstdc++ -Wl,--enable-stdcall= -fixup $libs_qga" - qga_vss_provider=3D"qga/vss-win32/qga-vss.dll qga/vss-win32/qga-vss.tl= b" else if test "$vss_win32_sdk" !=3D "" ; then echo "ERROR: Please download and install Microsoft VSS SDK:" @@ -2527,7 +2523,6 @@ int main(void) { EOF if compile_prog "" "" ; then guest_agent_ntddscsi=3Dyes - libs_qga=3D"-lsetupapi -lcfgmgr32 $libs_qga" fi fi =20 @@ -3085,7 +3080,6 @@ if test "$mingw32" =3D "yes" ; then echo "CONFIG_WIN32=3Dy" >> $config_host_mak if test "$guest_agent_with_vss" =3D "yes" ; then echo "CONFIG_QGA_VSS=3Dy" >> $config_host_mak - echo "QGA_VSS_PROVIDER=3D$qga_vss_provider" >> $config_host_mak echo "WIN_SDK=3D\"$win_sdk\"" >> $config_host_mak fi if test "$guest_agent_ntddscsi" =3D "yes" ; then @@ -3337,7 +3331,6 @@ echo "QEMU_LDFLAGS=3D$QEMU_LDFLAGS" >> $config_host_m= ak echo "LD_I386_EMULATION=3D$ld_i386_emulation" >> $config_host_mak echo "STRIP=3D$strip" >> $config_host_mak echo "EXESUF=3D$EXESUF" >> $config_host_mak -echo "LIBS_QGA=3D$libs_qga" >> $config_host_mak =20 if test "$rng_none" =3D "yes"; then echo "CONFIG_RNG_NONE=3Dy" >> $config_host_mak diff --git a/qga/meson.build b/qga/meson.build index 1ee9dca60b..56fb6539e5 100644 --- a/qga/meson.build +++ b/qga/meson.build @@ -1,3 +1,5 @@ +all_qga =3D [] + qga_qapi_outputs =3D [ 'qga-qapi-commands.c', 'qga-qapi-commands.h', @@ -50,19 +52,26 @@ qga_ss.add(when: 'CONFIG_WIN32', if_true: files( =20 qga_ss =3D qga_ss.apply(config_host, strict: false) =20 +gen_tlb =3D [] +qga_libs =3D [] +if targetos =3D=3D 'windows' + qga_libs +=3D ['-lws2_32', '-lwinmm', '-lpowrprof', '-lwtsapi32', '-lwin= inet', '-liphlpapi', '-lnetapi32'] + if 'CONFIG_QGA_VSS' in config_host + qga_libs +=3D ['-lole32', '-loleaut32', '-lshlwapi', '-lstdc++', '-Wl,= --enable-stdcall-fixup'] + subdir('vss-win32') + endif + if 'CONFIG_QGA_NTDDSCSI' in config_host + qga_libs +=3D ['-lsetupapi', '-lcfgmgr32'] + endif +endif + qga =3D executable('qemu-ga', qga_ss.sources(), - link_args: config_host['LIBS_QGA'].split(), + link_args: qga_libs, dependencies: [qemuutil, libudev], install: true) -all_qga =3D [qga] +all_qga +=3D qga =20 if targetos =3D=3D 'windows' - if 'CONFIG_QGA_VSS' in config_host - subdir('vss-win32') - else - gen_tlb =3D [] - endif - qemu_ga_msi_arch =3D { 'x86': ['-D', 'Arch=3D32'], 'x86_64': ['-a', 'x64', '-D', 'Arch=3D64'] --=20 2.34.1 From nobody Mon Feb 9 09:42:38 2026 Delivered-To: importer@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+importer=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 1644917795432462.41006231376707; Tue, 15 Feb 2022 01:36:35 -0800 (PST) Received: from localhost ([::1]:37540 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nJuGA-0000vG-CY for importer@patchew.org; Tue, 15 Feb 2022 04:36:34 -0500 Received: from eggs.gnu.org ([209.51.188.92]:54826) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nJuCL-00048M-1K for qemu-devel@nongnu.org; Tue, 15 Feb 2022 04:32:37 -0500 Received: from [2a00:1450:4864:20::533] (port=45820 helo=mail-ed1-x533.google.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nJuCI-0008RF-HL for qemu-devel@nongnu.org; Tue, 15 Feb 2022 04:32:36 -0500 Received: by mail-ed1-x533.google.com with SMTP id z13so12788962edc.12 for ; Tue, 15 Feb 2022 01:32:34 -0800 (PST) Received: from avogadro.lan ([2001:b07:6468:f312:c8dd:75d4:99ab:290a]) by smtp.gmail.com with ESMTPSA id m4sm6634308ejl.45.2022.02.15.01.32.32 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 15 Feb 2022 01:32:32 -0800 (PST) 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=gjRIoDreQKx28XOd1wx5LMEH73zc760fxUIxYHJ5BtA=; b=pNobCF4DaZPEAKD9hmxAUthBw9gn6vwiwQU9jVOEVO9f/CYvoHjTJQbyhINpQ/gjAv /usXtExhonlMBt11pTosVVNIrzwNNBO0jiK87Jo5uPQ+se4rsurvhywm5lbIQd8RgJOb Vuq+ojHFfAHb2UdTUzuUQ2JYzH6er8AmcsdqlePO1hrtgLAWqF69o5zQh8BniJ+5s0jK VpC6X5Kq5wpKy/Uu1Va1NKAOwFxFOQYwkzwa0YFNMUcgFRXvLeUPRiU/sEQeVY5PAytF alLEvPid2AO9adI+xvmba+tDmFwY7QQU+MXr+cFMqMNqLyq8dZxWJUjOuAaRu6DO0x3I kbBw== 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=gjRIoDreQKx28XOd1wx5LMEH73zc760fxUIxYHJ5BtA=; b=YvQcKS2mxb6MAEk5AiOtNNj+e5lEuBVUS614sM7DrNAjBOPCIKGx/8iZ5La+q3sCGe 7Gy90mSWBhnBEy6f1HyenyZTvWL5AXG0e/WNyNYeLWNeKgAJmftc66rZpH03qj7rm3p/ jxbJSXNQg/1yUwdnuC9PAfHFrxqOah30hXYiFsQ5NykdZbNKAmKlDs3X3D4xAjuO0x1s 6+fgEACWU0C/6lGRpR6i1j8p2mbyOWv0Sqb5XL3EtMvqsGC05o25rZQzf7F72U7PQZM3 jjc/wDrnP9QjrnDReODMEJ9/7MLbe/KP0Pd1aNez3w5Ys2gQG/dWoFmIDw2uqoXUQBZu jmMQ== X-Gm-Message-State: AOAM531P7rq9rv8x7lpVE/Xn3ERG3bMGnC6d+BrGzOAwD51/8O15IN/d 3rwBWv0lebRw3rb64M/9tybTHnHyShM= X-Google-Smtp-Source: ABdhPJyAoMZ8JdR/Igdh5QeNk1ipTbo5xR4iZs0bLxZy6ICmyMrQk98KrYRGPA+xELSN1q//Tsz7XA== X-Received: by 2002:a50:fb14:: with SMTP id d20mr3031616edq.214.1644917553256; Tue, 15 Feb 2022 01:32:33 -0800 (PST) From: Paolo Bonzini To: qemu-devel@nongnu.org Subject: [PULL 12/30] configure, meson: move image format options to meson_options.txt Date: Tue, 15 Feb 2022 10:32:05 +0100 Message-Id: <20220215093223.110827-13-pbonzini@redhat.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220215093223.110827-1-pbonzini@redhat.com> References: <20220215093223.110827-1-pbonzini@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Host-Lookup-Failed: Reverse DNS lookup failed for 2a00:1450:4864:20::533 (failed) 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+importer=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: 2 X-Spam_score: 0.2 X-Spam_bar: / X-Spam_report: (0.2 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FORGED_FROMDOMAIN=0.25, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.25, PDS_HP_HELO_NORDNS=0.904, RCVD_IN_DNSWL_NONE=-0.0001, RDNS_NONE=0.793, 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+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZM-MESSAGEID: 1644917797360100001 Content-Type: text/plain; charset="utf-8" Signed-off-by: Paolo Bonzini --- block/meson.build | 47 +++++++++++++++------- configure | 73 ----------------------------------- meson.build | 16 ++++---- meson_options.txt | 16 ++++++++ scripts/meson-buildoptions.sh | 24 ++++++++++++ 5 files changed, 80 insertions(+), 96 deletions(-) diff --git a/block/meson.build b/block/meson.build index 90dc9983e5..4afde2ebf8 100644 --- a/block/meson.build +++ b/block/meson.build @@ -45,20 +45,37 @@ block_ss.add(files( =20 softmmu_ss.add(when: 'CONFIG_TCG', if_true: files('blkreplay.c')) =20 -block_ss.add(when: 'CONFIG_QCOW1', if_true: files('qcow.c')) -block_ss.add(when: 'CONFIG_VDI', if_true: files('vdi.c')) -block_ss.add(when: 'CONFIG_CLOOP', if_true: files('cloop.c')) -block_ss.add(when: 'CONFIG_BOCHS', if_true: files('bochs.c')) -block_ss.add(when: 'CONFIG_VVFAT', if_true: files('vvfat.c')) -block_ss.add(when: 'CONFIG_DMG', if_true: files('dmg.c')) -block_ss.add(when: 'CONFIG_QED', if_true: files( - 'qed-check.c', - 'qed-cluster.c', - 'qed-l2-cache.c', - 'qed-table.c', - 'qed.c', -)) -block_ss.add(when: 'CONFIG_PARALLELS', if_true: files('parallels.c', 'para= llels-ext.c')) +if get_option('qcow1').allowed() + block_ss.add(files('qcow.c')) +endif +if get_option('vdi').allowed() + block_ss.add(files('vdi.c')) +endif +if get_option('cloop').allowed() + block_ss.add(files('cloop.c')) +endif +if get_option('bochs').allowed() + block_ss.add(files('bochs.c')) +endif +if get_option('vvfat').allowed() + block_ss.add(files('vvfat.c')) +endif +if get_option('dmg').allowed() + block_ss.add(files('dmg.c')) +endif +if get_option('qed').allowed() + block_ss.add(files( + 'qed-check.c', + 'qed-cluster.c', + 'qed-l2-cache.c', + 'qed-table.c', + 'qed.c', + )) +endif +if get_option('parallels').allowed() + block_ss.add(files('parallels.c', 'parallels-ext.c')) +endif + block_ss.add(when: 'CONFIG_WIN32', if_true: files('file-win32.c', 'win32-a= io.c')) block_ss.add(when: 'CONFIG_POSIX', if_true: [files('file-posix.c'), coref,= iokit]) block_ss.add(when: libiscsi, if_true: files('iscsi-opts.c')) @@ -89,7 +106,7 @@ foreach m : [ endforeach =20 # those are not exactly regular block modules, so treat them apart -if 'CONFIG_DMG' in config_host +if get_option('dmg').allowed() foreach m : [ [liblzfse, 'dmg-lzfse', liblzfse, 'dmg-lzfse.c'], [libbzip2, 'dmg-bz2', [glib, libbzip2], 'dmg-bz2.c'] diff --git a/configure b/configure index ee7c4aed0a..4ee1567419 100755 --- a/configure +++ b/configure @@ -331,14 +331,6 @@ debug_stack_usage=3D"no" tls_priority=3D"NORMAL" live_block_migration=3D${default_feature:-yes} replication=3D${default_feature:-yes} -bochs=3D${default_feature:-yes} -cloop=3D${default_feature:-yes} -dmg=3D${default_feature:-yes} -qcow1=3D${default_feature:-yes} -vdi=3D${default_feature:-yes} -vvfat=3D${default_feature:-yes} -qed=3D${default_feature:-yes} -parallels=3D${default_feature:-yes} debug_mutex=3D"no" plugins=3D"$default_feature" rng_none=3D"no" @@ -1044,38 +1036,6 @@ for opt do ;; --enable-replication) replication=3D"yes" ;; - --disable-bochs) bochs=3D"no" - ;; - --enable-bochs) bochs=3D"yes" - ;; - --disable-cloop) cloop=3D"no" - ;; - --enable-cloop) cloop=3D"yes" - ;; - --disable-dmg) dmg=3D"no" - ;; - --enable-dmg) dmg=3D"yes" - ;; - --disable-qcow1) qcow1=3D"no" - ;; - --enable-qcow1) qcow1=3D"yes" - ;; - --disable-vdi) vdi=3D"no" - ;; - --enable-vdi) vdi=3D"yes" - ;; - --disable-vvfat) vvfat=3D"no" - ;; - --enable-vvfat) vvfat=3D"yes" - ;; - --disable-qed) qed=3D"no" - ;; - --enable-qed) qed=3D"yes" - ;; - --disable-parallels) parallels=3D"no" - ;; - --enable-parallels) parallels=3D"yes" - ;; --disable-vhost-user) vhost_user=3D"no" ;; --enable-vhost-user) vhost_user=3D"yes" @@ -1375,14 +1335,6 @@ cat << EOF opengl opengl support qom-cast-debug cast debugging support tools build qemu-io, qemu-nbd and qemu-img tools - bochs bochs image format support - cloop cloop image format support - dmg dmg image format support - qcow1 qcow v1 image format support - vdi vdi image format support - vvfat vvfat image format support - qed qed image format support - parallels parallels image format support debug-mutex mutex debugging support rng-none dummy RNG, avoid using /dev/(u)random and getrandom() gio libgio support @@ -3264,31 +3216,6 @@ if test "$debug_mutex" =3D "yes" ; then echo "CONFIG_DEBUG_MUTEX=3Dy" >> $config_host_mak fi =20 -if test "$bochs" =3D "yes" ; then - echo "CONFIG_BOCHS=3Dy" >> $config_host_mak -fi -if test "$cloop" =3D "yes" ; then - echo "CONFIG_CLOOP=3Dy" >> $config_host_mak -fi -if test "$dmg" =3D "yes" ; then - echo "CONFIG_DMG=3Dy" >> $config_host_mak -fi -if test "$qcow1" =3D "yes" ; then - echo "CONFIG_QCOW1=3Dy" >> $config_host_mak -fi -if test "$vdi" =3D "yes" ; then - echo "CONFIG_VDI=3Dy" >> $config_host_mak -fi -if test "$vvfat" =3D "yes" ; then - echo "CONFIG_VVFAT=3Dy" >> $config_host_mak -fi -if test "$qed" =3D "yes" ; then - echo "CONFIG_QED=3Dy" >> $config_host_mak -fi -if test "$parallels" =3D "yes" ; then - echo "CONFIG_PARALLELS=3Dy" >> $config_host_mak -fi - if test "$plugins" =3D "yes" ; then echo "CONFIG_PLUGIN=3Dy" >> $config_host_mak fi diff --git a/meson.build b/meson.build index 02137be91e..38e3ea46e1 100644 --- a/meson.build +++ b/meson.build @@ -3463,14 +3463,14 @@ if have_block summary_info +=3D {'build virtiofs daemon': have_virtiofsd} summary_info +=3D {'Live block migration': config_host.has_key('CONFIG_L= IVE_BLOCK_MIGRATION')} summary_info +=3D {'replication support': config_host.has_key('CONFIG_RE= PLICATION')} - summary_info +=3D {'bochs support': config_host.has_key('CONFIG_BOCH= S')} - summary_info +=3D {'cloop support': config_host.has_key('CONFIG_CLOO= P')} - summary_info +=3D {'dmg support': config_host.has_key('CONFIG_DMG'= )} - summary_info +=3D {'qcow v1 support': config_host.has_key('CONFIG_QCOW= 1')} - summary_info +=3D {'vdi support': config_host.has_key('CONFIG_VDI'= )} - summary_info +=3D {'vvfat support': config_host.has_key('CONFIG_VVFA= T')} - summary_info +=3D {'qed support': config_host.has_key('CONFIG_QED'= )} - summary_info +=3D {'parallels support': config_host.has_key('CONFIG_PARA= LLELS')} + summary_info +=3D {'bochs support': get_option('bochs').allowed()} + summary_info +=3D {'cloop support': get_option('cloop').allowed()} + summary_info +=3D {'dmg support': get_option('dmg').allowed()} + summary_info +=3D {'qcow v1 support': get_option('qcow1').allowed()} + summary_info +=3D {'vdi support': get_option('vdi').allowed()} + summary_info +=3D {'vvfat support': get_option('vvfat').allowed()} + summary_info +=3D {'qed support': get_option('qed').allowed()} + summary_info +=3D {'parallels support': get_option('parallels').allowed(= )} summary_info +=3D {'FUSE exports': fuse} endif summary(summary_info, bool_yn: true, section: 'Block layer support') diff --git a/meson_options.txt b/meson_options.txt index 1b44b4e666..aef951eba1 100644 --- a/meson_options.txt +++ b/meson_options.txt @@ -222,3 +222,19 @@ option('fdt', type: 'combo', value: 'auto', =20 option('selinux', type: 'feature', value: 'auto', description: 'SELinux support in qemu-nbd') +option('bochs', type: 'feature', value: 'auto', + description: 'bochs image format support') +option('cloop', type: 'feature', value: 'auto', + description: 'cloop image format support') +option('dmg', type: 'feature', value: 'auto', + description: 'dmg image format support') +option('qcow1', type: 'feature', value: 'auto', + description: 'qcow1 image format support') +option('vdi', type: 'feature', value: 'auto', + description: 'vdi image format support') +option('vvfat', type: 'feature', value: 'auto', + description: 'vvfat image format support') +option('qed', type: 'feature', value: 'auto', + description: 'qed image format support') +option('parallels', type: 'feature', value: 'auto', + description: 'parallels image format support') diff --git a/scripts/meson-buildoptions.sh b/scripts/meson-buildoptions.sh index 3f107e5724..50a985abec 100644 --- a/scripts/meson-buildoptions.sh +++ b/scripts/meson-buildoptions.sh @@ -28,16 +28,19 @@ meson_options_help() { printf "%s\n" ' auth-pam PAM access control' printf "%s\n" ' avx2 AVX2 optimizations' printf "%s\n" ' avx512f AVX512F optimizations' + printf "%s\n" ' bochs bochs image format support' printf "%s\n" ' bpf eBPF support' printf "%s\n" ' brlapi brlapi character device driver' printf "%s\n" ' bzip2 bzip2 support for DMG images' printf "%s\n" ' cap-ng cap_ng support' + printf "%s\n" ' cloop cloop image format support' printf "%s\n" ' cocoa Cocoa user interface (macOS only)' printf "%s\n" ' coreaudio CoreAudio sound support' printf "%s\n" ' crypto-afalg Linux AF_ALG crypto backend driver' printf "%s\n" ' curl CURL block device driver' printf "%s\n" ' curses curses UI' printf "%s\n" ' dbus-display -display dbus support' + printf "%s\n" ' dmg dmg image format support' printf "%s\n" ' docs Documentations build support' printf "%s\n" ' dsound DirectSound sound support' printf "%s\n" ' fuse FUSE block device export' @@ -75,6 +78,9 @@ meson_options_help() { printf "%s\n" ' nvmm NVMM acceleration support' printf "%s\n" ' oss OSS sound support' printf "%s\n" ' pa PulseAudio sound support' + printf "%s\n" ' parallels parallels image format support' + printf "%s\n" ' qcow1 qcow1 image format support' + printf "%s\n" ' qed qed image format support' printf "%s\n" ' rbd Ceph block device driver' printf "%s\n" ' sdl SDL user interface' printf "%s\n" ' sdl-image SDL Image support for icons' @@ -90,6 +96,7 @@ meson_options_help() { printf "%s\n" ' u2f U2F emulation support' 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-user-blk-server' printf "%s\n" ' build vhost-user-blk server' printf "%s\n" ' virglrenderer virgl rendering support' @@ -100,6 +107,7 @@ meson_options_help() { printf "%s\n" ' vnc-png PNG compression for VNC server' printf "%s\n" ' vnc-sasl SASL authentication for VNC server' printf "%s\n" ' vte vte support for the gtk UI' + printf "%s\n" ' vvfat vvfat image format support' printf "%s\n" ' whpx WHPX acceleration support' printf "%s\n" ' xen Xen backend support' printf "%s\n" ' xen-pci-passthrough' @@ -119,6 +127,8 @@ _meson_option_parse() { --disable-avx2) printf "%s" -Davx2=3Ddisabled ;; --enable-avx512f) printf "%s" -Davx512f=3Denabled ;; --disable-avx512f) printf "%s" -Davx512f=3Ddisabled ;; + --enable-bochs) printf "%s" -Dbochs=3Denabled ;; + --disable-bochs) printf "%s" -Dbochs=3Ddisabled ;; --enable-bpf) printf "%s" -Dbpf=3Denabled ;; --disable-bpf) printf "%s" -Dbpf=3Ddisabled ;; --enable-brlapi) printf "%s" -Dbrlapi=3Denabled ;; @@ -134,6 +144,8 @@ _meson_option_parse() { --disable-cfi) printf "%s" -Dcfi=3Dfalse ;; --enable-cfi-debug) printf "%s" -Dcfi_debug=3Dtrue ;; --disable-cfi-debug) printf "%s" -Dcfi_debug=3Dfalse ;; + --enable-cloop) printf "%s" -Dcloop=3Denabled ;; + --disable-cloop) printf "%s" -Dcloop=3Ddisabled ;; --enable-cocoa) printf "%s" -Dcocoa=3Denabled ;; --disable-cocoa) printf "%s" -Dcocoa=3Ddisabled ;; --enable-coreaudio) printf "%s" -Dcoreaudio=3Denabled ;; @@ -146,6 +158,8 @@ _meson_option_parse() { --disable-curses) printf "%s" -Dcurses=3Ddisabled ;; --enable-dbus-display) printf "%s" -Ddbus_display=3Denabled ;; --disable-dbus-display) printf "%s" -Ddbus_display=3Ddisabled ;; + --enable-dmg) printf "%s" -Ddmg=3Denabled ;; + --disable-dmg) printf "%s" -Ddmg=3Ddisabled ;; --enable-docs) printf "%s" -Ddocs=3Denabled ;; --disable-docs) printf "%s" -Ddocs=3Ddisabled ;; --enable-dsound) printf "%s" -Ddsound=3Denabled ;; @@ -228,6 +242,12 @@ _meson_option_parse() { --disable-oss) printf "%s" -Doss=3Ddisabled ;; --enable-pa) printf "%s" -Dpa=3Denabled ;; --disable-pa) printf "%s" -Dpa=3Ddisabled ;; + --enable-parallels) printf "%s" -Dparallels=3Denabled ;; + --disable-parallels) printf "%s" -Dparallels=3Ddisabled ;; + --enable-qcow1) printf "%s" -Dqcow1=3Denabled ;; + --disable-qcow1) printf "%s" -Dqcow1=3Ddisabled ;; + --enable-qed) printf "%s" -Dqed=3Denabled ;; + --disable-qed) printf "%s" -Dqed=3Ddisabled ;; --enable-rbd) printf "%s" -Drbd=3Denabled ;; --disable-rbd) printf "%s" -Drbd=3Ddisabled ;; --enable-sdl) printf "%s" -Dsdl=3Denabled ;; @@ -266,6 +286,8 @@ _meson_option_parse() { --disable-usb-redir) printf "%s" -Dusb_redir=3Ddisabled ;; --enable-vde) printf "%s" -Dvde=3Denabled ;; --disable-vde) printf "%s" -Dvde=3Ddisabled ;; + --enable-vdi) printf "%s" -Dvdi=3Denabled ;; + --disable-vdi) printf "%s" -Dvdi=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-virglrenderer) printf "%s" -Dvirglrenderer=3Denabled ;; @@ -284,6 +306,8 @@ _meson_option_parse() { --disable-vnc-sasl) printf "%s" -Dvnc_sasl=3Ddisabled ;; --enable-vte) printf "%s" -Dvte=3Denabled ;; --disable-vte) printf "%s" -Dvte=3Ddisabled ;; + --enable-vvfat) printf "%s" -Dvvfat=3Denabled ;; + --disable-vvfat) printf "%s" -Dvvfat=3Ddisabled ;; --enable-whpx) printf "%s" -Dwhpx=3Denabled ;; --disable-whpx) printf "%s" -Dwhpx=3Ddisabled ;; --enable-xen) printf "%s" -Dxen=3Denabled ;; --=20 2.34.1 From nobody Mon Feb 9 09:42:38 2026 Delivered-To: importer@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+importer=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 1644918225036124.22213373311888; Tue, 15 Feb 2022 01:43:45 -0800 (PST) Received: from localhost ([::1]:56752 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nJuN5-0005ls-M4 for importer@patchew.org; Tue, 15 Feb 2022 04:43:43 -0500 Received: from eggs.gnu.org ([209.51.188.92]:54834) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nJuCL-0004Aw-JQ for qemu-devel@nongnu.org; Tue, 15 Feb 2022 04:32:37 -0500 Received: from [2a00:1450:4864:20::62e] (port=45711 helo=mail-ej1-x62e.google.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nJuCJ-0008RR-70 for qemu-devel@nongnu.org; Tue, 15 Feb 2022 04:32:37 -0500 Received: by mail-ej1-x62e.google.com with SMTP id lw4so12088735ejb.12 for ; Tue, 15 Feb 2022 01:32:34 -0800 (PST) Received: from avogadro.lan ([2001:b07:6468:f312:c8dd:75d4:99ab:290a]) by smtp.gmail.com with ESMTPSA id m4sm6634308ejl.45.2022.02.15.01.32.33 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 15 Feb 2022 01:32:33 -0800 (PST) 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=hw+TtQhEdnn/JekCaaI7QAaA/Gtqjg2yxmHMUB1QuVg=; b=bLsaiM4UznU2B92lOHXy8Zj0+oO0D6SHW05ZCXKR+vUvcm4EkOmvdI51KSR0hGM21i w47cRM7jrlZIV+6b01eyWoZ0M823VkyNbL5uCHM3iQ6G2h8H4tvB4CCtOuBCXKmctXR1 MTs6fES7evym9vio3cBJa6vEgUZiDrrofV5fEyLcFBZAJPDayzIB8NFWcXl3CuHH96tH 6/Gnt02Yk1WiScodv0PUdnnS4p4dsy3/b5cVCcVwkbgDsST2UgGm+uzoYdr1QnoNr0dL 7zmLTOG/vdG7pCniAK8nrW6/cabxGxxkTfJOu/1rGeMERY87WA/eOSBH3UwN4Z1cxLir 5zpg== 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=hw+TtQhEdnn/JekCaaI7QAaA/Gtqjg2yxmHMUB1QuVg=; b=4xnavWs9Ke25GThK3YH4hn2Aod8g+nF5OTBclNnlgHCT/nbdRidqZkHtIfTQbWiQbq pWwFMB//l7gzuGDQ7CAoDtNBTqHZTIj7RfCSfF/niK6TptpAVHKUWh8CyqhXPASt/ZQb lURSVfJrjmfam2y502e2rAC/7iiBEx5Xmxcv8CfFL0sWI4bkBmVmHeJS5yia84w6Mtrq dcnFgVDWvv9Ut7Ayzrgn2gEzkHpsg1vHOEl9U+GNtvKZZeFj4z63kiW4uM1i8eMCvBSe rNkQQNfgPxIPzn97Ea+i5RTi08VtwS+iRJMo2Qr8qJZyQaxnvd+ZqjIVZUyTkd9g9tmS dEOA== X-Gm-Message-State: AOAM531VtMNl3WMithEJs5VBP7LUla4o5cuT/9yzJekxtSwpOQdq30gI klZEJ4ITGVESd3eQCpRT1PTGzdjuy1s= X-Google-Smtp-Source: ABdhPJwzM8kItQ/nAdN1JKzV6vsjki7b7XiSiA4NrvTbyasxvJq/Lq/5HilDu90uBmuV6P7EfE8RNw== X-Received: by 2002:a17:907:7e97:: with SMTP id qb23mr2288727ejc.355.1644917553890; Tue, 15 Feb 2022 01:32:33 -0800 (PST) From: Paolo Bonzini To: qemu-devel@nongnu.org Subject: [PULL 13/30] configure, meson: move block layer options to meson_options.txt Date: Tue, 15 Feb 2022 10:32:06 +0100 Message-Id: <20220215093223.110827-14-pbonzini@redhat.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220215093223.110827-1-pbonzini@redhat.com> References: <20220215093223.110827-1-pbonzini@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Host-Lookup-Failed: Reverse DNS lookup failed for 2a00:1450:4864:20::62e (failed) 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+importer=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: 2 X-Spam_score: 0.2 X-Spam_bar: / X-Spam_report: (0.2 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FORGED_FROMDOMAIN=0.25, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.25, PDS_HP_HELO_NORDNS=0.904, RCVD_IN_DNSWL_NONE=-0.0001, RDNS_NONE=0.793, 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+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZM-MESSAGEID: 1644918226296100001 Content-Type: text/plain; charset="utf-8" Unlike image formats, these also require an entry in config-host.h. Signed-off-by: Paolo Bonzini --- block/meson.build | 4 +++- configure | 20 -------------------- meson.build | 11 ++++++++--- meson_options.txt | 4 ++++ migration/meson.build | 4 +++- scripts/meson-buildoptions.sh | 7 +++++++ tests/unit/meson.build | 2 +- 7 files changed, 26 insertions(+), 26 deletions(-) diff --git a/block/meson.build b/block/meson.build index 4afde2ebf8..8a1ce58c9c 100644 --- a/block/meson.build +++ b/block/meson.build @@ -80,7 +80,9 @@ block_ss.add(when: 'CONFIG_WIN32', if_true: files('file-w= in32.c', 'win32-aio.c') block_ss.add(when: 'CONFIG_POSIX', if_true: [files('file-posix.c'), coref,= iokit]) block_ss.add(when: libiscsi, if_true: files('iscsi-opts.c')) block_ss.add(when: 'CONFIG_LINUX', if_true: files('nvme.c')) -block_ss.add(when: 'CONFIG_REPLICATION', if_true: files('replication.c')) +if not get_option('replication').disabled() + block_ss.add(files('replication.c')) +endif block_ss.add(when: libaio, if_true: files('linux-aio.c')) block_ss.add(when: linux_io_uring, if_true: files('io_uring.c')) =20 diff --git a/configure b/configure index 4ee1567419..1a15e2325e 100755 --- a/configure +++ b/configure @@ -329,8 +329,6 @@ coroutine=3D"" coroutine_pool=3D"$default_feature" debug_stack_usage=3D"no" tls_priority=3D"NORMAL" -live_block_migration=3D${default_feature:-yes} -replication=3D${default_feature:-yes} debug_mutex=3D"no" plugins=3D"$default_feature" rng_none=3D"no" @@ -1028,14 +1026,6 @@ for opt do ;; --disable-pvrdma) pvrdma=3D"no" ;; - --disable-live-block-migration) live_block_migration=3D"no" - ;; - --enable-live-block-migration) live_block_migration=3D"yes" - ;; - --disable-replication) replication=3D"no" - ;; - --enable-replication) replication=3D"yes" - ;; --disable-vhost-user) vhost_user=3D"no" ;; --enable-vhost-user) vhost_user=3D"yes" @@ -1329,9 +1319,7 @@ cat << EOF vhost-kernel vhost kernel backend support vhost-user vhost-user backend support vhost-vdpa vhost-vdpa kernel backend support - live-block-migration Block migration in the main migration stream coroutine-pool coroutine freelist (better performance) - replication replication support opengl opengl support qom-cast-debug cast debugging support tools build qemu-io, qemu-nbd and qemu-img tools @@ -3195,10 +3183,6 @@ if test "$cmpxchg128" =3D "yes" ; then echo "CONFIG_CMPXCHG128=3Dy" >> $config_host_mak fi =20 -if test "$live_block_migration" =3D "yes" ; then - echo "CONFIG_LIVE_BLOCK_MIGRATION=3Dy" >> $config_host_mak -fi - if test "$rdma" =3D "yes" ; then echo "CONFIG_RDMA=3Dy" >> $config_host_mak echo "RDMA_LIBS=3D$rdma_libs" >> $config_host_mak @@ -3208,10 +3192,6 @@ if test "$pvrdma" =3D "yes" ; then echo "CONFIG_PVRDMA=3Dy" >> $config_host_mak fi =20 -if test "$replication" =3D "yes" ; then - echo "CONFIG_REPLICATION=3Dy" >> $config_host_mak -fi - if test "$debug_mutex" =3D "yes" ; then echo "CONFIG_DEBUG_MUTEX=3Dy" >> $config_host_mak fi diff --git a/meson.build b/meson.build index 38e3ea46e1..031bbf468c 100644 --- a/meson.build +++ b/meson.build @@ -1539,6 +1539,9 @@ config_host_data.set_quoted('CONFIG_HOST_DSOSUF', hos= t_dsosuf) config_host_data.set('HAVE_HOST_BLOCK_DEVICE', have_host_block_device) config_host_data.set('HOST_WORDS_BIGENDIAN', host_machine.endian() =3D=3D = 'big') =20 +config_host_data.set('CONFIG_LIVE_BLOCK_MIGRATION', get_option('live_block= _migration').allowed()) +config_host_data.set('CONFIG_REPLICATION', get_option('live_block_migratio= n').allowed()) + # has_header config_host_data.set('CONFIG_EPOLL', cc.has_header('sys/epoll.h')) config_host_data.set('CONFIG_LINUX_MAGIC_H', cc.has_header('linux/magic.h'= )) @@ -2684,7 +2687,9 @@ if have_block 'job.c', 'qemu-io-cmds.c', )) - block_ss.add(when: 'CONFIG_REPLICATION', if_true: files('replication.c')) + if config_host_data.get('CONFIG_REPLICATION') + block_ss.add(files('replication.c')) + endif =20 subdir('nbd') subdir('scsi') @@ -3461,8 +3466,8 @@ if have_block summary_info +=3D {'Use block whitelist in tools': config_host.has_key('= CONFIG_BDRV_WHITELIST_TOOLS')} summary_info +=3D {'VirtFS support': have_virtfs} summary_info +=3D {'build virtiofs daemon': have_virtiofsd} - summary_info +=3D {'Live block migration': config_host.has_key('CONFIG_L= IVE_BLOCK_MIGRATION')} - summary_info +=3D {'replication support': config_host.has_key('CONFIG_RE= PLICATION')} + summary_info +=3D {'Live block migration': config_host_data.get('CONFIG_= LIVE_BLOCK_MIGRATION')} + summary_info +=3D {'replication support': config_host_data.get('CONFIG_R= EPLICATION')} summary_info +=3D {'bochs support': get_option('bochs').allowed()} summary_info +=3D {'cloop support': get_option('cloop').allowed()} summary_info +=3D {'dmg support': get_option('dmg').allowed()} diff --git a/meson_options.txt b/meson_options.txt index aef951eba1..3bfaa77805 100644 --- a/meson_options.txt +++ b/meson_options.txt @@ -222,6 +222,10 @@ option('fdt', type: 'combo', value: 'auto', =20 option('selinux', type: 'feature', value: 'auto', description: 'SELinux support in qemu-nbd') +option('live_block_migration', type: 'feature', value: 'auto', + description: 'block migration in the main migration stream') +option('replication', type: 'feature', value: 'auto', + description: 'replication support') option('bochs', type: 'feature', value: 'auto', description: 'bochs image format support') option('cloop', type: 'feature', value: 'auto', diff --git a/migration/meson.build b/migration/meson.build index f8714dcb15..8b5ca5c047 100644 --- a/migration/meson.build +++ b/migration/meson.build @@ -28,7 +28,9 @@ softmmu_ss.add(files( ), gnutls) =20 softmmu_ss.add(when: ['CONFIG_RDMA', rdma], if_true: files('rdma.c')) -softmmu_ss.add(when: 'CONFIG_LIVE_BLOCK_MIGRATION', if_true: files('block.= c')) +if get_option('live_block_migration').allowed() + softmmu_ss.add(files('block.c')) +endif softmmu_ss.add(when: zstd, if_true: files('multifd-zstd.c')) =20 specific_ss.add(when: 'CONFIG_SOFTMMU', diff --git a/scripts/meson-buildoptions.sh b/scripts/meson-buildoptions.sh index 50a985abec..ffd712936d 100644 --- a/scripts/meson-buildoptions.sh +++ b/scripts/meson-buildoptions.sh @@ -66,6 +66,8 @@ meson_options_help() { printf "%s\n" ' libusb libusb support for USB passthrough' printf "%s\n" ' linux-aio Linux AIO support' printf "%s\n" ' linux-io-uring Linux io_uring support' + printf "%s\n" ' live-block-migration' + printf "%s\n" ' block migration in the main migration s= tream' printf "%s\n" ' lzfse lzfse support for DMG images' printf "%s\n" ' lzo lzo compression support' printf "%s\n" ' malloc-trim enable libc malloc_trim() for memory op= timization' @@ -82,6 +84,7 @@ meson_options_help() { printf "%s\n" ' qcow1 qcow1 image format support' printf "%s\n" ' qed qed image format support' printf "%s\n" ' rbd Ceph block device driver' + printf "%s\n" ' replication replication support' printf "%s\n" ' sdl SDL user interface' printf "%s\n" ' sdl-image SDL Image support for icons' printf "%s\n" ' seccomp seccomp support' @@ -217,6 +220,8 @@ _meson_option_parse() { --disable-linux-aio) printf "%s" -Dlinux_aio=3Ddisabled ;; --enable-linux-io-uring) printf "%s" -Dlinux_io_uring=3Denabled ;; --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 ;; --enable-lzfse) printf "%s" -Dlzfse=3Denabled ;; --disable-lzfse) printf "%s" -Dlzfse=3Ddisabled ;; --enable-lzo) printf "%s" -Dlzo=3Denabled ;; @@ -250,6 +255,8 @@ _meson_option_parse() { --disable-qed) printf "%s" -Dqed=3Ddisabled ;; --enable-rbd) printf "%s" -Drbd=3Denabled ;; --disable-rbd) printf "%s" -Drbd=3Ddisabled ;; + --enable-replication) printf "%s" -Dreplication=3Denabled ;; + --disable-replication) printf "%s" -Dreplication=3Ddisabled ;; --enable-sdl) printf "%s" -Dsdl=3Denabled ;; --disable-sdl) printf "%s" -Dsdl=3Ddisabled ;; --enable-sdl-image) printf "%s" -Dsdl_image=3Denabled ;; diff --git a/tests/unit/meson.build b/tests/unit/meson.build index 64a5e7bfde..0959061faf 100644 --- a/tests/unit/meson.build +++ b/tests/unit/meson.build @@ -106,7 +106,7 @@ if have_block if 'CONFIG_POSIX' in config_host tests +=3D {'test-image-locking': [testblock]} endif - if 'CONFIG_REPLICATION' in config_host + if config_host_data.get('CONFIG_REPLICATION') tests +=3D {'test-replication': [testblock]} endif if nettle.found() or gcrypt.found() --=20 2.34.1 From nobody Mon Feb 9 09:42:38 2026 Delivered-To: importer@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+importer=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 164491826425395.41403019425513; Tue, 15 Feb 2022 01:44:24 -0800 (PST) Received: from localhost ([::1]:58852 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nJuNj-0007B3-7X for importer@patchew.org; Tue, 15 Feb 2022 04:44:23 -0500 Received: from eggs.gnu.org ([209.51.188.92]:54828) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nJuCL-000492-6L for qemu-devel@nongnu.org; Tue, 15 Feb 2022 04:32:37 -0500 Received: from [2a00:1450:4864:20::530] (port=33474 helo=mail-ed1-x530.google.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nJuCJ-0008RY-M8 for qemu-devel@nongnu.org; Tue, 15 Feb 2022 04:32:36 -0500 Received: by mail-ed1-x530.google.com with SMTP id b13so31192149edn.0 for ; Tue, 15 Feb 2022 01:32:35 -0800 (PST) Received: from avogadro.lan ([2001:b07:6468:f312:c8dd:75d4:99ab:290a]) by smtp.gmail.com with ESMTPSA id m4sm6634308ejl.45.2022.02.15.01.32.33 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 15 Feb 2022 01:32:34 -0800 (PST) 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=jhFwU72yaHp33P0rYq3jYT3GqJJNnFHjydTeOFAFulA=; b=P3sxJ5MH2Sh/CzICXIg55OV+pCZhY/8/7AQWnYC3MhKFAl0UlYevLpZxEJzoIkMRpM vAF0s44aHYa7/NZGQ1VY+5N/cvmlTAMYLRDd2U2I9ku3/Cg/q6WMEC8SbMNyjgk3XK0R SSqnCI3aEP/yD1FJNvpd9qtdOymPiUHnxv2hnG0oy9B5ibPQOp0Ae+fHwWiejzo/Q/ya qmjFQXe/V7RDAgJDWaXYR3ZQjyFC4hwCLHockbqxnAuWp31dd4H0895cAvw6yjoP8irX cY/ZJyykspod04fX4epwYva3Yx5KkraOiLggO3NN5Bh1ZqyNPKD4YqFieq4d03Tan3W5 Ff6A== 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=jhFwU72yaHp33P0rYq3jYT3GqJJNnFHjydTeOFAFulA=; b=Rz5CbJ2W/G3TMyYAnxWYo0ayStIJxH/QGGS7Af7L0I2hRrTA0kKfNuyq+n9fJ0bnJ+ xZXNl5OWps6kq0Wim2vxp5oESYgoml1wwvltiosdlIM/U19xBR9vHGxP51KECnLLj5Cm wGvCSMNiuFmk5LNmhi4YvwIUSnYiKTcz4GJvNeIEAFjQwvuy5cWgZBUtFTYSwDU0pSn5 0ETTnvKVxNsuzlh0KCL+d437eyguJ0ZldjZ2lmqyO2Fm7CZ1HEZxv4iu+08yWofUnQWO cjux6OIzqUsQV2rBZRG7fie4HY8anAXJwibg7JpccC4+o3dQhpYUoUjUJ4qc+XEw24pd eHPA== X-Gm-Message-State: AOAM533jSAJpJ2u5ty4RKQ6HmrhWK4ozD6gvcLhG/mTMKhtJkKzgtPGU NpY+76zNkTfS6F9f+E+SDDKctWN/1u8= X-Google-Smtp-Source: ABdhPJxRDQQcSnN+P9VKnPK9mukUbemxjckJO6KJ6aXYg/K2PCt9xjOPC/c0HtGyh1p7+fXEUjphlw== X-Received: by 2002:a05:6402:1d49:: with SMTP id dz9mr2872121edb.238.1644917554479; Tue, 15 Feb 2022 01:32:34 -0800 (PST) From: Paolo Bonzini To: qemu-devel@nongnu.org Subject: [PULL 14/30] meson: define qemu_cflags/qemu_ldflags Date: Tue, 15 Feb 2022 10:32:07 +0100 Message-Id: <20220215093223.110827-15-pbonzini@redhat.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220215093223.110827-1-pbonzini@redhat.com> References: <20220215093223.110827-1-pbonzini@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Host-Lookup-Failed: Reverse DNS lookup failed for 2a00:1450:4864:20::530 (failed) 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+importer=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: 2 X-Spam_score: 0.2 X-Spam_bar: / X-Spam_report: (0.2 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FORGED_FROMDOMAIN=0.25, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.25, PDS_HP_HELO_NORDNS=0.904, RCVD_IN_DNSWL_NONE=-0.0001, RDNS_NONE=0.793, 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?Philippe=20Mathieu-Daud=C3=A9?= Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZM-MESSAGEID: 1644918266512100001 Prepare for moving more compiler tests to Meson. If the full set of compiler flags is needed in a cc.compiles/cc.links test, it will be handy to have a variable analogous to QEMU_CFLAGS. Reviewed-by: Philippe Mathieu-Daud=C3=A9 Signed-off-by: Paolo Bonzini --- meson.build | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/meson.build b/meson.build index 031bbf468c..c520d6af68 100644 --- a/meson.build +++ b/meson.build @@ -163,6 +163,10 @@ endif # Compiler flags # ################## =20 +qemu_cflags =3D config_host['QEMU_CFLAGS'].split() +qemu_cxxflags =3D config_host['QEMU_CXXFLAGS'].split() +qemu_ldflags =3D config_host['QEMU_LDFLAGS'].split() + # Specify linker-script with add_project_link_arguments so that it is not = placed # within a linker --start-group/--end-group pair if get_option('fuzzing') @@ -198,12 +202,9 @@ if get_option('fuzzing') endif endif =20 -add_global_arguments(config_host['QEMU_CFLAGS'].split(), - native: false, language: ['c', 'objc']) -add_global_arguments(config_host['QEMU_CXXFLAGS'].split(), - native: false, language: 'cpp') -add_global_link_arguments(config_host['QEMU_LDFLAGS'].split(), - native: false, language: ['c', 'cpp', 'objc']) +add_global_arguments(qemu_cflags, native: false, language: ['c', 'objc']) +add_global_arguments(qemu_cxxflags, native: false, language: ['cpp']) +add_global_link_arguments(qemu_ldflags, native: false, language: ['c', 'cp= p', 'objc']) =20 if targetos =3D=3D 'linux' add_project_arguments('-isystem', meson.current_source_dir() / 'linux-he= aders', --=20 2.34.1 From nobody Mon Feb 9 09:42:38 2026 Delivered-To: importer@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+importer=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 1644918727980903.0295803980969; Tue, 15 Feb 2022 01:52:07 -0800 (PST) Received: from localhost ([::1]:47612 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nJuVD-0000eR-Tc for importer@patchew.org; Tue, 15 Feb 2022 04:52:07 -0500 Received: from eggs.gnu.org ([209.51.188.92]:54860) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nJuCN-0004Gs-9V for qemu-devel@nongnu.org; Tue, 15 Feb 2022 04:32:39 -0500 Received: from [2a00:1450:4864:20::635] (port=40544 helo=mail-ej1-x635.google.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nJuCK-0008Rq-GJ for qemu-devel@nongnu.org; Tue, 15 Feb 2022 04:32:38 -0500 Received: by mail-ej1-x635.google.com with SMTP id p15so42876177ejc.7 for ; Tue, 15 Feb 2022 01:32:36 -0800 (PST) Received: from avogadro.lan ([2001:b07:6468:f312:c8dd:75d4:99ab:290a]) by smtp.gmail.com with ESMTPSA id m4sm6634308ejl.45.2022.02.15.01.32.34 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 15 Feb 2022 01:32:34 -0800 (PST) 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=N26I4OZsfW/6GiGWy3g2VG+knZRMe3uhswXNhKvQ0bA=; b=hrLXEwTo2tMdymdDBNqbpGPYOjXLN5wbcU7ku5cb9a//rtmXVd97meIZrifd44uowK OmAu525CJ5KlTxffo+23ATq8NIbO9BsDOdECxvsi5W2SHIymXFfbOi64ZKjNT/XCeZ0l lZjmgObI09M1VToq8CEW2+gDMjdeKQ7a0lI5nberFCFcOf4QTGS7IEe9dG6Kb8srqW6Y l3DvtQhkwpIblcsDFuoprr8KzQ1E8oAj9PPM2R9mJ0rVhO6enulSBgav3Rz30sy5/1Z2 bN41Fla2R1FVRSF1GTa5hwyHmcPlkU0fPDACCAS/1aBhFnMx/WbmYh6pHLlRghcGqG0I jQ9w== 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=N26I4OZsfW/6GiGWy3g2VG+knZRMe3uhswXNhKvQ0bA=; b=ZqatiCgzPIrxIAJgU9NDQ+dkKxXA7su9OCnhj3pRjCDyq+/OvZMIq+xp636L3P55zh MKVzJS7NatGviMw/IywI1CPrybeQogSPF3XsdEIePlnn0zX8JhbtM7SKXy3gIoiyZYRA sszyoJZ7ngGG7tOdtXSbwlTdwbFahlXClXzAm3W1qnyCmSvHQCh7g0lKanju3IxxWcqu DK4KwolM/piZEyBsVe1k85z++e8uALStO4iShsldYslLzk+2PPh8iQ5r8vFFF6ovoKJM lzchyciEAZXJVac+ZeMN6WShStVVJ2KAp5bcX4fo9XXBwGt1Oec6suMQoUSxOFxVR7T8 PQqA== X-Gm-Message-State: AOAM531JFNhrlTY4ZL8ssD8yaz/tTFS/0mQjBRIwuWwMHX8IF112wn6B iVHImXhGidK3kfnusi7nb39RFYUGDcs= X-Google-Smtp-Source: ABdhPJypQWTk6VFuFIBY0sAP19Gfu2ibbwRc51rebQbmb9b9NvnPaFiEFTeg2e0rAb/y4ix3fxOgdw== X-Received: by 2002:a17:906:6b0c:: with SMTP id q12mr2127728ejr.640.1644917555173; Tue, 15 Feb 2022 01:32:35 -0800 (PST) From: Paolo Bonzini To: qemu-devel@nongnu.org Subject: [PULL 15/30] configure, meson: move some default-disabled options to meson_options.txt Date: Tue, 15 Feb 2022 10:32:08 +0100 Message-Id: <20220215093223.110827-16-pbonzini@redhat.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220215093223.110827-1-pbonzini@redhat.com> References: <20220215093223.110827-1-pbonzini@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Host-Lookup-Failed: Reverse DNS lookup failed for 2a00:1450:4864:20::635 (failed) 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+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::635; envelope-from=paolo.bonzini@gmail.com; helo=mail-ej1-x635.google.com X-Spam_score_int: 2 X-Spam_score: 0.2 X-Spam_bar: / X-Spam_report: (0.2 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FORGED_FROMDOMAIN=0.25, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.25, PDS_HP_HELO_NORDNS=0.904, RCVD_IN_DNSWL_NONE=-0.0001, RDNS_NONE=0.793, 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+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZM-MESSAGEID: 1644918730610100001 Content-Type: text/plain; charset="utf-8" These do not depend on --with-default-features, so they become booleans in meson too. Signed-off-by: Paolo Bonzini --- configure | 61 +--------------------------------- crypto/meson.build | 2 +- meson.build | 23 +++++++++---- meson_options.txt | 12 +++++++ scripts/meson-buildoptions.sh | 21 ++++++++++++ tests/check-block.sh | 4 --- tests/qemu-iotests/meson.build | 2 +- 7 files changed, 53 insertions(+), 72 deletions(-) diff --git a/configure b/configure index 1a15e2325e..5a4a642846 100755 --- a/configure +++ b/configure @@ -238,7 +238,6 @@ cross_prefix=3D"" audio_drv_list=3D"default" block_drv_rw_whitelist=3D"" block_drv_ro_whitelist=3D"" -block_drv_whitelist_tools=3D"no" host_cc=3D"cc" debug_info=3D"yes" lto=3D"false" @@ -299,7 +298,6 @@ vhost_user_fs=3D"$default_feature" vhost_vdpa=3D"$default_feature" rdma=3D"$default_feature" pvrdma=3D"$default_feature" -gprof=3D"no" debug_tcg=3D"no" debug=3D"no" sanitizers=3D"no" @@ -311,13 +309,11 @@ modules=3D"no" module_upgrades=3D"no" prefix=3D"/usr/local" qemu_suffix=3D"qemu" -profiler=3D"no" softmmu=3D"yes" linux_user=3D"" bsd_user=3D"" pkgversion=3D"" pie=3D"" -qom_cast_debug=3D"yes" trace_backends=3D"log" trace_file=3D"trace" opengl=3D"$default_feature" @@ -329,9 +325,7 @@ coroutine=3D"" coroutine_pool=3D"$default_feature" debug_stack_usage=3D"no" tls_priority=3D"NORMAL" -debug_mutex=3D"no" plugins=3D"$default_feature" -rng_none=3D"no" secret_keyring=3D"$default_feature" meson=3D"" meson_args=3D"" @@ -806,8 +800,6 @@ for opt do ;; --without-default-features) # processed above ;; - --enable-gprof) gprof=3D"yes" - ;; --enable-gcov) gcov=3D"yes" ;; --static) @@ -848,20 +840,12 @@ for opt do # configure to be used by RPM and similar macros that set # lots of directory switches by default. ;; - --disable-qom-cast-debug) qom_cast_debug=3D"no" - ;; - --enable-qom-cast-debug) qom_cast_debug=3D"yes" - ;; --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') ;; - --enable-block-drv-whitelist-in-tools) block_drv_whitelist_tools=3D"yes" - ;; - --disable-block-drv-whitelist-in-tools) block_drv_whitelist_tools=3D"no" - ;; --enable-debug-tcg) debug_tcg=3D"yes" ;; --disable-debug-tcg) debug_tcg=3D"no" @@ -869,7 +853,7 @@ for opt do --enable-debug) # Enable debugging options that aren't excessively noisy debug_tcg=3D"yes" - debug_mutex=3D"yes" + meson_option_parse --enable-debug-mutex "" debug=3D"yes" fortify_source=3D"no" ;; @@ -898,8 +882,6 @@ for opt do ;; --enable-tcg) tcg=3D"enabled" ;; - --enable-profiler) profiler=3D"yes" - ;; --disable-system) softmmu=3D"no" ;; --enable-system) softmmu=3D"yes" @@ -1051,10 +1033,6 @@ for opt do --with-git-submodules=3D*) git_submodules_action=3D"$optarg" ;; - --enable-debug-mutex) debug_mutex=3Dyes - ;; - --disable-debug-mutex) debug_mutex=3Dno - ;; --enable-plugins) if test "$mingw32" =3D "yes"; then error_exit "TCG plugins not currently supported on= Windows platforms" else @@ -1069,10 +1047,6 @@ for opt do ;; --gdb=3D*) gdb_bin=3D"$optarg" ;; - --enable-rng-none) rng_none=3Dyes - ;; - --disable-rng-none) rng_none=3Dno - ;; --enable-keyring) secret_keyring=3D"yes" ;; --disable-keyring) secret_keyring=3D"no" @@ -1275,8 +1249,6 @@ Advanced options (experts only): --block-drv-ro-whitelist=3DL set block driver read-only whitelist (by default affects only QEMU, not tools like q= emu-img) - --enable-block-drv-whitelist-in-tools - use block whitelist also in tools instead of on= ly QEMU --with-trace-file=3DNAME Full PATH,NAME of file to store traces Default:trace- --cpu=3DCPU Build for host CPU [$cpu] @@ -1286,8 +1258,6 @@ Advanced options (experts only): --with-vss-sdk=3DSDK-path enable Windows VSS support in QEMU Guest Agent --with-win-sdk=3DSDK-path path to Windows Platform SDK (to build VSS .t= lb) --tls-priority default TLS protocol/cipher priority string - --enable-gprof QEMU profiling with gprof - --enable-profiler profiler support --enable-debug-stack-usage track the maximum stack usage of stacks created= by qemu_alloc_stack --enable-plugins @@ -1321,10 +1291,7 @@ cat << EOF vhost-vdpa vhost-vdpa kernel backend support coroutine-pool coroutine freelist (better performance) opengl opengl support - qom-cast-debug cast debugging support tools build qemu-io, qemu-nbd and qemu-img tools - debug-mutex mutex debugging support - rng-none dummy RNG, avoid using /dev/(u)random and getrandom() gio libgio support slirp-smbd use smbd (at path --smbd=3D*) in slirp networking =20 @@ -2848,11 +2815,6 @@ alpha) ;; esac =20 -if test "$gprof" =3D "yes" ; then - QEMU_CFLAGS=3D"-p $QEMU_CFLAGS" - QEMU_LDFLAGS=3D"-p $QEMU_LDFLAGS" -fi - if test "$have_asan" =3D "yes"; then QEMU_CFLAGS=3D"-fsanitize=3Daddress $QEMU_CFLAGS" QEMU_LDFLAGS=3D"-fsanitize=3Daddress $QEMU_LDFLAGS" @@ -3047,9 +3009,6 @@ fi if test "$static" =3D "yes" ; then echo "CONFIG_STATIC=3Dy" >> $config_host_mak fi -if test "$profiler" =3D "yes" ; then - echo "CONFIG_PROFILER=3Dy" >> $config_host_mak -fi if test "$want_tools" =3D "yes" ; then echo "CONFIG_TOOLS=3Dy" >> $config_host_mak fi @@ -3060,14 +3019,8 @@ if test "$slirp_smbd" =3D "yes" ; then echo "CONFIG_SLIRP_SMBD=3Dy" >> $config_host_mak echo "CONFIG_SMBD_COMMAND=3D\"$smbd\"" >> $config_host_mak fi -if test "$gprof" =3D "yes" ; then - echo "CONFIG_GPROF=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 -if test "$block_drv_whitelist_tools" =3D "yes" ; then - echo "CONFIG_BDRV_WHITELIST_TOOLS=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 @@ -3148,10 +3101,6 @@ if [ "$bsd" =3D "yes" ] ; then echo "CONFIG_BSD=3Dy" >> $config_host_mak fi =20 -if test "$qom_cast_debug" =3D "yes" ; then - echo "CONFIG_QOM_CAST_DEBUG=3Dy" >> $config_host_mak -fi - echo "CONFIG_COROUTINE_BACKEND=3D$coroutine" >> $config_host_mak if test "$coroutine_pool" =3D "yes" ; then echo "CONFIG_COROUTINE_POOL=3D1" >> $config_host_mak @@ -3192,10 +3141,6 @@ if test "$pvrdma" =3D "yes" ; then echo "CONFIG_PVRDMA=3Dy" >> $config_host_mak fi =20 -if test "$debug_mutex" =3D "yes" ; then - echo "CONFIG_DEBUG_MUTEX=3Dy" >> $config_host_mak -fi - if test "$plugins" =3D "yes" ; then echo "CONFIG_PLUGIN=3Dy" >> $config_host_mak fi @@ -3239,10 +3184,6 @@ echo "LD_I386_EMULATION=3D$ld_i386_emulation" >> $co= nfig_host_mak echo "STRIP=3D$strip" >> $config_host_mak echo "EXESUF=3D$EXESUF" >> $config_host_mak =20 -if test "$rng_none" =3D "yes"; then - echo "CONFIG_RNG_NONE=3Dy" >> $config_host_mak -fi - # use included Linux headers if test "$linux" =3D "yes" ; then mkdir -p linux-headers diff --git a/crypto/meson.build b/crypto/meson.build index 9bf3a431fe..19c44bea89 100644 --- a/crypto/meson.build +++ b/crypto/meson.build @@ -50,7 +50,7 @@ if gcrypt.found() util_ss.add(gcrypt, files('random-gcrypt.c')) elif gnutls.found() util_ss.add(gnutls, files('random-gnutls.c')) -elif 'CONFIG_RNG_NONE' in config_host +elif get_option('rng_none') util_ss.add(files('random-none.c')) else util_ss.add(files('random-platform.c')) diff --git a/meson.build b/meson.build index c520d6af68..8fc23df33d 100644 --- a/meson.build +++ b/meson.build @@ -167,6 +167,12 @@ qemu_cflags =3D config_host['QEMU_CFLAGS'].split() qemu_cxxflags =3D config_host['QEMU_CXXFLAGS'].split() qemu_ldflags =3D config_host['QEMU_LDFLAGS'].split() =20 +if get_option('gprof') + qemu_cflags +=3D ['-p'] + qemu_cxxflags +=3D ['-p'] + qemu_ldflags +=3D ['-p'] +endif + # Specify linker-script with add_project_link_arguments so that it is not = placed # within a linker --start-group/--end-group pair if get_option('fuzzing') @@ -1459,6 +1465,7 @@ config_host_data.set_quoted('CONFIG_SYSCONFDIR', get_= option('prefix') / get_opti config_host_data.set('HOST_' + host_arch.to_upper(), 1) =20 config_host_data.set('CONFIG_ATTR', libattr.found()) +config_host_data.set('CONFIG_BDRV_WHITELIST_TOOLS', get_option('block_drv_= whitelist_in_tools')) config_host_data.set('CONFIG_BRLAPI', brlapi.found()) config_host_data.set('CONFIG_COCOA', cocoa.found()) config_host_data.set('CONFIG_FUZZ', get_option('fuzzing')) @@ -1492,6 +1499,7 @@ config_host_data.set('CONFIG_LINUX_AIO', libaio.found= ()) config_host_data.set('CONFIG_LINUX_IO_URING', linux_io_uring.found()) config_host_data.set('CONFIG_LIBPMEM', libpmem.found()) config_host_data.set('CONFIG_NUMA', numa.found()) +config_host_data.set('CONFIG_PROFILER', get_option('profiler')) config_host_data.set('CONFIG_RBD', rbd.found()) config_host_data.set('CONFIG_SDL', sdl.found()) config_host_data.set('CONFIG_SDL_IMAGE', sdl_image.found()) @@ -1540,7 +1548,10 @@ config_host_data.set_quoted('CONFIG_HOST_DSOSUF', ho= st_dsosuf) config_host_data.set('HAVE_HOST_BLOCK_DEVICE', have_host_block_device) config_host_data.set('HOST_WORDS_BIGENDIAN', host_machine.endian() =3D=3D = 'big') =20 +config_host_data.set('CONFIG_DEBUG_MUTEX', get_option('debug_mutex')) +config_host_data.set('CONFIG_GPROF', get_option('gprof')) config_host_data.set('CONFIG_LIVE_BLOCK_MIGRATION', get_option('live_block= _migration').allowed()) +config_host_data.set('CONFIG_QOM_CAST_DEBUG', get_option('qom_cast_debug')) config_host_data.set('CONFIG_REPLICATION', get_option('live_block_migratio= n').allowed()) =20 # has_header @@ -3340,7 +3351,7 @@ if 'simple' in get_option('trace_backends') summary_info +=3D {'Trace output file': get_option('trace_file') + '-'} endif summary_info +=3D {'D-Bus display': dbus_display} -summary_info +=3D {'QOM debugging': config_host.has_key('CONFIG_QOM_CA= ST_DEBUG')} +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')} @@ -3386,18 +3397,18 @@ if link_args.length() > 0 endif summary_info +=3D {'QEMU_CFLAGS': config_host['QEMU_CFLAGS']} summary_info +=3D {'QEMU_LDFLAGS': config_host['QEMU_LDFLAGS']} -summary_info +=3D {'profiler': config_host.has_key('CONFIG_PROFIL= ER')} +summary_info +=3D {'profiler': get_option('profiler')} summary_info +=3D {'link-time optimization (LTO)': get_option('b_lto')} summary_info +=3D {'PIE': get_option('b_pie')} summary_info +=3D {'static build': config_host.has_key('CONFIG_STATIC= ')} summary_info +=3D {'malloc trim support': has_malloc_trim} summary_info +=3D {'membarrier': have_membarrier} summary_info +=3D {'debug stack usage': config_host.has_key('CONFIG_DEBUG_= STACK_USAGE')} -summary_info +=3D {'mutex debugging': config_host.has_key('CONFIG_DEBUG_= MUTEX')} +summary_info +=3D {'mutex debugging': get_option('debug_mutex')} summary_info +=3D {'memory allocator': get_option('malloc')} summary_info +=3D {'avx2 optimization': config_host_data.get('CONFIG_AVX2_= OPT')} summary_info +=3D {'avx512f optimization': config_host_data.get('CONFIG_AV= X512F_OPT')} -summary_info +=3D {'gprof enabled': config_host.has_key('CONFIG_GPROF'= )} +summary_info +=3D {'gprof enabled': get_option('gprof')} summary_info +=3D {'gcov': get_option('b_coverage')} summary_info +=3D {'thread sanitizer': config_host.has_key('CONFIG_TSAN')} summary_info +=3D {'CFI support': get_option('cfi')} @@ -3464,7 +3475,7 @@ summary_info +=3D {'coroutine pool': config_host['= CONFIG_COROUTINE_POOL'] =3D=3D '1 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 {'Use block whitelist in tools': config_host.has_key('= CONFIG_BDRV_WHITELIST_TOOLS')} + 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} summary_info +=3D {'Live block migration': config_host_data.get('CONFIG_= LIVE_BLOCK_MIGRATION')} @@ -3494,7 +3505,7 @@ if nettle.found() summary_info +=3D {' XTS': xts !=3D 'private'} endif summary_info +=3D {'AF_ALG support': have_afalg} -summary_info +=3D {'rng-none': config_host.has_key('CONFIG_RNG_NO= NE')} +summary_info +=3D {'rng-none': get_option('rng_none')} summary_info +=3D {'Linux keyring': config_host.has_key('CONFIG_SECRET= _KEYRING')} summary(summary_info, bool_yn: true, section: 'Crypto') =20 diff --git a/meson_options.txt b/meson_options.txt index 3bfaa77805..781e4d5170 100644 --- a/meson_options.txt +++ b/meson_options.txt @@ -242,3 +242,15 @@ option('qed', type: 'feature', value: 'auto', description: 'qed image format support') option('parallels', type: 'feature', value: 'auto', description: 'parallels image format support') +option('block_drv_whitelist_in_tools', type: 'boolean', value: false, + description: 'use block whitelist also in tools instead of only QEM= U') +option('rng_none', type: 'boolean', value: false, + description: 'dummy RNG, avoid using /dev/(u)random and getrandom()= ') +option('debug_mutex', type: 'boolean', value: false, + description: 'mutex debugging support') +option('qom_cast_debug', type: 'boolean', value: false, + description: 'cast debugging support') +option('gprof', type: 'boolean', value: false, + description: 'QEMU profiling with gprof') +option('profiler', type: 'boolean', value: false, + description: 'profiler support') diff --git a/scripts/meson-buildoptions.sh b/scripts/meson-buildoptions.sh index ffd712936d..a2d6f34b21 100644 --- a/scripts/meson-buildoptions.sh +++ b/scripts/meson-buildoptions.sh @@ -1,16 +1,25 @@ # This file is generated by meson-buildoptions.py, do not edit! meson_options_help() { + 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' printf "%s\n" ' --enable-capstone[=3DCHOICE]' printf "%s\n" ' Whether and how to find the ca= pstone library' 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" ' --enable-debug-mutex mutex debugging support' 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-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-profiler profiler support' + printf "%s\n" ' --enable-qom-cast-debug cast debugging support' + printf "%s\n" ' --enable-rng-none dummy RNG, avoid using /dev/(u= )random and' + printf "%s\n" ' getrandom()' printf "%s\n" ' --enable-slirp[=3DCHOICE] Whether and how to find the = slirp library' printf "%s\n" ' (choices: auto/disabled/enable= d/internal/system)' printf "%s\n" ' --enable-strip Strip targets on install' @@ -130,6 +139,8 @@ _meson_option_parse() { --disable-avx2) printf "%s" -Davx2=3Ddisabled ;; --enable-avx512f) printf "%s" -Davx512f=3Denabled ;; --disable-avx512f) printf "%s" -Davx512f=3Ddisabled ;; + --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 ;; --disable-bochs) printf "%s" -Dbochs=3Ddisabled ;; --enable-bpf) printf "%s" -Dbpf=3Denabled ;; @@ -161,6 +172,8 @@ _meson_option_parse() { --disable-curses) printf "%s" -Dcurses=3Ddisabled ;; --enable-dbus-display) printf "%s" -Ddbus_display=3Denabled ;; --disable-dbus-display) printf "%s" -Ddbus_display=3Ddisabled ;; + --enable-debug-mutex) printf "%s" -Ddebug_mutex=3Dtrue ;; + --disable-debug-mutex) printf "%s" -Ddebug_mutex=3Dfalse ;; --enable-dmg) printf "%s" -Ddmg=3Denabled ;; --disable-dmg) printf "%s" -Ddmg=3Ddisabled ;; --enable-docs) printf "%s" -Ddocs=3Denabled ;; @@ -184,6 +197,8 @@ _meson_option_parse() { --disable-glusterfs) printf "%s" -Dglusterfs=3Ddisabled ;; --enable-gnutls) printf "%s" -Dgnutls=3Denabled ;; --disable-gnutls) printf "%s" -Dgnutls=3Ddisabled ;; + --enable-gprof) printf "%s" -Dgprof=3Dtrue ;; + --disable-gprof) printf "%s" -Dgprof=3Dfalse ;; --enable-gtk) printf "%s" -Dgtk=3Denabled ;; --disable-gtk) printf "%s" -Dgtk=3Ddisabled ;; --enable-guest-agent-msi) printf "%s" -Dguest_agent_msi=3Denabled ;; @@ -249,14 +264,20 @@ _meson_option_parse() { --disable-pa) printf "%s" -Dpa=3Ddisabled ;; --enable-parallels) printf "%s" -Dparallels=3Denabled ;; --disable-parallels) printf "%s" -Dparallels=3Ddisabled ;; + --enable-profiler) printf "%s" -Dprofiler=3Dtrue ;; + --disable-profiler) printf "%s" -Dprofiler=3Dfalse ;; --enable-qcow1) printf "%s" -Dqcow1=3Denabled ;; --disable-qcow1) printf "%s" -Dqcow1=3Ddisabled ;; --enable-qed) printf "%s" -Dqed=3Denabled ;; --disable-qed) printf "%s" -Dqed=3Ddisabled ;; + --enable-qom-cast-debug) printf "%s" -Dqom_cast_debug=3Dtrue ;; + --disable-qom-cast-debug) printf "%s" -Dqom_cast_debug=3Dfalse ;; --enable-rbd) printf "%s" -Drbd=3Denabled ;; --disable-rbd) printf "%s" -Drbd=3Ddisabled ;; --enable-replication) printf "%s" -Dreplication=3Denabled ;; --disable-replication) printf "%s" -Dreplication=3Ddisabled ;; + --enable-rng-none) printf "%s" -Drng_none=3Dtrue ;; + --disable-rng-none) printf "%s" -Drng_none=3Dfalse ;; --enable-sdl) printf "%s" -Dsdl=3Denabled ;; --disable-sdl) printf "%s" -Dsdl=3Ddisabled ;; --enable-sdl-image) printf "%s" -Dsdl_image=3Denabled ;; diff --git a/tests/check-block.sh b/tests/check-block.sh index 720a46bc36..18f7433901 100755 --- a/tests/check-block.sh +++ b/tests/check-block.sh @@ -18,10 +18,6 @@ skip() { exit 0 } =20 -if grep -q "CONFIG_GPROF=3Dy" config-host.mak 2>/dev/null ; then - skip "GPROF is enabled =3D=3D> Not running the qemu-iotests." -fi - # Disable tests with any sanitizer except for specific ones SANITIZE_FLAGS=3D$( grep "CFLAGS.*-fsanitize" config-host.mak 2>/dev/null ) ALLOWED_SANITIZE_FLAGS=3D"safe-stack cfi-icall" diff --git a/tests/qemu-iotests/meson.build b/tests/qemu-iotests/meson.build index 5be3c74127..9747bb68a5 100644 --- a/tests/qemu-iotests/meson.build +++ b/tests/qemu-iotests/meson.build @@ -1,4 +1,4 @@ -if have_tools and targetos !=3D 'windows' +if have_tools and targetos !=3D 'windows' and not get_option('gprof') qemu_iotests_binaries =3D [qemu_img, qemu_io, qemu_nbd, qsd] qemu_iotests_env =3D {'PYTHON': python.full_path()} qemu_iotests_formats =3D { --=20 2.34.1 From nobody Mon Feb 9 09:42:38 2026 Delivered-To: importer@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+importer=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 1644918436003573.5968569713939; Tue, 15 Feb 2022 01:47:16 -0800 (PST) Received: from localhost ([::1]:35008 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nJuQU-0002Ef-KX for importer@patchew.org; Tue, 15 Feb 2022 04:47:14 -0500 Received: from eggs.gnu.org ([209.51.188.92]:54862) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nJuCN-0004HP-FJ for qemu-devel@nongnu.org; Tue, 15 Feb 2022 04:32:39 -0500 Received: from [2a00:1450:4864:20::636] (port=43848 helo=mail-ej1-x636.google.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nJuCL-0008Rt-5y for qemu-devel@nongnu.org; Tue, 15 Feb 2022 04:32:39 -0500 Received: by mail-ej1-x636.google.com with SMTP id d10so42876866eje.10 for ; Tue, 15 Feb 2022 01:32:36 -0800 (PST) Received: from avogadro.lan ([2001:b07:6468:f312:c8dd:75d4:99ab:290a]) by smtp.gmail.com with ESMTPSA id m4sm6634308ejl.45.2022.02.15.01.32.35 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 15 Feb 2022 01:32:35 -0800 (PST) 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=zhzbJ767n7/0p+5JsD4NIlyqO+FKtLZx4tLmECyeVwc=; b=dQRvWbE/z8RVlhicxZK71Im8UDr/v6jne9JKskYRXMY2tNtdfxhSGQzqppX7qyOEx6 tLVzu5bcyQRD/BxWA3KOPEswvZg08V31ZcZslrKMEFmy8wWO39nd+k+WvsZnHFTQgNzD N1izVnRj4K7omYKbyszy2j/F9EJRMSE2ksmJxVTu2wYASu0DYVte6YeUSzqJL063LSxv 6Kgzf79khUSESf0wZs2zPGvSgLhaPC3+6gAG8qmeuze+f98U1eedf+gGwq+zFV8rlrXn EqKNs7esyOD+sp0XXWEb12eDY95PK5Tv4jH+I8xoHy4EZnzjMAwoz0DQjJEFWRmoc8Jq SCrQ== 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=zhzbJ767n7/0p+5JsD4NIlyqO+FKtLZx4tLmECyeVwc=; b=4dmylJBL0TMoMnijSBziF274xnJecEnWkAnMvx8CvJbsgyZ+gcwVaQ5N6RxNwpx0KW niVZqRY0CpQtBougFs/ul5RlmJNh1jCUiySL9APsdJV+mtZyCqxZDMl40aS3mCh7IhZv i6NX6Y4RCOvQMjQuJED+ztPFmRQeOA6mRKbACNt93CA/ZLNtpW775assaEoZmNtPsNAp V0xF7+3pYh3Zg3lTLxKEwVoCQd4ohbjgVrsKYPUYJC7ruIkk2z/cq7TuAX3+HnHmpWBW n9kEubagu/3JcO+DwaISDiXA8XmWLH3fF4cuQSVeDEW98TVNpa9zgMN0yd3zTqxUQbzf lZQA== X-Gm-Message-State: AOAM533HKMTS4kFXUGa6tQ4Ph4gl5zkYV+GpCUrULbs/5TrEFQv/fxZd 3nLb/R4pAbPP2Cs5tFK5ywANdEGyKl8= X-Google-Smtp-Source: ABdhPJxGOPf2ovDTaDWQd9C/RJl+M2arwavjZzXfVxsvX74HbXKDDnf2I8lP8VlB+hQdqQxrtfy6TA== X-Received: by 2002:a17:906:73cc:: with SMTP id n12mr2212998ejl.459.1644917555856; Tue, 15 Feb 2022 01:32:35 -0800 (PST) From: Paolo Bonzini To: qemu-devel@nongnu.org Subject: [PULL 16/30] configure, meson: move coroutine options to meson_options.txt Date: Tue, 15 Feb 2022 10:32:09 +0100 Message-Id: <20220215093223.110827-17-pbonzini@redhat.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220215093223.110827-1-pbonzini@redhat.com> References: <20220215093223.110827-1-pbonzini@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Host-Lookup-Failed: Reverse DNS lookup failed for 2a00:1450:4864:20::636 (failed) 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+importer=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: 2 X-Spam_score: 0.2 X-Spam_bar: / X-Spam_report: (0.2 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FORGED_FROMDOMAIN=0.25, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.25, PDS_HP_HELO_NORDNS=0.904, RCVD_IN_DNSWL_NONE=-0.0001, RDNS_NONE=0.793, 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+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZM-MESSAGEID: 1644918436700100001 Content-Type: text/plain; charset="utf-8" Signed-off-by: Paolo Bonzini --- configure | 31 ------------------------------- meson.build | 11 +++++++++-- meson_options.txt | 4 ++++ scripts/meson-buildoptions.sh | 7 +++++++ 4 files changed, 20 insertions(+), 33 deletions(-) diff --git a/configure b/configure index 5a4a642846..1cc836ee55 100755 --- a/configure +++ b/configure @@ -322,8 +322,6 @@ vss_win32_sdk=3D"$default_feature" win_sdk=3D"no" want_tools=3D"$default_feature" coroutine=3D"" -coroutine_pool=3D"$default_feature" -debug_stack_usage=3D"no" tls_priority=3D"NORMAL" plugins=3D"$default_feature" secret_keyring=3D"$default_feature" @@ -937,12 +935,6 @@ for opt do ;; --with-coroutine=3D*) coroutine=3D"$optarg" ;; - --disable-coroutine-pool) coroutine_pool=3D"no" - ;; - --enable-coroutine-pool) coroutine_pool=3D"yes" - ;; - --enable-debug-stack-usage) debug_stack_usage=3D"yes" - ;; --disable-vhost-net) vhost_net=3D"no" ;; --enable-vhost-net) vhost_net=3D"yes" @@ -1258,8 +1250,6 @@ Advanced options (experts only): --with-vss-sdk=3DSDK-path enable Windows VSS support in QEMU Guest Agent --with-win-sdk=3DSDK-path path to Windows Platform SDK (to build VSS .t= lb) --tls-priority default TLS protocol/cipher priority string - --enable-debug-stack-usage - track the maximum stack usage of stacks created= by qemu_alloc_stack --enable-plugins enable plugins via shared library loading --disable-containers don't use containers for cross-building @@ -1289,7 +1279,6 @@ cat << EOF vhost-kernel vhost kernel backend support vhost-user vhost-user backend support vhost-vdpa vhost-vdpa kernel backend support - coroutine-pool coroutine freelist (better performance) opengl opengl support tools build qemu-io, qemu-nbd and qemu-img tools gio libgio support @@ -2498,17 +2487,6 @@ else esac fi =20 -if test "$coroutine_pool" =3D ""; then - coroutine_pool=3Dyes -fi - -if test "$debug_stack_usage" =3D "yes"; then - if test "$coroutine_pool" =3D "yes"; then - echo "WARN: disabling coroutine pool for stack usage debugging" - coroutine_pool=3Dno - fi -fi - ################################################## # SafeStack =20 @@ -3102,15 +3080,6 @@ if [ "$bsd" =3D "yes" ] ; then fi =20 echo "CONFIG_COROUTINE_BACKEND=3D$coroutine" >> $config_host_mak -if test "$coroutine_pool" =3D "yes" ; then - echo "CONFIG_COROUTINE_POOL=3D1" >> $config_host_mak -else - echo "CONFIG_COROUTINE_POOL=3D0" >> $config_host_mak -fi - -if test "$debug_stack_usage" =3D "yes" ; then - echo "CONFIG_DEBUG_STACK_USAGE=3Dy" >> $config_host_mak -fi =20 if test "$have_asan_iface_fiber" =3D "yes" ; then echo "CONFIG_ASAN_IFACE_FIBER=3Dy" >> $config_host_mak diff --git a/meson.build b/meson.build index 8fc23df33d..79ceff64a7 100644 --- a/meson.build +++ b/meson.build @@ -1548,7 +1548,14 @@ config_host_data.set_quoted('CONFIG_HOST_DSOSUF', ho= st_dsosuf) config_host_data.set('HAVE_HOST_BLOCK_DEVICE', have_host_block_device) config_host_data.set('HOST_WORDS_BIGENDIAN', host_machine.endian() =3D=3D = 'big') =20 +have_coroutine_pool =3D get_option('coroutine_pool') +if get_option('debug_stack_usage') and have_coroutine_pool + message('Disabling coroutine pool to measure stack usage') + have_coroutine_pool =3D false +endif +config_host_data.set10('CONFIG_COROUTINE_POOL', have_coroutine_pool) config_host_data.set('CONFIG_DEBUG_MUTEX', get_option('debug_mutex')) +config_host_data.set('CONFIG_DEBUG_STACK_USAGE', get_option('debug_stack_u= sage')) config_host_data.set('CONFIG_GPROF', get_option('gprof')) config_host_data.set('CONFIG_LIVE_BLOCK_MIGRATION', get_option('live_block= _migration').allowed()) config_host_data.set('CONFIG_QOM_CAST_DEBUG', get_option('qom_cast_debug')) @@ -3403,7 +3410,7 @@ summary_info +=3D {'PIE': get_option('b= _pie')} summary_info +=3D {'static build': config_host.has_key('CONFIG_STATIC= ')} summary_info +=3D {'malloc trim support': has_malloc_trim} summary_info +=3D {'membarrier': have_membarrier} -summary_info +=3D {'debug stack usage': config_host.has_key('CONFIG_DEBUG_= STACK_USAGE')} +summary_info +=3D {'debug stack usage': get_option('debug_stack_usage')} summary_info +=3D {'mutex debugging': get_option('debug_mutex')} summary_info +=3D {'memory allocator': get_option('malloc')} summary_info +=3D {'avx2 optimization': config_host_data.get('CONFIG_AVX2_= OPT')} @@ -3471,7 +3478,7 @@ summary(summary_info, bool_yn: true, section: 'Target= s and accelerators') # Block layer summary_info =3D {} summary_info +=3D {'coroutine backend': config_host['CONFIG_COROUTINE_BACK= END']} -summary_info +=3D {'coroutine pool': config_host['CONFIG_COROUTINE_POOL= '] =3D=3D '1'} +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']} diff --git a/meson_options.txt b/meson_options.txt index 781e4d5170..03ae957102 100644 --- a/meson_options.txt +++ b/meson_options.txt @@ -246,8 +246,12 @@ option('block_drv_whitelist_in_tools', type: 'boolean'= , value: false, description: 'use block whitelist also in tools instead of only QEM= U') option('rng_none', type: 'boolean', value: false, description: 'dummy RNG, avoid using /dev/(u)random and getrandom()= ') +option('coroutine_pool', type: 'boolean', value: true, + description: 'coroutine freelist (better performance)') option('debug_mutex', type: 'boolean', value: false, description: 'mutex debugging support') +option('debug_stack_usage', type: 'boolean', value: false, + description: 'measure coroutine stack usage') option('qom_cast_debug', type: 'boolean', value: false, description: 'cast debugging support') option('gprof', type: 'boolean', value: false, diff --git a/scripts/meson-buildoptions.sh b/scripts/meson-buildoptions.sh index a2d6f34b21..9a6e53a2e7 100644 --- a/scripts/meson-buildoptions.sh +++ b/scripts/meson-buildoptions.sh @@ -8,7 +8,10 @@ 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' 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' @@ -164,6 +167,8 @@ _meson_option_parse() { --disable-cocoa) printf "%s" -Dcocoa=3Ddisabled ;; --enable-coreaudio) printf "%s" -Dcoreaudio=3Denabled ;; --disable-coreaudio) printf "%s" -Dcoreaudio=3Ddisabled ;; + --enable-coroutine-pool) printf "%s" -Dcoroutine_pool=3Dtrue ;; + --disable-coroutine-pool) printf "%s" -Dcoroutine_pool=3Dfalse ;; --enable-crypto-afalg) printf "%s" -Dcrypto_afalg=3Denabled ;; --disable-crypto-afalg) printf "%s" -Dcrypto_afalg=3Ddisabled ;; --enable-curl) printf "%s" -Dcurl=3Denabled ;; @@ -174,6 +179,8 @@ _meson_option_parse() { --disable-dbus-display) printf "%s" -Ddbus_display=3Ddisabled ;; --enable-debug-mutex) printf "%s" -Ddebug_mutex=3Dtrue ;; --disable-debug-mutex) printf "%s" -Ddebug_mutex=3Dfalse ;; + --enable-debug-stack-usage) printf "%s" -Ddebug_stack_usage=3Dtrue ;; + --disable-debug-stack-usage) printf "%s" -Ddebug_stack_usage=3Dfalse ;; --enable-dmg) printf "%s" -Ddmg=3Denabled ;; --disable-dmg) printf "%s" -Ddmg=3Ddisabled ;; --enable-docs) printf "%s" -Ddocs=3Denabled ;; --=20 2.34.1 From nobody Mon Feb 9 09:42:38 2026 Delivered-To: importer@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+importer=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 1644918473028520.1714337406622; Tue, 15 Feb 2022 01:47:53 -0800 (PST) Received: from localhost ([::1]:36904 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nJuR5-0003d5-NV for importer@patchew.org; Tue, 15 Feb 2022 04:47:51 -0500 Received: from eggs.gnu.org ([209.51.188.92]:54914) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nJuCP-0004Jq-0N for qemu-devel@nongnu.org; Tue, 15 Feb 2022 04:32:41 -0500 Received: from [2a00:1450:4864:20::633] (port=47089 helo=mail-ej1-x633.google.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nJuCL-0008S4-RT for qemu-devel@nongnu.org; Tue, 15 Feb 2022 04:32:40 -0500 Received: by mail-ej1-x633.google.com with SMTP id qx21so3115647ejb.13 for ; Tue, 15 Feb 2022 01:32:37 -0800 (PST) Received: from avogadro.lan ([2001:b07:6468:f312:c8dd:75d4:99ab:290a]) by smtp.gmail.com with ESMTPSA id m4sm6634308ejl.45.2022.02.15.01.32.35 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 15 Feb 2022 01:32:36 -0800 (PST) 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=DZT7LYIMowLfFfQ/hzCsIHNSBTjrcm7LxXxZQ2L79o0=; b=ZvDs+Kx+vWf+nPUdcJ1X2vVoomFS54SZdmF5pFEOppEqFTnwRSSUv6S3v3UmkHdB6p M7vo2rgxg7wr0i1PQ4K2ykSgLehZf1GOFV6eQHr6UFE+a+u8ESXyILc2wE/BsP3RGXrE LBoGAJQ+F5FzNkJMSrgv0oZdM0NHTWHJZIos1AjczVRQwZFd9uFsrhoXPfUzcxJSIsMd 1vKeLVaQ/FJA1AvyeARysKxClXs+oEFC3FQRMkPL8dREopVjjkbkqREf7JM9s1pVyRua 3vZ3BW37U4vVOTnD0PKoSgHrfrDOSuklYf2VJh/evUHUM3UFLonAg5gnkvbdzhHVqGZV Oplg== 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=DZT7LYIMowLfFfQ/hzCsIHNSBTjrcm7LxXxZQ2L79o0=; b=gEni19vzZjhs4vPl4SOuH5qDDk26bCzKFF14+JqsJVcmJ5Bhl+gu3G8UgTH4JPhtiR OXOrxMDwiFderqzWAkFW3tvxpfkTVPb5B+L4mV0p8MLxqr6+t+FLVszh/Cc5kTHBp7Zq Vrhjvkn9m1yXFOEqM+KvCkdgKqWC0xkjdQnipX/dVwfcUevY5L3+/Se999OehlD8VhHH rUfwhc4ehrG0VMgMXEjav2f6xgajFNks+GmvKvgak0PObjdLj4Rog63NKQA0IxgavWdA 18nucZ1Wfe6TdfjEurseyaddyYi820c29vYaA/BukABvs1epUHHzf74Rj+dTCgH53dll iUAQ== X-Gm-Message-State: AOAM530h7TVL3ptajRiqDutyViw5aOAaYqLgJ4RzycXClenq1kaBLF/6 jgaDCB/lfHK75ni1A2Qpy6+KISc5WaE= X-Google-Smtp-Source: ABdhPJzQl+alL2SAoGc19w/21jrvyMzjJNrDoRdQNnjI1NW7UQAI9FxXE6EwHAYKz+E6tXaC4lU77w== X-Received: by 2002:a17:907:3f88:: with SMTP id hr8mr2211744ejc.600.1644917556487; Tue, 15 Feb 2022 01:32:36 -0800 (PST) From: Paolo Bonzini To: qemu-devel@nongnu.org Subject: [PULL 17/30] configure, meson: move smbd options to meson_options.txt Date: Tue, 15 Feb 2022 10:32:10 +0100 Message-Id: <20220215093223.110827-18-pbonzini@redhat.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220215093223.110827-1-pbonzini@redhat.com> References: <20220215093223.110827-1-pbonzini@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Host-Lookup-Failed: Reverse DNS lookup failed for 2a00:1450:4864:20::633 (failed) 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+importer=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: 2 X-Spam_score: 0.2 X-Spam_bar: / X-Spam_report: (0.2 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FORGED_FROMDOMAIN=0.25, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.25, PDS_HP_HELO_NORDNS=0.904, RCVD_IN_DNSWL_NONE=-0.0001, RDNS_NONE=0.793, 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+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZM-MESSAGEID: 1644918474706100003 Content-Type: text/plain; charset="utf-8" Signed-off-by: Paolo Bonzini --- configure | 26 ++------------------------ meson.build | 15 +++++++++++++-- meson_options.txt | 4 ++++ net/slirp.c | 16 ++++++++-------- scripts/meson-buildoptions.py | 1 + scripts/meson-buildoptions.sh | 3 +++ 6 files changed, 31 insertions(+), 34 deletions(-) diff --git a/configure b/configure index 1cc836ee55..9230ebd4a8 100755 --- a/configure +++ b/configure @@ -330,7 +330,6 @@ meson_args=3D"" ninja=3D"" gio=3D"$default_feature" skip_meson=3Dno -slirp_smbd=3D"$default_feature" =20 # The following Meson options are handled manually (still they # are included in the automatically generated help message) @@ -416,6 +415,7 @@ objcopy=3D"${OBJCOPY-${cross_prefix}objcopy}" ld=3D"${LD-${cross_prefix}ld}" ranlib=3D"${RANLIB-${cross_prefix}ranlib}" nm=3D"${NM-${cross_prefix}nm}" +smbd=3D"$SMBD" strip=3D"${STRIP-${cross_prefix}strip}" windres=3D"${WINDRES-${cross_prefix}windres}" pkg_config_exe=3D"${PKG_CONFIG-${cross_prefix}pkg-config}" @@ -535,7 +535,6 @@ darwin) sunos) solaris=3D"yes" make=3D"${MAKE-gmake}" - smbd=3D"${SMBD-/usr/sfw/sbin/smbd}" # needed for CMSG_ macros in sys/socket.h QEMU_CFLAGS=3D"-D_XOPEN_SOURCE=3D600 $QEMU_CFLAGS" # needed for TIOCWIN* defines in termios.h @@ -1047,10 +1046,6 @@ for opt do ;; --disable-gio) gio=3Dno ;; - --enable-slirp-smbd) slirp_smbd=3Dyes - ;; - --disable-slirp-smbd) slirp_smbd=3Dno - ;; # backwards compatibility options --enable-trace-backend=3D*) meson_option_parse "--enable-trace-backends= =3D$optarg" "$optarg" ;; @@ -1282,7 +1277,6 @@ cat << EOF opengl opengl support tools build qemu-io, qemu-nbd and qemu-img tools gio libgio support - slirp-smbd use smbd (at path --smbd=3D*) in slirp networking =20 NOTE: The object files are built at the place where configure is launched EOF @@ -2725,19 +2719,6 @@ case "$slirp" in ;; esac =20 -# Check for slirp smbd dupport -: ${smbd=3D${SMBD-/usr/sbin/smbd}} -if test "$slirp_smbd" !=3D "no" ; then - if test "$mingw32" =3D "yes" ; then - if test "$slirp_smbd" =3D "yes" ; then - error_exit "Host smbd not supported on this platform." - fi - slirp_smbd=3Dno - else - slirp_smbd=3Dyes - fi -fi - ########################################## # check for usable __NR_keyctl syscall =20 @@ -2993,10 +2974,6 @@ fi if test "$guest_agent" =3D "yes" ; then echo "CONFIG_GUEST_AGENT=3Dy" >> $config_host_mak fi -if test "$slirp_smbd" =3D "yes" ; then - echo "CONFIG_SLIRP_SMBD=3Dy" >> $config_host_mak - echo "CONFIG_SMBD_COMMAND=3D\"$smbd\"" >> $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) @@ -3355,6 +3332,7 @@ if test "$skip_meson" =3D no; then -Ddocdir=3D"$docdir" \ -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) \ diff --git a/meson.build b/meson.build index 79ceff64a7..7b3cfb6316 100644 --- a/meson.build +++ b/meson.build @@ -1462,6 +1462,17 @@ 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 +have_slirp_smbd =3D get_option('slirp_smbd') \ + .require(targetos !=3D 'windows', error_message: 'Host smbd not supporte= d on this platform.') \ + .allowed() +if have_slirp_smbd + smbd_path =3D get_option('smbd') + if smbd_path =3D=3D '' + smbd_path =3D (targetos =3D=3D 'solaris' ? '/usr/sfw/sbin/smbd' : '/us= r/sbin/smbd') + endif + config_host_data.set_quoted('CONFIG_SMBD_COMMAND', smbd_path) +endif + config_host_data.set('HOST_' + host_arch.to_upper(), 1) =20 config_host_data.set('CONFIG_ATTR', libattr.found()) @@ -3333,8 +3344,8 @@ summary_info +=3D {'genisoimage': config_host['= GENISOIMAGE']} if targetos =3D=3D 'windows' and config_host.has_key('CONFIG_GUEST_AGENT') summary_info +=3D {'wixl': wixl} endif -if slirp_opt !=3D 'disabled' and 'CONFIG_SLIRP_SMBD' in config_host - summary_info +=3D {'smbd': config_host['CONFIG_SMBD_COMMAND']} +if slirp_opt !=3D 'disabled' and have_system + summary_info +=3D {'smbd': have_slirp_smbd ? smbd_path : fals= e} endif summary(summary_info, bool_yn: true, section: 'Host binaries') =20 diff --git a/meson_options.txt b/meson_options.txt index 03ae957102..59220b52c8 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('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)') option('default_devices', type : 'boolean', value : true, @@ -258,3 +260,5 @@ option('gprof', type: 'boolean', value: false, description: 'QEMU profiling with gprof') option('profiler', type: 'boolean', value: false, description: 'profiler support') +option('slirp_smbd', type : 'feature', value : 'auto', + description: 'use smbd (at path --smbd=3D*) in slirp networking') diff --git a/net/slirp.c b/net/slirp.c index ad3a838e0b..bc5e9e4f77 100644 --- a/net/slirp.c +++ b/net/slirp.c @@ -27,7 +27,7 @@ #include "net/slirp.h" =20 =20 -#if defined(CONFIG_SLIRP_SMBD) +#if defined(CONFIG_SMBD_COMMAND) #include #include #endif @@ -91,7 +91,7 @@ typedef struct SlirpState { Slirp *slirp; Notifier poll_notifier; Notifier exit_notifier; -#if defined(CONFIG_SLIRP_SMBD) +#if defined(CONFIG_SMBD_COMMAND) gchar *smb_dir; #endif GSList *fwd; @@ -104,7 +104,7 @@ static QTAILQ_HEAD(, SlirpState) slirp_stacks =3D static int slirp_hostfwd(SlirpState *s, const char *redir_str, Error **err= p); static int slirp_guestfwd(SlirpState *s, const char *config_str, Error **e= rrp); =20 -#if defined(CONFIG_SLIRP_SMBD) +#if defined(CONFIG_SMBD_COMMAND) static int slirp_smb(SlirpState *s, const char *exported_dir, struct in_addr vserver_addr, Error **errp); static void slirp_smb_cleanup(SlirpState *s); @@ -377,7 +377,7 @@ static int net_slirp_init(NetClientState *peer, const c= har *model, struct in6_addr ip6_prefix; struct in6_addr ip6_host; struct in6_addr ip6_dns; -#if defined(CONFIG_SLIRP_SMBD) +#if defined(CONFIG_SMBD_COMMAND) struct in_addr smbsrv =3D { .s_addr =3D 0 }; #endif NetClientState *nc; @@ -487,7 +487,7 @@ static int net_slirp_init(NetClientState *peer, const c= har *model, return -1; } =20 -#if defined(CONFIG_SLIRP_SMBD) +#if defined(CONFIG_SMBD_COMMAND) if (vsmbserver && !inet_aton(vsmbserver, &smbsrv)) { error_setg(errp, "Failed to parse SMB address"); return -1; @@ -602,7 +602,7 @@ static int net_slirp_init(NetClientState *peer, const c= har *model, } } } -#if defined(CONFIG_SLIRP_SMBD) +#if defined(CONFIG_SMBD_COMMAND) if (smb_export) { if (slirp_smb(s, smb_export, smbsrv, errp) < 0) { goto error; @@ -794,7 +794,7 @@ void hmp_hostfwd_add(Monitor *mon, const QDict *qdict) =20 } =20 -#if defined(CONFIG_SLIRP_SMBD) +#if defined(CONFIG_SMBD_COMMAND) =20 /* automatic user mode samba server configuration */ static void slirp_smb_cleanup(SlirpState *s) @@ -909,7 +909,7 @@ static int slirp_smb(SlirpState* s, const char *exporte= d_dir, return 0; } =20 -#endif /* defined(CONFIG_SLIRP_SMBD) */ +#endif /* defined(CONFIG_SMBD_COMMAND) */ =20 static int guestfwd_can_read(void *opaque) { diff --git a/scripts/meson-buildoptions.py b/scripts/meson-buildoptions.py index 98ae944148..01b10f7ae0 100755 --- a/scripts/meson-buildoptions.py +++ b/scripts/meson-buildoptions.py @@ -32,6 +32,7 @@ "fuzzing_engine", "qemu_firmwarepath", "qemu_suffix", + "smbd", "sphinx_build", "trace_file", } diff --git a/scripts/meson-buildoptions.sh b/scripts/meson-buildoptions.sh index 9a6e53a2e7..fb8812693c 100644 --- a/scripts/meson-buildoptions.sh +++ b/scripts/meson-buildoptions.sh @@ -101,6 +101,7 @@ meson_options_help() { printf "%s\n" ' sdl-image SDL Image support for icons' printf "%s\n" ' seccomp seccomp support' printf "%s\n" ' selinux SELinux support in qemu-nbd' + printf "%s\n" ' slirp-smbd use smbd (at path --smbd=3D*) in slirp = networking' printf "%s\n" ' smartcard CA smartcard emulation support' printf "%s\n" ' snappy snappy compression support' printf "%s\n" ' sparse sparse checker' @@ -296,6 +297,8 @@ _meson_option_parse() { --enable-slirp) printf "%s" -Dslirp=3Denabled ;; --disable-slirp) printf "%s" -Dslirp=3Ddisabled ;; --enable-slirp=3D*) quote_sh "-Dslirp=3D$2" ;; + --enable-slirp-smbd) printf "%s" -Dslirp_smbd=3Denabled ;; + --disable-slirp-smbd) printf "%s" -Dslirp_smbd=3Ddisabled ;; --enable-smartcard) printf "%s" -Dsmartcard=3Denabled ;; --disable-smartcard) printf "%s" -Dsmartcard=3Ddisabled ;; --enable-snappy) printf "%s" -Dsnappy=3Denabled ;; --=20 2.34.1 From nobody Mon Feb 9 09:42:38 2026 Delivered-To: importer@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+importer=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 16449185789041004.4234633254728; Tue, 15 Feb 2022 01:49:38 -0800 (PST) Received: from localhost ([::1]:43370 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nJuSn-0001Wv-RC for importer@patchew.org; Tue, 15 Feb 2022 04:49:37 -0500 Received: from eggs.gnu.org ([209.51.188.92]:54916) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nJuCP-0004Ju-15 for qemu-devel@nongnu.org; Tue, 15 Feb 2022 04:32:41 -0500 Received: from [2a00:1450:4864:20::631] (port=44922 helo=mail-ej1-x631.google.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nJuCM-0008SJ-IV for qemu-devel@nongnu.org; Tue, 15 Feb 2022 04:32:40 -0500 Received: by mail-ej1-x631.google.com with SMTP id p14so18652682ejf.11 for ; Tue, 15 Feb 2022 01:32:38 -0800 (PST) Received: from avogadro.lan ([2001:b07:6468:f312:c8dd:75d4:99ab:290a]) by smtp.gmail.com with ESMTPSA id m4sm6634308ejl.45.2022.02.15.01.32.36 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 15 Feb 2022 01:32:36 -0800 (PST) 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=deO2F0ErgO8GDflMKY+3HW/h9IN8YSSqPFluAnL4JQw=; b=T/aSRDmlCK6yR0d0sgaB/lm5BC7FsJHWb6AN8qSpWMx8wD7GhwJS9sKr9GYFPUcNwa X0Lj0w2SIQSbo3zuccTW5QTeCrOso4ylEQLoP7htC3ZuKX2r33BlsM465+++r0nkmOyv zGkkkXr7McgskVKDIPEHVSV/htQo/245qQ9rrInWyA/w0OFOgAc/6wTFq6R//A6r7mmw /4FTD1Gm3lMSUvFIUjkFuJ/WaKz1MDLYKjVbRLBNDaUE+SQno1j6AAS0s6mjzjKfLktH gVxgprRy8kCHeUSGoJhQHVUSXkob+TsqN7kPmQYsqs4YYNREbx4Qto1smLTFEF09cXKc 40rA== 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=deO2F0ErgO8GDflMKY+3HW/h9IN8YSSqPFluAnL4JQw=; b=brOSQf/aQ5XylO1WXarXDzz3mm+IPIovBg91NPXv++aZkq5VewlU19RWk1CYILXTcv nGbuR0Dzx0Eikii6mjTG+ZZR+8JX1cC/LFjZB9SN/L7AjiAGOYsGl54NxuzpmU+Kpn8D YGNlW10W4/QqvZcXXsA9WNTwKqcNsQkW1+TGUcE7IuxgPz6HRJTcIxD7/81DThUjYusW W9QthAoQYLRfTJsMiLjI80m2DbqQ795kCWhT4cicC5XkrctrqPDIVBN6/z0ecjSs/jR3 vKPgS+UVwlw1oXxDmlJy0SoJk53yaFbjNH5KC+0TX3eTlCuHO6O5y3U9xf68WvcTyMpR 4SFw== X-Gm-Message-State: AOAM532H2MekJUDvOG8i/eMOUU6FhFtWRm+NbclE1CY1zimJJqiYG7Ia gpVYc3gY07xZrFgnFSwyWdshI8oe8bw= X-Google-Smtp-Source: ABdhPJyQfumNzCSZPGOXasNvj+lgnggWPk1kp+OC3U61oN1g8Dp6+pQ29FbyZBFYzqr/3ojBrofzaA== X-Received: by 2002:a17:906:6888:: with SMTP id n8mr2260321ejr.0.1644917557129; Tue, 15 Feb 2022 01:32:37 -0800 (PST) From: Paolo Bonzini To: qemu-devel@nongnu.org Subject: [PULL 18/30] configure, meson: move guest-agent, tools to meson Date: Tue, 15 Feb 2022 10:32:11 +0100 Message-Id: <20220215093223.110827-19-pbonzini@redhat.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220215093223.110827-1-pbonzini@redhat.com> References: <20220215093223.110827-1-pbonzini@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Host-Lookup-Failed: Reverse DNS lookup failed for 2a00:1450:4864:20::631 (failed) 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+importer=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: 2 X-Spam_score: 0.2 X-Spam_bar: / X-Spam_report: (0.2 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FORGED_FROMDOMAIN=0.25, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.25, PDS_HP_HELO_NORDNS=0.904, RCVD_IN_DNSWL_NONE=-0.0001, RDNS_NONE=0.793, 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+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZM-MESSAGEID: 1644918579399100001 Content-Type: text/plain; charset="utf-8" Signed-off-by: Paolo Bonzini --- configure | 48 ++-------------------------- contrib/vhost-user-gpu/meson.build | 2 +- docs/meson.build | 2 -- meson.build | 50 ++++++++++++++++-------------- meson_options.txt | 4 +++ qga/meson.build | 7 +++++ scripts/meson-buildoptions.sh | 6 ++++ tests/Makefile.include | 2 +- tests/unit/meson.build | 4 +-- 9 files changed, 50 insertions(+), 75 deletions(-) diff --git a/configure b/configure index 9230ebd4a8..a66e2c0d71 100755 --- a/configure +++ b/configure @@ -317,10 +317,8 @@ pie=3D"" trace_backends=3D"log" trace_file=3D"trace" opengl=3D"$default_feature" -guest_agent=3D"$default_feature" vss_win32_sdk=3D"$default_feature" win_sdk=3D"no" -want_tools=3D"$default_feature" coroutine=3D"" tls_priority=3D"NORMAL" plugins=3D"$default_feature" @@ -960,10 +958,6 @@ for opt do ;; --disable-zlib-test) ;; - --enable-guest-agent) guest_agent=3D"yes" - ;; - --disable-guest-agent) guest_agent=3D"no" - ;; --with-vss-sdk) vss_win32_sdk=3D"" ;; --with-vss-sdk=3D*) vss_win32_sdk=3D"$optarg" @@ -976,10 +970,6 @@ for opt do ;; --without-win-sdk) win_sdk=3D"no" ;; - --enable-tools) want_tools=3D"yes" - ;; - --disable-tools) want_tools=3D"no" - ;; --disable-virtio-blk-data-plane|--enable-virtio-blk-data-plane) echo "$0: $opt is obsolete, virtio-blk data-plane is always on" >&2 ;; @@ -1256,7 +1246,6 @@ cat << EOF user supported user emulation targets linux-user all linux usermode emulation targets bsd-user all BSD usermode emulation targets - guest-agent build the QEMU Guest Agent pie Position Independent Executables modules modules support (non-Windows) module-upgrades try to load modules from alternate paths for upgrades @@ -1275,7 +1264,6 @@ cat << EOF vhost-user vhost-user backend support vhost-vdpa vhost-vdpa kernel backend support opengl opengl support - tools build qemu-io, qemu-nbd and qemu-img tools gio libgio support =20 NOTE: The object files are built at the place where configure is launched @@ -1678,16 +1666,6 @@ else exit 1 fi =20 -########################################## -# system tools -if test -z "$want_tools"; then - if test "$softmmu" =3D "no"; then - want_tools=3Dno - else - want_tools=3Dyes - fi -fi - ######################################### # vhost interdependencies and host support =20 @@ -2344,7 +2322,7 @@ fi # check if we have VSS SDK headers for win =20 guest_agent_with_vss=3D"no" -if test "$mingw32" =3D "yes" && test "$guest_agent" !=3D "no" && \ +if test "$mingw32" =3D "yes" && \ test "$vss_win32_sdk" !=3D "no" ; then case "$vss_win32_sdk" in "") vss_win32_include=3D"-isystem $source_path" ;; @@ -2381,7 +2359,7 @@ fi # VSS provider from the source. It is usually unnecessary because the # pre-compiled .tlb file is included. =20 -if test "$mingw32" =3D "yes" && test "$guest_agent" !=3D "no" && \ +if test "$mingw32" =3D "yes" && \ test "$guest_agent_with_vss" =3D "yes" ; then if test -z "$win_sdk"; then programfiles=3D"$PROGRAMFILES" @@ -2399,7 +2377,7 @@ fi ########################################## # check if mingw environment provides a recent ntddscsi.h guest_agent_ntddscsi=3D"no" -if test "$mingw32" =3D "yes" && test "$guest_agent" !=3D "no"; then +if test "$mingw32" =3D "yes"; then cat > $TMPC << EOF #include #include @@ -2825,20 +2803,6 @@ if test "$mingw32" =3D "yes" ; then done fi =20 -# Probe for guest agent support/options - -if [ "$guest_agent" !=3D "no" ]; then - if [ "$softmmu" =3D no -a "$want_tools" =3D no ] ; then - guest_agent=3Dno - elif [ "$linux" =3D "yes" -o "$bsd" =3D "yes" -o "$solaris" =3D "yes" -o= "$mingw32" =3D "yes" ] ; then - guest_agent=3Dyes - elif [ "$guest_agent" !=3D yes ]; then - guest_agent=3Dno - else - error_exit "Guest agent is not supported on this platform" - fi -fi - # Guest agent Windows MSI package =20 if test "$QEMU_GA_MANUFACTURER" =3D ""; then @@ -2968,12 +2932,6 @@ fi if test "$static" =3D "yes" ; then echo "CONFIG_STATIC=3Dy" >> $config_host_mak fi -if test "$want_tools" =3D "yes" ; then - echo "CONFIG_TOOLS=3Dy" >> $config_host_mak -fi -if test "$guest_agent" =3D "yes" ; then - echo "CONFIG_GUEST_AGENT=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) diff --git a/contrib/vhost-user-gpu/meson.build b/contrib/vhost-user-gpu/me= son.build index 92c8f3a86a..b4e26045da 100644 --- a/contrib/vhost-user-gpu/meson.build +++ b/contrib/vhost-user-gpu/meson.build @@ -1,4 +1,4 @@ -if 'CONFIG_TOOLS' in config_host and virgl.found() and gbm.found() \ +if have_tools and virgl.found() and gbm.found() \ and 'CONFIG_LINUX' in config_host and pixman.found() executable('vhost-user-gpu', files('vhost-user-gpu.c', 'virgl.c', 'vugbm= .c'), dependencies: [qemuutil, pixman, gbm, virgl, vhost_user, open= gl], diff --git a/docs/meson.build b/docs/meson.build index 57b28a3146..831d4aea2b 100644 --- a/docs/meson.build +++ b/docs/meson.build @@ -37,8 +37,6 @@ endif if build_docs SPHINX_ARGS +=3D ['-Dversion=3D' + meson.project_version(), '-Drelease= =3D' + config_host['PKGVERSION']] =20 - have_ga =3D have_tools and config_host.has_key('CONFIG_GUEST_AGENT') - man_pages =3D { 'qemu-ga.8': (have_ga ? 'man8' : ''), 'qemu-ga-ref.7': (have_ga ? 'man7' : ''), diff --git a/meson.build b/meson.build index 7b3cfb6316..b9bedf928a 100644 --- a/meson.build +++ b/meson.build @@ -44,21 +44,7 @@ config_host_data =3D configuration_data() genh =3D [] qapi_trace_events =3D [] =20 -target_dirs =3D config_host['TARGET_DIRS'].split() -have_linux_user =3D false -have_bsd_user =3D false -have_system =3D false -foreach target : target_dirs - have_linux_user =3D have_linux_user or target.endswith('linux-user') - have_bsd_user =3D have_bsd_user or target.endswith('bsd-user') - have_system =3D have_system or target.endswith('-softmmu') -endforeach -have_user =3D have_linux_user or have_bsd_user -have_tools =3D 'CONFIG_TOOLS' in config_host -have_block =3D have_system or have_tools - -python =3D import('python').find_installation() - +bsd_oses =3D ['gnu/kfreebsd', 'freebsd', 'netbsd', 'openbsd', 'dragonfly',= 'darwin'] supported_oses =3D ['windows', 'freebsd', 'netbsd', 'openbsd', 'darwin', '= sunos', 'linux'] supported_cpus =3D ['ppc', 'ppc64', 's390x', 'riscv', 'x86', 'x86_64', 'arm', 'aarch64', 'loongarch64', 'mips', 'mips64', 'sparc', 'sparc64'] @@ -72,6 +58,28 @@ endif =20 targetos =3D host_machine.system() =20 +target_dirs =3D config_host['TARGET_DIRS'].split() +have_linux_user =3D false +have_bsd_user =3D false +have_system =3D false +foreach target : target_dirs + have_linux_user =3D have_linux_user or target.endswith('linux-user') + have_bsd_user =3D have_bsd_user or target.endswith('bsd-user') + have_system =3D have_system or target.endswith('-softmmu') +endforeach +have_user =3D have_linux_user or have_bsd_user +have_tools =3D get_option('tools') \ + .disable_auto_if(not have_system) \ + .allowed() +have_ga =3D get_option('guest_agent') \ + .disable_auto_if(not have_system and not have_tools) \ + .require(targetos in ['sunos', 'linux', 'windows'], + error_message: 'unsupported OS for QEMU guest agent') \ + .allowed() +have_block =3D have_system or have_tools + +python =3D import('python').find_installation() + if cpu not in supported_cpus host_arch =3D 'unknown' elif cpu =3D=3D 'x86' @@ -3214,11 +3222,7 @@ if 'CONFIG_PLUGIN' in config_host install_headers('include/qemu/qemu-plugin.h') endif =20 -if 'CONFIG_GUEST_AGENT' in config_host - subdir('qga') -elif get_option('guest_agent_msi').enabled() - error('Guest agent MSI requested, but the guest agent is not being built= ') -endif +subdir('qga') =20 # Don't build qemu-keymap if xkbcommon is not explicitly enabled # when we don't build tools or system @@ -3341,7 +3345,7 @@ if config_host.has_key('HAVE_GDB_BIN') summary_info +=3D {'gdb': config_host['HAVE_GDB_BIN']} endif summary_info +=3D {'genisoimage': config_host['GENISOIMAGE']} -if targetos =3D=3D 'windows' and config_host.has_key('CONFIG_GUEST_AGENT') +if targetos =3D=3D 'windows' and have_ga summary_info +=3D {'wixl': wixl} endif if slirp_opt !=3D 'disabled' and have_system @@ -3379,7 +3383,7 @@ 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': config_host.has_key('CONFIG_GUEST_= AGENT')} +summary_info +=3D {'build guest agent': have_ga} summary(summary_info, bool_yn: true, section: 'Configurable features') =20 # Compilation information @@ -3589,7 +3593,7 @@ summary_info +=3D {'GBM': gbm} summary_info +=3D {'libiscsi support': libiscsi} summary_info +=3D {'libnfs support': libnfs} if targetos =3D=3D 'windows' - if config_host.has_key('CONFIG_GUEST_AGENT') + if have_ga summary_info +=3D {'QGA VSS support': config_host.has_key('CONFIG_QG= A_VSS')} summary_info +=3D {'QGA w32 disk info': config_host.has_key('CONFIG_QG= A_NTDDSCSI')} endif diff --git a/meson_options.txt b/meson_options.txt index 59220b52c8..589d242439 100644 --- a/meson_options.txt +++ b/meson_options.txt @@ -36,8 +36,12 @@ option('install_blobs', type : 'boolean', value : true, description: 'install provided firmware blobs') option('sparse', type : 'feature', value : 'auto', description: 'sparse checker') +option('guest_agent', type : 'feature', value : 'auto', + description: 'Build QEMU Guest Agent') option('guest_agent_msi', type : 'feature', value : 'auto', description: 'Build MSI package for the QEMU Guest Agent') +option('tools', type : 'feature', value : 'auto', + description: 'build support utilities that come with QEMU') =20 option('malloc_trim', type : 'feature', value : 'auto', description: 'enable libc malloc_trim() for memory optimization') diff --git a/qga/meson.build b/qga/meson.build index 56fb6539e5..97cc391fe1 100644 --- a/qga/meson.build +++ b/qga/meson.build @@ -1,3 +1,10 @@ +if not have_ga + if get_option('guest_agent_msi').enabled() + error('Guest agent MSI requested, but the guest agent is not being bui= lt') + endif + subdir_done() +endif + all_qga =3D [] =20 qga_qapi_outputs =3D [ diff --git a/scripts/meson-buildoptions.sh b/scripts/meson-buildoptions.sh index fb8812693c..4edc611273 100644 --- a/scripts/meson-buildoptions.sh +++ b/scripts/meson-buildoptions.sh @@ -62,6 +62,7 @@ meson_options_help() { printf "%s\n" ' glusterfs Glusterfs block device driver' printf "%s\n" ' gnutls GNUTLS cryptography support' printf "%s\n" ' gtk GTK+ user interface' + printf "%s\n" ' guest-agent Build QEMU Guest Agent' printf "%s\n" ' guest-agent-msi Build MSI package for the QEMU Guest Ag= ent' printf "%s\n" ' hax HAX acceleration support' printf "%s\n" ' hvf HVF acceleration support' @@ -108,6 +109,7 @@ meson_options_help() { printf "%s\n" ' spice Spice server support' printf "%s\n" ' spice-protocol Spice protocol support' printf "%s\n" ' tcg TCG support' + printf "%s\n" ' tools build support utilities that come with = QEMU' printf "%s\n" ' tpm TPM support' printf "%s\n" ' u2f U2F emulation support' printf "%s\n" ' usb-redir libusbredir support' @@ -209,6 +211,8 @@ _meson_option_parse() { --disable-gprof) printf "%s" -Dgprof=3Dfalse ;; --enable-gtk) printf "%s" -Dgtk=3Denabled ;; --disable-gtk) printf "%s" -Dgtk=3Ddisabled ;; + --enable-guest-agent) printf "%s" -Dguest_agent=3Denabled ;; + --disable-guest-agent) printf "%s" -Dguest_agent=3Ddisabled ;; --enable-guest-agent-msi) printf "%s" -Dguest_agent_msi=3Denabled ;; --disable-guest-agent-msi) printf "%s" -Dguest_agent_msi=3Ddisabled ;; --enable-hax) printf "%s" -Dhax=3Denabled ;; @@ -315,6 +319,8 @@ _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 ;; + --enable-tools) printf "%s" -Dtools=3Denabled ;; + --disable-tools) printf "%s" -Dtools=3Ddisabled ;; --enable-tpm) printf "%s" -Dtpm=3Denabled ;; --disable-tpm) printf "%s" -Dtpm=3Ddisabled ;; --enable-trace-backends=3D*) quote_sh "-Dtrace_backends=3D$2" ;; diff --git a/tests/Makefile.include b/tests/Makefile.include index 646c8b1334..e7153c8e91 100644 --- a/tests/Makefile.include +++ b/tests/Makefile.include @@ -150,7 +150,7 @@ check-acceptance: check-acceptance-deprecated-warning |= check-avocado .PHONY: check-block check check-clean get-vm-images check: =20 -ifeq ($(CONFIG_TOOLS)$(CONFIG_POSIX),yy) +ifneq ($(.check-block.deps),) check: check-block check-block: run-ninja $(if $(MAKE.n),,+)$(MESON) test $(MTESTARGS) $(.mtestargs) --verbose \ diff --git a/tests/unit/meson.build b/tests/unit/meson.build index 0959061faf..3a51759ebc 100644 --- a/tests/unit/meson.build +++ b/tests/unit/meson.build @@ -149,9 +149,7 @@ if have_system endif endif =20 -if 'CONFIG_TSAN' not in config_host and \ - 'CONFIG_GUEST_AGENT' in config_host and \ - 'CONFIG_LINUX' in config_host +if have_ga and targetos =3D=3D 'linux' and 'CONFIG_TSAN' not in config_host tests +=3D {'test-qga': ['../qtest/libqtest.c']} test_deps +=3D {'test-qga': qga} endif --=20 2.34.1 From nobody Mon Feb 9 09:42:38 2026 Delivered-To: importer@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+importer=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 1644918552037351.8378534049623; Tue, 15 Feb 2022 01:49:12 -0800 (PST) Received: from localhost ([::1]:41468 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nJuSM-0006vT-Ik for importer@patchew.org; Tue, 15 Feb 2022 04:49:10 -0500 Received: from eggs.gnu.org ([209.51.188.92]:54964) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nJuCQ-0004Nx-CX for qemu-devel@nongnu.org; Tue, 15 Feb 2022 04:32:42 -0500 Received: from [2a00:1450:4864:20::62f] (port=39608 helo=mail-ej1-x62f.google.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nJuCO-0008SN-3T for qemu-devel@nongnu.org; Tue, 15 Feb 2022 04:32:42 -0500 Received: by mail-ej1-x62f.google.com with SMTP id p9so20021592ejd.6 for ; Tue, 15 Feb 2022 01:32:38 -0800 (PST) Received: from avogadro.lan ([2001:b07:6468:f312:c8dd:75d4:99ab:290a]) by smtp.gmail.com with ESMTPSA id m4sm6634308ejl.45.2022.02.15.01.32.37 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 15 Feb 2022 01:32:37 -0800 (PST) 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=T0OFaVgYpYiiercWGJHBall5XMdKYApo48qVLKLorG8=; b=hD7ImMut3e5vFtwVJmqfxoV6iSUpL63/IH/cWW/pBzGhEhJTVO8h8oWXjXtrysMDp4 z4Xjta/BuHEnB7m7jQw+0HE6lu23aeWryByet0DxPYzwESK3is+VrwLhcIvq7fQLGpq5 eKxF4MOoFQGo68R29HsNFf3C9QDCO+7bgEjbd2NHtue8GRfXHZLvLKnDW7u+rp0z7oZ4 v6zgermByi3Fd/HjWQhJ8/EltmDadSS6vDUWVAwHp4AT+JrW4HxQSHlrETXytm6lddsa OMVu6aujFGXXDHMdK4Yl/o9TTKLZTMjhgWDs5BJyJFLJhg0LZNgzevfvlEEb8FBdaT8U pYhg== 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=T0OFaVgYpYiiercWGJHBall5XMdKYApo48qVLKLorG8=; b=pUlsr0yKNxq9+1jupldYMt5G9+ll44HD7fgigo7BY7iIxQs45CrLPyZt9GbobAEnbA vhd5U/mOTc0Z8FtOxxkD3EFX6KTRyuNgmboAIiJFy/YYQFy/C94RBx/ADH1LNkRBmWAp R2m1MAC/dq8ye7N/kvWy7Y9bc/rQqdBqF8D4UG60dA9VbvpvtX2NQjyP2sYtkUGbP+sq RdS+bI/Xp5vMUiiG0MIzj8QGTovLQ7XpiMVarss1wLoocRF8jYpzU2nyqeFv1qYuNjHl 4xilluX1OtU30bHPBnbNyy6rd9V/B+DrCBihPuoKAeiDBvww3I+1NiOf/nQ+mG0q8/Wm S+qA== X-Gm-Message-State: AOAM532d9Jo/xCl6LSJXtAvTVh3kgg2tamJXMTfN3QelXkNgIv02Uv9n 9MF652+E6A98sxnaedX2nVj9S+KHrhs= X-Google-Smtp-Source: ABdhPJzYAS3lozsb3J9R4mMmjhaXZhNjXw8qYF0nvQPEW38w2csN1hzfVaVIll+hXVRFR5K+EXzbOQ== X-Received: by 2002:a17:906:7291:: with SMTP id b17mr2170377ejl.321.1644917557830; Tue, 15 Feb 2022 01:32:37 -0800 (PST) From: Paolo Bonzini To: qemu-devel@nongnu.org Subject: [PULL 19/30] meson: refine check for whether to look for virglrenderer Date: Tue, 15 Feb 2022 10:32:12 +0100 Message-Id: <20220215093223.110827-20-pbonzini@redhat.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220215093223.110827-1-pbonzini@redhat.com> References: <20220215093223.110827-1-pbonzini@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Host-Lookup-Failed: Reverse DNS lookup failed for 2a00:1450:4864:20::62f (failed) 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+importer=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: 2 X-Spam_score: 0.2 X-Spam_bar: / X-Spam_report: (0.2 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FORGED_FROMDOMAIN=0.25, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.25, PDS_HP_HELO_NORDNS=0.904, RCVD_IN_DNSWL_NONE=-0.0001, RDNS_NONE=0.793, 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+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZM-MESSAGEID: 1644918553190100001 Content-Type: text/plain; charset="utf-8" The check should be performed even if !have_system, as long as there is som= e hope that vhost-user-gpu will be built. Store into have_vhost_user_gpu whether vhost= -user-gpu will be built; we will also use the variable to decide whether to look for = libepoxy. Signed-off-by: Paolo Bonzini --- contrib/vhost-user-gpu/meson.build | 3 +-- meson.build | 5 ++++- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/contrib/vhost-user-gpu/meson.build b/contrib/vhost-user-gpu/me= son.build index b4e26045da..c8883c2d8e 100644 --- a/contrib/vhost-user-gpu/meson.build +++ b/contrib/vhost-user-gpu/meson.build @@ -1,5 +1,4 @@ -if have_tools and virgl.found() and gbm.found() \ - and 'CONFIG_LINUX' in config_host and pixman.found() +if have_vhost_user_gpu executable('vhost-user-gpu', files('vhost-user-gpu.c', 'virgl.c', 'vugbm= .c'), dependencies: [qemuutil, pixman, gbm, virgl, vhost_user, open= gl], install: true, diff --git a/meson.build b/meson.build index b9bedf928a..5ad346816e 100644 --- a/meson.build +++ b/meson.build @@ -621,7 +621,9 @@ if not get_option('zstd').auto() or have_block method: 'pkg-config', kwargs: static_kwargs) endif virgl =3D not_found -if not get_option('virglrenderer').auto() or have_system + +have_vhost_user_gpu =3D have_tools and targetos =3D=3D 'linux' and pixman.= found() +if not get_option('virglrenderer').auto() or have_system or have_vhost_use= r_gpu virgl =3D dependency('virglrenderer', method: 'pkg-config', required: get_option('virglrenderer'), @@ -1000,6 +1002,7 @@ if (have_system or have_tools) and (virgl.found() or = opengl.found()) gbm =3D dependency('gbm', method: 'pkg-config', required: false, kwargs: static_kwargs) endif +have_vhost_user_gpu =3D have_vhost_user_gpu and virgl.found() and gbm.foun= d() =20 gnutls =3D not_found gnutls_crypto =3D not_found --=20 2.34.1 From nobody Mon Feb 9 09:42:38 2026 Delivered-To: importer@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+importer=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 1644918826502720.7632933694863; Tue, 15 Feb 2022 01:53:46 -0800 (PST) Received: from localhost ([::1]:50274 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nJuWn-00072u-D6 for importer@patchew.org; Tue, 15 Feb 2022 04:53:45 -0500 Received: from eggs.gnu.org ([209.51.188.92]:54948) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nJuCP-0004Mf-Pc for qemu-devel@nongnu.org; Tue, 15 Feb 2022 04:32:41 -0500 Received: from [2a00:1450:4864:20::631] (port=35404 helo=mail-ej1-x631.google.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nJuCN-0008ST-Ph for qemu-devel@nongnu.org; Tue, 15 Feb 2022 04:32:41 -0500 Received: by mail-ej1-x631.google.com with SMTP id qk11so22510390ejb.2 for ; Tue, 15 Feb 2022 01:32:39 -0800 (PST) Received: from avogadro.lan ([2001:b07:6468:f312:c8dd:75d4:99ab:290a]) by smtp.gmail.com with ESMTPSA id m4sm6634308ejl.45.2022.02.15.01.32.37 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 15 Feb 2022 01:32:38 -0800 (PST) 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=ks34+qg3/pZbGPdtnrEzelBZMFOlLPY42nRaA7wgQnQ=; b=mgbJijRU5vlexr7BlFdCH3hg/qwEIR3NE6pLx7vB4WClgOr4Ts1pbPyhvAoYo8NqV1 lXSJif57s0blAnLrBkHfG/PYbdTRk00hI5vkAHohQBWEGhX4yhSQAcw6PupI0e9p72bp 8U2E0OMTEVMQuUK9T1gdFbuhOgDSkEc1280jVgi9F4CtMwAb+w0Gof6GCiTQ3HYTFxjG Z5CN4hMb2gUJrpZARswsRs0IM95UubeH98NjssoG0Uf6PsoBviMiQ3DEWUD+IpRtE8HE P2sBteTLTQT0738RLur7MDM3/WbduSI4YrO3vGgD2iREdoi+Fcz9ghyCrXVhmRWEa3sH lQEw== 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=ks34+qg3/pZbGPdtnrEzelBZMFOlLPY42nRaA7wgQnQ=; b=4nVJGchdOvfcRMGYbokRPnDZ4xyBmV+qVnjIemUOAhMpu+r4Nnhq1v46MC2Od7NXge 8dvb7Mf+Zxluw1LoqjFzRoKZ94Z/5myPtdqwZtOttB9yFg955PNmuXb+NbIs5/gO90X1 RoTJr/Qc5Zmm8C9pLFLTAm39nvPoM+Wfa3MFx+jsKnCg5xuX/MCHT/Z53/MH2UvQ+Sn2 0wLxEflS641pLx4SF6X5bpE8dfPZDjNmz16DTILYrlqDuM7c1a0XeOfkOWsyXYY2Z9j/ u3hsoJfGvuuaDtsAPxaYANyLaC4E2OAu/ltY2ThehdQA+cnTtesHd4juopeZNq44FYRC 9K2w== X-Gm-Message-State: AOAM532oLhiwaYHkx4ZrKGV29wmWduALRy4/H7lQbf1d7aX2Foe/vf+g AYeqE5RLE+Y6SH+kUm7a5BLpVaO/tA4= X-Google-Smtp-Source: ABdhPJwf4QnLjYPG9FjlDQX9bIc3HaOaq+sf4u9yF/kjNvc4WQz8wY8q5R0Huw94ReoYY9ZJoHZFJA== X-Received: by 2002:a17:907:8192:: with SMTP id iy18mr208550ejc.209.1644917558488; Tue, 15 Feb 2022 01:32:38 -0800 (PST) From: Paolo Bonzini To: qemu-devel@nongnu.org Subject: [PULL 20/30] configure, meson: move OpenGL check to meson Date: Tue, 15 Feb 2022 10:32:13 +0100 Message-Id: <20220215093223.110827-21-pbonzini@redhat.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220215093223.110827-1-pbonzini@redhat.com> References: <20220215093223.110827-1-pbonzini@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Host-Lookup-Failed: Reverse DNS lookup failed for 2a00:1450:4864:20::631 (failed) 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+importer=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: 2 X-Spam_score: 0.2 X-Spam_bar: / X-Spam_report: (0.2 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FORGED_FROMDOMAIN=0.25, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.25, PDS_HP_HELO_NORDNS=0.904, RCVD_IN_DNSWL_NONE=-0.0001, RDNS_NONE=0.793, 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+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZM-MESSAGEID: 1644918827840100001 Content-Type: text/plain; charset="utf-8" Signed-off-by: Paolo Bonzini --- configure | 40 ----------------------------------- meson.build | 16 +++++++++----- meson_options.txt | 2 ++ scripts/meson-buildoptions.sh | 3 +++ ui/meson.build | 16 +++++++------- 5 files changed, 24 insertions(+), 53 deletions(-) diff --git a/configure b/configure index a66e2c0d71..4c9f3f7cb4 100755 --- a/configure +++ b/configure @@ -316,7 +316,6 @@ pkgversion=3D"" pie=3D"" trace_backends=3D"log" trace_file=3D"trace" -opengl=3D"$default_feature" vss_win32_sdk=3D"$default_feature" win_sdk=3D"no" coroutine=3D"" @@ -952,10 +951,6 @@ for opt do ;; --enable-vhost-user-fs) vhost_user_fs=3D"yes" ;; - --disable-opengl) opengl=3D"no" - ;; - --enable-opengl) opengl=3D"yes" - ;; --disable-zlib-test) ;; --with-vss-sdk) vss_win32_sdk=3D"" @@ -1263,7 +1258,6 @@ cat << EOF vhost-kernel vhost kernel backend support vhost-user vhost-user backend support vhost-vdpa vhost-vdpa kernel backend support - opengl opengl support gio libgio support =20 NOTE: The object files are built at the place where configure is launched @@ -2266,34 +2260,6 @@ case "$fdt" in esac =20 ########################################## -# opengl probe (for sdl2, gtk) - -if test "$opengl" !=3D "no" ; then - epoxy=3Dno - if $pkg_config epoxy; then - cat > $TMPC << EOF -#include -int main(void) { return 0; } -EOF - if compile_prog "" "" ; then - epoxy=3Dyes - fi - fi - - if test "$epoxy" =3D "yes" ; then - opengl_cflags=3D"$($pkg_config --cflags epoxy)" - opengl_libs=3D"$($pkg_config --libs epoxy)" - opengl=3Dyes - else - if test "$opengl" =3D "yes" ; then - feature_not_found "opengl" "Please install epoxy with EGL" - fi - opengl_cflags=3D"" - opengl_libs=3D"" - opengl=3Dno - fi -fi - # check for usbfs have_usbfs=3Dno if test "$linux_user" =3D "yes"; then @@ -3003,12 +2969,6 @@ if test "$tcg" =3D "enabled" -a "$tcg_interpreter" = =3D "true" ; then echo "CONFIG_TCG_INTERPRETER=3Dy" >> $config_host_mak fi =20 -if test "$opengl" =3D "yes" ; then - echo "CONFIG_OPENGL=3Dy" >> $config_host_mak - echo "OPENGL_CFLAGS=3D$opengl_cflags" >> $config_host_mak - echo "OPENGL_LIBS=3D$opengl_libs" >> $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 5ad346816e..6308225e3c 100644 --- a/meson.build +++ b/meson.build @@ -993,9 +993,14 @@ if not get_option('coreaudio').auto() or (targetos =3D= =3D 'darwin' and have_system) endif =20 opengl =3D not_found -if 'CONFIG_OPENGL' in config_host - opengl =3D declare_dependency(compile_args: config_host['OPENGL_CFLAGS']= .split(), - link_args: config_host['OPENGL_LIBS'].split(= )) +if not get_option('opengl').auto() or have_system or have_vhost_user_gpu + epoxy =3D dependency('epoxy', method: 'pkg-config', + required: get_option('opengl'), kwargs: static_kwarg= s) + if cc.has_header('epoxy/egl.h', dependencies: epoxy) + opengl =3D epoxy + elif get_option('dsound').enabled() + error('epoxy/egl.h not found') + endif endif gbm =3D not_found if (have_system or have_tools) and (virgl.found() or opengl.found()) @@ -1521,6 +1526,7 @@ config_host_data.set('CONFIG_LINUX_AIO', libaio.found= ()) config_host_data.set('CONFIG_LINUX_IO_URING', linux_io_uring.found()) config_host_data.set('CONFIG_LIBPMEM', libpmem.found()) config_host_data.set('CONFIG_NUMA', numa.found()) +config_host_data.set('CONFIG_OPENGL', opengl.found()) config_host_data.set('CONFIG_PROFILER', get_option('profiler')) config_host_data.set('CONFIG_RBD', rbd.found()) config_host_data.set('CONFIG_SDL', sdl.found()) @@ -1994,7 +2000,7 @@ host_kconfig =3D \ (have_tpm ? ['CONFIG_TPM=3Dy'] : []) + \ (spice.found() ? ['CONFIG_SPICE=3Dy'] : []) + \ (have_ivshmem ? ['CONFIG_IVSHMEM=3Dy'] : []) + \ - ('CONFIG_OPENGL' in config_host ? ['CONFIG_OPENGL=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'] : []) + \ @@ -3591,7 +3597,7 @@ summary_info +=3D {'smartcard support': cacard} summary_info +=3D {'U2F support': u2f} summary_info +=3D {'libusb': libusb} summary_info +=3D {'usb net redir': usbredir} -summary_info +=3D {'OpenGL support': config_host.has_key('CONFIG_OPENGL= ')} +summary_info +=3D {'OpenGL support (epoxy)': opengl} summary_info +=3D {'GBM': gbm} summary_info +=3D {'libiscsi support': libiscsi} summary_info +=3D {'libnfs support': libnfs} diff --git a/meson_options.txt b/meson_options.txt index 589d242439..417b543314 100644 --- a/meson_options.txt +++ b/meson_options.txt @@ -145,6 +145,8 @@ option('lzo', type : 'feature', value : 'auto', description: 'lzo compression support') option('rbd', type : 'feature', value : 'auto', description: 'Ceph block device driver') +option('opengl', type : 'feature', value : 'auto', + description: 'OpenGL support') option('gtk', type : 'feature', value : 'auto', description: 'GTK+ user interface') option('sdl', type : 'feature', value : 'auto', diff --git a/scripts/meson-buildoptions.sh b/scripts/meson-buildoptions.sh index 4edc611273..cc9bb4b1fd 100644 --- a/scripts/meson-buildoptions.sh +++ b/scripts/meson-buildoptions.sh @@ -91,6 +91,7 @@ meson_options_help() { printf "%s\n" ' nettle nettle cryptography support' printf "%s\n" ' numa libnuma support' printf "%s\n" ' nvmm NVMM acceleration support' + printf "%s\n" ' opengl OpenGL support' printf "%s\n" ' oss OSS sound support' printf "%s\n" ' pa PulseAudio sound support' printf "%s\n" ' parallels parallels image format support' @@ -270,6 +271,8 @@ _meson_option_parse() { --disable-numa) printf "%s" -Dnuma=3Ddisabled ;; --enable-nvmm) printf "%s" -Dnvmm=3Denabled ;; --disable-nvmm) printf "%s" -Dnvmm=3Ddisabled ;; + --enable-opengl) printf "%s" -Dopengl=3Denabled ;; + --disable-opengl) printf "%s" -Dopengl=3Ddisabled ;; --enable-oss) printf "%s" -Doss=3Denabled ;; --disable-oss) printf "%s" -Doss=3Ddisabled ;; --enable-pa) printf "%s" -Dpa=3Denabled ;; diff --git a/ui/meson.build b/ui/meson.build index 64286ba150..cdf2bafb03 100644 --- a/ui/meson.build +++ b/ui/meson.build @@ -43,7 +43,6 @@ vnc_ss.add(zlib, png, jpeg, gnutls) vnc_ss.add(when: sasl, if_true: files('vnc-auth-sasl.c')) softmmu_ss.add_all(when: vnc, if_true: vnc_ss) softmmu_ss.add(when: vnc, if_false: files('vnc-stubs.c')) -specific_ss.add(when: ['CONFIG_SOFTMMU'], if_true: opengl) =20 ui_modules =3D {} =20 @@ -53,17 +52,18 @@ if curses.found() ui_modules +=3D {'curses' : curses_ss} endif =20 -if config_host.has_key('CONFIG_OPENGL') +softmmu_ss.add(opengl) +if opengl.found() opengl_ss =3D ss.source_set() opengl_ss.add(gbm) - opengl_ss.add(when: [opengl, pixman, 'CONFIG_OPENGL'], + opengl_ss.add(when: [opengl, pixman], if_true: files('shader.c', 'console-gl.c', 'egl-helpers.c',= 'egl-context.c')) ui_modules +=3D {'opengl' : opengl_ss} endif =20 -if config_host.has_key('CONFIG_OPENGL') and gbm.found() +if opengl.found() and gbm.found() egl_headless_ss =3D ss.source_set() - egl_headless_ss.add(when: [opengl, gbm, pixman, 'CONFIG_OPENGL'], + egl_headless_ss.add(when: [opengl, gbm, pixman], if_true: files('egl-headless.c')) ui_modules +=3D {'egl-headless' : egl_headless_ss} endif @@ -98,8 +98,8 @@ if gtk.found() gtk_ss =3D ss.source_set() gtk_ss.add(gtk, vte, pixman, files('gtk.c', 'gtk-clipboard.c')) gtk_ss.add(when: x11, if_true: files('x_keymap.c')) - gtk_ss.add(when: [opengl, 'CONFIG_OPENGL'], if_true: files('gtk-gl-area.= c')) - gtk_ss.add(when: [x11, opengl, 'CONFIG_OPENGL'], if_true: files('gtk-egl= .c')) + gtk_ss.add(when: opengl, if_true: files('gtk-gl-area.c')) + gtk_ss.add(when: [x11, opengl], if_true: files('gtk-egl.c')) ui_modules +=3D {'gtk' : gtk_ss} endif =20 @@ -112,7 +112,7 @@ if sdl.found() 'sdl2-input.c', 'sdl2.c', )) - sdl_ss.add(when: [opengl, 'CONFIG_OPENGL'], if_true: files('sdl2-gl.c')) + sdl_ss.add(when: opengl, if_true: files('sdl2-gl.c')) sdl_ss.add(when: x11, if_true: files('x_keymap.c')) ui_modules +=3D {'sdl' : sdl_ss} endif --=20 2.34.1 From nobody Mon Feb 9 09:42:38 2026 Delivered-To: importer@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+importer=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 1644918936313707.7126349230405; Tue, 15 Feb 2022 01:55:36 -0800 (PST) Received: from localhost ([::1]:55900 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nJuYZ-0005kE-A0 for importer@patchew.org; Tue, 15 Feb 2022 04:55:35 -0500 Received: from eggs.gnu.org ([209.51.188.92]:54970) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nJuCQ-0004OJ-Et for qemu-devel@nongnu.org; Tue, 15 Feb 2022 04:32:42 -0500 Received: from [2a00:1450:4864:20::636] (port=43849 helo=mail-ej1-x636.google.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nJuCO-0008Sg-LE for qemu-devel@nongnu.org; Tue, 15 Feb 2022 04:32:42 -0500 Received: by mail-ej1-x636.google.com with SMTP id d10so42877184eje.10 for ; Tue, 15 Feb 2022 01:32:40 -0800 (PST) Received: from avogadro.lan ([2001:b07:6468:f312:c8dd:75d4:99ab:290a]) by smtp.gmail.com with ESMTPSA id m4sm6634308ejl.45.2022.02.15.01.32.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 15 Feb 2022 01:32:38 -0800 (PST) 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=iwKrw8tO5y25zYOksvfVojKXZjXfywa7yUC+Id68b80=; b=SukyXIponDfC/9oCJ3lLJ2oX9SM4FI/v66qY+ij6harXLYGwI467t+Bwv1OsV2xBtd U/LOc+dsRn7P4nZldW0Ny8d3GLPs9oplb2tYc5vho/P4Wnc2mq4w9ydWrNzh9dsSl+Jt NH39+9B9Bc3la4UGu7lN5RZ4f+Y0Z+aooPSZDh63yedb24p6oeMcKWy2qEbXLhGlojSj 1whU6sry8zbPgjdSR+b57s0tt6qdQ92jKb7I2rEg3KDnUdNPu21OaFgiuBeAFe1eLn9q Cl0tm4sDJ403ShacTsWrYvX+j1TmJv9UtWo/1JSazQNOy0hya4aLNS+uFB8QwOvAR36l uEaw== 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=iwKrw8tO5y25zYOksvfVojKXZjXfywa7yUC+Id68b80=; b=kAea2KjUplAZvudA8BOFyD7jqptdfGsEnaWywp4Tq9n31gTvE/+A5mGSlJ3FZV7Rtz XFmWnpg4imLnt/m5dOTaQL2BgNY7VuTsHfr8Wk2MkjnhQPZOYof6Sor0a5s2fwtO+Mq9 Y7medsu7miTMF3yfVNeBoBoIDNFy+rq/XCOfxp+0z16PWM1AFnYDaRGBnwi7p/tmMsnM dr3GyjTrdu+YcSAiVBmHyBokd8cp2CKXiU24dUDbLAFXbm6yu3axC6U2U9Mr31tBi9Yj FDmpfwv3kKtVHFfO14rPft/cKexYNMeup0+M5D3HVp54ylVhUtlKjE5QCuMC8ojiJ2V0 xKig== X-Gm-Message-State: AOAM531sUJL/JYsfVsdLACM2bkRWBRWkLBq338SbXGS+HMZHGNiXorez RUgAHnUQ7TeScZ3y8Ep1GWyAm69Pjl0= X-Google-Smtp-Source: ABdhPJzX6e8OIyPrlMUxkJDndvoAozpweUKk3uQ3WNTHBTueQ4x2GClnJcV7lDt1nVU93ERMxhjk+w== X-Received: by 2002:a17:907:1c87:: with SMTP id nb7mr2212163ejc.279.1644917559115; Tue, 15 Feb 2022 01:32:39 -0800 (PST) From: Paolo Bonzini To: qemu-devel@nongnu.org Subject: [PULL 21/30] qga/vss-win32: fix midl arguments Date: Tue, 15 Feb 2022 10:32:14 +0100 Message-Id: <20220215093223.110827-22-pbonzini@redhat.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220215093223.110827-1-pbonzini@redhat.com> References: <20220215093223.110827-1-pbonzini@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Host-Lookup-Failed: Reverse DNS lookup failed for 2a00:1450:4864:20::636 (failed) 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+importer=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: 2 X-Spam_score: 0.2 X-Spam_bar: / X-Spam_report: (0.2 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FORGED_FROMDOMAIN=0.25, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.25, PDS_HP_HELO_NORDNS=0.904, RCVD_IN_DNSWL_NONE=-0.0001, RDNS_NONE=0.793, 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+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZM-MESSAGEID: 1644918937604100001 From: Marc-Andr=C3=A9 Lureau Microsoft midl compiler doesn't take "-options" form, nor does it take OUTPUT filename. The -I option seems needless as well (at least with VS15). It's not clear what was actually used when it was introduced in commit b39297aedfabe9. strings says "Created by MIDL version 7.00.0555 at Fri Dec 21 13:36:39 2012". I doubt the makefile rule actually ever worked. Signed-off-by: Marc-Andr=C3=A9 Lureau Signed-off-by: Paolo Bonzini --- qga/vss-win32/meson.build | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/qga/vss-win32/meson.build b/qga/vss-win32/meson.build index 90825edef3..78bdf5e74a 100644 --- a/qga/vss-win32/meson.build +++ b/qga/vss-win32/meson.build @@ -26,8 +26,7 @@ if midl.found() gen_tlb =3D custom_target('gen-tlb', input: 'qga-vss.idl', output: 'qga-vss.tlb', - command: [midl, '-tlb', '-I' + config_host['WIN_= SDK'], - '@INPUT@', '@OUTPUT@']) + command: [midl, '@INPUT@', '/tlb', '@OUTPUT@']) else gen_tlb =3D custom_target('gen-tlb', input: 'qga-vss.tlb', --=20 2.34.1 From nobody Mon Feb 9 09:42:38 2026 Delivered-To: importer@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+importer=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 1644919139896419.5693725940198; Tue, 15 Feb 2022 01:58:59 -0800 (PST) Received: from localhost ([::1]:36002 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nJubq-0001aV-K5 for importer@patchew.org; Tue, 15 Feb 2022 04:58:58 -0500 Received: from eggs.gnu.org ([209.51.188.92]:54986) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nJuCR-0004QE-Bv for qemu-devel@nongnu.org; Tue, 15 Feb 2022 04:32:43 -0500 Received: from [2a00:1450:4864:20::636] (port=39615 helo=mail-ej1-x636.google.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nJuCP-0008Su-2K for qemu-devel@nongnu.org; Tue, 15 Feb 2022 04:32:42 -0500 Received: by mail-ej1-x636.google.com with SMTP id p9so20021760ejd.6 for ; Tue, 15 Feb 2022 01:32:40 -0800 (PST) Received: from avogadro.lan ([2001:b07:6468:f312:c8dd:75d4:99ab:290a]) by smtp.gmail.com with ESMTPSA id m4sm6634308ejl.45.2022.02.15.01.32.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 15 Feb 2022 01:32:39 -0800 (PST) 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=SRgJg5xfpuSAqjCPUPWulsWzAL4Etybls08rekRjgyc=; b=fZinXVP+NV/qUgE3PAsM0u1nLhqDmwwAuALQzMCFv4isQm5yzDxDaBeLYjnho9xjKT gily+qDbIy56aLjE2QnRQyhg5AOUW6+t8hlms9ch9zcuRlTEqw/x8DJpoM0ipqk0+fL6 Ct1K12k1fhoYsRXxUHjwtAdW6wpMdhlL+ywMWrIczf1S6AmDriG0SzWORi9MlcCFTxXz buGn2y0gCs2I1Qw638jtauWExw/lPSwuhSALQyRcdgCs52kuhi2lQdJRC6nDe1EKe7E5 Q0Fxf+VtArBp/WYSOuyQOzhU2cXTL72wJMdljYPO24d2kouz49RGHXpKKJ5eEZrtECNm RUhA== 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=SRgJg5xfpuSAqjCPUPWulsWzAL4Etybls08rekRjgyc=; b=uwulXeRlrefgHelx3zyiYp7Cuent2723upSB7OYobO6R4hmus36TPQp/zS/bKT7t+0 6lLxY2lIl5eBGhFkW7JxlxitmzRmHZ642KoGDNpuuL0g2uBolcFzdtsr0wrF69uEXS52 sLzyZt3vDjYK3fN+VFal/9O/ODeLT4/0fJhsyaL8fJHSmZKomuLJAiZIWC4jyNK4WdHI NU89j55lJCkMsFEHt17fWBKhbjBwCCt/JheNR9a7GkYvO9ub0eDuDyt/MX4ip/w5Eqp7 ICoo2m6nk8mjiTKlaPFGQ3MOREf3EcIerLM6lq9tT0y49HFkSYbf3Y89viGQ/gZWMsW7 bZtw== X-Gm-Message-State: AOAM530xewd+MR77bLdD0B5RH3ZjNAbJbPK3NCkrQX37n1bmySXs09Pc hYThtLJ4e7X8MtCEpjU8tsjRJSaYmRA= X-Google-Smtp-Source: ABdhPJxPWnraBmWhFLBdbBu9uAY/HDrV0O40+pmjBQRvWPdWjU0uGtixSa0eIIqkouJDGhDws1vLbw== X-Received: by 2002:a17:906:2ed0:: with SMTP id s16mr2167511eji.327.1644917559866; Tue, 15 Feb 2022 01:32:39 -0800 (PST) From: Paolo Bonzini To: qemu-devel@nongnu.org Subject: [PULL 22/30] meson: drop --with-win-sdk Date: Tue, 15 Feb 2022 10:32:15 +0100 Message-Id: <20220215093223.110827-23-pbonzini@redhat.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220215093223.110827-1-pbonzini@redhat.com> References: <20220215093223.110827-1-pbonzini@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Host-Lookup-Failed: Reverse DNS lookup failed for 2a00:1450:4864:20::636 (failed) 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+importer=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: 2 X-Spam_score: 0.2 X-Spam_bar: / X-Spam_report: (0.2 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FORGED_FROMDOMAIN=0.25, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.25, PDS_HP_HELO_NORDNS=0.904, RCVD_IN_DNSWL_NONE=-0.0001, RDNS_NONE=0.793, 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+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZM-MESSAGEID: 1644919141832100001 From: Marc-Andr=C3=A9 Lureau It's no longer used. Signed-off-by: Marc-Andr=C3=A9 Lureau Signed-off-by: Paolo Bonzini --- configure | 29 ----------------------------- meson.build | 5 ----- 2 files changed, 34 deletions(-) diff --git a/configure b/configure index 4c9f3f7cb4..20968ca7ac 100755 --- a/configure +++ b/configure @@ -317,7 +317,6 @@ pie=3D"" trace_backends=3D"log" trace_file=3D"trace" vss_win32_sdk=3D"$default_feature" -win_sdk=3D"no" coroutine=3D"" tls_priority=3D"NORMAL" plugins=3D"$default_feature" @@ -959,12 +958,6 @@ for opt do ;; --without-vss-sdk) vss_win32_sdk=3D"no" ;; - --with-win-sdk) win_sdk=3D"" - ;; - --with-win-sdk=3D*) win_sdk=3D"$optarg" - ;; - --without-win-sdk) win_sdk=3D"no" - ;; --disable-virtio-blk-data-plane|--enable-virtio-blk-data-plane) echo "$0: $opt is obsolete, virtio-blk data-plane is always on" >&2 ;; @@ -2319,27 +2312,6 @@ EOF fi fi =20 -########################################## -# lookup Windows platform SDK (if not specified) -# The SDK is needed only to build .tlb (type library) file of guest agent -# VSS provider from the source. It is usually unnecessary because the -# pre-compiled .tlb file is included. - -if test "$mingw32" =3D "yes" && \ - test "$guest_agent_with_vss" =3D "yes" ; then - if test -z "$win_sdk"; then - programfiles=3D"$PROGRAMFILES" - test -n "$PROGRAMW6432" && programfiles=3D"$PROGRAMW6432" - if test -n "$programfiles"; then - win_sdk=3D$(ls -d "$programfiles/Microsoft SDKs/Windows/v"* | tail -= 1) 2>/dev/null - else - feature_not_found "Windows SDK" - fi - elif test "$win_sdk" =3D "no"; then - win_sdk=3D"" - fi -fi - ########################################## # check if mingw environment provides a recent ntddscsi.h guest_agent_ntddscsi=3D"no" @@ -2871,7 +2843,6 @@ if test "$mingw32" =3D "yes" ; then echo "CONFIG_WIN32=3Dy" >> $config_host_mak if test "$guest_agent_with_vss" =3D "yes" ; then echo "CONFIG_QGA_VSS=3Dy" >> $config_host_mak - echo "WIN_SDK=3D\"$win_sdk\"" >> $config_host_mak fi if test "$guest_agent_ntddscsi" =3D "yes" ; then echo "CONFIG_QGA_NTDDSCSI=3Dy" >> $config_host_mak diff --git a/meson.build b/meson.build index 6308225e3c..96d64ec28f 100644 --- a/meson.build +++ b/meson.build @@ -3409,11 +3409,6 @@ endif if targetos =3D=3D 'darwin' summary_info +=3D {'Objective-C compiler': ' '.join(meson.get_compiler('= objc').cmd_array())} endif -if targetos =3D=3D 'windows' - if 'WIN_SDK' in config_host - summary_info +=3D {'Windows SDK': config_host['WIN_SDK']} - endif -endif summary_info +=3D {'CFLAGS': ' '.join(get_option('c_args') + ['-O' + get_option('optim= ization')] + (get_option('debug') ? ['= -g'] : []))} --=20 2.34.1 From nobody Mon Feb 9 09:42:38 2026 Delivered-To: importer@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+importer=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 1644918990070836.9604897545836; Tue, 15 Feb 2022 01:56:30 -0800 (PST) Received: from localhost ([::1]:58934 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nJuZQ-0001M0-O4 for importer@patchew.org; Tue, 15 Feb 2022 04:56:28 -0500 Received: from eggs.gnu.org ([209.51.188.92]:54994) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nJuCR-0004Qj-GK for qemu-devel@nongnu.org; Tue, 15 Feb 2022 04:32:43 -0500 Received: from [2a00:1450:4864:20::62d] (port=43841 helo=mail-ej1-x62d.google.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nJuCP-0008TF-SG for qemu-devel@nongnu.org; Tue, 15 Feb 2022 04:32:43 -0500 Received: by mail-ej1-x62d.google.com with SMTP id d10so42877298eje.10 for ; Tue, 15 Feb 2022 01:32:41 -0800 (PST) Received: from avogadro.lan ([2001:b07:6468:f312:c8dd:75d4:99ab:290a]) by smtp.gmail.com with ESMTPSA id m4sm6634308ejl.45.2022.02.15.01.32.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 15 Feb 2022 01:32:40 -0800 (PST) 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=ZKtQehfgqTqCYFHTsewHfFExtlaTkKJvLPbIHbRQpHw=; b=T6MaMBRtVVb3EW6imJEW1QG8pRo6r8DSh2e2k04Q/2FhUvW3tZWyN7g/DNVdXMV931 nOR0Dj0xczzwXp1QALmBnWjHVgrEQ2MgeUOtf9zjFjX+wEBkDGL3X9eLlcJWTYJ6zZ91 GHptLEVDeaAp91j4YNObRzZc16kTEe+DsmiALVHzD60W8D44uiQ9KfsKV6l5mK6nYoWB VXc4bfIQtgLkeg6OHl/uRGmsSgr3iQJwDMhZoy252ZM2D4xaZA/ZsCZ1ro89tZ/i0WaG 2tjLIxHnVEM9D46GewLPAPjmSmNiuAvxRUpRnTbv3n1J6FOqdceySOdy7E8y14gTeyJK o34g== 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=ZKtQehfgqTqCYFHTsewHfFExtlaTkKJvLPbIHbRQpHw=; b=LAzTfkVgQ09IZPrH/wtCyZIdCWGlctuQCE1YUUSGv86R8f/EPHnXx0qVZxXySn+XTG Ky3SA5zMwMyAAhuljSSvoqbNJ2zVvM0aRV7HOhUf8lX3oCmXDvSLPFIZTYf8MMUPyOqA ZUM1it0yazRMcN/8yqw0USr3g7vyGLGLDD29MqzijpEmi/dw4PC8Pt/AxAWr0cf8QZKi Sa5p5uok9Pl0U0KnQ5iDaqZsG6Vn6LpXA75A5dvl02QsoEVGfNzZJjqOfLJOR1IoBudB uHGkhDDVD4xnz15+/MkB2geolRM2Ee5O2L9n6RKBaoeJoSlrz+5CtrNtaaS7hCHtFKYz 9x0g== X-Gm-Message-State: AOAM533XYoSs98MlM1ebR1WRzeDIQuMGdDL+HVlkVsxDJKv07FG2wT+/ Ka4c4x0qjDk/V4Z8dMD4aideKsB42c4= X-Google-Smtp-Source: ABdhPJz4ccNRPf4tazENg5cSGPnTNg7KtaW9AtonO4bTNAsQJFuif2xYwB1sILZj2gl24yV8g4wQjw== X-Received: by 2002:a17:907:7286:: with SMTP id dt6mr2209984ejc.285.1644917560525; Tue, 15 Feb 2022 01:32:40 -0800 (PST) From: Paolo Bonzini To: qemu-devel@nongnu.org Subject: [PULL 23/30] qga/vss-win32: use widl if available Date: Tue, 15 Feb 2022 10:32:16 +0100 Message-Id: <20220215093223.110827-24-pbonzini@redhat.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220215093223.110827-1-pbonzini@redhat.com> References: <20220215093223.110827-1-pbonzini@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Host-Lookup-Failed: Reverse DNS lookup failed for 2a00:1450:4864:20::62d (failed) 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+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::62d; envelope-from=paolo.bonzini@gmail.com; helo=mail-ej1-x62d.google.com X-Spam_score_int: 2 X-Spam_score: 0.2 X-Spam_bar: / X-Spam_report: (0.2 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FORGED_FROMDOMAIN=0.25, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.25, PDS_HP_HELO_NORDNS=0.904, RCVD_IN_DNSWL_NONE=-0.0001, RDNS_NONE=0.793, 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?= , Konstantin Kostiuk Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZM-MESSAGEID: 1644918991636100001 From: Marc-Andr=C3=A9 Lureau widl from mingw64-tools and wine can compile a TLB file. Signed-off-by: Marc-Andr=C3=A9 Lureau Reviewed-by: Konstantin Kostiuk Signed-off-by: Paolo Bonzini --- qga/vss-win32/meson.build | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/qga/vss-win32/meson.build b/qga/vss-win32/meson.build index 78bdf5e74a..8f3aff5fe3 100644 --- a/qga/vss-win32/meson.build +++ b/qga/vss-win32/meson.build @@ -18,15 +18,18 @@ if add_languages('cpp', required: false) all_qga +=3D qga_vss endif =20 -# rules to build qga-vss.tlb -# Currently, only native build is supported because building .tlb -# (TypeLibrary) from .idl requires WindowsSDK and MIDL (and cl.exe in VC++= ). midl =3D find_program('midl', required: false) +widl =3D find_program('widl', required: false) if midl.found() gen_tlb =3D custom_target('gen-tlb', input: 'qga-vss.idl', output: 'qga-vss.tlb', command: [midl, '@INPUT@', '/tlb', '@OUTPUT@']) +elif widl.found() + gen_tlb =3D custom_target('gen-tlb', + input: 'qga-vss.idl', + output: 'qga-vss.tlb', + command: [widl, '-t', '@INPUT@', '-o', '@OUTPUT@= ']) else gen_tlb =3D custom_target('gen-tlb', input: 'qga-vss.tlb', --=20 2.34.1 From nobody Mon Feb 9 09:42:38 2026 Delivered-To: importer@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+importer=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 1644919379024247.24916565850378; Tue, 15 Feb 2022 02:02:59 -0800 (PST) Received: from localhost ([::1]:43804 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nJufh-0005KA-Sv for importer@patchew.org; Tue, 15 Feb 2022 05:02:57 -0500 Received: from eggs.gnu.org ([209.51.188.92]:55022) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nJuCT-0004Uz-2g for qemu-devel@nongnu.org; Tue, 15 Feb 2022 04:32:45 -0500 Received: from [2a00:1450:4864:20::631] (port=42832 helo=mail-ej1-x631.google.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nJuCQ-0008Ta-DO for qemu-devel@nongnu.org; Tue, 15 Feb 2022 04:32:44 -0500 Received: by mail-ej1-x631.google.com with SMTP id hw13so14355164ejc.9 for ; Tue, 15 Feb 2022 01:32:42 -0800 (PST) Received: from avogadro.lan ([2001:b07:6468:f312:c8dd:75d4:99ab:290a]) by smtp.gmail.com with ESMTPSA id m4sm6634308ejl.45.2022.02.15.01.32.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 15 Feb 2022 01:32:40 -0800 (PST) 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=QsjrVfDbM3uRmhBjv0LGskeKvpCMdxywr4PakZvThbI=; b=Lez+bfqcqQ/PEhONeVpTkBjkVob5GDQkl4QV8QiSBKnHvz3FLkYUmoWYYpLeE04EwI 8J7MJKKdYWFs+wadPWahl9vkRJlch825/m50jEy48INyKQzwR7hcHqiXUBOBM0y7efM2 4HkBDJiEQWPUft+YP1rWB2H4nAL0EAtHQgBAvtnZQBlD4sJFby6LbVyADUwZmbtObq32 lCFhJUomEvYwQ41YTfEH0X2SE7ajaOaxEdG3adAahLw9Nhjke8L2cC371y49X4xAE84H x8p1GLMNnGASA5b+UlVYTGm9/ICMma6QHIjLSSn2UldXTlSViR5LsifwaIbveZKliBCj eOGQ== 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=QsjrVfDbM3uRmhBjv0LGskeKvpCMdxywr4PakZvThbI=; b=cxwfdIAzlQaQvUQfCE5aMP98F5BE8uV7yrnAsdXTHd4bc8ERjVIyCGSXFrXUxlikJn 6PwR9WSa1tYdXsZK0byGXuTvkyFV30hpsnpOWwzQXVNRFyQkUQfhYS3Q9Dc+v6xgYyLW ZSeZl++HnAIxWpBLS68eB1yRs9dGpM9XKsoMgbfvzMuWRoaL9m2LE1d4Apv3mRuMoBBo lKKLkPl5qWIus8+9M8XqzKnuqxXywU4TQLDFwoeTN3vgD6Ndamo+ZqmdB/eaDygqbxlW bzbpxC+k0wlPiqJy8KGz3/QGh4YTj5rBRaM6NDlxbMe35H6weA7jTzWfwTD7u0SViiBT OdVg== X-Gm-Message-State: AOAM530BasuGYtnAJ+euBaSYy4qn+qf2gmR0oDvCM2DaAwSfsuJK2tKf n60CIUdJbpHenxC55nZhjNNgut595Vs= X-Google-Smtp-Source: ABdhPJwXvy9RSQOh0+zzCSQWfFmP8zailh7TNB05kMry//I0HnwFgbMYmV+ho7t90v3xXPni/m8FGA== X-Received: by 2002:a17:907:d01:: with SMTP id gn1mr2240673ejc.507.1644917561169; Tue, 15 Feb 2022 01:32:41 -0800 (PST) From: Paolo Bonzini To: qemu-devel@nongnu.org Subject: [PULL 24/30] qga/vss: use standard windows headers location Date: Tue, 15 Feb 2022 10:32:17 +0100 Message-Id: <20220215093223.110827-25-pbonzini@redhat.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220215093223.110827-1-pbonzini@redhat.com> References: <20220215093223.110827-1-pbonzini@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Host-Lookup-Failed: Reverse DNS lookup failed for 2a00:1450:4864:20::631 (failed) 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+importer=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: 2 X-Spam_score: 0.2 X-Spam_bar: / X-Spam_report: (0.2 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FORGED_FROMDOMAIN=0.25, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.25, PDS_HP_HELO_NORDNS=0.904, RCVD_IN_DNSWL_NONE=-0.0001, RDNS_NONE=0.793, 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?= , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZM-MESSAGEID: 1644919380604100001 From: Marc-Andr=C3=A9 Lureau Stop using special paths with outdated headers from an old SDK. Instead, use standard include paths. You can still build against the old SDK by running configure with --extra-cxxflags=3D"-isystem /path/to/inc/win2003/" (this also allows to build against MinGW headers, which are currently broken as in 9.0) Signed-off-by: Marc-Andr=C3=A9 Lureau Reviewed-by: Philippe Mathieu-Daud=C3=A9 Signed-off-by: Paolo Bonzini --- qga/vss-win32/install.cpp | 2 +- qga/vss-win32/provider.cpp | 4 ++-- qga/vss-win32/requester.cpp | 4 ++-- qga/vss-win32/vss-common.h | 6 +----- 4 files changed, 6 insertions(+), 10 deletions(-) diff --git a/qga/vss-win32/install.cpp b/qga/vss-win32/install.cpp index 40de133774..efc5bb9909 100644 --- a/qga/vss-win32/install.cpp +++ b/qga/vss-win32/install.cpp @@ -13,7 +13,7 @@ #include "qemu/osdep.h" =20 #include "vss-common.h" -#include +#include #include "install.h" #include #include diff --git a/qga/vss-win32/provider.cpp b/qga/vss-win32/provider.cpp index 72d8b0e19d..fd187fb66f 100644 --- a/qga/vss-win32/provider.cpp +++ b/qga/vss-win32/provider.cpp @@ -12,8 +12,8 @@ =20 #include "qemu/osdep.h" #include "vss-common.h" -#include -#include +#include +#include =20 #define VSS_TIMEOUT_MSEC (60*1000) =20 diff --git a/qga/vss-win32/requester.cpp b/qga/vss-win32/requester.cpp index 940a2c8f55..4513324dd2 100644 --- a/qga/vss-win32/requester.cpp +++ b/qga/vss-win32/requester.cpp @@ -14,8 +14,8 @@ #include "vss-common.h" #include "requester.h" #include "install.h" -#include -#include +#include +#include =20 /* Max wait time for frozen event (VSS can only hold writes for 10 seconds= ) */ #define VSS_TIMEOUT_FREEZE_MSEC 60000 diff --git a/qga/vss-win32/vss-common.h b/qga/vss-win32/vss-common.h index 61c170b52e..54f8de8c88 100644 --- a/qga/vss-win32/vss-common.h +++ b/qga/vss-win32/vss-common.h @@ -46,11 +46,7 @@ #undef VSS_E_MAXIMUM_NUMBER_OF_VOLUMES_REACHED #undef VSS_E_MAXIMUM_NUMBER_OF_SNAPSHOTS_REACHED =20 -/* - * VSS headers must be installed from Microsoft VSS SDK 7.2 available at: - * http://www.microsoft.com/en-us/download/details.aspx?id=3D23490 - */ -#include +#include #include "vss-handles.h" =20 /* Macros to convert char definitions to wchar */ --=20 2.34.1 From nobody Mon Feb 9 09:42:38 2026 Delivered-To: importer@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+importer=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 1644919229718567.4110311935443; Tue, 15 Feb 2022 02:00:29 -0800 (PST) Received: from localhost ([::1]:38982 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nJudJ-0006rx-N9 for importer@patchew.org; Tue, 15 Feb 2022 05:00:29 -0500 Received: from eggs.gnu.org ([209.51.188.92]:55038) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nJuCU-0004ZK-1T for qemu-devel@nongnu.org; Tue, 15 Feb 2022 04:32:46 -0500 Received: from [2a00:1450:4864:20::636] (port=42837 helo=mail-ej1-x636.google.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nJuCR-0008U7-8p for qemu-devel@nongnu.org; Tue, 15 Feb 2022 04:32:45 -0500 Received: by mail-ej1-x636.google.com with SMTP id hw13so14355234ejc.9 for ; Tue, 15 Feb 2022 01:32:42 -0800 (PST) Received: from avogadro.lan ([2001:b07:6468:f312:c8dd:75d4:99ab:290a]) by smtp.gmail.com with ESMTPSA id m4sm6634308ejl.45.2022.02.15.01.32.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 15 Feb 2022 01:32:41 -0800 (PST) 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=C3qbl9Xo8xHu5lXB1Jbn7zsUkdB0YWZ+ivvO8wTe+Ao=; b=ZBh0HaQOUlt1hqOJf2C5Ua62dMf7P5CPPNobH/wuCspAhnHQetTZlFLsOhZhfEylGt XdgYLG4mym9SZ5nSaaUrd/60VcvjwLt6S0q6741Z1cKsTl3qdnLIIzQU5UoSKrU/6f0U +Bg6vYSbWPsGnQqHlkj2Y4Z6RBT2Z5p9vIg4G55jCPotnsvUeHjHL4BUYXq8o/r/gsn/ SiyaugGq0zq3Sm8NI/r+Y37HZHGHJUvf+V6chh011U/FquujrL3Bj2mCRhAPghY9SfFZ urf1yTw7GiLTvdtGxufKBalY40qQk3aBs5xnR3FcWroHvjPGDda5k+HUgy+8ZmHZQf2W rA0A== 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=C3qbl9Xo8xHu5lXB1Jbn7zsUkdB0YWZ+ivvO8wTe+Ao=; b=7ncDOwBT8APgLcKpsA2SQoTCpI3+Cu9aQlle6IyDmDmQ1oiEfX2NdYRzPGlXexsopO KLf7hfEEVsjeIOcD53w8dCdemoOuhqe85Dcg8F7pqLAhGxSvS2wcJKzd94UUCg/oAFfJ s8DNzDhw8qtsNFHmHDYV1QJVCWT43Rh1UUxby32AoH6QrWyvq9FD0aR8jFcmQE9y6P9D /T0dwmLLBTxav+VaAmJ7IS2L3G1Uw55xp6iECdXK2GxF8MWDPGytxDKZt/9S8xoQjC17 JudOUcP4mYRb6y8SrxXF2kAstv5WWFiTYpbvF69Mm3CaCKxw7Bjj10qCtfHfl1OyZ21E YaSQ== X-Gm-Message-State: AOAM530SB1xqXQvsAefCV4127Z/7sIFmzg2L0JK7fomTEDZFbWyWvxAW R3eu9/RaLq0yn7jy910CGM1IbOATkyc= X-Google-Smtp-Source: ABdhPJyik8DoMyjm/pR2RA5cMfzSIZxlzgnl77v8Be6pukuTiaR1w37SNGNHhEy4HlWA8wSFe0KJNA== X-Received: by 2002:a17:906:9be4:: with SMTP id de36mr2205055ejc.228.1644917561894; Tue, 15 Feb 2022 01:32:41 -0800 (PST) From: Paolo Bonzini To: qemu-devel@nongnu.org Subject: [PULL 25/30] configure, meson: replace VSS SDK checks and options with --enable-vss-sdk Date: Tue, 15 Feb 2022 10:32:18 +0100 Message-Id: <20220215093223.110827-26-pbonzini@redhat.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220215093223.110827-1-pbonzini@redhat.com> References: <20220215093223.110827-1-pbonzini@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Host-Lookup-Failed: Reverse DNS lookup failed for 2a00:1450:4864:20::636 (failed) 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+importer=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: 2 X-Spam_score: 0.2 X-Spam_bar: / X-Spam_report: (0.2 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FORGED_FROMDOMAIN=0.25, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.25, PDS_HP_HELO_NORDNS=0.904, RCVD_IN_DNSWL_NONE=-0.0001, RDNS_NONE=0.793, 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+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZM-MESSAGEID: 1644919234157100001 From: Marc-Andr=C3=A9 Lureau The VSS headers are part of standard MS VS SDK, at least since version 15, and probably before that. They are also included with MinGW, although currently broken. Let's streamline a bit the options, by not making it so special, and instead rely on proper system headers configuration or user --extra-cxxflags. This still requires some extra step to cross-build with MinGW as described in the meson.build file now. Signed-off-by: Marc-Andr=C3=A9 Lureau [Use a "feature"-type option. - Paolo] Signed-off-by: Paolo Bonzini --- configure | 47 ----------------------------------- meson.build | 10 +++++++- meson_options.txt | 2 ++ qga/meson.build | 21 ++++++++++++++-- scripts/meson-buildoptions.sh | 3 +++ 5 files changed, 33 insertions(+), 50 deletions(-) diff --git a/configure b/configure index 20968ca7ac..a518f51cef 100755 --- a/configure +++ b/configure @@ -316,7 +316,6 @@ pkgversion=3D"" pie=3D"" trace_backends=3D"log" trace_file=3D"trace" -vss_win32_sdk=3D"$default_feature" coroutine=3D"" tls_priority=3D"NORMAL" plugins=3D"$default_feature" @@ -952,12 +951,6 @@ for opt do ;; --disable-zlib-test) ;; - --with-vss-sdk) vss_win32_sdk=3D"" - ;; - --with-vss-sdk=3D*) vss_win32_sdk=3D"$optarg" - ;; - --without-vss-sdk) vss_win32_sdk=3D"no" - ;; --disable-virtio-blk-data-plane|--enable-virtio-blk-data-plane) echo "$0: $opt is obsolete, virtio-blk data-plane is always on" >&2 ;; @@ -1220,8 +1213,6 @@ Advanced options (experts only): --with-coroutine=3DBACKEND coroutine backend. Supported options: ucontext, sigaltstack, windows --enable-gcov enable test coverage analysis with gcov - --with-vss-sdk=3DSDK-path enable Windows VSS support in QEMU Guest Agent - --with-win-sdk=3DSDK-path path to Windows Platform SDK (to build VSS .t= lb) --tls-priority default TLS protocol/cipher priority string --enable-plugins enable plugins via shared library loading @@ -2277,41 +2268,6 @@ EOF fi fi =20 -########################################## -# check if we have VSS SDK headers for win - -guest_agent_with_vss=3D"no" -if test "$mingw32" =3D "yes" && \ - test "$vss_win32_sdk" !=3D "no" ; then - case "$vss_win32_sdk" in - "") vss_win32_include=3D"-isystem $source_path" ;; - *\ *) # The SDK is installed in "Program Files" by default, but we can= not - # handle path with spaces. So we symlink the headers into ".sdk/= vss". - vss_win32_include=3D"-isystem $source_path/.sdk/vss" - symlink "$vss_win32_sdk/inc" "$source_path/.sdk/vss/inc" - ;; - *) vss_win32_include=3D"-isystem $vss_win32_sdk" - esac - cat > $TMPC << EOF -#define __MIDL_user_allocate_free_DEFINED__ -#include -int main(void) { return VSS_CTX_BACKUP; } -EOF - if compile_prog "$vss_win32_include" "" ; then - guest_agent_with_vss=3D"yes" - QEMU_CFLAGS=3D"$QEMU_CFLAGS $vss_win32_include" - else - if test "$vss_win32_sdk" !=3D "" ; then - echo "ERROR: Please download and install Microsoft VSS SDK:" - echo "ERROR: http://www.microsoft.com/en-us/download/details.aspx?= id=3D23490" - echo "ERROR: On POSIX-systems, you can extract the SDK headers by:" - echo "ERROR: scripts/extract-vsssdk-headers setup.exe" - echo "ERROR: The headers are extracted in the directory \`inc'." - feature_not_found "VSS support" - fi - fi -fi - ########################################## # check if mingw environment provides a recent ntddscsi.h guest_agent_ntddscsi=3D"no" @@ -2841,9 +2797,6 @@ if test "$debug_tcg" =3D "yes" ; then fi if test "$mingw32" =3D "yes" ; then echo "CONFIG_WIN32=3Dy" >> $config_host_mak - if test "$guest_agent_with_vss" =3D "yes" ; then - echo "CONFIG_QGA_VSS=3Dy" >> $config_host_mak - fi if test "$guest_agent_ntddscsi" =3D "yes" ; then echo "CONFIG_QGA_NTDDSCSI=3Dy" >> $config_host_mak fi diff --git a/meson.build b/meson.build index 96d64ec28f..39126d1cc6 100644 --- a/meson.build +++ b/meson.build @@ -1932,6 +1932,14 @@ config_host_data.set('CONFIG_AF_VSOCK', cc.compiles(= gnu_source_prefix + ''' return -1; }''')) =20 +have_vss =3D false +if targetos =3D=3D 'windows' and link_language =3D=3D 'cpp' + have_vss =3D cxx.compiles(''' + #define __MIDL_user_allocate_free_DEFINED__ + #include + int main(void) { return VSS_CTX_BACKUP; }''') +endif + ignored =3D ['CONFIG_QEMU_INTERP_PREFIX', # actually per-target 'HAVE_GDB_BIN'] arrays =3D ['CONFIG_BDRV_RW_WHITELIST', 'CONFIG_BDRV_RO_WHITELIST'] @@ -3598,7 +3606,7 @@ summary_info +=3D {'libiscsi support': libiscsi} summary_info +=3D {'libnfs support': libnfs} if targetos =3D=3D 'windows' if have_ga - summary_info +=3D {'QGA VSS support': config_host.has_key('CONFIG_QG= A_VSS')} + summary_info +=3D {'QGA VSS support': have_qga_vss} summary_info +=3D {'QGA w32 disk info': config_host.has_key('CONFIG_QG= A_NTDDSCSI')} endif endif diff --git a/meson_options.txt b/meson_options.txt index 417b543314..aad337592d 100644 --- a/meson_options.txt +++ b/meson_options.txt @@ -42,6 +42,8 @@ option('guest_agent_msi', type : 'feature', value : 'auto= ', description: 'Build MSI package for the QEMU Guest Agent') option('tools', type : 'feature', value : 'auto', description: 'build support utilities that come with QEMU') +option('qga_vss', type : 'feature', value: 'auto', + description: 'build QGA VSS support (broken with MinGW)') =20 option('malloc_trim', type : 'feature', value : 'auto', description: 'enable libc malloc_trim() for memory optimization') diff --git a/qga/meson.build b/qga/meson.build index 97cc391fe1..a32c141dd0 100644 --- a/qga/meson.build +++ b/qga/meson.build @@ -2,9 +2,26 @@ if not have_ga if get_option('guest_agent_msi').enabled() error('Guest agent MSI requested, but the guest agent is not being bui= lt') endif + have_qga_vss =3D false subdir_done() endif =20 +have_qga_vss =3D get_option('qga_vss') \ + .require(targetos =3D=3D 'windows', + error_message: 'VSS support requires Windows') \ + .require(link_language =3D=3D 'cpp', + error_message: 'VSS support requires a C++ compiler') \ + .require(have_vss, error_message: '''VSS support requires VSS headers. + If your Visual Studio installation doesn't have the VSS headers, + Please download and install Microsoft VSS SDK: + http://www.microsoft.com/en-us/download/details.aspx?id=3D23490 + On POSIX-systems, MinGW doesn't yet provide working headers. + you can extract the SDK headers by: + $ scripts/extract-vsssdk-headers setup.exe + The headers are extracted in the directory 'inc/win2003'. + Then run configure with: --extra-cxxflags=3D"-isystem /path/to/vss/inc= /win2003"''') \ + .allowed() + all_qga =3D [] =20 qga_qapi_outputs =3D [ @@ -63,7 +80,7 @@ gen_tlb =3D [] qga_libs =3D [] if targetos =3D=3D 'windows' qga_libs +=3D ['-lws2_32', '-lwinmm', '-lpowrprof', '-lwtsapi32', '-lwin= inet', '-liphlpapi', '-lnetapi32'] - if 'CONFIG_QGA_VSS' in config_host + if have_qga_vss qga_libs +=3D ['-lole32', '-loleaut32', '-lshlwapi', '-lstdc++', '-Wl,= --enable-stdcall-fixup'] subdir('vss-win32') endif @@ -93,7 +110,7 @@ if targetos =3D=3D 'windows' if wixl.found() deps =3D [gen_tlb, qga] qemu_ga_msi_vss =3D [] - if 'CONFIG_QGA_VSS' in config_host + if have_qga_vss qemu_ga_msi_vss =3D ['-D', 'InstallVss'] deps +=3D qga_vss endif diff --git a/scripts/meson-buildoptions.sh b/scripts/meson-buildoptions.sh index cc9bb4b1fd..688d881ff0 100644 --- a/scripts/meson-buildoptions.sh +++ b/scripts/meson-buildoptions.sh @@ -20,6 +20,7 @@ meson_options_help() { printf "%s\n" ' --enable-malloc=3DCHOICE choose memory allocator to u= se [system] (choices:' printf "%s\n" ' jemalloc/system/tcmalloc)' printf "%s\n" ' --enable-profiler profiler support' + printf "%s\n" ' --enable-qga-vss build QGA VSS support' printf "%s\n" ' --enable-qom-cast-debug cast debugging support' printf "%s\n" ' --enable-rng-none dummy RNG, avoid using /dev/(u= )random and' printf "%s\n" ' getrandom()' @@ -285,6 +286,8 @@ _meson_option_parse() { --disable-qcow1) printf "%s" -Dqcow1=3Ddisabled ;; --enable-qed) printf "%s" -Dqed=3Denabled ;; --disable-qed) printf "%s" -Dqed=3Ddisabled ;; + --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 ;; --disable-qom-cast-debug) printf "%s" -Dqom_cast_debug=3Dfalse ;; --enable-rbd) printf "%s" -Drbd=3Denabled ;; --=20 2.34.1 From nobody Mon Feb 9 09:42:38 2026 Delivered-To: importer@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+importer=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 1644919571022748.552233903867; Tue, 15 Feb 2022 02:06:11 -0800 (PST) Received: from localhost ([::1]:52352 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nJuin-0004cL-EK for importer@patchew.org; Tue, 15 Feb 2022 05:06:09 -0500 Received: from eggs.gnu.org ([209.51.188.92]:55032) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nJuCT-0004Xs-QV for qemu-devel@nongnu.org; Tue, 15 Feb 2022 04:32:45 -0500 Received: from [2a00:1450:4864:20::62e] (port=47086 helo=mail-ej1-x62e.google.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nJuCR-0008UE-Rr for qemu-devel@nongnu.org; Tue, 15 Feb 2022 04:32:45 -0500 Received: by mail-ej1-x62e.google.com with SMTP id qx21so3116221ejb.13 for ; Tue, 15 Feb 2022 01:32:43 -0800 (PST) Received: from avogadro.lan ([2001:b07:6468:f312:c8dd:75d4:99ab:290a]) by smtp.gmail.com with ESMTPSA id m4sm6634308ejl.45.2022.02.15.01.32.42 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 15 Feb 2022 01:32:42 -0800 (PST) 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=C5XJVTYcKatvyE2EVlCh4jGGCNj/NoYf8aEqk9uKu7c=; b=oyPKDIZE01mfGFMe/iylRm2ZGSpFIwqKyix4rq4kO6Halb74Irx85b7xlld3TjKow7 MDSKpomivkmyDJfXnQV5ZuQimpVJBPsvVHeEmMqv32lZzzcaM8NMEizbEWDMbFTpbTFT ACK2AUSbT4SlbX9uQ9+RadpWqdjEDLQTeNfuUeZ8kpbyvsLy+ohzYUNfdz1FRDAFjED+ ZuaJ+51vLmu+QHknW19eD380tHdyBvmHTKvyC4kXAuUJMCvQ/AGfpNfCjoJkqtVvlTEA br1PCq1Ga42osZzQHGSuyXPadQZF766BVxvWJQYj4gqzsciMNU1dWVogxhT4PblDou8V +qsQ== 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=C5XJVTYcKatvyE2EVlCh4jGGCNj/NoYf8aEqk9uKu7c=; b=5qDtN2odYgWgUIS3hqnXgpQqd328mBFJsCE4rxoeh1hTb5ZGAB7hIxG5M1QD1LW+YS HNYKRwNOZL3umUOeMM7w/JnzsgEfGgrwdYm8ty09J97gDUWsqoxGMhyVF7R28y0ogSDN aDc/G4/hR9XAIrtx+93+c7dXM58fXnUJDm9ZnS9tsXc1RiNa5ADI/2ACbwTVWwU9Ly8c XREJHk6yia8/8MaZz7Jyh3uGXvUj6wU+GvOMOuVWWvS74Laqn/Nvq6L+KTSVn2/SIFhu pwsFUII/EDgI12/Os4aeQzDp9FlOPNPEdlpKCZ2ieFmunlsOzC5HHwiqvTR84WU/hAhE ATVw== X-Gm-Message-State: AOAM5323i5OeDPaWlQIptJLZOjFHeTmfGd9s7zYqbhDt6N0KYn+k30/p TmuaKrxJDU9nbOO4AB5euBqctxk0gB4= X-Google-Smtp-Source: ABdhPJzlXgD7M4hUHne13JmzunwuBQT42qhvn2heI+g8GS7/Iu1GJ/J1gmN/iCahi0Z+TG4vSQ3xvA== X-Received: by 2002:a17:906:77cb:: with SMTP id m11mr2370632ejn.116.1644917562565; Tue, 15 Feb 2022 01:32:42 -0800 (PST) From: Paolo Bonzini To: qemu-devel@nongnu.org Subject: [PULL 26/30] meson: do not make qga/vss-win32/meson.build conditional on C++ presence Date: Tue, 15 Feb 2022 10:32:19 +0100 Message-Id: <20220215093223.110827-27-pbonzini@redhat.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220215093223.110827-1-pbonzini@redhat.com> References: <20220215093223.110827-1-pbonzini@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Host-Lookup-Failed: Reverse DNS lookup failed for 2a00:1450:4864:20::62e (failed) 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+importer=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: 2 X-Spam_score: 0.2 X-Spam_bar: / X-Spam_report: (0.2 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FORGED_FROMDOMAIN=0.25, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.25, PDS_HP_HELO_NORDNS=0.904, RCVD_IN_DNSWL_NONE=-0.0001, RDNS_NONE=0.793, 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?= , Konstantin Kostiuk Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZM-MESSAGEID: 1644919573185100001 From: Marc-Andr=C3=A9 Lureau C++ presence is checked by the qga/ directory, so it can be assumed when building VSS module. Signed-off-by: Marc-Andr=C3=A9 Lureau Reviewed-by: Konstantin Kostiuk Signed-off-by: Paolo Bonzini --- qga/vss-win32/meson.build | 41 +++++++++++++++++++++++---------------- 1 file changed, 24 insertions(+), 17 deletions(-) diff --git a/qga/vss-win32/meson.build b/qga/vss-win32/meson.build index 8f3aff5fe3..8d4c5708d8 100644 --- a/qga/vss-win32/meson.build +++ b/qga/vss-win32/meson.build @@ -1,22 +1,29 @@ -if add_languages('cpp', required: false) - glib_dynamic =3D dependency('glib-2.0', static: false) - link_args =3D cc.get_supported_link_arguments(['-fstack-protector-all', = '-fstack-protector-strong', - '-Wl,--add-stdcall-alias', = '-Wl,--enable-stdcall-fixup']) +glib_dynamic =3D dependency('glib-2.0', static: false) +link_args =3D cc.get_supported_link_arguments([ + '-fstack-protector-all', + '-fstack-protector-strong', + '-Wl,--add-stdcall-alias', + '-Wl,--enable-stdcall-fixup' +]) =20 - qga_vss =3D shared_module('qga-vss', ['requester.cpp', 'provider.cpp', '= install.cpp'], - name_prefix: '', - cpp_args: ['-Wno-unknown-pragmas', '-Wno-delete-non-virtua= l-dtor', '-Wno-non-virtual-dtor'], - link_args: link_args, - vs_module_defs: 'qga-vss.def', - dependencies: [glib_dynamic, socket, - cc.find_library('ole32'), - cc.find_library('oleaut32'), - cc.find_library('shlwapi'), - cc.find_library('uuid'), - cc.find_library('intl')]) +qga_vss =3D shared_module( + 'qga-vss', + ['requester.cpp', 'provider.cpp', 'install.cpp'], + name_prefix: '', + cpp_args: ['-Wno-unknown-pragmas', '-Wno-delete-non-virtual-dtor', '-Wno= -non-virtual-dtor'], + link_args: link_args, + vs_module_defs: 'qga-vss.def', + dependencies: [ + glib_dynamic, socket, + cc.find_library('ole32'), + cc.find_library('oleaut32'), + cc.find_library('shlwapi'), + cc.find_library('uuid'), + cc.find_library('intl') + ] +) =20 - all_qga +=3D qga_vss -endif +all_qga +=3D qga_vss =20 midl =3D find_program('midl', required: false) widl =3D find_program('widl', required: false) --=20 2.34.1 From nobody Mon Feb 9 09:42:38 2026 Delivered-To: importer@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+importer=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 1644919451155351.73925408915227; Tue, 15 Feb 2022 02:04:11 -0800 (PST) Received: from localhost ([::1]:47382 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nJugs-0000rI-Aa for importer@patchew.org; Tue, 15 Feb 2022 05:04:10 -0500 Received: from eggs.gnu.org ([209.51.188.92]:55058) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nJuCU-0004cA-RT for qemu-devel@nongnu.org; Tue, 15 Feb 2022 04:32:46 -0500 Received: from [2a00:1450:4864:20::632] (port=37675 helo=mail-ej1-x632.google.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nJuCS-0008UX-Oc for qemu-devel@nongnu.org; Tue, 15 Feb 2022 04:32:46 -0500 Received: by mail-ej1-x632.google.com with SMTP id h8so16384008ejy.4 for ; Tue, 15 Feb 2022 01:32:44 -0800 (PST) Received: from avogadro.lan ([2001:b07:6468:f312:c8dd:75d4:99ab:290a]) by smtp.gmail.com with ESMTPSA id m4sm6634308ejl.45.2022.02.15.01.32.42 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 15 Feb 2022 01:32:42 -0800 (PST) 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=Bv7+RSXKAk+/P8xmsmdOzIGcRi8dXXMcCuzdHmmHF5c=; b=EXoOyhBgb/DvfnigH5JFDWDANQExbVqQLZu8JLYN3s6EVb7SVsVkrvxaKg//DbrSaw irODQEVsSTnt7ueHCyDZHw/JmaSBTQTew4Th95mGtFeSdPneJC9q37E6XfQ9+NRLdAsw MPzVz6ADRamOIiCUQq1/MAEmIvekb+F1lwttrixArI0OC/KkreB6VqQE4Cx89ItEFV33 ClLiftoPnLVQqUZ1pIHK8O9vcN4zKAIbMqNy5ybWvYCCGj4YjsfTgSNwak8P6+hypyfS 7Ek5OKu2tyqdew49ZFv4evGR/PqNLvN/arAX2KQhb5qlT6hdCJoSZtkhJ5e/T4nMwH+l PWMA== 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=Bv7+RSXKAk+/P8xmsmdOzIGcRi8dXXMcCuzdHmmHF5c=; b=X+FwYiV/AXBIbVMbU9/9+F/pfcCzQhIGruQ9vjry96ZFOyVj6Dt0bAqvhP04AMP8wk 9ob2NTzcyHwSC9OSrQ/DmStQ09Rs292tDk/JE5ruB3m6CJi6a3Io7C2tiLAW1fRpbv53 C4fK0CFAYnIBFjWyPMCtJ2TaTNrNT4dQmUGeRkKZu0QrH3DjBUDcDbucUnbV5Nvh2hf3 i1rNKsny6lh6NpA1Uum5cayUgASmHP/m4IQ1STgzktfjqe2xYXYaXTvTd5IDvo1cYGdy 81K8g7G0DHaCtmQ3AtRBni8urvG+txi+aFspipTVZdMT6KM3V4Ja2gaUePIcKUaCKPLs vZsQ== X-Gm-Message-State: AOAM533/5d3ePCKTAnGgLsJ1SqmAZK3WEnEQ3aYaVMaZK30XM27jy5Lr X+viqbsy9TnPOMgcfa6OtwL1kMMsCAI= X-Google-Smtp-Source: ABdhPJy7wlLWTMV084EViwieku5m5sGnhSFd1qXGs2ozhQv/jGxlZxzVry6YhxUuqh/lAhqb6maf0w== X-Received: by 2002:a17:906:190d:: with SMTP id a13mr2170751eje.339.1644917563290; Tue, 15 Feb 2022 01:32:43 -0800 (PST) From: Paolo Bonzini To: qemu-devel@nongnu.org Subject: [PULL 27/30] qga/vss-win32: require widl/midl, remove pre-built TLB file Date: Tue, 15 Feb 2022 10:32:20 +0100 Message-Id: <20220215093223.110827-28-pbonzini@redhat.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220215093223.110827-1-pbonzini@redhat.com> References: <20220215093223.110827-1-pbonzini@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Host-Lookup-Failed: Reverse DNS lookup failed for 2a00:1450:4864:20::632 (failed) 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+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::632; envelope-from=paolo.bonzini@gmail.com; helo=mail-ej1-x632.google.com X-Spam_score_int: 2 X-Spam_score: 0.2 X-Spam_bar: / X-Spam_report: (0.2 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FORGED_FROMDOMAIN=0.25, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.25, PDS_HP_HELO_NORDNS=0.904, RCVD_IN_DNSWL_NONE=-0.0001, RDNS_NONE=0.793, 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?= , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Konstantin Kostiuk Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZM-MESSAGEID: 1644919453173100001 From: Marc-Andr=C3=A9 Lureau There are no good reason anymore to keep a pre-built file in the repository. Signed-off-by: Marc-Andr=C3=A9 Lureau Reviewed-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Konstantin Kostiuk Signed-off-by: Paolo Bonzini --- meson.build | 4 ++++ qga/meson.build | 2 ++ qga/vss-win32/meson.build | 9 +-------- qga/vss-win32/qga-vss.tlb | Bin 1528 -> 0 bytes 4 files changed, 7 insertions(+), 8 deletions(-) delete mode 100644 qga/vss-win32/qga-vss.tlb diff --git a/meson.build b/meson.build index 39126d1cc6..730e622417 100644 --- a/meson.build +++ b/meson.build @@ -307,8 +307,12 @@ iokit =3D [] emulator_link_args =3D [] nvmm =3Dnot_found hvf =3D not_found +midl =3D not_found +widl =3D not_found host_dsosuf =3D '.so' if targetos =3D=3D 'windows' + midl =3D find_program('midl', required: false) + widl =3D find_program('widl', required: false) socket =3D cc.find_library('ws2_32') winmm =3D cc.find_library('winmm') =20 diff --git a/qga/meson.build b/qga/meson.build index a32c141dd0..4ac781cb33 100644 --- a/qga/meson.build +++ b/qga/meson.build @@ -20,6 +20,8 @@ have_qga_vss =3D get_option('qga_vss') \ $ scripts/extract-vsssdk-headers setup.exe The headers are extracted in the directory 'inc/win2003'. Then run configure with: --extra-cxxflags=3D"-isystem /path/to/vss/inc= /win2003"''') \ + .require(midl.found() or widl.found(), + error_message: 'VSS support requires midl or widl') \ .allowed() =20 all_qga =3D [] diff --git a/qga/vss-win32/meson.build b/qga/vss-win32/meson.build index 8d4c5708d8..c064a4e245 100644 --- a/qga/vss-win32/meson.build +++ b/qga/vss-win32/meson.build @@ -25,21 +25,14 @@ qga_vss =3D shared_module( =20 all_qga +=3D qga_vss =20 -midl =3D find_program('midl', required: false) -widl =3D find_program('widl', required: false) if midl.found() gen_tlb =3D custom_target('gen-tlb', input: 'qga-vss.idl', output: 'qga-vss.tlb', command: [midl, '@INPUT@', '/tlb', '@OUTPUT@']) -elif widl.found() +else gen_tlb =3D custom_target('gen-tlb', input: 'qga-vss.idl', output: 'qga-vss.tlb', command: [widl, '-t', '@INPUT@', '-o', '@OUTPUT@= ']) -else - gen_tlb =3D custom_target('gen-tlb', - input: 'qga-vss.tlb', - output: 'qga-vss.tlb', - command: ['cp', '@INPUT@', '@OUTPUT@']) endif diff --git a/qga/vss-win32/qga-vss.tlb b/qga/vss-win32/qga-vss.tlb deleted file mode 100644 index 226452a1861371ffe0cad1019cf90fdfdcd5ef49..000000000000000000000000000= 0000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1528 zcmeYbb_-!*U}OLRP8Kl5;0UB3A_y8H!@$4OPh6a(1_GM|T)fx!kz-UGh_rLWKC!yoBjb#vz`9Lwu4+R-SJ!kIOX4xLBUUGN9-NyTyP76j}@n z2f!qQ8-xepfXD+7rW+{SKz4&@7#qX~^1#sn3O|tFK>%ciE<&_Q3PuKoMqI)S5zj9Ngog_=3D gXfrXehlhjmFbIJB4$8MKU>*YlD1Z9^F{m5{03Vre%>V!Z --=20 2.34.1 From nobody Mon Feb 9 09:42:38 2026 Delivered-To: importer@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+importer=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 1644919836362879.5829495168573; Tue, 15 Feb 2022 02:10:36 -0800 (PST) Received: from localhost ([::1]:60426 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nJun5-00022x-AD for importer@patchew.org; Tue, 15 Feb 2022 05:10:35 -0500 Received: from eggs.gnu.org ([209.51.188.92]:55070) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nJuCV-0004dA-3X for qemu-devel@nongnu.org; Tue, 15 Feb 2022 04:32:47 -0500 Received: from [2a00:1450:4864:20::62e] (port=43843 helo=mail-ej1-x62e.google.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nJuCT-0008Ud-E1 for qemu-devel@nongnu.org; Tue, 15 Feb 2022 04:32:46 -0500 Received: by mail-ej1-x62e.google.com with SMTP id d10so42877615eje.10 for ; Tue, 15 Feb 2022 01:32:45 -0800 (PST) Received: from avogadro.lan ([2001:b07:6468:f312:c8dd:75d4:99ab:290a]) by smtp.gmail.com with ESMTPSA id m4sm6634308ejl.45.2022.02.15.01.32.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 15 Feb 2022 01:32:43 -0800 (PST) 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=6lnp+y1CQ1+VKM1AP6R8y5Kq7ZQ0qg3S2I5gAaWaIHc=; b=gJw8JFwoaK+rs5T3MQNqqV9Njaj+BBqB1JHupYzUAaL6oW/VX7OPudWQrNv5b1NHaW k/9A0+Gf0YdCZuXkrLfzBOMXpWDpdgmPSjOZ1NWKL609b5krnoF1Xo03eExwolQmmpDT EF/+4mJbjGCGY123qRb4RrYSDDmipfrkO7opkBDtUQbW256F8eZHL47uk7DthaakmxDn rztE1Z8GJrMgnvFM9ODCodx0RDc9yN2O9TCx/UdOkt9YLUaNoSlWnpUCbdDYQ8LBUlri Tf8wD+HPIBo2qEO63uWeiUrD2DuN3g5zKfRMHd7mZaITPl3pSfzb55ie983B9fjxAXVh JIfQ== 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=6lnp+y1CQ1+VKM1AP6R8y5Kq7ZQ0qg3S2I5gAaWaIHc=; b=53dQA8FbSmT5s0mZ+zsHnLdQ3fhA8mhf7MNGeWjPwIzvNcuMJ71WFjdvHI0a6ii+fS cVgZoXQ2kSE1Fkj7mYt/oq/DS210SyPKjfAsnXGgOBYMrhyFnjQXvlqwGHaKVbMz5SzD a88x3uGSFrnKbMAdSxaCI8AfYj2UjUvLgBpCdwSw4SkQRAGAaRlRoo6g7gFw7icUCrVt Az0IL/f34la9VxPcSBW+rfLxO+FyYa7Wd5bRPSV7kWshhQ1ArlyAnfV+I7FEOMrg97NC PVyY0Y7yCmdDEOYHiYR3nmGDoD+XaTj+sFniQ+t68bqInR4MGb+9O+AqZcpwcqaBnHf5 bPEA== X-Gm-Message-State: AOAM5330EDf/BB+203TQkaLXV+w3CCLRdn4BIO40VpjH2XjD6Bi0yc16 PlHv8w3oT82IMqoC+WoSekqkStseZzk= X-Google-Smtp-Source: ABdhPJwsbkjJt/aa2KS/1wHK7oiwU9DsGdyNO3r+dlA/LdGAic089LQCnkPqrHvXBIzMcNrlNTM4lg== X-Received: by 2002:a17:906:779b:: with SMTP id s27mr2180749ejm.389.1644917564089; Tue, 15 Feb 2022 01:32:44 -0800 (PST) From: Paolo Bonzini To: qemu-devel@nongnu.org Subject: [PULL 28/30] meson: require dynamic linking for VSS support Date: Tue, 15 Feb 2022 10:32:21 +0100 Message-Id: <20220215093223.110827-29-pbonzini@redhat.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220215093223.110827-1-pbonzini@redhat.com> References: <20220215093223.110827-1-pbonzini@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Host-Lookup-Failed: Reverse DNS lookup failed for 2a00:1450:4864:20::62e (failed) 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+importer=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: 2 X-Spam_score: 0.2 X-Spam_bar: / X-Spam_report: (0.2 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FORGED_FROMDOMAIN=0.25, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.25, PDS_HP_HELO_NORDNS=0.904, RCVD_IN_DNSWL_NONE=-0.0001, RDNS_NONE=0.793, 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?= , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Konstantin Kostiuk Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZM-MESSAGEID: 1644919837982100001 From: Marc-Andr=C3=A9 Lureau The glib_dynamic detection does not work because the dependency is overridden in the main meson.build. Signed-off-by: Marc-Andr=C3=A9 Lureau [Rewritten commit message, added requirement in qga/meson.build - Paolo] Reviewed-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Konstantin Kostiuk Signed-off-by: Paolo Bonzini --- qga/meson.build | 2 ++ qga/vss-win32/meson.build | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/qga/meson.build b/qga/meson.build index 4ac781cb33..d22ecb4187 100644 --- a/qga/meson.build +++ b/qga/meson.build @@ -22,6 +22,8 @@ have_qga_vss =3D get_option('qga_vss') \ Then run configure with: --extra-cxxflags=3D"-isystem /path/to/vss/inc= /win2003"''') \ .require(midl.found() or widl.found(), error_message: 'VSS support requires midl or widl') \ + .require(not enable_static, + error_message: 'VSS support requires dynamic linking with GLib'= ) \ .allowed() =20 all_qga =3D [] diff --git a/qga/vss-win32/meson.build b/qga/vss-win32/meson.build index c064a4e245..71c50d0866 100644 --- a/qga/vss-win32/meson.build +++ b/qga/vss-win32/meson.build @@ -1,4 +1,3 @@ -glib_dynamic =3D dependency('glib-2.0', static: false) link_args =3D cc.get_supported_link_arguments([ '-fstack-protector-all', '-fstack-protector-strong', @@ -14,7 +13,8 @@ qga_vss =3D shared_module( link_args: link_args, vs_module_defs: 'qga-vss.def', dependencies: [ - glib_dynamic, socket, + glib, + socket, cc.find_library('ole32'), cc.find_library('oleaut32'), cc.find_library('shlwapi'), --=20 2.34.1 From nobody Mon Feb 9 09:42:38 2026 Delivered-To: importer@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+importer=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 1644918745866950.0468867592841; Tue, 15 Feb 2022 01:52:25 -0800 (PST) Received: from localhost ([::1]:47838 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nJuVT-00010O-Nc for importer@patchew.org; Tue, 15 Feb 2022 04:52:23 -0500 Received: from eggs.gnu.org ([209.51.188.92]:55112) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nJuCX-0004iA-Db for qemu-devel@nongnu.org; Tue, 15 Feb 2022 04:32:50 -0500 Received: from [2a00:1450:4864:20::633] (port=39614 helo=mail-ej1-x633.google.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nJuCU-0008Uq-6K for qemu-devel@nongnu.org; Tue, 15 Feb 2022 04:32:48 -0500 Received: by mail-ej1-x633.google.com with SMTP id p9so20022179ejd.6 for ; Tue, 15 Feb 2022 01:32:45 -0800 (PST) Received: from avogadro.lan ([2001:b07:6468:f312:c8dd:75d4:99ab:290a]) by smtp.gmail.com with ESMTPSA id m4sm6634308ejl.45.2022.02.15.01.32.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 15 Feb 2022 01:32:44 -0800 (PST) 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=0ihAc++5heo7eP5Wr1bMFEBKai3oqyH5vKU1sZrECrA=; b=aanZSC85jUvaqCWyLZtJqQDtSPeN/XarHi8nnMJIhuD9Zld69FfNo3mWmrVr1nLewU r/pirPjykxJznnU238WUOO4q6sH2yQDldh9usxpBfOXjFpNb4lrKahMGQTM4qcfG42FJ 1mbUs9Yu2bdk+wM9Si+sw+B+6uNtxn7e3Ynv0TCi+TsuplCZo/8yCazd0Pff5m+b4Md2 Q1ItrZSNLla++lcJF83qB/KkV0ESEqveOB5h4jLA5QqdQ46pAJH3/WeR4SC0nx1JCln8 H5dHFEBwrXE5S3jmWjvcqGBYjhz76Wpct0QkfTSsef7i+vAM3T7OBjDjhNg+SknW2UHD 6k/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=0ihAc++5heo7eP5Wr1bMFEBKai3oqyH5vKU1sZrECrA=; b=dWqY2xd2CMybrLEqQaIyxsmdls+IZMP4Y9Epz6hKWzMY5x27H1e7heKufK6ZzfRdK1 3uuMRlDdo1IL+iytBhNux0w/OylSvwfEZlHAtQWSM4Iy6zczzbUZAVGJwpQUOfrSVm+e fyJbgRrwJ2woMlflJtxGCEY9O3zwmOFTZx6hNx7H4FF4UA448I37zZbcWDvJYSPayddf 7+gR4Tdr41whAhBTpIbCidNqNGhszCLrDvhYwnmJ3IP9h64LLH7Rvr1fvDmdCqRgAX3M qDmEtytQT1B7EB/8sCR6His3CtIEtnkfVgTO+QTQLC5b5JYliDaTfyK/nbpf/0s7heoo 7UbA== X-Gm-Message-State: AOAM532hyO5OVn/omuVw5MOhy8pd2wD6cElshbCVo+Q9BfcQm3T4Wgbn 1Uf3TGvOY8OxO093asRtyRiJCqjYEJI= X-Google-Smtp-Source: ABdhPJyAYUeiUDmnWnFVNuRupfClmpjnYFdRaSNFBC+V8M1sNBJ07f+YUP82LXSXyEXjZc+ZzOd1/Q== X-Received: by 2002:a17:906:7a09:: with SMTP id d9mr2140764ejo.103.1644917564872; Tue, 15 Feb 2022 01:32:44 -0800 (PST) From: Paolo Bonzini To: qemu-devel@nongnu.org Subject: [PULL 29/30] meson, configure: move ntddscsi API check to meson Date: Tue, 15 Feb 2022 10:32:22 +0100 Message-Id: <20220215093223.110827-30-pbonzini@redhat.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220215093223.110827-1-pbonzini@redhat.com> References: <20220215093223.110827-1-pbonzini@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Host-Lookup-Failed: Reverse DNS lookup failed for 2a00:1450:4864:20::633 (failed) 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+importer=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: 2 X-Spam_score: 0.2 X-Spam_bar: / X-Spam_report: (0.2 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FORGED_FROMDOMAIN=0.25, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.25, PDS_HP_HELO_NORDNS=0.904, RCVD_IN_DNSWL_NONE=-0.0001, RDNS_NONE=0.793, 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?= , Konstantin Kostiuk Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZM-MESSAGEID: 1644918746549100002 From: Marc-Andr=C3=A9 Lureau Signed-off-by: Marc-Andr=C3=A9 Lureau Reviewed-by: Konstantin Kostiuk Signed-off-by: Paolo Bonzini --- configure | 23 ----------------------- meson.build | 18 +++++++++++++++++- qga/commands-win32.c | 6 +++--- qga/meson.build | 2 +- 4 files changed, 21 insertions(+), 28 deletions(-) diff --git a/configure b/configure index a518f51cef..3300231279 100755 --- a/configure +++ b/configure @@ -2268,26 +2268,6 @@ EOF fi fi =20 -########################################## -# check if mingw environment provides a recent ntddscsi.h -guest_agent_ntddscsi=3D"no" -if test "$mingw32" =3D "yes"; then - cat > $TMPC << EOF -#include -#include -int main(void) { -#if !defined(IOCTL_SCSI_GET_ADDRESS) -#error Missing required ioctl definitions -#endif - SCSI_ADDRESS addr =3D { .Lun =3D 0, .TargetId =3D 0, .PathId =3D 0 }; - return addr.Lun; -} -EOF - if compile_prog "" "" ; then - guest_agent_ntddscsi=3Dyes - fi -fi - ########################################## # capstone =20 @@ -2797,9 +2777,6 @@ if test "$debug_tcg" =3D "yes" ; then fi if test "$mingw32" =3D "yes" ; then echo "CONFIG_WIN32=3Dy" >> $config_host_mak - if test "$guest_agent_ntddscsi" =3D "yes" ; then - echo "CONFIG_QGA_NTDDSCSI=3Dy" >> $config_host_mak - fi echo "QEMU_GA_MSI_MINGW_DLL_PATH=3D${QEMU_GA_MSI_MINGW_DLL_PATH}" >> $co= nfig_host_mak echo "QEMU_GA_MANUFACTURER=3D${QEMU_GA_MANUFACTURER}" >> $config_host_mak echo "QEMU_GA_DISTRO=3D${QEMU_GA_DISTRO}" >> $config_host_mak diff --git a/meson.build b/meson.build index 730e622417..129776c409 100644 --- a/meson.build +++ b/meson.build @@ -1944,6 +1944,22 @@ if targetos =3D=3D 'windows' and link_language =3D= =3D 'cpp' int main(void) { return VSS_CTX_BACKUP; }''') endif =20 +have_ntddscsi =3D false +if targetos =3D=3D 'windows' + have_ntddscsi =3D cc.compiles(''' + #include + #include + int main(void) { + #if !defined(IOCTL_SCSI_GET_ADDRESS) + #error Missing required ioctl definitions + #endif + SCSI_ADDRESS addr =3D { .Lun =3D 0, .TargetId =3D 0, .PathId =3D 0 }; + return addr.Lun; + } +''') +endif +config_host_data.set('HAVE_NTDDSCSI', have_ntddscsi) + ignored =3D ['CONFIG_QEMU_INTERP_PREFIX', # actually per-target 'HAVE_GDB_BIN'] arrays =3D ['CONFIG_BDRV_RW_WHITELIST', 'CONFIG_BDRV_RO_WHITELIST'] @@ -3611,7 +3627,7 @@ summary_info +=3D {'libnfs support': libnfs} if targetos =3D=3D 'windows' if have_ga summary_info +=3D {'QGA VSS support': have_qga_vss} - summary_info +=3D {'QGA w32 disk info': config_host.has_key('CONFIG_QG= A_NTDDSCSI')} + summary_info +=3D {'QGA w32 disk info': have_ntddscsi} endif endif summary_info +=3D {'seccomp support': seccomp} diff --git a/qga/commands-win32.c b/qga/commands-win32.c index 484cb1c6bd..4fbbad793f 100644 --- a/qga/commands-win32.c +++ b/qga/commands-win32.c @@ -18,7 +18,7 @@ #include #include #include -#ifdef CONFIG_QGA_NTDDSCSI +#ifdef HAVE_NTDDSCSI #include #include #endif @@ -474,7 +474,7 @@ void qmp_guest_file_flush(int64_t handle, Error **errp) } } =20 -#ifdef CONFIG_QGA_NTDDSCSI +#ifdef HAVE_NTDDSCSI =20 static GuestDiskBusType win2qemu[] =3D { [BusTypeUnknown] =3D GUEST_DISK_BUS_TYPE_UNKNOWN, @@ -1111,7 +1111,7 @@ GuestDiskInfoList *qmp_guest_get_disks(Error **errp) return NULL; } =20 -#endif /* CONFIG_QGA_NTDDSCSI */ +#endif /* HAVE_NTDDSCSI */ =20 static GuestFilesystemInfo *build_guest_fsinfo(char *guid, Error **errp) { diff --git a/qga/meson.build b/qga/meson.build index d22ecb4187..54f2da5b07 100644 --- a/qga/meson.build +++ b/qga/meson.build @@ -88,7 +88,7 @@ if targetos =3D=3D 'windows' qga_libs +=3D ['-lole32', '-loleaut32', '-lshlwapi', '-lstdc++', '-Wl,= --enable-stdcall-fixup'] subdir('vss-win32') endif - if 'CONFIG_QGA_NTDDSCSI' in config_host + if have_ntddscsi qga_libs +=3D ['-lsetupapi', '-lcfgmgr32'] endif endif --=20 2.34.1 From nobody Mon Feb 9 09:42:38 2026 Delivered-To: importer@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+importer=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 164491966981039.64192621896734; Tue, 15 Feb 2022 02:07:49 -0800 (PST) Received: from localhost ([::1]:55598 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nJukO-000779-Ms for importer@patchew.org; Tue, 15 Feb 2022 05:07:48 -0500 Received: from eggs.gnu.org ([209.51.188.92]:55124) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nJuCa-0004m7-Kg for qemu-devel@nongnu.org; Tue, 15 Feb 2022 04:32:52 -0500 Received: from [2a00:1450:4864:20::534] (port=43650 helo=mail-ed1-x534.google.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nJuCU-0008V6-Tb for qemu-devel@nongnu.org; Tue, 15 Feb 2022 04:32:49 -0500 Received: by mail-ed1-x534.google.com with SMTP id y17so29083376edd.10 for ; Tue, 15 Feb 2022 01:32:46 -0800 (PST) Received: from avogadro.lan ([2001:b07:6468:f312:c8dd:75d4:99ab:290a]) by smtp.gmail.com with ESMTPSA id m4sm6634308ejl.45.2022.02.15.01.32.44 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 15 Feb 2022 01:32:45 -0800 (PST) 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=b+ciQvRWIHhYiOzIr5/SBokBom/pAmPzbz7GzQFHxFA=; b=cLJ8os5YlDp2STzYo1Z2CWj6rVMaYUbuv+yhX9Uo9BZuLtkJzm0wl6G/ExD1tvUgjh JwZC19+cXALlS83A59xqO866vtrkfA0zIXP7t4sq1THp3kqxVa1/TAfF8FcuOn8LCKZp 9hLUYSitJhYbjw1x49gROAaEFDITwSDlx/JGZGuU/JCCJFO16i0dFDGAaxYov2/HAMNl XYgP5Clzbn5Zj3y5kKb+y1lE/aPQQwnwDhguCY/Cq3vDSxFdzew0XPlv2hf5PoAaN45D j6IhInLMTM3oFtLVTbNOjC2I0IfNlaFfGDvbRvm8pJJ12MBhK/N+AhhiCAAG03znWKRN Ueeg== 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=b+ciQvRWIHhYiOzIr5/SBokBom/pAmPzbz7GzQFHxFA=; b=S4X1UFWqhT4R822LAMfM7aJ8dRrEdLetBXUdS7emAZp2h20qamSbdyA/FUlqP1twOb cKMfIItYLdWIR1u+XNP7yCY0SqrpUcr9w8rJMrJfnyh8WNPorCbaS5/SjXn1wMueLdkz FqUfhUr31Uo4BBU+oAO+u9lRHDvbjMiH5pDMj4VY3x/0YR3pC5VPEZd5PYWqBxmE7FW1 YDFEqTSMdqIINvG3ewuG60qVOe2Lq2XQcezGIXCQSdBMqAvCq2+M/lt045B1T718L3og p487krvanGM1TtD2jio3vD6nAI9y9rNJuSsN7Ku7O6inHlfutWN+QgOkHsDTH6eiyMov 1oKw== X-Gm-Message-State: AOAM533npEMKo7EBhhlVoa+mkfhngH9LEYbeXBfFBClOMjCfUOMugICW vw0+5xv2IqhJ25XALrHU5JPDTJZvB94= X-Google-Smtp-Source: ABdhPJxxabCC/VP7tVR70IeSfl15/Csw4pP/FdAok5L1INd95xA8BX8ra7QnT6zVKiO5W8p4hILLnQ== X-Received: by 2002:a05:6402:42cc:: with SMTP id i12mr2975000edc.220.1644917565539; Tue, 15 Feb 2022 01:32:45 -0800 (PST) From: Paolo Bonzini To: qemu-devel@nongnu.org Subject: [PULL 30/30] configure, meson: move CONFIG_IASL to a Meson option Date: Tue, 15 Feb 2022 10:32:23 +0100 Message-Id: <20220215093223.110827-31-pbonzini@redhat.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220215093223.110827-1-pbonzini@redhat.com> References: <20220215093223.110827-1-pbonzini@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Host-Lookup-Failed: Reverse DNS lookup failed for 2a00:1450:4864:20::534 (failed) 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+importer=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: 2 X-Spam_score: 0.2 X-Spam_bar: / X-Spam_report: (0.2 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FORGED_FROMDOMAIN=0.25, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.25, PDS_HP_HELO_NORDNS=0.904, RCVD_IN_DNSWL_NONE=-0.0001, RDNS_NONE=0.793, 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+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZM-MESSAGEID: 1644919672001100001 Content-Type: text/plain; charset="utf-8" Signed-off-by: Paolo Bonzini --- configure | 4 +--- meson.build | 12 ++++++++---- meson_options.txt | 2 ++ scripts/meson-buildoptions.py | 1 + 4 files changed, 12 insertions(+), 7 deletions(-) diff --git a/configure b/configure index 3300231279..1bf732fcdb 100755 --- a/configure +++ b/configure @@ -2929,9 +2929,6 @@ echo "MESON=3D$meson" >> $config_host_mak echo "NINJA=3D$ninja" >> $config_host_mak echo "CC=3D$cc" >> $config_host_mak echo "HOST_CC=3D$host_cc" >> $config_host_mak -if $iasl -h > /dev/null 2>&1; then - echo "CONFIG_IASL=3D$iasl" >> $config_host_mak -fi echo "AR=3D$ar" >> $config_host_mak echo "AS=3D$as" >> $config_host_mak echo "CCAS=3D$ccas" >> $config_host_mak @@ -3149,6 +3146,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")" \ -Dqemu_firmwarepath=3D"$firmwarepath" \ -Dqemu_suffix=3D"$qemu_suffix" \ -Dsmbd=3D"$smbd" \ diff --git a/meson.build b/meson.build index 129776c409..99a15d0a6e 100644 --- a/meson.build +++ b/meson.build @@ -1468,7 +1468,9 @@ 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')) +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')) config_host_data.set_quoted('CONFIG_QEMU_CONFDIR', get_option('prefix') / = qemu_confdir) @@ -1963,7 +1965,6 @@ config_host_data.set('HAVE_NTDDSCSI', have_ntddscsi) ignored =3D ['CONFIG_QEMU_INTERP_PREFIX', # actually per-target 'HAVE_GDB_BIN'] arrays =3D ['CONFIG_BDRV_RW_WHITELIST', 'CONFIG_BDRV_RO_WHITELIST'] -strings =3D ['CONFIG_IASL'] foreach k, v: config_host if ignored.contains(k) # do nothing @@ -1972,8 +1973,6 @@ foreach k, v: config_host v =3D '"' + '", "'.join(v.split()) + '", ' endif config_host_data.set(k, v) - elif strings.contains(k) - config_host_data.set_quoted(k, v) elif k.startswith('CONFIG_') config_host_data.set(k, v =3D=3D 'y' ? 1 : v) endif @@ -3381,6 +3380,11 @@ 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 {'genisoimage': config_host['GENISOIMAGE']} if targetos =3D=3D 'windows' and have_ga summary_info +=3D {'wixl': wixl} diff --git a/meson_options.txt b/meson_options.txt index aad337592d..30237917df 100644 --- a/meson_options.txt +++ b/meson_options.txt @@ -12,6 +12,8 @@ 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)') +option('iasl', type : 'string', value : '', + description: 'Path to ACPI disassembler') 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.py b/scripts/meson-buildoptions.py index 01b10f7ae0..693be7b966 100755 --- a/scripts/meson-buildoptions.py +++ b/scripts/meson-buildoptions.py @@ -30,6 +30,7 @@ "default_devices", "docdir", "fuzzing_engine", + "iasl", "qemu_firmwarepath", "qemu_suffix", "smbd", --=20 2.34.1