From patchwork Thu Oct 31 04:04:15 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Pierrick Bouvier X-Patchwork-Id: 839847 Delivered-To: patch@linaro.org Received: by 2002:adf:a38c:0:b0:37d:45d0:187 with SMTP id l12csp79213wrb; Wed, 30 Oct 2024 21:05:28 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCVyW1hJlEj5Jv3wy00XN95uOrzd7uxLQ/oOK85V85ZTBSjW2D5cTt1yXzKOw0iXOQO5i2RbVQ==@linaro.org X-Google-Smtp-Source: AGHT+IHKBhTMFz3vmXNm0chgJ/0GQgDyj0gV83X3iN70ICvyF/ec3o8Rtn1o5rGILrGtKffjGnes X-Received: by 2002:a05:6214:3387:b0:6cb:8339:3443 with SMTP id 6a1803df08f44-6d18567da6amr241292086d6.7.1730347528620; Wed, 30 Oct 2024 21:05:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1730347528; cv=none; d=google.com; s=arc-20240605; b=Yf2xBNk0bVVWxO3DHu3mKPl7eP6VOZhJ5KctJj5bOg91EL5ekO2fk9WjO+/c/msiOu Lj6suUynt+LTkZgt82/t/2UFQVeZkqu8VJiM5rm4JgStP1HIpEFN3QZXI8iWcLoKAx7d JCkkZPB2tCg/erE3/A9C01xkCJuItQt0x/AFCmpuvoNwx+m8zU00f/jc4hpu9Tk0dIJr iNxFZC6GJvyQ8kuW32O6VivxcsyElGB+J6ON550oYZPyNqwlfaV7gfetEJixFyuuH70s GU/IV/C0NGAUeoSHiH9m0nb6xVsVXXfnQ/yGfqxp5KVKqnmADqCoKkUii3t3RLu1FuwZ O6xQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=njeHlPS1UvDHI0dHkOZk8rvt6i94v/W7laKq7UySnIM=; fh=qCkgi8uX0wPVo2PQZm7xsjDtLlhOh+0Zq/b6I6Z+gew=; b=eCAYbiQji7j+09zx99rlgDD+bCToGzRDBQSIgE5VqmiJ+iRIgrmGkh6iEDsbHTnHdq CZL0STdSHXsSdtp9GR0mlFXOaPSVpx2rn3wF9S4pHIb8/BTOuSNA0Q+DDy0TRhlaPmaq RGnBdH513/BhBbFxsIlH9Qa9OVd2bkHG+4Pj/1lym98dzTHQp7LLoddplGvh2RI3Tb5D JUFNS694fOZAiSpL3ac4NL6k5TBBg9Tt2lNoj8LhVR/LQqTWVwKMDQls8A3DHAv8UVHz BlERw7mpWT+0Be5nroabQgGvmlk1jC9YGH+d3BJN7DKNTerydDxDUIx1gfb/VyAsgEG/ DgkA==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=JzZOmVcl; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id 6a1803df08f44-6d353fd639dsi8965036d6.187.2024.10.30.21.05.28 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 30 Oct 2024 21:05:28 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=JzZOmVcl; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1t6MQh-0003e4-QT; Thu, 31 Oct 2024 00:05:04 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1t6MQe-0003bP-Tc for qemu-devel@nongnu.org; Thu, 31 Oct 2024 00:05:00 -0400 Received: from mail-pj1-x1032.google.com ([2607:f8b0:4864:20::1032]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1t6MQc-0004pY-UC for qemu-devel@nongnu.org; Thu, 31 Oct 2024 00:05:00 -0400 Received: by mail-pj1-x1032.google.com with SMTP id 98e67ed59e1d1-2e2b549799eso388287a91.3 for ; Wed, 30 Oct 2024 21:04:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1730347497; x=1730952297; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=njeHlPS1UvDHI0dHkOZk8rvt6i94v/W7laKq7UySnIM=; b=JzZOmVclvLooWgo5QSYOns/4x7NWLfWP9GnrYGq6tbRg/jmYpamxy9dVB74mmwY1t2 xgp6MtCeIxL6YyFPeFzQww+4LZDNP41oDmCp0XI4yYUOqFTVzKBJtNtj9qz0IxEmfWax zXvZyUuiPNDChNmdnJbDQlIB4Ny0avqiZWfnmE1viQuk03rPLOgTFMp0auZx5k33c/Wx cXyfd0wh7HJtxCRgrUVcs/dBQ0n8r3sDtwyz8XoVChFRxjl99kVE+76WNgHZgbjDL/rZ zn+gAyL6SIzZ3S8cEN/4njWV8LEYJnfkrRsDKVhtHSS1ZRWFApEfEWV3d1m3m+2W1f22 9WxA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1730347497; x=1730952297; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=njeHlPS1UvDHI0dHkOZk8rvt6i94v/W7laKq7UySnIM=; b=Qro7pbAbDBWv1qdrotRrarUZAdn8gqjsPQ2KMWz6tQscwEOcp5ED8OklLtkiGnH8df Rc0hYnDGU78lutiumJKvQyQ5iC0UUMPQ9gPpXbwrRl65o1TRuJf/IDCOqVckInpTQusP c5KtWJEejviKb2ZsoxmpCNsTGFwqwrN6oBiyoaRk3JKRMSVTXgFaPSDACOVWcnp5WCFV UwGORe+HBSQeyd1lwk/ucJvEwvDYCWLq/KJvyOHH6/aclquPZ+s57Tz4Vu3DU2TUdo0z adu8jL76xxSx52U/jrcRGlA485rjF19mHscU/pHmuem+jXbMEzfEtSI5BtdNSCSXmxUF 36Bg== X-Gm-Message-State: AOJu0YzPLK9k2uv3UgrLaUCKLF+0HpCUT2ypXnUCStTKi+Hlnca0ETHw 3Jp/XjZeDzNH6oZkXWIqhynDmhBh0t219wqcQp0AGIx45iFyI/Sf/1abUMCPyUYa8iR11KXrKIi 3XtVWOw== X-Received: by 2002:a17:90a:df0b:b0:2e0:f896:9d6d with SMTP id 98e67ed59e1d1-2e8f106fd8cmr19013294a91.16.1730347497564; Wed, 30 Oct 2024 21:04:57 -0700 (PDT) Received: from linaro.. (216-180-64-156.dyn.novuscom.net. [216.180.64.156]) by smtp.gmail.com with ESMTPSA id 98e67ed59e1d1-2e93db3a023sm428438a91.49.2024.10.30.21.04.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 30 Oct 2024 21:04:57 -0700 (PDT) From: Pierrick Bouvier To: qemu-devel@nongnu.org Cc: Cleber Rosa , John Snow , Michael Roth , Alexandre Iooss , Konstantin Kostiuk , Stefano Garzarella , Thomas Huth , =?utf-8?q?Daniel_P=2E_Berrang=C3=A9?= , Paolo Bonzini , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , =?utf-8?q?Marc?= =?utf-8?q?-Andr=C3=A9_Lureau?= , =?utf-8?q?Ale?= =?utf-8?q?x_Benn=C3=A9e?= , "Michael S. Tsirkin" , Mahmoud Mandour , Pierrick Bouvier Subject: [PATCH 01/12] scripts: remove erroneous file that breaks git clone on Windows Date: Wed, 30 Oct 2024 21:04:15 -0700 Message-Id: <20241031040426.772604-2-pierrick.bouvier@linaro.org> X-Mailer: git-send-email 2.39.5 In-Reply-To: <20241031040426.772604-1-pierrick.bouvier@linaro.org> References: <20241031040426.772604-1-pierrick.bouvier@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::1032; envelope-from=pierrick.bouvier@linaro.org; helo=mail-pj1-x1032.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham 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+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org This file was created by mistake in recent ed7667188 (9p: remove 'proxy' filesystem backend driver). When cloning the repository using native git for windows, we see this: Error: error: invalid path 'scripts/meson-buildoptions.' Error: The process 'C:\Program Files\Git\bin\git.exe' failed with exit code 128 Reviewed-by: Paolo Bonzini Signed-off-by: Pierrick Bouvier --- scripts/meson-buildoptions. | 0 1 file changed, 0 insertions(+), 0 deletions(-) delete mode 100644 scripts/meson-buildoptions. diff --git a/scripts/meson-buildoptions. b/scripts/meson-buildoptions. deleted file mode 100644 index e69de29bb2d..00000000000 From patchwork Thu Oct 31 04:04:16 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Pierrick Bouvier X-Patchwork-Id: 839855 Delivered-To: patch@linaro.org Received: by 2002:adf:a38c:0:b0:37d:45d0:187 with SMTP id l12csp79871wrb; Wed, 30 Oct 2024 21:07:53 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCW+AMfJ2Cqp64qjjEvpUnEIsPLndWGrzpOmh8jG3WgJYKHg0R6zsODOPMvDSx9Rj8cCJrStCw==@linaro.org X-Google-Smtp-Source: AGHT+IFq9ifLN41RRJl2BGXFAnZMyB/vGWujVeZnKyxXYx7zsgOtM6V9FxdFGg88a1+/WryZ5Rgi X-Received: by 2002:a05:620a:1724:b0:7b1:4436:cf12 with SMTP id af79cd13be357-7b193eedb9amr2792109885a.25.1730347673692; Wed, 30 Oct 2024 21:07:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1730347673; cv=none; d=google.com; s=arc-20240605; b=EG74FpmiT6OGVrp033VTMbVqY6fgdaC9/O57/nbnHTKQwARwBL747uKisbj4+BKFkq vE61WRFnNjDEhsi1gLh8fp1uBwBqp8HZpnGqY8oI3CLYRvAxaUEAITO3HhFp5F9NA7VG zMF1FH2ctjvcGE22PY4dP0yWxHgBbMHhrIzHWM5GFkpYYA3ruS+aKONXWBHCgVLB6+D2 gm+9gDhXwqNXjAyH6o1C3QE1sPprZSwwZlU/yjGcQQfSXmyVrxSNFxbXd7qR0LletnvJ D3BaS5O5S6FzXHPHel2cRciRRCEOJQyEj4Pm5EPSA1ByiaxjvA680KRJ8Wb7gVuLlZg6 g6Pw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=WpgvBPyGx65kpjq48fx4MpdW5Aw7ymp2tboHQxxKolQ=; fh=qCkgi8uX0wPVo2PQZm7xsjDtLlhOh+0Zq/b6I6Z+gew=; b=UZJkS4wO/ruv9mBHaDb67RQMHAJCf3Ed6FqKyWD0rE8aHuoQ+JXo1jjumCBLJ2rC3d NzTv9N1M9Fd6fA+yj/c4PgFZiK556YTIDyda990KL+lGjcSSAqBaylNjxRCdzJ0kn7ls HtVWrQpT/XJdvS/o0qiMK9k6xqVSEQBBwO65974R3H/Ra7q36/l03GSRzWUnCSXjafQc 0119pd6WmLAAm9ChTdR+rc8fabVlh4uZ//8WBFetErTWUF9zgmgeMYPOMZoxmBsdHhN/ VXm8pdX2dauN0MRjs34B4FWpUjXkH3hyw6Hr4Ijjsm4/RXjThG+NamNEoE53q01SIaqv Tcrg==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="FM//VtgL"; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id af79cd13be357-7b2f39f1d94si87097585a.94.2024.10.30.21.07.53 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 30 Oct 2024 21:07:53 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="FM//VtgL"; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1t6MQn-0003hR-9W; Thu, 31 Oct 2024 00:05:09 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1t6MQg-0003dR-IB for qemu-devel@nongnu.org; Thu, 31 Oct 2024 00:05:03 -0400 Received: from mail-pj1-x1035.google.com ([2607:f8b0:4864:20::1035]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1t6MQe-0004ph-MB for qemu-devel@nongnu.org; Thu, 31 Oct 2024 00:05:02 -0400 Received: by mail-pj1-x1035.google.com with SMTP id 98e67ed59e1d1-2e30116efc9so392169a91.2 for ; Wed, 30 Oct 2024 21:04:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1730347498; x=1730952298; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=WpgvBPyGx65kpjq48fx4MpdW5Aw7ymp2tboHQxxKolQ=; b=FM//VtgL48k9OtEeWPfmQ3f0wtXsDJ2O8rPQNzK6SxUhLgPzaV5TTlx3gLvBd8bvCO l0zzzKjUVw12e19SDEatsOuccsFVhu6JslcAZWTCXGuvlHTZ64EPnsEAq0Hzi0JpqJkk 36sKnzS1x0np1nsEw57InouMvDTZjSzbwvoMeMToaaH4MOWLLUzfxsByo6pWDG2CxWaH ZfD/X1h9wM47E1ILEXiQu+I1yUZosEe9Mt8lXeLlE56H28Ucksh1rjgsVk0oW863Xgir Vh/tT33ODlBgwbzvD+cmpom0z7nxA2aDgabvmNcg6ppCMdYk3u1ArX71ibi6VfpZhtim PNfw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1730347498; x=1730952298; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=WpgvBPyGx65kpjq48fx4MpdW5Aw7ymp2tboHQxxKolQ=; b=cI7bDcW2MKaJPBJyR+uwMfeqhbYG9pJYU+dYNXgEnBctFDr6N4+DdpctUR06Iyngbf XXQBMfslcQRz5Sbo0U00I+Yl7tGaC9/20fqkhl05Mb8FGTMSb4gDGuo3YC7prtPBZAE+ YANbm277cLYfxJl6n1T6kEXfqydydxgJw5Rp+iPyEZwTlzDzcNzz89Po9xcImfo6T02T MPml1+KvtPFy2ZaVDyVSBczOk1R8aieylxy1ZQmYa9ytzjMZwew9ksA1PpxR51whNcqY swUf1oyHyQrkKNj9xQ+TL4AGUXQguchHmNyJeSe5iJheXQKMF+5UDAb/d26963QWZ/Y7 PDUA== X-Gm-Message-State: AOJu0YzYxISZRl7a68edi13MZ4kzJlq3MUZIjvq1vYDGi3dtTQqOECMr b7QuklIfezAT5M+dYeclDenq/XB76abcWaLeXAILr3RdivJsqcS5jven3a+OYhYeOU0vTpWipDt IdjBYgw== X-Received: by 2002:a17:90a:e154:b0:2e2:e148:3d30 with SMTP id 98e67ed59e1d1-2e8f107354amr21150840a91.23.1730347498653; Wed, 30 Oct 2024 21:04:58 -0700 (PDT) Received: from linaro.. (216-180-64-156.dyn.novuscom.net. [216.180.64.156]) by smtp.gmail.com with ESMTPSA id 98e67ed59e1d1-2e93db3a023sm428438a91.49.2024.10.30.21.04.57 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 30 Oct 2024 21:04:58 -0700 (PDT) From: Pierrick Bouvier To: qemu-devel@nongnu.org Cc: Cleber Rosa , John Snow , Michael Roth , Alexandre Iooss , Konstantin Kostiuk , Stefano Garzarella , Thomas Huth , =?utf-8?q?Daniel_P=2E_Berrang=C3=A9?= , Paolo Bonzini , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , =?utf-8?q?Marc?= =?utf-8?q?-Andr=C3=A9_Lureau?= , =?utf-8?q?Ale?= =?utf-8?q?x_Benn=C3=A9e?= , "Michael S. Tsirkin" , Mahmoud Mandour , Pierrick Bouvier Subject: [PATCH 02/12] contrib/plugins/cflow: fix warning Date: Wed, 30 Oct 2024 21:04:16 -0700 Message-Id: <20241031040426.772604-3-pierrick.bouvier@linaro.org> X-Mailer: git-send-email 2.39.5 In-Reply-To: <20241031040426.772604-1-pierrick.bouvier@linaro.org> References: <20241031040426.772604-1-pierrick.bouvier@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::1035; envelope-from=pierrick.bouvier@linaro.org; helo=mail-pj1-x1035.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham 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+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org contrib/plugins/cflow.c: In function ‘plugin_exit’: contrib/plugins/cflow.c:167:19: error: declaration of ‘n’ shadows a previous local [-Werror=shadow=local] 167 | NodeData *n = l->data; | ^ contrib/plugins/cflow.c:139:9: note: shadowed declaration is here 139 | int n = 0; | ^ Reviewed-by: Alex Bennée Signed-off-by: Pierrick Bouvier --- contrib/plugins/cflow.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/contrib/plugins/cflow.c b/contrib/plugins/cflow.c index 6faa55d10d1..b39974d1cf3 100644 --- a/contrib/plugins/cflow.c +++ b/contrib/plugins/cflow.c @@ -136,7 +136,7 @@ static void plugin_exit(qemu_plugin_id_t id, void *p) g_autoptr(GString) result = g_string_new("collected "); GList *data; GCompareFunc sort = &hottest; - int n = 0; + int i = 0; g_mutex_lock(&node_lock); g_string_append_printf(result, "%d control flow nodes in the hash table\n", @@ -162,8 +162,8 @@ static void plugin_exit(qemu_plugin_id_t id, void *p) data = g_list_sort(data, sort); for (GList *l = data; - l != NULL && n < topn; - l = l->next, n++) { + l != NULL && i < topn; + l = l->next, i++) { NodeData *n = l->data; const char *type = n->mid_count ? "sync fault" : "branch"; g_string_append_printf(result, " addr: 0x%"PRIx64 " %s: %s (%s)\n", From patchwork Thu Oct 31 04:04:17 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Pierrick Bouvier X-Patchwork-Id: 839854 Delivered-To: patch@linaro.org Received: by 2002:adf:a38c:0:b0:37d:45d0:187 with SMTP id l12csp79783wrb; Wed, 30 Oct 2024 21:07:35 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCWotlmw+IeGRPIpAHOOvqeTYPv2eq3HDmGwu8bgMhxV7iM0lxHpa1gZr+7I80GFyuwHAE7n+Q==@linaro.org X-Google-Smtp-Source: AGHT+IFKJl+1Y+FuP8q79FBGdt0TD6rOEIqsnyp9ISkNHUun6ppa6MoxVHZ87rPerMscfLGmlKRW X-Received: by 2002:a05:622a:15d0:b0:461:5571:5cc6 with SMTP id d75a77b69052e-46155715de2mr199468371cf.46.1730347655124; Wed, 30 Oct 2024 21:07:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1730347655; cv=none; d=google.com; s=arc-20240605; b=D8p9HNLSI41UBpa7adoJhHXOJtsUuxC0RWDDnFIp9fxkdT2lYZCPzO4PXg00dQFAJP +6nKrjCuSdjs8AWXR7hpO2CEVkZ3ipS5JASvkppG00dSn0L8ja0BlwHm6NgMs/S4KYmf KgNW+QeHUumVDWZ/6FAxsAIiSqzvsquQ8uBOEWnfCMaKYPPbFe2UgvHrNtzg6BXg47sG 6/uoKmOl3yxzdWKQFuR0HQ3SkI2B7OvhYLWXiiTErC32RdkL+UO0Ddrgq/gULzmLwhvz InsgwR1HzmI3VB1mYvW8IFa+OWrQG/9RttFUUnY7RxLwQGqpQrEJ66nWqOYZpYGdFyPP ciiQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=fv7fP7ICWyfxL2x/CP9SZRa4THtQuAFnXp8RQEnngd8=; fh=qCkgi8uX0wPVo2PQZm7xsjDtLlhOh+0Zq/b6I6Z+gew=; b=FzgUwupFX4NKS3XS4wA2bKJl6vDfrM9WUbAlIlaUd6QViItTn1FV7P2QHgvHbmFixe lH40sG3ABwBONwsOzQgYXz4ABSMOeogO1ylz9nSV0igqqMscAJ1DQAskL4Psqh/wixfg ihT4BEx0xb25nJnJ0NL/VFmdh2SyAyK+IOskSdJYoshiuzdXiPUhrw/A7Rm7Xl7yjMfq vSO7rLJ2VW4DFWTuPdVVykrEhmV1ZS0LoW0QLF9QYUZB+Qe58r+MzRf8kKDXK7QGdHzE BpF6xug4DtIrE4aVpo/IkfaZWSmoWmRwI+CDY9RUGmHBxJ9K28V3mQhNGLBOyYQjpjD8 aAVQ==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="BJCL8X/l"; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id d75a77b69052e-462ad0b452fsi8931431cf.112.2024.10.30.21.07.34 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 30 Oct 2024 21:07:35 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="BJCL8X/l"; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1t6MQp-0003lK-RT; Thu, 31 Oct 2024 00:05:12 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1t6MQg-0003dU-RU for qemu-devel@nongnu.org; Thu, 31 Oct 2024 00:05:03 -0400 Received: from mail-pj1-x102a.google.com ([2607:f8b0:4864:20::102a]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1t6MQf-0004q1-2s for qemu-devel@nongnu.org; Thu, 31 Oct 2024 00:05:02 -0400 Received: by mail-pj1-x102a.google.com with SMTP id 98e67ed59e1d1-2e56750bb0dso381466a91.0 for ; Wed, 30 Oct 2024 21:05:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1730347500; x=1730952300; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=fv7fP7ICWyfxL2x/CP9SZRa4THtQuAFnXp8RQEnngd8=; b=BJCL8X/lA4a8SS5Y57Zp/+YXEwlvrqdmuWrdCnynK/ZZYsZlzh6AT46FZ0uqSuPW+G EyvItsTlhYQh+NVMLBQvhba8byYj2l4n+nPx68wshcVBiw0tCMoGwi0tQEo+jr+9bRux oncAjkv5yKI+kt02BosphueN8+chuYdH1yZC/jqRyTDYzCwsr3fqEZY/TYYukncktwPW XVMbouGinVUsuWx/Phs0s1YZGVzpy2iR/y51+ZakxH3WWDJhZEE/FI1e5W2QdoiSftcL gtqFLaDxi4HUYdyIZHryVzMTZ3H/E9TneUWNRGXZTUlrP+l1rdXgKMyAIQo/3YBZjFMy Dumg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1730347500; x=1730952300; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=fv7fP7ICWyfxL2x/CP9SZRa4THtQuAFnXp8RQEnngd8=; b=mbUkjh0zPXkzYmhfqPiamKEaqtxujvN0TQ6HDBay5CgSMW1O9s1wt5IoXWqwVcNMo2 mne7XdA8OPfvHZrssZ1/miDwGSsh/tNtVGnnRVl7qzBx8I7juhMC+y7UnXE/M7GxA6+A 6z8xEtwKiTxA3IHKySf8jHkg6jjbCh47pFiauGCkEdH3ErcBoLCaqIhvkZFVhp2nN7Pz lxWVdi5FGCubXwQRfIzNTl/AG8vDV4/MQ9440cw1kxN9Ee2KAN9WUTDLAd7AL677hSKF dRDKgYQ3bWmqn5d01FFQlO3tJaVtPx+RUgAteuABIjHvkfcLN/piTudtTePtUVM/rWyo /4XA== X-Gm-Message-State: AOJu0YwSzh0NVegB27GfedA01GE6+GGf758zIt72ctffIgOJY4gK2ZEj eN7xRowLM4v2hSSf4UQZtREJsIqPHzZgSnldHf0ms5uaFfYNukJ0A/rbhUaqIWW4yOofkIENfOS fwVSOLg== X-Received: by 2002:a17:90b:2741:b0:2e2:b64e:f506 with SMTP id 98e67ed59e1d1-2e8f105b461mr21551918a91.13.1730347499654; Wed, 30 Oct 2024 21:04:59 -0700 (PDT) Received: from linaro.. (216-180-64-156.dyn.novuscom.net. [216.180.64.156]) by smtp.gmail.com with ESMTPSA id 98e67ed59e1d1-2e93db3a023sm428438a91.49.2024.10.30.21.04.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 30 Oct 2024 21:04:59 -0700 (PDT) From: Pierrick Bouvier To: qemu-devel@nongnu.org Cc: Cleber Rosa , John Snow , Michael Roth , Alexandre Iooss , Konstantin Kostiuk , Stefano Garzarella , Thomas Huth , =?utf-8?q?Daniel_P=2E_Berrang=C3=A9?= , Paolo Bonzini , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , =?utf-8?q?Marc?= =?utf-8?q?-Andr=C3=A9_Lureau?= , =?utf-8?q?Ale?= =?utf-8?q?x_Benn=C3=A9e?= , "Michael S. Tsirkin" , Mahmoud Mandour , Pierrick Bouvier Subject: [PATCH 03/12] meson: build contrib/plugins with meson Date: Wed, 30 Oct 2024 21:04:17 -0700 Message-Id: <20241031040426.772604-4-pierrick.bouvier@linaro.org> X-Mailer: git-send-email 2.39.5 In-Reply-To: <20241031040426.772604-1-pierrick.bouvier@linaro.org> References: <20241031040426.772604-1-pierrick.bouvier@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::102a; envelope-from=pierrick.bouvier@linaro.org; helo=mail-pj1-x102a.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham 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+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org Tried to unify this meson.build with tests/tcg/plugins/meson.build but the resulting modules are not output in the right directory. Originally proposed by Anton Kochkov, thank you! Solves: https://gitlab.com/qemu-project/qemu/-/issues/1710 Reviewed-by: Alex Bennée Signed-off-by: Pierrick Bouvier --- meson.build | 4 ++++ contrib/plugins/meson.build | 28 ++++++++++++++++++++++++++++ 2 files changed, 32 insertions(+) create mode 100644 contrib/plugins/meson.build diff --git a/meson.build b/meson.build index f7d45175212..d8af08299e0 100644 --- a/meson.build +++ b/meson.build @@ -3684,6 +3684,10 @@ subdir('accel') subdir('plugins') subdir('ebpf') +if 'CONFIG_TCG' in config_all_accel + subdir('contrib/plugins') +endif + common_user_inc = [] subdir('common-user') diff --git a/contrib/plugins/meson.build b/contrib/plugins/meson.build new file mode 100644 index 00000000000..63a32c2b4f0 --- /dev/null +++ b/contrib/plugins/meson.build @@ -0,0 +1,28 @@ +contrib_plugins = ['bbv', 'cache', 'cflow', 'drcov', 'execlog', 'hotblocks', + 'hotpages', 'howvec', 'hwprofile', 'ips', 'stoptrigger'] +if host_os != 'windows' + # lockstep uses socket.h + contrib_plugins += 'lockstep' +endif + +t = [] +if get_option('plugins') + foreach i : contrib_plugins + if host_os == 'windows' + t += shared_module(i, files(i + '.c') + 'win32_linker.c', + include_directories: '../../include/qemu', + link_depends: [win32_qemu_plugin_api_lib], + link_args: ['-Lplugins', '-lqemu_plugin_api'], + dependencies: glib) + else + t += shared_module(i, files(i + '.c'), + include_directories: '../../include/qemu', + dependencies: glib) + endif + endforeach +endif +if t.length() > 0 + alias_target('contrib-plugins', t) +else + run_target('contrib-plugins', command: find_program('true')) +endif From patchwork Thu Oct 31 04:04:18 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Pierrick Bouvier X-Patchwork-Id: 839853 Delivered-To: patch@linaro.org Received: by 2002:adf:a38c:0:b0:37d:45d0:187 with SMTP id l12csp79761wrb; Wed, 30 Oct 2024 21:07:31 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCV312zs2t6dhiNO1AebI54ajlndYmGck1iRsULr40bqAQ352YMAfVhEInhRxJCqaAdQ87PYfg==@linaro.org X-Google-Smtp-Source: AGHT+IHNGobYN1KvyglSB90yqe1bYA9FEBRvWmPSd+z/Iqr4Y7kJUJHeq1R6U3yffJyFa3tYzKD9 X-Received: by 2002:a05:6902:248a:b0:e2b:9790:835f with SMTP id 3f1490d57ef6-e3087b7bb36mr15516694276.34.1730347650915; Wed, 30 Oct 2024 21:07:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1730347650; cv=none; d=google.com; s=arc-20240605; b=BSv7w3PvWoEopkQEjDruH9Tba/GbHYjWFe/TxLzn2osKhTYUS6hNFcwmwlORbEObj/ X6IL3JG+p5YY5gNSMbl0j9cbrXt5T69k3LiaPLLSGDYjhtFRSO30wn7Faruv0wwbSaJa zKCZ+2qDODoXz8WMrvjYOopr6oMRmAIep6Kya1SIyMfyP0kDCep5pCJ4utvlCU61Yx0j m0n7y8WqYFS9LQY0KYXZ0y8dwlik2FMl24X6lJII5v9AXEXu8bWPkGFrhmUah+JaxgOH X2JEtB6F79HtGZCVYxjh1k3m2XkjiYdiKi75wo7r90PbobDBbeJL8PetvevdttXF7dOQ FOlA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=s8/FoORAU+MbCzBkiE+YK/dNQraWToWCvs2DtBwW02Y=; fh=qCkgi8uX0wPVo2PQZm7xsjDtLlhOh+0Zq/b6I6Z+gew=; b=hH+CucK9JiWFww3BFWSN2WoYnh0zdKVLh+3YPKep3nfgdTuPRRjpJ8DKItc0nHXJTA fF5gejpHMHW7y3y4S487OMoh2j5F5d7X/3ReHOAMpbOaj05L5fRCDVur25Qg1IDNLXn2 vEt/K6IsUs4qxM15AM/geiYvprcUMIZ5GQaUys9p3DzNH2KhAqal7AZikiw+pu3BpWJQ wDfy4Dy/+tUHRaG9fxkohkhqB+N/39s+8UBtb420vTKlD4HcJtp9NMC7uwWKLS+BcAk+ 46UJAh0V2w3uLz/0AiBH7DCnkFWMCT0yJOl78Pi7Pm1JPhtM6UZO2l7HgH9xFoF2pB/s 4LFA==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=M+u9yDEE; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id d75a77b69052e-462ad0b0f4csi9228921cf.145.2024.10.30.21.07.30 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 30 Oct 2024 21:07:30 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=M+u9yDEE; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1t6MQn-0003iO-LW; Thu, 31 Oct 2024 00:05:09 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1t6MQi-0003eU-Ba for qemu-devel@nongnu.org; Thu, 31 Oct 2024 00:05:04 -0400 Received: from mail-pl1-x630.google.com ([2607:f8b0:4864:20::630]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1t6MQg-0004qT-GI for qemu-devel@nongnu.org; Thu, 31 Oct 2024 00:05:04 -0400 Received: by mail-pl1-x630.google.com with SMTP id d9443c01a7336-20c8b557f91so5319605ad.2 for ; Wed, 30 Oct 2024 21:05:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1730347501; x=1730952301; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=s8/FoORAU+MbCzBkiE+YK/dNQraWToWCvs2DtBwW02Y=; b=M+u9yDEEMZfeVUY41bCuihIlEqXL3E744K4MGrk+PF7YhSNnXFx7cin8upM+xipYo2 HjqwMJ2LUkn0FAx4sg0KeA+TWW5LZ5ORhDvcIrbRpXxqk5vyOPrleDQfAgHWCoM1+nAb 87hJFpyt8Cuw1/ALbDu8KU8wbnrWc4iph+EXOSba4vaRgoChfngXnWPHw4OdDaAP6yS8 qdOaL2TgyzdCLz2KzYY54BYLi5ZMHy/f+gFasU2Az6a3TSpXTqCWT1o7Yn7DuawCDwzQ xdzJM8kGalI8GQLc2wAmsLWGVjLc9l3Jg+teWVg91gPyeAdL+qnpb1sgBqxtlWgEEVTE laCg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1730347501; x=1730952301; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=s8/FoORAU+MbCzBkiE+YK/dNQraWToWCvs2DtBwW02Y=; b=SP0f8nKuw8Jgj9kmbPRcqblDhr2gTwyuK6iXoTn2l6tQUkmj685WZfQdfDEeWuwhgO e/Wg1LsfUCA5oJghGynUjpq5MYG6NKMVDe5TZmmvZO6Xdkxjd2sk9u+RQ1Zaj0ez5Adn aJydUtoN3OrJabZs1bKw/r7MScDWk6KvNoXmt7g/QYbcDCiSPAgS5dDFIR7hxL3z36Ci aoXtiDpl2UT9tgPZHMexaTJJkGaDn92PaTH1NeZE7E9ETnXt5FhH/tiPEotSO/YbTK95 f1Cj5J9YZ5uFH+yhDvO1COgmn4kyVjRMGxzQGwDqYO8NkhpaYfVDJb8nx8tUnJyU05dO 9ULQ== X-Gm-Message-State: AOJu0YxZH7Q0O9NQXvZGuhyJyIAynnCmgsBkJumG8X1VOKUGGOdv/2zd eSYZDnUXj4jwAxsmbMmCvfB605tmWwRHfPtVbRL1Ogl1YyeKBG8ZM+LxLEsy0FY1JCnBPrwSWqA wLHZePw== X-Received: by 2002:a17:903:228d:b0:20b:9062:7b08 with SMTP id d9443c01a7336-210c6c6e7edmr287969295ad.45.1730347500835; Wed, 30 Oct 2024 21:05:00 -0700 (PDT) Received: from linaro.. (216-180-64-156.dyn.novuscom.net. [216.180.64.156]) by smtp.gmail.com with ESMTPSA id 98e67ed59e1d1-2e93db3a023sm428438a91.49.2024.10.30.21.04.59 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 30 Oct 2024 21:05:00 -0700 (PDT) From: Pierrick Bouvier To: qemu-devel@nongnu.org Cc: Cleber Rosa , John Snow , Michael Roth , Alexandre Iooss , Konstantin Kostiuk , Stefano Garzarella , Thomas Huth , =?utf-8?q?Daniel_P=2E_Berrang=C3=A9?= , Paolo Bonzini , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , =?utf-8?q?Marc?= =?utf-8?q?-Andr=C3=A9_Lureau?= , =?utf-8?q?Ale?= =?utf-8?q?x_Benn=C3=A9e?= , "Michael S. Tsirkin" , Mahmoud Mandour , Pierrick Bouvier Subject: [PATCH 04/12] contrib/plugins: remove Makefile for contrib/plugins Date: Wed, 30 Oct 2024 21:04:18 -0700 Message-Id: <20241031040426.772604-5-pierrick.bouvier@linaro.org> X-Mailer: git-send-email 2.39.5 In-Reply-To: <20241031040426.772604-1-pierrick.bouvier@linaro.org> References: <20241031040426.772604-1-pierrick.bouvier@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::630; envelope-from=pierrick.bouvier@linaro.org; helo=mail-pl1-x630.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham 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+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org Now replaced by meson build. Reviewed-by: Alex Bennée Signed-off-by: Pierrick Bouvier --- configure | 18 --------- Makefile | 10 ----- contrib/plugins/Makefile | 87 ---------------------------------------- 3 files changed, 115 deletions(-) delete mode 100644 contrib/plugins/Makefile diff --git a/configure b/configure index 4a0159e1832..8f0ba505187 100755 --- a/configure +++ b/configure @@ -1073,7 +1073,6 @@ if test "$plugins" != "no" && test $host_bits -eq 64; then plugins="no" else plugins=yes - subdirs="$subdirs contrib/plugins" fi fi @@ -1704,7 +1703,6 @@ LINKS="$LINKS .gdbinit scripts" # scripts needed by relative path in .gdbinit LINKS="$LINKS tests/avocado tests/data" LINKS="$LINKS tests/qemu-iotests/check tests/qemu-iotests/Makefile" LINKS="$LINKS python" -LINKS="$LINKS contrib/plugins/Makefile " for f in $LINKS ; do if [ -e "$source_path/$f" ]; then symlink "$source_path/$f" "$f" @@ -1790,22 +1788,6 @@ if test "$default_targets" = "yes"; then echo "CONFIG_DEFAULT_TARGETS=y" >> $config_host_mak fi -# contrib/plugins configuration -echo "# Automatically generated by configure - do not modify" > contrib/plugins/$config_host_mak -echo "SRC_PATH=$source_path/contrib/plugins" >> contrib/plugins/$config_host_mak -echo "PKG_CONFIG=${pkg_config}" >> contrib/plugins/$config_host_mak -echo "CC=$cc $CPU_CFLAGS" >> contrib/plugins/$config_host_mak -echo "CFLAGS=${CFLAGS-$default_cflags} $EXTRA_CFLAGS" >> contrib/plugins/$config_host_mak -if test "$host_os" = windows; then - echo "DLLTOOL=$dlltool" >> contrib/plugins/$config_host_mak -fi -if test "$host_os" = darwin; then - echo "CONFIG_DARWIN=y" >> contrib/plugins/$config_host_mak -fi -if test "$host_os" = windows; then - echo "CONFIG_WIN32=y" >> contrib/plugins/$config_host_mak -fi - # tests/tcg configuration mkdir -p tests/tcg echo "# Automatically generated by configure - do not modify" > tests/tcg/$config_host_mak diff --git a/Makefile b/Makefile index 917c9a34d1c..b65b0bd41a8 100644 --- a/Makefile +++ b/Makefile @@ -187,11 +187,6 @@ SUBDIR_RULES=$(foreach t, all clean distclean, $(addsuffix /$(t), $(SUBDIRS))) $(SUBDIR_RULES): $(call quiet-command,$(MAKE) $(SUBDIR_MAKEFLAGS) -C $(dir $@) V="$(V)" TARGET_DIR="$(dir $@)" $(notdir $@),) -ifneq ($(filter contrib/plugins, $(SUBDIRS)),) -.PHONY: plugins -plugins: contrib/plugins/all -endif - .PHONY: recurse-all recurse-clean recurse-all: $(addsuffix /all, $(SUBDIRS)) recurse-clean: $(addsuffix /clean, $(SUBDIRS)) @@ -307,11 +302,6 @@ help: $(call print-help,cscope,Generate cscope index) $(call print-help,sparse,Run sparse on the QEMU source) @echo '' -ifneq ($(filter contrib/plugins, $(SUBDIRS)),) - @echo 'Plugin targets:' - $(call print-help,plugins,Build the example TCG plugins) - @echo '' -endif @echo 'Cleaning targets:' $(call print-help,clean,Remove most generated files but keep the config) $(call print-help,distclean,Remove all generated files) diff --git a/contrib/plugins/Makefile b/contrib/plugins/Makefile deleted file mode 100644 index bbddd4800ff..00000000000 --- a/contrib/plugins/Makefile +++ /dev/null @@ -1,87 +0,0 @@ -# -*- Mode: makefile -*- -# -# This Makefile example is fairly independent from the main makefile -# so users can take and adapt it for their build. We only really -# include config-host.mak so we don't have to repeat probing for -# programs that the main configure has already done for us. -# - -include config-host.mak - -TOP_SRC_PATH = $(SRC_PATH)/../.. - -VPATH += $(SRC_PATH) - -NAMES := -NAMES += bbv -NAMES += execlog -NAMES += hotblocks -NAMES += hotpages -NAMES += howvec - -# The lockstep example communicates using unix sockets, -# and can't be easily made to work on windows. -ifneq ($(CONFIG_WIN32),y) -NAMES += lockstep -endif - -NAMES += hwprofile -NAMES += cache -NAMES += drcov -NAMES += ips -NAMES += stoptrigger -NAMES += cflow - -ifeq ($(CONFIG_WIN32),y) -SO_SUFFIX := .dll -LDLIBS += $(shell $(PKG_CONFIG) --libs glib-2.0) -else -SO_SUFFIX := .so -endif - -SONAMES := $(addsuffix $(SO_SUFFIX),$(addprefix lib,$(NAMES))) - -# The main QEMU uses Glib extensively so it is perfectly fine to use it -# in plugins (which many example do). -PLUGIN_CFLAGS := $(shell $(PKG_CONFIG) --cflags glib-2.0) -PLUGIN_CFLAGS += -fPIC -Wall -PLUGIN_CFLAGS += -I$(TOP_SRC_PATH)/include/qemu - -# Helper that honours V=1 so we get some output when compiling -quiet-@ = $(if $(V),,@$(if $1,printf " %-7s %s\n" "$(strip $1)" "$(strip $2)" && )) -quiet-command = $(call quiet-@,$2,$3)$1 - -# for including , in command strings -COMMA := , - -all: $(SONAMES) - -%.o: %.c - $(call quiet-command, \ - $(CC) $(CFLAGS) $(PLUGIN_CFLAGS) -c -o $@ $<, \ - BUILD, plugin $@) - -ifeq ($(CONFIG_WIN32),y) -lib%$(SO_SUFFIX): %.o win32_linker.o ../../plugins/libqemu_plugin_api.a - $(call quiet-command, \ - $(CC) -shared -o $@ $^ $(LDLIBS), \ - LINK, plugin $@) -else ifeq ($(CONFIG_DARWIN),y) -lib%$(SO_SUFFIX): %.o - $(call quiet-command, \ - $(CC) -bundle -Wl$(COMMA)-undefined$(COMMA)dynamic_lookup -o $@ $^ $(LDLIBS), \ - LINK, plugin $@) -else -lib%$(SO_SUFFIX): %.o - $(call quiet-command, \ - $(CC) -shared -o $@ $^ $(LDLIBS), \ - LINK, plugin $@) -endif - - -clean distclean: - rm -f *.o *$(SO_SUFFIX) *.d - rm -Rf .libs - -.PHONY: all clean -.SECONDARY: From patchwork Thu Oct 31 04:04:19 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Pierrick Bouvier X-Patchwork-Id: 839859 Delivered-To: patch@linaro.org Received: by 2002:adf:a38c:0:b0:37d:45d0:187 with SMTP id l12csp80483wrb; Wed, 30 Oct 2024 21:10:07 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCVJf54xs0u1MCBkVqisto1Pf0DOpUX1a9FgGJeqv7EHZ4o3sIM3Hhj1OyEAR9bEWT7nliFkqg==@linaro.org X-Google-Smtp-Source: AGHT+IG5UTNZSjreprv/lqxqtJo6ZhavHQxRfrFyMWdBCGA6kTDPeJXshd+a2rBd4l1XsgYOebV2 X-Received: by 2002:a05:620a:44c6:b0:7b1:5f49:6c10 with SMTP id af79cd13be357-7b193f5d452mr2542997985a.63.1730347807126; Wed, 30 Oct 2024 21:10:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1730347807; cv=none; d=google.com; s=arc-20240605; b=Hguap1UFEb8ypUce8G963M5KwZGXGGnXgL7WYLhgQ3+SlRoZBmEcO6VJ1Aj5lGpy/V qigRWAnBaKU5tori76WmSZpUd5cpYo6YU9QdNX2a3KU+FtqZIQOx8zYVg9gAvguBLQ/D 2XbmRpTbY3zFqym50ud0Ox76hEtRufEjYAi2b57o3dMcOBcWsB2QzEQPNaxQDAGyBBzG c9IOn+nK2ZcdQ8GU0dKltprl0bvducKYywf+e4PE6ydM5D+16iNry7DqC4I2ju0sFeYC 8ZrGtegsEHMLnYIhqp7p+dc0OYYCV6C58wWCoXCnJyvh6ZhtZ9W/URHG4BMq6aEv0BfC ltXw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=stB6xsCXZvGGgXKJAPY9QdgEF+16xwQAb0j6tVuAwQI=; fh=qCkgi8uX0wPVo2PQZm7xsjDtLlhOh+0Zq/b6I6Z+gew=; b=UQtC5vCklja/6WADGRV8c8JEHTrD8PHtqaibvaFZPcALeTB0PGCB3OiTHCUQYBfCG1 fqYELq992eNNxqrDbJEUR4FmhnPF6lBuRgOcHF4xw97w4G0oXDFMK57PiGbh1+z0ff+F NWMRnq5joZKgxLM2qXDg4Yy6mvTmVsjFgCYYw6xc0X+qcSL9frP5VHRyA39RX2Ut6mLZ e5+7927zPeDHCEFWbBGSIdUeBQbvdCJeEqf8eIYzkQ2FGa1oOKFK85U5X/IdZ8FAc1fm iC1RkgZB+kdLIVTvmUyMrpb+5jcMjYqZu/B40I6ZUkTJotm26V0O4Bl2HP1wfcsLmpnL EVZQ==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=QJ3fHpt2; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id af79cd13be357-7b2f3ab4d3esi86180485a.614.2024.10.30.21.10.06 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 30 Oct 2024 21:10:07 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=QJ3fHpt2; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1t6MQv-0003po-Cy; Thu, 31 Oct 2024 00:05:17 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1t6MQi-0003ef-RB for qemu-devel@nongnu.org; Thu, 31 Oct 2024 00:05:07 -0400 Received: from mail-pl1-x630.google.com ([2607:f8b0:4864:20::630]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1t6MQh-0004qs-4Z for qemu-devel@nongnu.org; Thu, 31 Oct 2024 00:05:04 -0400 Received: by mail-pl1-x630.google.com with SMTP id d9443c01a7336-20cbb1cf324so4545895ad.0 for ; Wed, 30 Oct 2024 21:05:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1730347502; x=1730952302; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=stB6xsCXZvGGgXKJAPY9QdgEF+16xwQAb0j6tVuAwQI=; b=QJ3fHpt2h4XeDHUo0UbLB4hh7VNbO1TvqaAuymV3ZpFgjA7R1yVesL31n0Y7R7JDqX UcKymBK60J80KUcKtYH9SYgKhNPd3OOUwOEoLINp5C3HMXwqPWmOiHO5E4ww7Y9IPBt3 geIDUwuLz87JBx6ZvxyEPSCXliaJH48DNGHBJ7gt9go9KU5+GAdKu2Cb1uEQAATj1KqT phQ1OghgGaFT3BJeYd6u9Y5N/gtPdjzYeCFdYhnyy3RGnkyF+/wo3jWiwyBBr81I4+xq BoQSBv/EhXqqQHKEoSKvyc1RthM1ba8ADO0lFrWbP6kxJ9syFYkqxzOWuBXplGs2NMI1 5dMw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1730347502; x=1730952302; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=stB6xsCXZvGGgXKJAPY9QdgEF+16xwQAb0j6tVuAwQI=; b=w2rwUJf44AkCP7F+EaQV2YwL8IE4K32AECRQFtq5n2jQFdE/dDNN7+k6QPFKvmhdZC IiQTDS3ZjBMQBxAEXfIQriFsvQIxgf1j3YhhTIqFVFSuzV2jaxeKCqjli8dfSkNiwq5F LLhL/0LrsLNyym1x6KNisc0+hYkIRH+TmAnGGeHTnRgVRqCJDGYqvGrbPDSL2BPU1J8d DHNahCYI1CMMlP4/ef1DhxPPZcD00UxV44Cmbz3wE6MqMe1s2OOw/tVsXLQs0O1mvdRG Pzk1TGrJG4BOeJHv8Vj3beOXYWNVqxcw6k7VZ2rzet7mxsOPQeO3b8pE62f2PPgvqbqF FViQ== X-Gm-Message-State: AOJu0YwwCVt5/SFa1y9VVStO5wCErgN17yKza2Rc96AE7lSTYx4FV0Yk dydK7CCwnLcA7saGA0kfPIfxqac04FbwHRLZFeO2/w4IiWzTgEof+sUx0MOYVzPebJ02XxVbZpX LZZc2tg== X-Received: by 2002:a17:902:eccb:b0:20e:5792:32ed with SMTP id d9443c01a7336-210c6c6cf5bmr217904555ad.41.1730347501863; Wed, 30 Oct 2024 21:05:01 -0700 (PDT) Received: from linaro.. (216-180-64-156.dyn.novuscom.net. [216.180.64.156]) by smtp.gmail.com with ESMTPSA id 98e67ed59e1d1-2e93db3a023sm428438a91.49.2024.10.30.21.05.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 30 Oct 2024 21:05:01 -0700 (PDT) From: Pierrick Bouvier To: qemu-devel@nongnu.org Cc: Cleber Rosa , John Snow , Michael Roth , Alexandre Iooss , Konstantin Kostiuk , Stefano Garzarella , Thomas Huth , =?utf-8?q?Daniel_P=2E_Berrang=C3=A9?= , Paolo Bonzini , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , =?utf-8?q?Marc?= =?utf-8?q?-Andr=C3=A9_Lureau?= , =?utf-8?q?Ale?= =?utf-8?q?x_Benn=C3=A9e?= , "Michael S. Tsirkin" , Mahmoud Mandour , Pierrick Bouvier Subject: [PATCH 05/12] qga: fix -Wsometimes-uninitialized windows warning Date: Wed, 30 Oct 2024 21:04:19 -0700 Message-Id: <20241031040426.772604-6-pierrick.bouvier@linaro.org> X-Mailer: git-send-email 2.39.5 In-Reply-To: <20241031040426.772604-1-pierrick.bouvier@linaro.org> References: <20241031040426.772604-1-pierrick.bouvier@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::630; envelope-from=pierrick.bouvier@linaro.org; helo=mail-pl1-x630.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham 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+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org Reported by clang, but not gcc. [5123/5678] Compiling C object qga/qemu-ga.exe.p/commands-windows-ssh.c.obj FAILED: qga/qemu-ga.exe.p/commands-windows-ssh.c.obj "cc" "-Iqga/qemu-ga.exe.p" "-Iqga" "-I../qga" "-I." "-Iqapi" "-Itrace" "-Iui" "-Iui/shader" "-IC:/msys64/clangarm64/include/glib-2.0" "-IC:/msys64/clangarm64/lib/glib-2.0/include" "-fdiagnostics-color=auto" "-Wall" "-Winvalid-pch" "-Werror" "-std=gnu11" "-O2" "-g" "-fstack-protector-strong" "-Wempty-body" "-Wendif-labels" "-Wexpansion-to-defined" "-Wformat-security" "-Wformat-y2k" "-Wignored-qualifiers" "-Winit-self" "-Wmissing-format-attribute" "-Wmissing-prototypes" "-Wnested-externs" "-Wold-style-definition" "-Wredundant-decls" "-Wstrict-prototypes" "-Wtype-limits" "-Wundef" "-Wvla" "-Wwrite-strings" "-Wno-gnu-variable-sized-type-not-at-end" "-Wno-initializer-overrides" "-Wno-missing-include-dirs" "-Wno-psabi" "-Wno-shift-negative-value" "-Wno-string-plus-int" "-Wno-tautological-type-limit-compare" "-Wno-typedef-redefinition" "-Wthread-safety" "-iquote" "." "-iquote" "C:/w/qemu" "-iquote" "C:/w/qemu/include" "-iquote" "C:/w/qemu/host/include/aarch64" "-iquote" "C:/w/qemu/host/include/generic" "-iquote" "C:/w/qemu/tcg/aarch64" "-D_GNU_SOURCE" "-D_FILE_OFFSET_BITS=64" "-D_LARGEFILE_SOURCE" "-fno-strict-aliasing" "-fno-common" "-fwrapv" "-fno-pie" "-ftrivial-auto-var-init=zero" "-fzero-call-used-regs=used-gpr" -MD -MQ qga/qemu-ga.exe.p/commands-windows-ssh.c.obj -MF "qga/qemu-ga.exe.p/commands-windows-ssh.c.obj.d" -o qga/qemu-ga.exe.p/commands-windows-ssh.c.obj "-c" ../qga/commands-windows-ssh.c ../qga/commands-windows-ssh.c:383:9: error: variable 'userPSID' is used uninitialized whenever 'if' condition is true [-Werror,-Wsometimes-uninitialized] 383 | if (!create_acl(userInfo, &pACL, errp)) { | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ../qga/commands-windows-ssh.c:415:15: note: uninitialized use occurs here 415 | LocalFree(userPSID); | ^~~~~~~~ ../qga/commands-windows-ssh.c:383:5: note: remove the 'if' if its condition is always false 383 | if (!create_acl(userInfo, &pACL, errp)) { | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 384 | goto error; | ~~~~~~~~~~~ 385 | } | ~ ../qga/commands-windows-ssh.c:380:18: note: initialize the variable 'userPSID' to silence this warning 380 | PSID userPSID; | ^ | = NULL 1 error generated. Signed-off-by: Pierrick Bouvier Reviewed-by: Konstantin Kostiuk --- qga/commands-windows-ssh.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/qga/commands-windows-ssh.c b/qga/commands-windows-ssh.c index 6a642e3ba81..df45c17b757 100644 --- a/qga/commands-windows-ssh.c +++ b/qga/commands-windows-ssh.c @@ -377,7 +377,7 @@ error: static bool set_file_permissions(PWindowsUserInfo userInfo, Error **errp) { PACL pACL = NULL; - PSID userPSID; + PSID userPSID = NULL; /* Creates the access control structure */ if (!create_acl(userInfo, &pACL, errp)) { From patchwork Thu Oct 31 04:04:20 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Pierrick Bouvier X-Patchwork-Id: 839856 Delivered-To: patch@linaro.org Received: by 2002:adf:a38c:0:b0:37d:45d0:187 with SMTP id l12csp80304wrb; Wed, 30 Oct 2024 21:09:22 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCVbxVIyR7SiBX1RD2gkj92JB5S92M3KLc9kqApRspo5pzqSwgUkr3qjiCciEyxO+X4VuWjLGA==@linaro.org X-Google-Smtp-Source: AGHT+IEgVOg0onJ2+1RTIp8+qJanVRn7D3VtU/YIqo7+abZ11uIcosuDL1hteErVo3eQI9atKRxw X-Received: by 2002:a05:6214:4a88:b0:6cb:e5ba:3117 with SMTP id 6a1803df08f44-6d1856c3f72mr263630436d6.23.1730347762101; Wed, 30 Oct 2024 21:09:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1730347762; cv=none; d=google.com; s=arc-20240605; b=aHZqYCY9nl0XicXtbZipPT4wIjDI8k/5ujVUmYSj4YeoKp0W0+U/zo+L+sdr8HRmOg mn/6ncwxt7mGVh6BaQ6azROdoxFTR9pL+Bqu7+0Ar9xo3WUu/mVr15fgF9il/qrX9YAE ortDYna443Rw5j5+Fpq56UB7HFDdgfdNmVBkEqQ01R0ZAruLaz32r7D+Q/+2Zd/BlMhm itJSfxQi1uJeNdZ/zYrbo/t6V98cL2MCcDBKohgCIkveFYT2q2B0fiOU90kl9lpUsDOw TDjTsHCYDx/hjGcJGDkAtn60dXRu7OQoC/hHg4DeYjhC9WATDNMpyqJomSxvNi3scl5i +pbQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=sm6RxNg+VAWQBzeQTWA0D+UajI2IQKoU/Rfc9RmIGOo=; fh=qCkgi8uX0wPVo2PQZm7xsjDtLlhOh+0Zq/b6I6Z+gew=; b=Qcyn3u/VbMNYvLAvpU2/SpMQdrckf1aW1qUj7+7fxRpENQOb7808vqYy6nU5/3xHyE fXIRBv6Di+0cDjoi2dgh3hawpjmZkrWoE0dxp++MvZ/AE8U6AYochgyrCOYSAaTKQMyT brk9DwwCwv6CPOH5ljlObJbBq93kxkk7npkhl207aCOpbtmfBLklyPBFP7SE1VSFM+1t WiG9+m5yWCMuy0Hf4rZpd1sWpDb3mRxkNe6BArdECdD0US7qHzq9/CNUQ0BF3SdqZfDa 1yGhhVeNDTDLVgF4XUx0ZjrUVq3VwvC0iwfljxB/IhtjgO5oPgsyfindaVnwB87kqopT G9OQ==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=pH+r6WuB; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id 6a1803df08f44-6d3541c68b6si8813036d6.581.2024.10.30.21.09.21 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 30 Oct 2024 21:09:22 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=pH+r6WuB; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1t6MQs-0003nb-C4; Thu, 31 Oct 2024 00:05:14 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1t6MQk-0003et-87 for qemu-devel@nongnu.org; Thu, 31 Oct 2024 00:05:07 -0400 Received: from mail-pj1-x1036.google.com ([2607:f8b0:4864:20::1036]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1t6MQi-0004rb-Fu for qemu-devel@nongnu.org; Thu, 31 Oct 2024 00:05:06 -0400 Received: by mail-pj1-x1036.google.com with SMTP id 98e67ed59e1d1-2e30116efc9so392197a91.2 for ; Wed, 30 Oct 2024 21:05:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1730347503; x=1730952303; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=sm6RxNg+VAWQBzeQTWA0D+UajI2IQKoU/Rfc9RmIGOo=; b=pH+r6WuB1/avRqOvfla8F/QlXyWZ9btRtaNenea9XTvpn3fFCEJSJgy64mQER8e2ba QjWphNg3beNj1vHzvxYlosBu+nBsuqvmVG2vt/TCpdQw1c5Ca0cAkorSZPhSHZpKz6jw HH+FWtPmWqdYg6+QA0nYyJgCkbzmiyZKBnDaLOXzk1RUnqNOhWOmyNXyiBKu3F+gfvxX sdKHMoKAoK0AAXaHRPSDFQDay+pWALkE9ztIfvarp6tjfzH4vx4QHghbvqFxA2QvmSxe juzYdgReBS5P5fsHhOkQdzXc29EAxfsO573A3W2Mh+ZVtyh3FxTz2/uvzPxBoyWe0dHm e6qw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1730347503; x=1730952303; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=sm6RxNg+VAWQBzeQTWA0D+UajI2IQKoU/Rfc9RmIGOo=; b=TaI0yb1QXIFjTYSTdsql0KmJNn4BSxQwdqnKU9XPcak0kWIF0DUluMOEz+LaDvHptL 49DN5iz5kFdVOR46e45YSRZsPXEqwWj7W7YqtCNU1WJQFmHnquzjsOVCGv04dxtiDUvk LmAWXvNbENfK0rKp348ySjnpG52w8racO4lPyyh7qx8h5Fn73tTsLwmV9uwVKeJ55nQl 3w88UchIomeam16ZZIZM44t+vge/GEnNqtMWm3z6i3rShh/5WoVANlb9xI7R9GilWzcj lCJn6S09WbjUuLYyxUw6eM02gcYHVFv5i4vkp4tDy8YtkLJIvyVzN3jY8Kll/Gc83B/2 M6kQ== X-Gm-Message-State: AOJu0YxwwCV0aHzQoLcZwCTI4vDjvPq5CaNCfCZLLYoWAZjcpnJel8ZV s6Mc5RJXPfPMV0D9LZFdpN2iOPIMKQgE3ZWneHKwSH77Lrj5KrMLrcxjW+C+REjKVVwGgrP6ve0 n9Znd9A== X-Received: by 2002:a17:90a:4e0a:b0:2e2:c6b9:fd4a with SMTP id 98e67ed59e1d1-2e8f1072087mr20872679a91.18.1730347502813; Wed, 30 Oct 2024 21:05:02 -0700 (PDT) Received: from linaro.. (216-180-64-156.dyn.novuscom.net. [216.180.64.156]) by smtp.gmail.com with ESMTPSA id 98e67ed59e1d1-2e93db3a023sm428438a91.49.2024.10.30.21.05.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 30 Oct 2024 21:05:02 -0700 (PDT) From: Pierrick Bouvier To: qemu-devel@nongnu.org Cc: Cleber Rosa , John Snow , Michael Roth , Alexandre Iooss , Konstantin Kostiuk , Stefano Garzarella , Thomas Huth , =?utf-8?q?Daniel_P=2E_Berrang=C3=A9?= , Paolo Bonzini , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , =?utf-8?q?Marc?= =?utf-8?q?-Andr=C3=A9_Lureau?= , =?utf-8?q?Ale?= =?utf-8?q?x_Benn=C3=A9e?= , "Michael S. Tsirkin" , Mahmoud Mandour , Pierrick Bouvier Subject: [PATCH 06/12] qga: fix missing static and prototypes windows warnings Date: Wed, 30 Oct 2024 21:04:20 -0700 Message-Id: <20241031040426.772604-7-pierrick.bouvier@linaro.org> X-Mailer: git-send-email 2.39.5 In-Reply-To: <20241031040426.772604-1-pierrick.bouvier@linaro.org> References: <20241031040426.772604-1-pierrick.bouvier@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::1036; envelope-from=pierrick.bouvier@linaro.org; helo=mail-pj1-x1036.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham 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+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org Reported by clang++, but not by g++. ../qga/vss-win32/provider.cpp:48:6: error: no previous prototype for function 'LockModule' [-Werror,-Wmissing-prototypes] 48 | void LockModule(BOOL lock) | ^ ../qga/vss-win32/provider.cpp:48:1: note: declare 'static' if the function is not intended to be used outside of this translation unit 48 | void LockModule(BOOL lock) | ^ | static ../qga/vss-win32/provider.cpp:531:13: error: no previous prototype for function 'DllMain' [-Werror,-Wmissing-prototypes] 531 | BOOL WINAPI DllMain(HINSTANCE hinstDll, DWORD dwReason, LPVOID lpReserved) | ^ ../qga/vss-win32/provider.cpp:531:1: note: declare 'static' if the function is not intended to be used outside of this translation unit 531 | BOOL WINAPI DllMain(HINSTANCE hinstDll, DWORD dwReason, LPVOID lpReserved) | ^ | static Signed-off-by: Pierrick Bouvier Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Konstantin Kostiuk --- qga/vss-win32/install.cpp | 6 +++++- qga/vss-win32/provider.cpp | 5 ++++- qga/vss-win32/requester.cpp | 8 ++++---- 3 files changed, 13 insertions(+), 6 deletions(-) diff --git a/qga/vss-win32/install.cpp b/qga/vss-win32/install.cpp index 84944133f79..5cea5bcf747 100644 --- a/qga/vss-win32/install.cpp +++ b/qga/vss-win32/install.cpp @@ -39,7 +39,7 @@ const GUID CLSID_WbemLocator = { 0x4590f811, 0x1d3a, 0x11d0, const GUID IID_IWbemLocator = { 0xdc12a687, 0x737f, 0x11cf, {0x88, 0x4d, 0x00, 0xaa, 0x00, 0x4b, 0x2e, 0x24} }; -void errmsg(DWORD err, const char *text) +static void errmsg(DWORD err, const char *text) { /* * `text' contains function call statement when errmsg is called via chk(). @@ -242,6 +242,7 @@ out: } /* Unregister this module from COM+ Applications Catalog */ +STDAPI COMUnregister(void); STDAPI COMUnregister(void) { qga_debug_begin; @@ -256,6 +257,7 @@ out: } /* Register this module to COM+ Applications Catalog */ +STDAPI COMRegister(void); STDAPI COMRegister(void) { qga_debug_begin; @@ -380,11 +382,13 @@ out: return hr; } +STDAPI_(void) CALLBACK DLLCOMRegister(HWND, HINSTANCE, LPSTR, int); STDAPI_(void) CALLBACK DLLCOMRegister(HWND, HINSTANCE, LPSTR, int) { COMRegister(); } +STDAPI_(void) CALLBACK DLLCOMUnregister(HWND, HINSTANCE, LPSTR, int); STDAPI_(void) CALLBACK DLLCOMUnregister(HWND, HINSTANCE, LPSTR, int) { COMUnregister(); diff --git a/qga/vss-win32/provider.cpp b/qga/vss-win32/provider.cpp index cc72e5ef1b9..a102a23fbf1 100644 --- a/qga/vss-win32/provider.cpp +++ b/qga/vss-win32/provider.cpp @@ -45,7 +45,7 @@ const IID IID_IVssEnumObject = { 0xAE1C7110, 0x2F60, 0x11d3, {0x8A, 0x39, 0x00, 0xC0, 0x4F, 0x72, 0xD8, 0xE3} }; -void LockModule(BOOL lock) +static void LockModule(BOOL lock) { if (lock) { InterlockedIncrement(&g_nComObjsInUse); @@ -527,6 +527,9 @@ STDAPI DllCanUnloadNow() return g_nComObjsInUse == 0 ? S_OK : S_FALSE; } +EXTERN_C +BOOL WINAPI DllMain(HINSTANCE hinstDll, DWORD dwReason, LPVOID lpReserved); + EXTERN_C BOOL WINAPI DllMain(HINSTANCE hinstDll, DWORD dwReason, LPVOID lpReserved) { diff --git a/qga/vss-win32/requester.cpp b/qga/vss-win32/requester.cpp index 9884c65e707..4401d55e3a4 100644 --- a/qga/vss-win32/requester.cpp +++ b/qga/vss-win32/requester.cpp @@ -254,8 +254,8 @@ out: qga_debug_end; } -DWORD get_reg_dword_value(HKEY baseKey, LPCSTR subKey, LPCSTR valueName, - DWORD defaultData) +static DWORD get_reg_dword_value(HKEY baseKey, LPCSTR subKey, LPCSTR valueName, + DWORD defaultData) { qga_debug_begin; @@ -272,12 +272,12 @@ DWORD get_reg_dword_value(HKEY baseKey, LPCSTR subKey, LPCSTR valueName, return dwordData; } -bool is_valid_vss_backup_type(VSS_BACKUP_TYPE vssBT) +static bool is_valid_vss_backup_type(VSS_BACKUP_TYPE vssBT) { return (vssBT > VSS_BT_UNDEFINED && vssBT < VSS_BT_OTHER); } -VSS_BACKUP_TYPE get_vss_backup_type( +static VSS_BACKUP_TYPE get_vss_backup_type( VSS_BACKUP_TYPE defaultVssBT = DEFAULT_VSS_BACKUP_TYPE) { qga_debug_begin; From patchwork Thu Oct 31 04:04:21 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Pierrick Bouvier X-Patchwork-Id: 839857 Delivered-To: patch@linaro.org Received: by 2002:adf:a38c:0:b0:37d:45d0:187 with SMTP id l12csp80470wrb; Wed, 30 Oct 2024 21:10:05 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCU4M9ULGL2bnM7AeB/01uyd0GqSNFwpZiGe4Mdia4fMGcgsGOB6/NFit1Dth9flL0Fz9kS9iw==@linaro.org X-Google-Smtp-Source: AGHT+IE8f6jsBCi8S2ndX8dG2E1mrDOjRKin54NLYmWIM9N42YmZSAv9lLmVwclW8J+nkxMmebgL X-Received: by 2002:a05:622a:55:b0:461:2f3:c52f with SMTP id d75a77b69052e-462ad2549d2mr18829411cf.2.1730347805539; Wed, 30 Oct 2024 21:10:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1730347805; cv=none; d=google.com; s=arc-20240605; b=RmlQqBYSHhlJRaDYeW3xqju8+LYZN11poxbfLillQjiTAhYOmP0Jjp8VI3U3xfCBGA Bj7sd/UNsv/j/K+mkXrA2Pvt396KJtWyLA8KeV+AkyTlsUJn8pZjwqGp+lhBqV/KWKZ8 itXNreTy6aS76ERgzzPc9HdgfY+TJNIDAWvlaXzKi/brIAxy2lCBFpTek5XRXo7g0wRU inrEJ1fYE4rEs2r5/GyDyQfYY6+ied2B17DlrRbJm38tIPPIcZ25QsclwXTkk6Ukye8N qOvr/I5Jj4EJhfCRc1oQtW51FfRmmMm4dNA9Bu1XWixFfmXfciBBvHiHNzrsOPhcjxFq YsTg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=hoWX44V0fGpE1g+o7be5wb7qyUlUtcMzAcPzXC+tmrQ=; fh=qCkgi8uX0wPVo2PQZm7xsjDtLlhOh+0Zq/b6I6Z+gew=; b=Vmhiyvj9yowOI7LXG5mNFvwvMZZA6rVcZwk85DHLKe2El/trd01BqidxhZ72aFyFIl Env+kkUGzJ25SQqSc2nvdy5nWafajkDExSNdzRpzwQesbfvSd4QsIDaAwvwTZ3iL6SBs aQVDzkk+VMCXrfIo914oG3NkaUjl/PTnxEirgI1iHmWRgrJ5D4p73MkaMD1WJm5F5O2i FZKpaCtO1UPbqiOdL6DrOwtfHgPKcimzos0QySAxf1BX10RVrr0NSkADzWtJYS3KCd5F 1McRmasUnARqfOFUuqDNbAdbtlSp4pmsxCOJLLWCCd1d2DvsLzAF+A8IdyRCUlSMJz5f 9xBA==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=AJje5q7A; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id d75a77b69052e-462ad1b0fcdsi8184191cf.232.2024.10.30.21.10.05 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 30 Oct 2024 21:10:05 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=AJje5q7A; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1t6MQv-0003qp-T1; Thu, 31 Oct 2024 00:05:17 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1t6MQl-0003f8-PV for qemu-devel@nongnu.org; Thu, 31 Oct 2024 00:05:07 -0400 Received: from mail-pj1-x102b.google.com ([2607:f8b0:4864:20::102b]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1t6MQj-00051r-QF for qemu-devel@nongnu.org; Thu, 31 Oct 2024 00:05:07 -0400 Received: by mail-pj1-x102b.google.com with SMTP id 98e67ed59e1d1-2e2e050b1c3so1262011a91.0 for ; Wed, 30 Oct 2024 21:05:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1730347504; x=1730952304; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=hoWX44V0fGpE1g+o7be5wb7qyUlUtcMzAcPzXC+tmrQ=; b=AJje5q7AMb9ky9l+pbiX5Ssnqng4Qol4bftjvOb0F7xQa0hL+cG24V8NMe+nUam9QZ jE672JLpQBhjqAnDUIf0rfuu2VduD4BydNFsWrxNEWSqLQ5GXhKhTt5JHmRSZoO8G+G1 Asm1KoMgikqt0SAJamCw8j1M/O6+LYTLuGWIqyrWW2W63J+uFeVMpxv5c97vMTtNi8QZ cPnhfJ6DjRIP3sQH0fB99uGXU34VNeIBc2L7MY2YiqZP0To3XI9O03c7x7U8gnNL0nfg m1T3qwSzoHl2ONM4hQey3Gi0/SFgeUJFu7XHWJP2YF3fCmPucdUdt6JHmaPo1ZRNlYO/ s7bA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1730347504; x=1730952304; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=hoWX44V0fGpE1g+o7be5wb7qyUlUtcMzAcPzXC+tmrQ=; b=dM3FTvnZfHhK3Glt91ODYCwSZ+toDaF1AW2Gsg2yw7EeTeU2uy8VIL83FXdbWiHKV0 W5EgYBcJHKvG2xf0S2wkugACcMIUNhAiuLWeQQVwtDObr2euSA9IKdndovgBAKLYAcW5 y1nNjoAqsSxoQCC7ShWnNPQ0YHNGVuIrZ8tNipDa4s6oQmkS30vCYk2Hvhd7xjoP6G39 etwktfmldGRcSaAWm5Hk4Fve3MDbJ2jz7c81H3OQSsk/LriKKGIaycwj94IWJ4qw+wjV vzn0Mav/OTBIPZAnHO4seTwbBAVCpRjJBoBZZzJsy7KanmoRBalxaUDmp13aF1GMr8cV w42Q== X-Gm-Message-State: AOJu0YwjEHgcY2Y0HbxfaOpktRQse9p1nMygwKr7iW7aPW/8MuTajWdM OT85raQdiDxdhLEH2fCW2IM9p+Wljmte3gp2sniO6beevdZsE8DZ3Qghda5ITvzCanqwQdEVzcs oxNurbw== X-Received: by 2002:a17:90b:1844:b0:2da:6e46:ad48 with SMTP id 98e67ed59e1d1-2e93e058c03mr1631473a91.1.1730347503974; Wed, 30 Oct 2024 21:05:03 -0700 (PDT) Received: from linaro.. (216-180-64-156.dyn.novuscom.net. [216.180.64.156]) by smtp.gmail.com with ESMTPSA id 98e67ed59e1d1-2e93db3a023sm428438a91.49.2024.10.30.21.05.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 30 Oct 2024 21:05:03 -0700 (PDT) From: Pierrick Bouvier To: qemu-devel@nongnu.org Cc: Cleber Rosa , John Snow , Michael Roth , Alexandre Iooss , Konstantin Kostiuk , Stefano Garzarella , Thomas Huth , =?utf-8?q?Daniel_P=2E_Berrang=C3=A9?= , Paolo Bonzini , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , =?utf-8?q?Marc?= =?utf-8?q?-Andr=C3=A9_Lureau?= , =?utf-8?q?Ale?= =?utf-8?q?x_Benn=C3=A9e?= , "Michael S. Tsirkin" , Mahmoud Mandour , Pierrick Bouvier Subject: [PATCH 07/12] win32: use compiler option instead of attribute gcc_struct Date: Wed, 30 Oct 2024 21:04:21 -0700 Message-Id: <20241031040426.772604-8-pierrick.bouvier@linaro.org> X-Mailer: git-send-email 2.39.5 In-Reply-To: <20241031040426.772604-1-pierrick.bouvier@linaro.org> References: <20241031040426.772604-1-pierrick.bouvier@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::102b; envelope-from=pierrick.bouvier@linaro.org; helo=mail-pj1-x102b.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham 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+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org This attribute is not recognized by clang, but the associated option is. Signed-off-by: Pierrick Bouvier --- meson.build | 8 ++++---- include/qemu/compiler.h | 7 +------ subprojects/libvhost-user/libvhost-user.h | 6 +----- 3 files changed, 6 insertions(+), 15 deletions(-) diff --git a/meson.build b/meson.build index d8af08299e0..d0d5dbe1479 100644 --- a/meson.build +++ b/meson.build @@ -330,10 +330,10 @@ elif host_os == 'sunos' elif host_os == 'haiku' qemu_common_flags += ['-DB_USE_POSITIVE_POSIX_ERRORS', '-D_BSD_SOURCE', '-fPIC'] elif host_os == 'windows' - if not compiler.compiles('struct x { int y; } __attribute__((gcc_struct));', - args: '-Werror') - error('Your compiler does not support __attribute__((gcc_struct)) - please use GCC instead of Clang') - endif + # https://gcc.gnu.org/onlinedocs/gcc/x86-Type-Attributes.html + # We use this compilation option instead of relying on gcc_struct attribute + # because clang does not support it (but supports the option). + qemu_common_flags += ['-mno-ms-bitfields'] endif # Choose instruction set (currently x86-only) diff --git a/include/qemu/compiler.h b/include/qemu/compiler.h index c06954ccb41..d904408e5ed 100644 --- a/include/qemu/compiler.h +++ b/include/qemu/compiler.h @@ -22,12 +22,7 @@ #define QEMU_EXTERN_C extern #endif -#if defined(_WIN32) && (defined(__x86_64__) || defined(__i386__)) -# define QEMU_PACKED __attribute__((gcc_struct, packed)) -#else -# define QEMU_PACKED __attribute__((packed)) -#endif - +#define QEMU_PACKED __attribute__((packed)) #define QEMU_ALIGNED(X) __attribute__((aligned(X))) #ifndef glue diff --git a/subprojects/libvhost-user/libvhost-user.h b/subprojects/libvhost-user/libvhost-user.h index deb40e77b3f..2ffc58c11b1 100644 --- a/subprojects/libvhost-user/libvhost-user.h +++ b/subprojects/libvhost-user/libvhost-user.h @@ -186,11 +186,7 @@ typedef struct VhostUserShared { unsigned char uuid[UUID_LEN]; } VhostUserShared; -#if defined(_WIN32) && (defined(__x86_64__) || defined(__i386__)) -# define VU_PACKED __attribute__((gcc_struct, packed)) -#else -# define VU_PACKED __attribute__((packed)) -#endif +#define VU_PACKED __attribute__((packed)) typedef struct VhostUserMsg { int request; From patchwork Thu Oct 31 04:04:22 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Pierrick Bouvier X-Patchwork-Id: 839848 Delivered-To: patch@linaro.org Received: by 2002:adf:a38c:0:b0:37d:45d0:187 with SMTP id l12csp79267wrb; Wed, 30 Oct 2024 21:05:39 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCUk5eip3QgavyELT19XyyBciZOJj9Z0VHneTWFRK3yMbp61nbowd5xEUY+pWToBu6ibw0vt8w==@linaro.org X-Google-Smtp-Source: AGHT+IHUoBTzKrXrbnE4T0b8qEmSJzuE5/7PQ4uEt8lnnZGNRo5QYilDyNTbNLLonIpYQ2f5lFTO X-Received: by 2002:a05:6214:4890:b0:6cb:ece3:d923 with SMTP id 6a1803df08f44-6d351b25274mr23141656d6.42.1730347539182; Wed, 30 Oct 2024 21:05:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1730347539; cv=none; d=google.com; s=arc-20240605; b=HIzl36t8ptJp3HNqgNEi8oLJ9wv+6pF8BvwiVpXwZ/mjs9ePJfgf8O+l6a5C7V7ZnM unpqV/mOOObOPA7INTX0GC9zeIgicSUEiOte6PNFN/2iA3DdkQZRIM1b8Y9/bAqTjuqV xVpx0Un/o49kxw0C0fAVf5HeVzYAYDJIxbopQ2qej9HoSih2URVgKBTwrmc5Vnjd/dlK v1oU0WhpswBVJrN5G8n7rToB3JMJducYzJG4G7/iw0pGWVUAg9do4nuTipPlidVZYF/l Gt0cOUAPmJHdUmqSa9dJrUh+2H8STRWSuSj4bp3qt4g1vqQDuCa9PoXmaYbB+4uqvCad Ee+Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=MazmFmRo30op9YnWOmViRpaEpFEJWTUfVA0x4drzOKE=; fh=qCkgi8uX0wPVo2PQZm7xsjDtLlhOh+0Zq/b6I6Z+gew=; b=BAFCBXXh6o5grtuxf2y/csjkacNL19G+EGjv8STf9AHdDPpHx4grUkZbh+uSNdAfmY X7KbsY90SK+PAytImY/+9enj/69VlDOOP7ufcAHIsVOWZfy85nzZZGQr3IXNLwFS+XYN VQbAXsXsyIAuPMyoF7T+xmlo1AKoNu4IEe5V78ugowxi1rWA8fHc/J/DFL1BRXoh1yqG 9Oq/J5MZPCzPAqVIkrGm6WCGMbAuPSyZa8aCBXZ64nZsrpRZrZRVSRRGeOhmMPFsl8Xq J3Rm7mVtnVeySHHgCO8ynyJjZjhxTm4MNg2i/dKhEOeOPGg7gmm7wk1WVvUJPkAs4M0K 9Eiw==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=MZtrlJvI; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id 6a1803df08f44-6d35418029fsi8267616d6.398.2024.10.30.21.05.38 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 30 Oct 2024 21:05:39 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=MZtrlJvI; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1t6MQr-0003mg-Gk; Thu, 31 Oct 2024 00:05:13 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1t6MQn-0003iA-Dv for qemu-devel@nongnu.org; Thu, 31 Oct 2024 00:05:09 -0400 Received: from mail-pj1-x102e.google.com ([2607:f8b0:4864:20::102e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1t6MQk-00052o-QF for qemu-devel@nongnu.org; Thu, 31 Oct 2024 00:05:08 -0400 Received: by mail-pj1-x102e.google.com with SMTP id 98e67ed59e1d1-2e3fca72a41so458988a91.1 for ; Wed, 30 Oct 2024 21:05:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1730347505; x=1730952305; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=MazmFmRo30op9YnWOmViRpaEpFEJWTUfVA0x4drzOKE=; b=MZtrlJvIBG4cWcdTt8pd+KKsdh6m/7r0KO91JCsN8EEFlKH+9zUAJpJnRxug0TnLmR wJSMVhs5iv7STZIYrnzzQAvqsF4ilBGISjVVKH2HmRlNmFPdv2g9O+3IIX8DrWl85ovW Qmf6pBrZCzGL9cZ3Hj/1uabpZAWELD8G4IBVSRTqVS9N6Sh+k4Ih9/DDMDf8cxwombeT +hBCNSxed2p09d6bPXyYgKSqWawdcP8YS4WrZnodWA5U78Q8/caajgvtlOFMXj0a1xa1 53bLAMyZS9z9EvYCQMLtQ7hgQ7D++g1CPuKnMh4fJVW+DOZz6cT0JpgYYx3Dchu4NJZm t42A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1730347505; x=1730952305; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=MazmFmRo30op9YnWOmViRpaEpFEJWTUfVA0x4drzOKE=; b=ltXe29v7fgjdju4osMSJm7OgTplerGx2BxUeZoaXY4DPHVIi2eHmT1pJctlBQkaV4Z AKM3usGZPt7Wkyu5m4O3YKr/R/7F3CeZdx2BGWmjlINFkVXoeQ4FB7fse7huZXIpoQC9 3CmwCsTyY7Gg5NUNf919lYrOmJmmz7ieAwG2hyqZyK9DBM4jSCcAZmhykh6vNeCwCpgR vzb2bXnqiyUbxevG2rMAMbHAP11DeDjgcz2a5306M7vU8OGa9KEs4CXFMFDYLRdHlLej gH9bRrRr1TP7Pd6ooG0k+J2qrgcevDz5FezCD8UROtU8diF0G9K50fXhNH2aOhzBRim0 6KVA== X-Gm-Message-State: AOJu0YzD9tzHjz3OV7maVaktr0hRqinJs3FHWHoL3eHnH7h9hgJReu55 I3h2gKeSOFbX7/AtV4ftqJ8L6XL3jfs/wc8ocgzKhQNDKpjjB62pE74K7eoswwKag8wsa/pUoNN suJTTsA== X-Received: by 2002:a17:90b:1a8e:b0:2e5:e43a:1413 with SMTP id 98e67ed59e1d1-2e93c182879mr2408081a91.9.1730347505119; Wed, 30 Oct 2024 21:05:05 -0700 (PDT) Received: from linaro.. (216-180-64-156.dyn.novuscom.net. [216.180.64.156]) by smtp.gmail.com with ESMTPSA id 98e67ed59e1d1-2e93db3a023sm428438a91.49.2024.10.30.21.05.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 30 Oct 2024 21:05:04 -0700 (PDT) From: Pierrick Bouvier To: qemu-devel@nongnu.org Cc: Cleber Rosa , John Snow , Michael Roth , Alexandre Iooss , Konstantin Kostiuk , Stefano Garzarella , Thomas Huth , =?utf-8?q?Daniel_P=2E_Berrang=C3=A9?= , Paolo Bonzini , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , =?utf-8?q?Marc?= =?utf-8?q?-Andr=C3=A9_Lureau?= , =?utf-8?q?Ale?= =?utf-8?q?x_Benn=C3=A9e?= , "Michael S. Tsirkin" , Mahmoud Mandour , Pierrick Bouvier Subject: [PATCH 08/12] plugins: enable linking with clang/lld Date: Wed, 30 Oct 2024 21:04:22 -0700 Message-Id: <20241031040426.772604-9-pierrick.bouvier@linaro.org> X-Mailer: git-send-email 2.39.5 In-Reply-To: <20241031040426.772604-1-pierrick.bouvier@linaro.org> References: <20241031040426.772604-1-pierrick.bouvier@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::102e; envelope-from=pierrick.bouvier@linaro.org; helo=mail-pj1-x102e.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham 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+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org Windows uses a special mechanism to enable plugins to work (DLL delay loading). Option for lld is different than ld. Signed-off-by: Pierrick Bouvier --- meson.build | 4 ++++ contrib/plugins/meson.build | 2 +- plugins/meson.build | 24 ++++++++++++++++++++---- tests/tcg/plugins/meson.build | 3 +-- 4 files changed, 26 insertions(+), 7 deletions(-) diff --git a/meson.build b/meson.build index d0d5dbe1479..fe11570b147 100644 --- a/meson.build +++ b/meson.build @@ -334,6 +334,10 @@ elif host_os == 'windows' # We use this compilation option instead of relying on gcc_struct attribute # because clang does not support it (but supports the option). qemu_common_flags += ['-mno-ms-bitfields'] + + if compiler.get_id() == 'clang' and compiler.get_linker_id() != 'ld.lld' + error('On windows, you need to use lld with clang - use msys2 clang64/clangarm64 env') + endif endif # Choose instruction set (currently x86-only) diff --git a/contrib/plugins/meson.build b/contrib/plugins/meson.build index 63a32c2b4f0..484b9a808c8 100644 --- a/contrib/plugins/meson.build +++ b/contrib/plugins/meson.build @@ -12,7 +12,7 @@ if get_option('plugins') t += shared_module(i, files(i + '.c') + 'win32_linker.c', include_directories: '../../include/qemu', link_depends: [win32_qemu_plugin_api_lib], - link_args: ['-Lplugins', '-lqemu_plugin_api'], + link_args: win32_qemu_plugin_api_link_flags, dependencies: glib) else t += shared_module(i, files(i + '.c'), diff --git a/plugins/meson.build b/plugins/meson.build index 1cc039d29b2..51297582f93 100644 --- a/plugins/meson.build +++ b/plugins/meson.build @@ -11,14 +11,15 @@ if not enable_modules capture: true, command: ['sed', '-ne', 's/^[[:space:]]*\\(qemu_.*\\);/_\\1/p', '@INPUT@']) emulator_link_args += ['-Wl,-exported_symbols_list,plugins/qemu-plugins-ld64.symbols'] + elif host_os == 'windows' and meson.get_compiler('c').get_id() == 'clang' + # LLVM/lld does not support exporting specific symbols. However, it works + # out of the box with dllexport/dllimport attribute we set in the code. else emulator_link_args += ['-Xlinker', '--dynamic-list=' + (meson.project_source_root() / 'plugins/qemu-plugins.symbols')] endif endif if host_os == 'windows' - dlltool = find_program('dlltool', required: true) - # Generate a .lib file for plugins to link against. # First, create a .def file listing all the symbols a plugin should expect to have # available in qemu @@ -27,12 +28,27 @@ if host_os == 'windows' output: 'qemu_plugin_api.def', capture: true, command: ['sed', '-e', '0,/^/s//EXPORTS/; s/[{};]//g', '@INPUT@']) + # then use dlltool to assemble a delaylib. + # The delaylib will have an "imaginary" name (qemu.exe), that is used by the + # linker file we add with plugins (win32_linker.c) to identify that we want + # to find missing symbols in current program. + win32_qemu_plugin_api_link_flags = ['-Lplugins', '-lqemu_plugin_api'] + if meson.get_compiler('c').get_id() == 'clang' + # With LLVM/lld, delaylib is specified at link time (-delayload) + dlltool = find_program('llvm-dlltool', required: true) + dlltool_cmd = [dlltool, '-d', '@INPUT@', '-l', '@OUTPUT@', '-D', 'qemu.exe'] + win32_qemu_plugin_api_link_flags += ['-Wl,-delayload=qemu.exe'] + else + # With gcc/ld, delay lib is built with a specific delay parameter. + dlltool = find_program('dlltool', required: true) + dlltool_cmd = [dlltool, '--input-def', '@INPUT@', + '--output-delaylib', '@OUTPUT@', '--dllname', 'qemu.exe'] + endif win32_qemu_plugin_api_lib = configure_file( input: win32_plugin_def, output: 'libqemu_plugin_api.a', - command: [dlltool, '--input-def', '@INPUT@', - '--output-delaylib', '@OUTPUT@', '--dllname', 'qemu.exe'] + command: dlltool_cmd ) endif specific_ss.add(files( diff --git a/tests/tcg/plugins/meson.build b/tests/tcg/plugins/meson.build index f847849b1b7..87a17d67bd4 100644 --- a/tests/tcg/plugins/meson.build +++ b/tests/tcg/plugins/meson.build @@ -5,9 +5,8 @@ if get_option('plugins') t += shared_module(i, files(i + '.c') + '../../../contrib/plugins/win32_linker.c', include_directories: '../../../include/qemu', link_depends: [win32_qemu_plugin_api_lib], - link_args: ['-Lplugins', '-lqemu_plugin_api'], + link_args: win32_qemu_plugin_api_link_flags, dependencies: glib) - else t += shared_module(i, files(i + '.c'), include_directories: '../../../include/qemu', From patchwork Thu Oct 31 04:04:23 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Pierrick Bouvier X-Patchwork-Id: 839849 Delivered-To: patch@linaro.org Received: by 2002:adf:a38c:0:b0:37d:45d0:187 with SMTP id l12csp79279wrb; Wed, 30 Oct 2024 21:05:41 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCXqDHPyr+lSSgRPihKChtTbVEWth93V1NQDh1l3t4zuUC9Gs1ep08aHQHBcTnRY0nyLl8nZPQ==@linaro.org X-Google-Smtp-Source: AGHT+IG3rRM8WrSCjIxaGcjxeXKU/EdGGb4kHSOuRYzGAUwq2HEVqw3u7Qmi84eR4LwU357ULV7c X-Received: by 2002:a05:6122:2a4e:b0:50d:5a12:9436 with SMTP id 71dfb90a1353d-51014ff85e1mr14903094e0c.3.1730347541468; Wed, 30 Oct 2024 21:05:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1730347541; cv=none; d=google.com; s=arc-20240605; b=OHMUom3YWX9hB5wfR5pD+VMqPm6fIi9keMCp9Yxpu59vYVuzFwROO9JEBsjBMFwCPM nKKLpoNIeNroqeqMsr0qLeOhXx7EzyKbXLVuUs2/q+LuN8vussYOWMeM+AOGR0dDJtqn vI3cSRupri9FfaokEMER646PbcGZrwFVDGJJRL3Sk3q+8WTtDZs88dJSfAZI4Bh8iOQ9 rT/7g/scq5+2RJn2+++zbw7H/XkG70rBp3nc6mbEiKSyHHz0CPXW6HYONru0V03PBiy5 YdfHK5KNa9IbGfP0hpaAfIHQP//MsHOhvtObqYW67BX9wB6qKtWtenKLQEFGfAL8W76S z0/Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=5Etq9dXgBLnq7Fjrg4VPpsKmiULD2dA0vZBWi1xVOs4=; fh=qCkgi8uX0wPVo2PQZm7xsjDtLlhOh+0Zq/b6I6Z+gew=; b=dICp8qmsyk+n4R3vv6nPhA0yKAJ+x6wW7JZiQiZKqBC6a3vJfX/MLV64jdkrbt+RQx ggxML4BHxOg1BxD7ViIYaKk5pCGCOKbxBRiSQxMYuv5Z6JH36PYG8sljEa4R8DMyM51T pyUB0ZUWM7Psx53Gyn0geiGIAf1ufXVsiz91+vmIW0f1vwmM3sj99ev/h7CoB6Ub0ryu Nl/7cU+7g4UeXbUO8F74MFbBYOuHdl+b47dv4ejEx8npAY71YsSUSmbED/KNrE5Wa3UZ VHp+nPHmIg+5buha5PemSzzffF0AEnzuMBTgcN4Z9OMYyUCm97Gat56933TOR5YZhz5j LDYw==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=FPLWlXsE; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id af79cd13be357-7b2f3ad168asi80942185a.705.2024.10.30.21.05.41 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 30 Oct 2024 21:05:41 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=FPLWlXsE; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1t6MQw-0003r5-Fr; Thu, 31 Oct 2024 00:05:18 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1t6MQn-0003i8-Dd for qemu-devel@nongnu.org; Thu, 31 Oct 2024 00:05:09 -0400 Received: from mail-pj1-x1030.google.com ([2607:f8b0:4864:20::1030]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1t6MQl-000539-Hq for qemu-devel@nongnu.org; Thu, 31 Oct 2024 00:05:09 -0400 Received: by mail-pj1-x1030.google.com with SMTP id 98e67ed59e1d1-2e2ad9825a7so409644a91.0 for ; Wed, 30 Oct 2024 21:05:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1730347506; x=1730952306; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=5Etq9dXgBLnq7Fjrg4VPpsKmiULD2dA0vZBWi1xVOs4=; b=FPLWlXsEtBdOKQcSXQSIxaHfL6tGgMtdtCjgEDArrybaHV4zvkjTxIQvDd9yVfxLWE Y5PqpSqQ8d7D6Bmeyg8jyVkd/6S+/2lgy7OWM7nFuyQ+vWGUpOvEuKHBlDa9K4lqri4Q v+tmirX4f3hP/SX8XJc/RS0rSOIM/3Enb7kIR/diOy6ZFdaTRf/A2NTHxhNYL7m9OBb7 svSbmjlfh746cy0p0yZ0j1pqX1Yf33AvchfE7JY2nH4aUYhWgCRfIP3JixlWbeOrM6lM VKhtIk93wT6FYwQNc/DYxvQcaDmD8CQHfsUA9ub4Cmq45I6D+Z8d9wWIBDjoK9P6d86o 1gmg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1730347506; x=1730952306; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=5Etq9dXgBLnq7Fjrg4VPpsKmiULD2dA0vZBWi1xVOs4=; b=OKo7a5tT/xpQ1bAmpky8V6+l9HlXlv0F1JpXdHOhyWtkRP8+cEGpiq7f7VQN4fgsKZ N13E5xu1apS5neW8QjgX0CHvHamfbGKgSgikTY9MhXynJet9CFpGmXfGuN2lyZMkMUj7 kjCqORIXAaDt2dbZeENAHCZBQB0DoZ+jGTBdc+ZcdJ5TQLCyw+cj9vY2xz4bxItZ4tbv ggGqd0SXDml4bt7+b1iFex9zhG15uDX4QxYfEqiyifuxJ+R6mlsAH5iHV/GVVO8f0Z7M +4q4j8t8Dr49Aym0Hk/exYhgsGOHzbkYYXPEO+nb1Ywesz0o9kUfvD1hHg3LWcO092UE srMw== X-Gm-Message-State: AOJu0YyBWySKJ+WxED/1D9IXdX5WrXHXJgqqV0NyFe4YoATk8R0gKeAS ksS1TMctLZ2qHrRvX9wfzrs3AxH5a+9iMZjOmByArvSis8C48DgkqKgdyw8rX3Co8fCE0aF9j7Y JNJydCQ== X-Received: by 2002:a17:90b:315:b0:2e2:ba35:356c with SMTP id 98e67ed59e1d1-2e8f11dceb8mr18783247a91.39.1730347506141; Wed, 30 Oct 2024 21:05:06 -0700 (PDT) Received: from linaro.. (216-180-64-156.dyn.novuscom.net. [216.180.64.156]) by smtp.gmail.com with ESMTPSA id 98e67ed59e1d1-2e93db3a023sm428438a91.49.2024.10.30.21.05.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 30 Oct 2024 21:05:05 -0700 (PDT) From: Pierrick Bouvier To: qemu-devel@nongnu.org Cc: Cleber Rosa , John Snow , Michael Roth , Alexandre Iooss , Konstantin Kostiuk , Stefano Garzarella , Thomas Huth , =?utf-8?q?Daniel_P=2E_Berrang=C3=A9?= , Paolo Bonzini , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , =?utf-8?q?Marc?= =?utf-8?q?-Andr=C3=A9_Lureau?= , =?utf-8?q?Ale?= =?utf-8?q?x_Benn=C3=A9e?= , "Michael S. Tsirkin" , Mahmoud Mandour , Pierrick Bouvier Subject: [PATCH 09/12] plugins: add missing export for qemu_plugin_num_vcpus Date: Wed, 30 Oct 2024 21:04:23 -0700 Message-Id: <20241031040426.772604-10-pierrick.bouvier@linaro.org> X-Mailer: git-send-email 2.39.5 In-Reply-To: <20241031040426.772604-1-pierrick.bouvier@linaro.org> References: <20241031040426.772604-1-pierrick.bouvier@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::1030; envelope-from=pierrick.bouvier@linaro.org; helo=mail-pj1-x1030.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham 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+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org Signed-off-by: Pierrick Bouvier Reviewed-by: Philippe Mathieu-Daudé --- include/qemu/qemu-plugin.h | 1 + 1 file changed, 1 insertion(+) diff --git a/include/qemu/qemu-plugin.h b/include/qemu/qemu-plugin.h index 622c9a02327..0fba36ae028 100644 --- a/include/qemu/qemu-plugin.h +++ b/include/qemu/qemu-plugin.h @@ -803,6 +803,7 @@ void qemu_plugin_register_atexit_cb(qemu_plugin_id_t id, qemu_plugin_udata_cb_t cb, void *userdata); /* returns how many vcpus were started at this point */ +QEMU_PLUGIN_API int qemu_plugin_num_vcpus(void); /** From patchwork Thu Oct 31 04:04:24 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Pierrick Bouvier X-Patchwork-Id: 839852 Delivered-To: patch@linaro.org Received: by 2002:adf:a38c:0:b0:37d:45d0:187 with SMTP id l12csp79736wrb; Wed, 30 Oct 2024 21:07:25 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCU+dv85ZSY0IxuUzLaP+uNUTO4jfFp8lNrQSyJJsUm4scIxEt/iUSdbHq+4WDjhiimUaEpyXg==@linaro.org X-Google-Smtp-Source: AGHT+IHfbW3J+XNRxIbsVYqspYoMt7LlE4e1vZCvgQaFIRvoBzYt+P79mctsfsNGFekIOcziIEaY X-Received: by 2002:a05:6214:4b11:b0:6cb:eaba:ed5a with SMTP id 6a1803df08f44-6d1856fb306mr204785856d6.29.1730347644805; Wed, 30 Oct 2024 21:07:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1730347644; cv=none; d=google.com; s=arc-20240605; b=Hmcdgt7giWOjEj0ZM2+dfkPqX2jrfZ6AxbfpUdTkqelr+h2O2ofdtRz7Y88GM44/RU 7MW+Y2z4hloCFbvdX49qeNzL3eo0xtWyJaXwfyVG6w7nqbK+wdL+io9L7BRZf3R3qbwj zgYr4jqby7VW50FaESzns9XxaqqGfxYZxGCpvXFtlKz/chIhn/+GCj3jwuNYgpBEA7mb bma9xlf2jg0sbT4LhD3Q+Tlu8NXMH8rWQI229O0Na3BQ9EpljPwTTEy6mV5ElIqdREDI ebAq+axsT/EJwhKpm7F7H1WbT7KomLW7v6Dp56mahVfbwDcqNmz8yW/wOFvlCtzlblI/ wEhg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=2sPdHdQJ35Fr/SOKKnyBguzQdXGmWsCiWtlEfDPVHMQ=; fh=qCkgi8uX0wPVo2PQZm7xsjDtLlhOh+0Zq/b6I6Z+gew=; b=Scprt0Wg7gTStUj7MGibCCVGTuRo39dwO7zY1D+LKQfojwYX/zkgeo8bsjemjRX3TD kpYcjvGrTUD0dBnGQrj53VkFarpbGyb6W1XxmNp1jfe3UUYgZNnuFOV4hUZgqaCgJFLI F23etwuDwD5mEOA0d6Kzi6o1+bJfruzNYrDefPoqRPZSyXgPuubrnAXrkeHl/4MGU+Oh ZksmsJItEpFcDa+oAw6pAK/AFgZao2XRws3ZO5LnaIr07BbmukzSbvGlcoctEOvRKXcb krvBLS8u3l8T0IUWuG64m9nvpaH/nKRuknmqAcLrNZ8t5e6Z9MNPUEJuB0zNsK/SlA6B aw9Q==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=eqhjkCZ5; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id 6a1803df08f44-6d3541c6d4asi8716046d6.582.2024.10.30.21.07.24 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 30 Oct 2024 21:07:24 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=eqhjkCZ5; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1t6MQy-0003sP-OX; Thu, 31 Oct 2024 00:05:20 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1t6MQp-0003kW-43 for qemu-devel@nongnu.org; Thu, 31 Oct 2024 00:05:11 -0400 Received: from mail-pj1-x1029.google.com ([2607:f8b0:4864:20::1029]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1t6MQn-00053e-5A for qemu-devel@nongnu.org; Thu, 31 Oct 2024 00:05:10 -0400 Received: by mail-pj1-x1029.google.com with SMTP id 98e67ed59e1d1-2e91403950dso392295a91.3 for ; Wed, 30 Oct 2024 21:05:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1730347507; x=1730952307; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=2sPdHdQJ35Fr/SOKKnyBguzQdXGmWsCiWtlEfDPVHMQ=; b=eqhjkCZ5x0rnw1R4BkY/zmAK2bN604e2aRg5MdiXurbRxcr/V0iKEsj56O8h+M+5Gb NcqiWa4m6fvfpcYDQG056R1Y1sMt/LPyw6z8TzXXbgsSxIhhA8LHEJjXdZ7WMtxsrkZu P1vkV9LuMwLrX0GA2AHVzUonzjJjFhlDx+a74PjTnJYcXG0hE/R7zsqiUmjTVNksfAIt +iuiCU5Bjmq0Ue7Rit8xVCatW0/IXsQAifXfxNQyuRc+GbKEydBvPL6mUOmLOX04x9d2 q0NiHHtSDexLuJHKILvCeh1rhdf9EZZPGW+yDHT/dwpZt/0hWxsY4QdRTQUIbGtuseh9 gTpg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1730347507; x=1730952307; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=2sPdHdQJ35Fr/SOKKnyBguzQdXGmWsCiWtlEfDPVHMQ=; b=vLvZqAxXbgGW0kZG55O9bElB2tFUc4WpC85XOR0Q5lH8I8+agJ3MDnXN6Bda7czmSF 8ik3xlGkpCVsDcxFwF6WP9BfiyX3f7ny2tB/YH9ZkoPRvrMfnbNPLzeNhSic4fVeiehZ oIQjx9Syk3CEymSwSJXNBef1nRIPhfo9xpWHpV6+c4/tmq+7AksVOWqJZ0M6z413Ks3g VKz9WV20dYtaof9YfyRmRxCafriCNGtrK+kA+vZ0kIwB6oLOlhF9dcCDd17r0NwANLqj IpEZqnU1tGHIy9vol7Vp55VJx7fUygxiJ8Ng6KH2Q8LipGsMwHZpylt5scxHqY3gW4Er d/8g== X-Gm-Message-State: AOJu0YxhvEsAgkJNPkTQzCrYlMG2wiqWUmR2XiXrhcgA6evRGFNpVtZ/ PWG1EV3Czu6Qs8Av+pONai4krkuZnFkawYhMPf/+dcpG4Dq6iqef94m7Rd4ONjHI/9dQg4DLG62 A9+jozQ== X-Received: by 2002:a17:90a:d481:b0:2e0:d957:1b9d with SMTP id 98e67ed59e1d1-2e8f1071c8dmr21944997a91.13.1730347507133; Wed, 30 Oct 2024 21:05:07 -0700 (PDT) Received: from linaro.. (216-180-64-156.dyn.novuscom.net. [216.180.64.156]) by smtp.gmail.com with ESMTPSA id 98e67ed59e1d1-2e93db3a023sm428438a91.49.2024.10.30.21.05.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 30 Oct 2024 21:05:06 -0700 (PDT) From: Pierrick Bouvier To: qemu-devel@nongnu.org Cc: Cleber Rosa , John Snow , Michael Roth , Alexandre Iooss , Konstantin Kostiuk , Stefano Garzarella , Thomas Huth , =?utf-8?q?Daniel_P=2E_Berrang=C3=A9?= , Paolo Bonzini , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , =?utf-8?q?Marc?= =?utf-8?q?-Andr=C3=A9_Lureau?= , =?utf-8?q?Ale?= =?utf-8?q?x_Benn=C3=A9e?= , "Michael S. Tsirkin" , Mahmoud Mandour , Pierrick Bouvier Subject: [PATCH 10/12] plugins: detect qemu plugin API symbols from header Date: Wed, 30 Oct 2024 21:04:24 -0700 Message-Id: <20241031040426.772604-11-pierrick.bouvier@linaro.org> X-Mailer: git-send-email 2.39.5 In-Reply-To: <20241031040426.772604-1-pierrick.bouvier@linaro.org> References: <20241031040426.772604-1-pierrick.bouvier@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::1029; envelope-from=pierrick.bouvier@linaro.org; helo=mail-pj1-x1029.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham 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+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org Instead of using a static file (error prone and hard to keep in sync), we generate it using a script. Note: if a symbol is not exported, we'll now notice it when linking for Windows/MacOS platforms. Signed-off-by: Pierrick Bouvier --- MAINTAINERS | 1 + plugins/meson.build | 12 ++++++--- scripts/qemu-plugin-symbols.py | 45 ++++++++++++++++++++++++++++++++++ 3 files changed, 55 insertions(+), 3 deletions(-) create mode 100755 scripts/qemu-plugin-symbols.py diff --git a/MAINTAINERS b/MAINTAINERS index f48d9142b8a..d34b6606e95 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -3719,6 +3719,7 @@ F: plugins/ F: tests/tcg/plugins/ F: tests/avocado/tcg_plugins.py F: contrib/plugins/ +F: scripts/qemu-plugin-symbols.py AArch64 TCG target M: Richard Henderson diff --git a/plugins/meson.build b/plugins/meson.build index 51297582f93..d60be2a4d6d 100644 --- a/plugins/meson.build +++ b/plugins/meson.build @@ -2,11 +2,17 @@ if not get_option('plugins') subdir_done() endif +qemu_plugin_symbols = configure_file( + input: files('../include/qemu/qemu-plugin.h'), + output: 'qemu-plugin.symbols', + capture: true, + command: [files('../scripts/qemu-plugin-symbols.py'), '@INPUT@']) + # Modules need more symbols than just those in plugins/qemu-plugins.symbols if not enable_modules if host_os == 'darwin' configure_file( - input: files('qemu-plugins.symbols'), + input: qemu_plugin_symbols, output: 'qemu-plugins-ld64.symbols', capture: true, command: ['sed', '-ne', 's/^[[:space:]]*\\(qemu_.*\\);/_\\1/p', '@INPUT@']) @@ -15,7 +21,7 @@ if not enable_modules # LLVM/lld does not support exporting specific symbols. However, it works # out of the box with dllexport/dllimport attribute we set in the code. else - emulator_link_args += ['-Xlinker', '--dynamic-list=' + (meson.project_source_root() / 'plugins/qemu-plugins.symbols')] + emulator_link_args += ['-Xlinker', '--dynamic-list=' + qemu_plugin_symbols.full_path()] endif endif @@ -24,7 +30,7 @@ if host_os == 'windows' # First, create a .def file listing all the symbols a plugin should expect to have # available in qemu win32_plugin_def = configure_file( - input: files('qemu-plugins.symbols'), + input: qemu_plugin_symbols, output: 'qemu_plugin_api.def', capture: true, command: ['sed', '-e', '0,/^/s//EXPORTS/; s/[{};]//g', '@INPUT@']) diff --git a/scripts/qemu-plugin-symbols.py b/scripts/qemu-plugin-symbols.py new file mode 100755 index 00000000000..e285ebb8f9e --- /dev/null +++ b/scripts/qemu-plugin-symbols.py @@ -0,0 +1,45 @@ +#!/usr/bin/env python3 +# -*- coding: utf-8 -*- +# +# Extract QEMU Plugin API symbols from a header file +# +# Copyright 2024 Linaro Ltd +# +# Author: Pierrick Bouvier +# +# This work is licensed under the terms of the GNU GPL, version 2 or later. +# See the COPYING file in the top-level directory. +# +# SPDX-License-Identifier: GPL-2.0-or-later + +import argparse +import re + +def extract_symbols(plugin_header): + with open(plugin_header) as file: + content = file.read() + # Remove QEMU_PLUGIN_API macro definition. + content = content.replace('#define QEMU_PLUGIN_API', '') + expected = content.count('QEMU_PLUGIN_API') + # Find last word between QEMU_PLUGIN_API and (, matching on several lines. + # We use *? non-greedy quantifier. + syms = re.findall(r'QEMU_PLUGIN_API.*?(\w+)\s*\(', content, re.DOTALL) + syms.sort() + # Ensure we found as many symbols as API markers. + assert len(syms) == expected + return syms + +def main() -> None: + parser = argparse.ArgumentParser(description='Extract QEMU plugin symbols') + parser.add_argument('plugin_header', help='Path to QEMU plugin header.') + args = parser.parse_args() + + syms = extract_symbols(args.plugin_header) + + print('{') + for s in syms: + print(" {};".format(s)) + print('};') + +if __name__ == '__main__': + main() From patchwork Thu Oct 31 04:04:25 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Pierrick Bouvier X-Patchwork-Id: 839858 Delivered-To: patch@linaro.org Received: by 2002:adf:a38c:0:b0:37d:45d0:187 with SMTP id l12csp80480wrb; Wed, 30 Oct 2024 21:10:06 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCVY8bEVBPTevuy6vgnmwd97/vhBHWnJMNRkXC5q797D8YpklBP29YCl2xG4q8Q/MJRodM/CVQ==@linaro.org X-Google-Smtp-Source: AGHT+IG5N5LfKqtAIvbNkYeA9nx8LsiQb6CYSXfMzICWvvtdnV5v3+YX6nF8tqlLgqJGkBWwcifa X-Received: by 2002:ac8:7e90:0:b0:461:22f1:dd1a with SMTP id d75a77b69052e-4613c1b4d48mr241711081cf.56.1730347806768; Wed, 30 Oct 2024 21:10:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1730347806; cv=none; d=google.com; s=arc-20240605; b=E46NOQfRfW8D8csWXSiFwVWd+7v+sm6+uN9MS+4r5tMohUmiDdJPY+W8wf7vBkenf4 7wTEfHwf86q+useF/5+ahxRPdoW9Jv4sSNtMxIst0yrrdIxZeb94fTwhKE8AM5bEyHV4 FYgCrLlyz0e9GPeC7csczaNN2s/+VGX6LybdCatFYWZhTk+aoTLsnfDycNBuMfYaUpKj rv0N0flOSxEApfNL+kSmZQxlH5D600et68iWZ7GLmJzahrTSyspqWbyEYdd4zKZoI7Vl jQz+Y0DRI1wKLroxxJW1/T6Q1LjKiS7NkNZWe8g9f1PecLMOWjH/marUJlUEoNYcVmN+ c3hQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=R6PRNouRIX8nn07oym8VUYNLwY1A8W1UJP1nr46hRjQ=; fh=qCkgi8uX0wPVo2PQZm7xsjDtLlhOh+0Zq/b6I6Z+gew=; b=Hv/l008FMudMdKjWrrgsAampe8HFbCJ8uspgyw/ak8g8MCTTvWysjwhh5Uq6MTwdlj sUHfQk6e4qIkmcu+heBZ6oGyFxPOEcGMKnOWxfqH5JJVQLFfyQM1/yhCTzk+OSZM11Fp DnOp6d6+CGdBJJm5XjV7BsOWWHm+FES0fC48EbzxA6yU5L3dTZbggGloiFrlXIQUIDaC 6qFGSV1X5INY85ehVkxa7efXNoHaWEeegH1KluTX+TXE4yOgqWvIKrlAf2mfEw3TujcE LqaVxU/KBVpORAiTXgp/iWhI6fmT24XfgYSdrWtMAOxpbAbvSnWzN5LFSsmngOSrME2v dPZA==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=AMpCfDAk; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id d75a77b69052e-462ad0b194csi8485841cf.103.2024.10.30.21.10.06 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 30 Oct 2024 21:10:06 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=AMpCfDAk; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1t6MQv-0003qy-VN; Thu, 31 Oct 2024 00:05:17 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1t6MQp-0003lO-O5 for qemu-devel@nongnu.org; Thu, 31 Oct 2024 00:05:12 -0400 Received: from mail-pj1-x102f.google.com ([2607:f8b0:4864:20::102f]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1t6MQn-00053v-Oy for qemu-devel@nongnu.org; Thu, 31 Oct 2024 00:05:11 -0400 Received: by mail-pj1-x102f.google.com with SMTP id 98e67ed59e1d1-2e2b549799eso388370a91.3 for ; Wed, 30 Oct 2024 21:05:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1730347508; x=1730952308; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=R6PRNouRIX8nn07oym8VUYNLwY1A8W1UJP1nr46hRjQ=; b=AMpCfDAkTEj6oJvuJxwzCViBuUmhDOC63RdXnyVNx/AW1Z2oUH8jJnwvYWyErbKbsp 5700OyiYx8D2UTLbA2HORLl84eIIrkAFvk7dM4BMITfXEGAIeSQAp5Q4guatFvlDCzBV 4V3ywzw0vuET1vibMVvcwmTssI3JjBb5RXXiQOlg4uTbARHYI850fl6EaQu4mvnUnAE4 jteVSWA74D+leYakZcYV6d7q7mxlLYyiioLgTyxycsx6ZW1gsV6xujwR1ZHImk6NIUXi wYffuAcBkWqRY7mU+OcBYpIzfCSrLp48hhdsz1q/CnYEBc/l3RVSv+ZQO1SeSuf7Hji4 evPg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1730347508; x=1730952308; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=R6PRNouRIX8nn07oym8VUYNLwY1A8W1UJP1nr46hRjQ=; b=DZ+uEAVBAFUJqv5XudobKxkPmpHk15QGOtaf82Iy4TnxpaghRontVrYs+deuO7RkJC 0AqaDzPd7hal3rfdmhiBmHCMIScrXCV7d5ssUdQkr//QBcA4+hQip5KLkNWE39C0eJLv AnE/jqCJQXVWXyXddYznfFlfo0I9QmX/2v3XR3sZiiOFXgUm+By46JyQG+68qYOespqc eP8/KAyn60gGqXnalvOUVY0NEK4eJKrHYXP8NvIFWF9C31Ew9SMyNmocbieVeVAat9qs gYrQqeSIoPo3BwbnGPxzctAkk0sVV8U47XciSRMQkJ8UCLt9/fBaV5E+AupUA9OBTssi T8DA== X-Gm-Message-State: AOJu0Yy0EHanhX99ZSodPU4WcDoC6bGR8+hJiX5Yrip/SxEMn+8cAnZ0 sUxDLpSakPk8ISQnmWDfT5lMVEmqKmJIN/QVlf32JTgleE8q2fhB39jOfQxzDsYyrSeqouZTNo4 ZXFWBrg== X-Received: by 2002:a17:90b:4f81:b0:2e2:cf63:224c with SMTP id 98e67ed59e1d1-2e8f11d55b4mr17651623a91.35.1730347508125; Wed, 30 Oct 2024 21:05:08 -0700 (PDT) Received: from linaro.. (216-180-64-156.dyn.novuscom.net. [216.180.64.156]) by smtp.gmail.com with ESMTPSA id 98e67ed59e1d1-2e93db3a023sm428438a91.49.2024.10.30.21.05.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 30 Oct 2024 21:05:07 -0700 (PDT) From: Pierrick Bouvier To: qemu-devel@nongnu.org Cc: Cleber Rosa , John Snow , Michael Roth , Alexandre Iooss , Konstantin Kostiuk , Stefano Garzarella , Thomas Huth , =?utf-8?q?Daniel_P=2E_Berrang=C3=A9?= , Paolo Bonzini , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , =?utf-8?q?Marc?= =?utf-8?q?-Andr=C3=A9_Lureau?= , =?utf-8?q?Ale?= =?utf-8?q?x_Benn=C3=A9e?= , "Michael S. Tsirkin" , Mahmoud Mandour , Pierrick Bouvier Subject: [PATCH 11/12] plugins: eradicate qemu-plugins.symbols static file Date: Wed, 30 Oct 2024 21:04:25 -0700 Message-Id: <20241031040426.772604-12-pierrick.bouvier@linaro.org> X-Mailer: git-send-email 2.39.5 In-Reply-To: <20241031040426.772604-1-pierrick.bouvier@linaro.org> References: <20241031040426.772604-1-pierrick.bouvier@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::102f; envelope-from=pierrick.bouvier@linaro.org; helo=mail-pj1-x102f.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham 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+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org Signed-off-by: Pierrick Bouvier --- plugins/qemu-plugins.symbols | 59 ------------------------------------ 1 file changed, 59 deletions(-) delete mode 100644 plugins/qemu-plugins.symbols diff --git a/plugins/qemu-plugins.symbols b/plugins/qemu-plugins.symbols deleted file mode 100644 index 032661f9ea7..00000000000 --- a/plugins/qemu-plugins.symbols +++ /dev/null @@ -1,59 +0,0 @@ -{ - qemu_plugin_bool_parse; - qemu_plugin_end_code; - qemu_plugin_entry_code; - qemu_plugin_get_hwaddr; - qemu_plugin_get_registers; - qemu_plugin_hwaddr_device_name; - qemu_plugin_hwaddr_is_io; - qemu_plugin_hwaddr_phys_addr; - qemu_plugin_insn_data; - qemu_plugin_insn_disas; - qemu_plugin_insn_haddr; - qemu_plugin_insn_size; - qemu_plugin_insn_symbol; - qemu_plugin_insn_vaddr; - qemu_plugin_mem_get_value; - qemu_plugin_mem_is_big_endian; - qemu_plugin_mem_is_sign_extended; - qemu_plugin_mem_is_store; - qemu_plugin_mem_size_shift; - qemu_plugin_num_vcpus; - qemu_plugin_outs; - qemu_plugin_path_to_binary; - qemu_plugin_read_memory_vaddr; - qemu_plugin_read_register; - qemu_plugin_register_atexit_cb; - qemu_plugin_register_flush_cb; - qemu_plugin_register_vcpu_exit_cb; - qemu_plugin_register_vcpu_idle_cb; - qemu_plugin_register_vcpu_init_cb; - qemu_plugin_register_vcpu_insn_exec_cb; - qemu_plugin_register_vcpu_insn_exec_cond_cb; - qemu_plugin_register_vcpu_insn_exec_inline_per_vcpu; - qemu_plugin_register_vcpu_mem_cb; - qemu_plugin_register_vcpu_mem_inline_per_vcpu; - qemu_plugin_register_vcpu_resume_cb; - qemu_plugin_register_vcpu_syscall_cb; - qemu_plugin_register_vcpu_syscall_ret_cb; - qemu_plugin_register_vcpu_tb_exec_cb; - qemu_plugin_register_vcpu_tb_exec_cond_cb; - qemu_plugin_register_vcpu_tb_exec_inline_per_vcpu; - qemu_plugin_register_vcpu_tb_trans_cb; - qemu_plugin_request_time_control; - qemu_plugin_reset; - qemu_plugin_scoreboard_free; - qemu_plugin_scoreboard_find; - qemu_plugin_scoreboard_new; - qemu_plugin_start_code; - qemu_plugin_tb_get_insn; - qemu_plugin_tb_n_insns; - qemu_plugin_tb_vaddr; - qemu_plugin_u64_add; - qemu_plugin_u64_get; - qemu_plugin_u64_set; - qemu_plugin_u64_sum; - qemu_plugin_uninstall; - qemu_plugin_update_ns; - qemu_plugin_vcpu_for_each; -}; From patchwork Thu Oct 31 04:04:26 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Pierrick Bouvier X-Patchwork-Id: 839851 Delivered-To: patch@linaro.org Received: by 2002:adf:a38c:0:b0:37d:45d0:187 with SMTP id l12csp79719wrb; Wed, 30 Oct 2024 21:07:22 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCVRqZdjpx4SxwnMTHot9OeE+04QDvyVehefFa7KZUhlaQpX+Q4RXvzP2gI/iKgb9VkWoBIGVA==@linaro.org X-Google-Smtp-Source: AGHT+IH3JZlu5Wg7wtmUvitGPyoV/r0TXS3i5qRcEsnGZYOH7eL122lNKUVgQae+R41vg3KX7Snh X-Received: by 2002:ac8:7d06:0:b0:461:259a:3df7 with SMTP id d75a77b69052e-462ad338524mr19098581cf.27.1730347642077; Wed, 30 Oct 2024 21:07:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1730347642; cv=none; d=google.com; s=arc-20240605; b=E5YDU1iDwjMhbJBfzEtohJZP7rWgwoOvmuwiSil3pWYOpka0HzYDamVk2IejhTqGTV Ni3Euoy9MEJCfxnzLTercgJwCgP2MXO1WI1cBLefSwd/NdZgi/RisEAW9NV8I+CrMsyv A6AISChA50saztKl8o8IQvjbWWjJrw8upQ+9V7YOGic+z03Z4tvcBwM44aFY8G5jSmb2 f2QDxdCEifdEVBMNpBkbLwxYybQ9PmIypTulfbqtkoiGErBx3l6sNuIQzX959y6Jk8eP QvY8kJ5irCRuWhUnUKX0hDWTJ9M9FA0CwBoENFWTemlhY0xAWFJ4kJWhiHw+jzOQqGGI 17/w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=GWEffwDMJmqQqCBLwXmQs/G5t8KhBeTNj8bmbTesV98=; fh=qCkgi8uX0wPVo2PQZm7xsjDtLlhOh+0Zq/b6I6Z+gew=; b=V1bxOuWYaOBvwSnAavf94LjX1r0an96BSWAkPk1EM/af9nggNunysQeGHhEKVAZ+Xf D7AaF7Hpz/98nmf1x3naIJXSLrZCSY/QKbucvyVZN8n4vfR9Tc62XO2QEUcAOy6X4eHi aHOHauQ7JpvLPAawewJDYYC6QjQnhQAS2Zt5de+LfcItdBVIgR9FL2eJ6gm3jVyyKzMw KIqX6RY8VgbDbQXlt/3BVXMDce9gEMF4iHW8mP/PDgBNFZmFdexEGi2WWNE4BydbVRgF myetqBpt4s4M+L6VhOprkHyFuIItfnOFebMmAeF1xAxlFmEGBpUkWgOFeFLLmvksoyGX m+NA==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=MzooNerj; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id d75a77b69052e-462ad0b2279si8399491cf.8.2024.10.30.21.07.21 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 30 Oct 2024 21:07:22 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=MzooNerj; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1t6MR1-0003tp-13; Thu, 31 Oct 2024 00:05:23 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1t6MQq-0003mk-Ue for qemu-devel@nongnu.org; Thu, 31 Oct 2024 00:05:13 -0400 Received: from mail-pj1-x102a.google.com ([2607:f8b0:4864:20::102a]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1t6MQo-00054S-Rk for qemu-devel@nongnu.org; Thu, 31 Oct 2024 00:05:12 -0400 Received: by mail-pj1-x102a.google.com with SMTP id 98e67ed59e1d1-2e2e2d09decso1245881a91.1 for ; Wed, 30 Oct 2024 21:05:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1730347509; x=1730952309; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=GWEffwDMJmqQqCBLwXmQs/G5t8KhBeTNj8bmbTesV98=; b=MzooNerjm+E/rAukrg6fEbUq1DSZU+9dh/YsTMo2A22dnDCg/WtZ+mvAfoUB2m6v4k olz9MzGTlR6QxBGez5mMinalIjowCaWmj36INhSxBPS2VBuQPPAAsiB+0NE7rIo8JjCd h2ACLzzLW7EWRkbNhN0fF/D0Zox/tIOvAlwpXvW6O75Bip0KbmZMg5VMPhl2Vruhen3M ItrTdF+qDvfSkzWNbw+j31TMpfvtoJk7aiJIzEhlT1Vzdu+C9HGDDgzSWoD6dJaBoBed YBmI48nKnr7+KBkohRQVUpovWIcpkroVMNeeeEnVwc1NEhYj8xbM8hMkAmooMKRHQVNt DUgA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1730347509; x=1730952309; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=GWEffwDMJmqQqCBLwXmQs/G5t8KhBeTNj8bmbTesV98=; b=gGfTKRSlxtBDNd/iUNuiM4fNS3T8AwdLfxBKmObce59UBPOmZxcForXRw6hpxXsfok 4MGOyXFhpBvOm2/VdPLt26gA0hZy/CMLXh5ozNSgPy5dDPfPeOAVDOL728UNUmGdXM4/ +SPKcVMkSfm/mU+31QYlnvy9XF6l5yzoVjrxeSncOvtYivPzeOSg9OgV5f6Ow7hS18OW rADB0IowN7QI6rTbf6Ud1+Lisdg+bZ0azAa3h4Ymyo4MWHqdFyjBmQPekLai6djbxSiH wiDxLlikGCgUzo/KBWx8ZLjy4xWTaW83y6khK4zfM838npsiS5QgTEx8LKG5EOX6HqOy KeSw== X-Gm-Message-State: AOJu0YzVi9+PORBv8d+Dmn6wEN5g97SpR3A+M2oLkTUrhnWHZfSO4hjT ijLnfPXieW8p0FL3VWNfL2wMUVFWt5NB96Mt/rXIrqnyiGXihNZFZFgTEtc5RgdWzrZGokiXNwZ I9e0Wxg== X-Received: by 2002:a17:90b:510b:b0:2e2:bb32:73e7 with SMTP id 98e67ed59e1d1-2e93e0df6d2mr1575949a91.15.1730347509245; Wed, 30 Oct 2024 21:05:09 -0700 (PDT) Received: from linaro.. (216-180-64-156.dyn.novuscom.net. [216.180.64.156]) by smtp.gmail.com with ESMTPSA id 98e67ed59e1d1-2e93db3a023sm428438a91.49.2024.10.30.21.05.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 30 Oct 2024 21:05:08 -0700 (PDT) From: Pierrick Bouvier To: qemu-devel@nongnu.org Cc: Cleber Rosa , John Snow , Michael Roth , Alexandre Iooss , Konstantin Kostiuk , Stefano Garzarella , Thomas Huth , =?utf-8?q?Daniel_P=2E_Berrang=C3=A9?= , Paolo Bonzini , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , =?utf-8?q?Marc?= =?utf-8?q?-Andr=C3=A9_Lureau?= , =?utf-8?q?Ale?= =?utf-8?q?x_Benn=C3=A9e?= , "Michael S. Tsirkin" , Mahmoud Mandour , Pierrick Bouvier Subject: [PATCH 12/12] docs: add information on how to setup build environments Date: Wed, 30 Oct 2024 21:04:26 -0700 Message-Id: <20241031040426.772604-13-pierrick.bouvier@linaro.org> X-Mailer: git-send-email 2.39.5 In-Reply-To: <20241031040426.772604-1-pierrick.bouvier@linaro.org> References: <20241031040426.772604-1-pierrick.bouvier@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::102a; envelope-from=pierrick.bouvier@linaro.org; helo=mail-pj1-x102a.google.com X-Spam_score_int: -19 X-Spam_score: -2.0 X-Spam_bar: -- X-Spam_report: (-2.0 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, URIBL_SBL_A=0.1 autolearn=ham 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+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org MacOS and Linux are straightforward, but Windows needs a bit more details. Signed-off-by: Pierrick Bouvier --- docs/about/build-platforms.rst | 4 +- docs/devel/build-system.rst | 100 +++++++++++++++++++++++++++++++++ 2 files changed, 103 insertions(+), 1 deletion(-) diff --git a/docs/about/build-platforms.rst b/docs/about/build-platforms.rst index 8fd7da140a3..fd1a8cabe36 100644 --- a/docs/about/build-platforms.rst +++ b/docs/about/build-platforms.rst @@ -29,6 +29,9 @@ The `Repology`_ site is a useful resource to identify currently shipped versions of software in various operating systems, though it does not cover all distros listed below. +You can find how to install build dependencies for different systems on the +:ref:`setup-build-env` page. + Supported host architectures ---------------------------- @@ -118,7 +121,6 @@ Optional build dependencies cross compilation using ``docker`` or ``podman``, or to use pre-built binaries distributed with QEMU. - Windows ------- diff --git a/docs/devel/build-system.rst b/docs/devel/build-system.rst index d42045a2325..fa5601fed82 100644 --- a/docs/devel/build-system.rst +++ b/docs/devel/build-system.rst @@ -595,3 +595,103 @@ Built by Makefile: meson.build. The rules are produced from Meson's JSON description of tests (obtained with "meson introspect --tests") through the script scripts/mtest2make.py. + +.. _setup-build-env: + +Setup build environment +======================= + +Linux +----- + +Fedora +++++++ + +:: + + sudo dnf update && sudo dnf builddep qemu + +Debian/Ubuntu ++++++++++++++ + +You first need to enable `Sources List `_. +Then, use apt to install dependencies: + +:: + + sudo apt update && sudo apt build-dep qemu + +MacOS +----- + +You first need to install `Homebrew `_. Then, use it to +install dependencies: + +:: + + brew update && brew install $(brew deps --include-build qemu) + +Windows +------- + +You first need to install `MSYS2 `_. +MSYS2 offers `different environments `_. +x86_64 environments are based on GCC, while aarch64 is based on Clang. + +We recommend to use UCRT64 for windows-x86_64 and CLANGARM64 for windows-aarch64 +(only available on windows-aarch64 hosts). + +Then, you can open a windows shell, and enter msys2 env using: + +:: + + c:/msys64/msys2_shell.cmd -defterm -here -no-start -ucrt64 + # Replace -ucrt64 by -clangarm64 or -mingw64 for other environments. + +MSYS2 package manager does not offer a built-in way to install build +dependencies. You can start with this list of packages using pacman: + +Note: Dependencies need to be installed again if you use a different MSYS2 +environment. + +:: + + # update MSYS2 itself, you need to reopen your shell at the end. + pacman -Syu + pacman -S \ + base-devel binutils bison diffutils flex git grep make sed \ + ${MINGW_PACKAGE_PREFIX}-toolchain \ + ${MINGW_PACKAGE_PREFIX}-glib2 \ + ${MINGW_PACKAGE_PREFIX}-gtk3 \ + ${MINGW_PACKAGE_PREFIX}-libnfs \ + ${MINGW_PACKAGE_PREFIX}-libssh \ + ${MINGW_PACKAGE_PREFIX}-ninja \ + ${MINGW_PACKAGE_PREFIX}-pixman \ + ${MINGW_PACKAGE_PREFIX}-pkgconf \ + ${MINGW_PACKAGE_PREFIX}-python \ + ${MINGW_PACKAGE_PREFIX}-SDL2 \ + ${MINGW_PACKAGE_PREFIX}-zstd + +If you want to install all dependencies, it's possible to use recipe used to +build QEMU in MSYS2 itself. + +:: + + pacman -S wget + wget https://raw.githubusercontent.com/msys2/MINGW-packages/refs/heads/master/mingw-w64-qemu/PKGBUILD + # Some packages may be missing for your environment, installation will still + # be done though. + makepkg -s PKGBUILD || true + +Build on windows-aarch64 +++++++++++++++++++++++++ + +When trying to cross compile meson for x86_64 using UCRT64 or MINGW64 env, +configure will run into an error because the cpu detected is not correct. + +Meson detects x86_64 processes emulated, so you need to manually set the cpu, +and force a cross compilation (with empty prefix). + +:: + + ./configure --cpu=x86_64 --cross-prefix=