From patchwork Tue Dec 17 22:42:56 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Pierrick Bouvier X-Patchwork-Id: 851465 Delivered-To: patch@linaro.org Received: by 2002:a5d:4888:0:b0:385:e875:8a9e with SMTP id g8csp616622wrq; Tue, 17 Dec 2024 14:44:29 -0800 (PST) X-Forwarded-Encrypted: i=2; AJvYcCVIcmK2rVKL4TrMJ0Uegs5iDkrmj9WZl6SO03rM+gqGQ1U1wOEElIRwr92DWQu6dCdeIrO0JQ==@linaro.org X-Google-Smtp-Source: AGHT+IGMvvTab/FA+kOrsGWnS7Fj9yn2gmLKklBu4lgze+qVHOHWJJ9GWML0CBm8cj1e+bq1fey0 X-Received: by 2002:ac8:5a95:0:b0:460:7b6e:9475 with SMTP id d75a77b69052e-46908db3e18mr10963071cf.10.1734475468984; Tue, 17 Dec 2024 14:44:28 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1734475468; cv=none; d=google.com; s=arc-20240605; b=IPHPif4BwhwCaujlBuPfI0fWCCzWewfmXaYbrROu/tenSd6g8NlWWP8kEP+Quh46JK FcZ9LZLyWjiKhzwtnhmi6UFzdvaUpyngwoXFHE2zhglKmMGrJ+7tjyDunyFHVG+AzciV KYY0dC1e+iSRA1W7auGFXgnf1cXeO5LJY+2YnW9l3NZaxVFsND/RVbumMrXnZwFZUDrk /r7Y9LtE40gqdNUSfJl2CsmgZTc+OCGPoG4fiksr2FuJb2RcPGlvUvx6GrOb+UmvtYbV k0rtsWTQ/2hY4QDbiOrngSv2PKU6Hp/P77rGDFfazi45muaO2lHpWeLs8sW+3BbneGQN wUxQ== 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=pMDwQlE3l0KKa7P5lbeW0nhoWgR5/Mui2HXPodnjcRo=; fh=e32mLanPjfs41dQwy8Wt4zFa68BQ2A3naWRPcWqt/Vw=; b=aL2Vv0C4g9ToYYuJQdixrSAmm/5i1YazqPXLD/psYubBS+yizEoRVkc63GM+qzdbrQ ct5RYGMercRuUxPsq/euvYInv7BrMxGxThPcQT/jRdy0QhQxvhGrvhLjIXIbqJFL9dRs 99Hp8K1NQ5dC9LW3+qgBHq4Doba/ouHfosn+1tefCvXWpIHqoQiJS7NMC644Wb/hBK0Q 0qhYfGsrexV7MY9G9JlHEBRJZF9P0Fd1I/9dlsjuxeNfRmUDbVKJdPy+1DVNZUsVb8fB GBdFjiQ5oNgwHunmDzbmlj3zSy+DaArrJRFJhKNQiPkTfr3MODl1kCfhAK8hCJ8/RSwW xtmA==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=EZaar5tK; 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-467b2ed03cesi104591321cf.420.2024.12.17.14.44.28 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 17 Dec 2024 14:44:28 -0800 (PST) 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=EZaar5tK; 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 1tNgHd-0004J5-S6; Tue, 17 Dec 2024 17:43:17 -0500 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 1tNgHc-0004Ij-Sv for qemu-devel@nongnu.org; Tue, 17 Dec 2024 17:43:16 -0500 Received: from mail-pf1-x434.google.com ([2607:f8b0:4864:20::434]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tNgHZ-00018j-39 for qemu-devel@nongnu.org; Tue, 17 Dec 2024 17:43:15 -0500 Received: by mail-pf1-x434.google.com with SMTP id d2e1a72fcca58-728f28744c5so5443533b3a.1 for ; Tue, 17 Dec 2024 14:43:12 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1734475391; x=1735080191; 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=pMDwQlE3l0KKa7P5lbeW0nhoWgR5/Mui2HXPodnjcRo=; b=EZaar5tKTrCAjHivfNNmdLuo7DHj2zJTPwLO3+tQ2/tsN0Dn7hX0AbVvN7YoEtuipj qzk3+eR4DJiXyE10e446UXMn15j42j7lXCs8PII+1qnW65EwxdLw9nzsuGDfQt8LjT5t ZeBLzUCer8fKiuoPZkrUjzl4ESra/1NlHCm8amURJFK6QVipTJMh6TfipxAW1FQsNmlz ydbkdVGXq8QqQAzrbuwn0/aB3vbWxBnL3q0T56/x/8hJcGEjerwN+GYBdj3AMo4txjs9 VGgpKTkNLJILWe6WyHjhR0TXu5vlOpAF0z812eaKjJB743dCNM/fGLrwhJYVTarfEey8 cTRA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1734475391; x=1735080191; 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=pMDwQlE3l0KKa7P5lbeW0nhoWgR5/Mui2HXPodnjcRo=; b=nbWHA2naut8nT4P3b3HPGCenPM0ScApzQAYqs3fcVn3hyDJu1lVjWXT8JffoEvivyV Cq5vKxvNs2nFJ06/UUZWh0vsuresIMXX0lFGs1UgwligcStxcbVP7uCzYVEb0RhQb3Iv EsSzLNhjyQddAFjF0OlarzYO6juuVIUxd+La3NfPjDPpJHMCiFXkoi1+9uZcx0gJVAXY L6RRE01kGFlR5yEjKTPcowr7xL8BKurZDednRhznM7I2kPgswSJBxU7EU5DBYG/aPoQI AnbwxZYi3P6JyOLhrNfHxj1L9cskDaZUpBNm92jZVepaRzitgMM/otd3FW2unDJG9WIS cwuA== X-Gm-Message-State: AOJu0YzxojLQRmcnBBz/Ncnc4/95RiuW3EFyBl5BE2ejdKeXL7mJscPD ilgsKzH/CxUGEiby0BIcYXT0+2WmIClM39VEwyJVw85owh16RXV7+WlJTNIxgXI0tMwuedMY634 cuco= X-Gm-Gg: ASbGncv9/sQH7l0wmcD944MWCqsS72FxHBMjxzTicCBbM71vsTJx6OfWVIzwDys0POh X4TYPtpw4EZecHps9BFFoqt46ZZQz7vVmfAAPWtj2Dcc7X1CbY6aBOhk68gTvBUblSx2GoDod+5 nMv4wMMo2JoBzeUGmkJRMBbrDVyEY9oH5PgNPSyi8arNli5iMhBVMZ5oGst8361O7I/izhXUWS0 RDF6Tr9DGDH9JkGrufq0wyI7xB2z8xaZnwPYObfJ4k8RK9NM3CH/g0o X-Received: by 2002:a05:6a20:6a1d:b0:1db:df34:a1d6 with SMTP id adf61e73a8af0-1e5b48a4612mr1126803637.42.1734475391556; Tue, 17 Dec 2024 14:43:11 -0800 (PST) Received: from pc.. ([38.39.164.180]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-72918ac53f3sm7463214b3a.27.2024.12.17.14.43.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 17 Dec 2024 14:43:11 -0800 (PST) From: Pierrick Bouvier To: qemu-devel@nongnu.org Cc: Pierrick Bouvier , =?utf-8?q?Alex_Benn?= =?utf-8?q?=C3=A9e?= , richard.henderson@linaro.org, philmd@linaro.org, Alexandre Iooss , Mahmoud Mandour , Thomas Huth , Paolo Bonzini Subject: [PATCH v3 01/11] tests/tcg/plugins/insn: remove unused callback parameter Date: Tue, 17 Dec 2024 14:42:56 -0800 Message-Id: <20241217224306.2900490-2-pierrick.bouvier@linaro.org> X-Mailer: git-send-email 2.39.5 In-Reply-To: <20241217224306.2900490-1-pierrick.bouvier@linaro.org> References: <20241217224306.2900490-1-pierrick.bouvier@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::434; envelope-from=pierrick.bouvier@linaro.org; helo=mail-pf1-x434.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 Reviewed-by: Alex BennĂ©e Reviewed-by: Richard Henderson Signed-off-by: Pierrick Bouvier --- tests/tcg/plugins/insn.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/tests/tcg/plugins/insn.c b/tests/tcg/plugins/insn.c index baf2d07205d..0c723cb9ed8 100644 --- a/tests/tcg/plugins/insn.c +++ b/tests/tcg/plugins/insn.c @@ -150,10 +150,8 @@ static void vcpu_tb_trans(qemu_plugin_id_t id, struct qemu_plugin_tb *tb) qemu_plugin_register_vcpu_insn_exec_inline_per_vcpu( insn, QEMU_PLUGIN_INLINE_ADD_U64, insn_count, 1); } else { - uint64_t vaddr = qemu_plugin_insn_vaddr(insn); qemu_plugin_register_vcpu_insn_exec_cb( - insn, vcpu_insn_exec_before, QEMU_PLUGIN_CB_NO_REGS, - GUINT_TO_POINTER(vaddr)); + insn, vcpu_insn_exec_before, QEMU_PLUGIN_CB_NO_REGS, NULL); } if (do_size) { From patchwork Tue Dec 17 22:42:57 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Pierrick Bouvier X-Patchwork-Id: 851468 Delivered-To: patch@linaro.org Received: by 2002:a5d:4888:0:b0:385:e875:8a9e with SMTP id g8csp616801wrq; Tue, 17 Dec 2024 14:45:00 -0800 (PST) X-Forwarded-Encrypted: i=2; AJvYcCXXfFnMOhNIBLHMgay4tdCxNx+9ytDaHzs2qCZUf+pJSLnpikVxa64CKmB9xM751tZb5cGZ4w==@linaro.org X-Google-Smtp-Source: AGHT+IGl1+uOh6ewXzNT5rG9ZS2eoG3BKIV0e89zz7Pr/Eu4GKjfjzHX6pzyPtd/dpGnIQiAo5YL X-Received: by 2002:ac8:5fc4:0:b0:466:9197:b4fb with SMTP id d75a77b69052e-46908ed0d02mr8887451cf.47.1734475500446; Tue, 17 Dec 2024 14:45:00 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1734475500; cv=none; d=google.com; s=arc-20240605; b=kPLGcl4WUeS04EoDw66Z96Gbpurfm+MFexUbnGcRebP5GdFMDbKIOVLGjBzJPDx6OZ YUmY2TXVsQY9inJlotM94+qqV6CxfU8O71DCohIqzPmuyzOoa+WCkQ3lkCHoscgyXAqo lLp/px6CPKsBKd39A7WrIXZ4CKfSqZOCeBAPoDly7K3YF/u6h3cdabOHK8U46AFntE11 Qf4hUK/8dlSu4TfIuW/sp2IHDdmuDDcgCeIzFpyk7qzJ/Zvcr6sL0P3nsOOMjHYweMvF RDm76x+uuBJntZ6tS2y6jateOgBUj+HqNJmVsyrN3M/Ia7nFvITHxqQtSdkWfrer4Dkg uKnA== 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=NOzYfBh0zmSLp+iKqt+C5cDNqScuCpesF/tusP6QFbo=; fh=e32mLanPjfs41dQwy8Wt4zFa68BQ2A3naWRPcWqt/Vw=; b=L4BqVCyYHXxreExB8aW+xva2vjrsWvErwcnl4FHcednV7OkRbdGHkqdwn30PueL7FR bw3fC7BrdffGotDAB+RRu8nXAizt51dfJ8SQvIsZSyTHoxFvA7ERl15m6USY2pC6Izhd qpwrN/J6lFYJIf5eGuw6rcOHNDHts8wbhl2GKcclMHIwQ3jC7mxT2Csm+2E3PBp4wluc KpNitOumZIsCb+mSQxMpdeEOXupmuRrfxDOGODi4FSqL1tbdBKdK6MDmnzF13VOus5tB 5/T79XDb1c7TKMU5owvMpdAswBcy53LPprFpIIV+atC6f5UgLsNes49S5HmdlyKcccjm zRNQ==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=rEWGNR36; 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-7b7048bf5aasi1064594685a.277.2024.12.17.14.45.00 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 17 Dec 2024 14:45:00 -0800 (PST) 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=rEWGNR36; 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 1tNgHj-0004LJ-18; Tue, 17 Dec 2024 17:43:23 -0500 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 1tNgHf-0004JG-8K for qemu-devel@nongnu.org; Tue, 17 Dec 2024 17:43:19 -0500 Received: from mail-pf1-x434.google.com ([2607:f8b0:4864:20::434]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tNgHa-00018u-De for qemu-devel@nongnu.org; Tue, 17 Dec 2024 17:43:19 -0500 Received: by mail-pf1-x434.google.com with SMTP id d2e1a72fcca58-725ef0397aeso5228161b3a.2 for ; Tue, 17 Dec 2024 14:43:13 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1734475392; x=1735080192; 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=NOzYfBh0zmSLp+iKqt+C5cDNqScuCpesF/tusP6QFbo=; b=rEWGNR369wdoc06ayRxkHSUnPdDE9NKxzf5Kivzx16yYZPMZSaStqaMJTKNMeVeZGZ jfDawKWGULon7JIXsAzEevh0LKshkStIbusreQ5ANzduQtp7LjBQlUlJ5+mPd+7sGkJV L/L1RGJfPiyj3FFWvDFePVTCyzNxKLfFV15XjTsJJqW/bkKNz1rmCG61zmvChtSmFgVn c/ZM32y3GyTB/08AAC2Z56GcQrQRHeQhhaeLXPNA5gMrApzQv1ZAGqjHelT8BwHLIEOg LSGOYWNrvzR4gW0eSw9P2etLExL8qa2X3keST39vey9GjEYbraRUC2aiPcgRSTF0N3uT UejQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1734475392; x=1735080192; 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=NOzYfBh0zmSLp+iKqt+C5cDNqScuCpesF/tusP6QFbo=; b=hp91nQqv+pP2Zx59YmmyvRZfyaCG5RL4rlmkugwQ2L0a81ZQFVg72OhSBG5npg9Fj4 jvRurS1OZjo4I5TKfGAOd6Unzwn+CHyzir8yQUKJe2aqH0drLmIEDGv0WZj56ZoxCnjg b+Dw9gqMLYQEda9P2FTeez7zwDfdAuOLemfHZVRixiIBGTUfsuit9kJZDwDlxhgquokq J6BLQTOcth2XpF4V/xbkd+rwjCVX3CUbGHDSvYh6ObiM0eRt5QwTu1b5/XxZtX78gzKK f+ob4rVJFHKUa74FIjzUiKV8KBaMkDIsYPO5C4YLQi1wXfn0Um4VBT0VSLa4a4wIQitu M8zg== X-Gm-Message-State: AOJu0YxTC/V/h2+UrxrieZqfnSCytU9jJOfqUe0Rky5vcKqs/wpPT6Rv pujUCQEfGogzI8er0GYOsSr2+9yBQX+CAB7C8mn/E7xrDQYF9bBjoUTgb9Dp477gUbus+n7lkx8 j/2M= X-Gm-Gg: ASbGncsvZbz2mnwS1jNYTRkFgiG8mKpDwqCCMtsasIWzqx7FoZ9be3pwpHUxymumsqw CK+y8NWMGxZSJhXGIEebnOd7pxvb2c8+3kHpmfCG/aHjLMdIRzGREQW7BqFSJ2nVUYVR1MUqxQp Bai/sB9+CPhUMvcw7Udtq7gm02fahZ6TqyzRz1Nmbdwxq8gVxPWxUY+Zc5K/+0yYws64b3gUkN2 fHxqkDH5s4g07GtleXonesZ6Z9WMSnl5yiQRE22Tf96IdLIppzaUF35 X-Received: by 2002:a05:6a00:21c6:b0:728:eb32:356c with SMTP id d2e1a72fcca58-72a8d2611f2mr991827b3a.11.1734475392496; Tue, 17 Dec 2024 14:43:12 -0800 (PST) Received: from pc.. ([38.39.164.180]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-72918ac53f3sm7463214b3a.27.2024.12.17.14.43.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 17 Dec 2024 14:43:12 -0800 (PST) From: Pierrick Bouvier To: qemu-devel@nongnu.org Cc: Pierrick Bouvier , =?utf-8?q?Alex_Benn?= =?utf-8?q?=C3=A9e?= , richard.henderson@linaro.org, philmd@linaro.org, Alexandre Iooss , Mahmoud Mandour , Thomas Huth , Paolo Bonzini Subject: [PATCH v3 02/11] contrib/plugins/howvec: ensure we don't regress if this plugin is extended Date: Tue, 17 Dec 2024 14:42:57 -0800 Message-Id: <20241217224306.2900490-3-pierrick.bouvier@linaro.org> X-Mailer: git-send-email 2.39.5 In-Reply-To: <20241217224306.2900490-1-pierrick.bouvier@linaro.org> References: <20241217224306.2900490-1-pierrick.bouvier@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::434; envelope-from=pierrick.bouvier@linaro.org; helo=mail-pf1-x434.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, T_SPF_TEMPERROR=0.01 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 Reviewed-by: Richard Henderson Signed-off-by: Pierrick Bouvier --- contrib/plugins/howvec.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/contrib/plugins/howvec.c b/contrib/plugins/howvec.c index 9be67f74534..2aa9029c3f0 100644 --- a/contrib/plugins/howvec.c +++ b/contrib/plugins/howvec.c @@ -253,6 +253,8 @@ static struct qemu_plugin_scoreboard *find_counter( int i; uint64_t *cnt = NULL; uint32_t opcode = 0; + /* if opcode is greater than 32 bits, we should refactor insn hash table. */ + G_STATIC_ASSERT(sizeof(opcode) == sizeof(uint32_t)); InsnClassExecCount *class = NULL; /* @@ -284,7 +286,7 @@ static struct qemu_plugin_scoreboard *find_counter( g_mutex_lock(&lock); icount = (InsnExecCount *) g_hash_table_lookup(insns, - GUINT_TO_POINTER(opcode)); + (gpointer)(intptr_t) opcode); if (!icount) { icount = g_new0(InsnExecCount, 1); @@ -295,8 +297,7 @@ static struct qemu_plugin_scoreboard *find_counter( qemu_plugin_scoreboard_new(sizeof(uint64_t)); icount->count = qemu_plugin_scoreboard_u64(score); - g_hash_table_insert(insns, GUINT_TO_POINTER(opcode), - (gpointer) icount); + g_hash_table_insert(insns, (gpointer)(intptr_t) opcode, icount); } g_mutex_unlock(&lock); From patchwork Tue Dec 17 22:42:58 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Pierrick Bouvier X-Patchwork-Id: 851460 Delivered-To: patch@linaro.org Received: by 2002:a5d:4888:0:b0:385:e875:8a9e with SMTP id g8csp616283wrq; Tue, 17 Dec 2024 14:43:32 -0800 (PST) X-Forwarded-Encrypted: i=2; AJvYcCWdhFV7f226Lcsd2g1WLYkB0hIdgh9X8dCSZujqAEWXdxnGMnOyT0h5gj6f5oHFAKrW+VYEhw==@linaro.org X-Google-Smtp-Source: AGHT+IEGQJeInByQY3CZTHhRpc9X+iS+SkCxyr8BJm564J2Z1Z2cXMHHBb44OUGVGDX598VgIgJd X-Received: by 2002:a05:620a:4514:b0:7b6:dd7a:9716 with SMTP id af79cd13be357-7b8636e6dbemr93011685a.10.1734475412096; Tue, 17 Dec 2024 14:43:32 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1734475412; cv=none; d=google.com; s=arc-20240605; b=KQ+CjO8XmkAlipgy4KT4bkwohjFvAm2IQ5xXsSdODrS/S6ddy0zjnQTOitcxKYrcV7 P0zCNfqaoSuBOnJa5DYEEpY04Q1q3aFtTQCAHElGhoUJuCqnClvESV2uccMs8vdDQo0O UC2eJMZdYoui44NeGCpf+SlD0BMWCzsDMtGC57ODT+PFQTBb81A+zcoLg46q/0kg5qnb omzT8QlR9c/jobexRE0OBePT7ko+GFl1rg61OSjIepvYudBCKXTpv09/5QFIIWKCso7U Fmx2uCt28gRgrCId6U+/m+fPf9S2KCrqb8IMv4h4fEZurjllXAI2yq4TuSHJW/+K746t /F4Q== 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=FtDnDxoim/xhxV1Wp1Am01Tmaf0WaBzRac6ychlNj2g=; fh=e32mLanPjfs41dQwy8Wt4zFa68BQ2A3naWRPcWqt/Vw=; b=jcpLBYZMK50eM4yGC0ZSsKScht0l7hcHhbNDDU8n7x6dj4MwdFbpCZQ2GFG07imN45 Go9rF1IvfDOl7uwRYLuOsWm0jFvgiJqJixtdWcnVa9buWAnu1++/XEeGCmeHHq+bNXvg /FumSkIL+7RTRzr3mW4o1k3BXIQAvv4nFwCUqIZgscvMhU7t8vqMDoZNVdaifjgRdEdx 0gI3OMjdnnkxLyUOz5PehS01Ee9IzeYqyyC/oyLWlu482TE2VcCmWlpeVcdgblO6uOIe 17+gVrBv/l6PfwVmyxMKq/fYE1f8ZKo4eT2wrr2VM/y+RIOCgwswdE54xfATQWnROFNz U0Bw==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=vgrUOOB9; 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-7b7048f398asi1145530885a.676.2024.12.17.14.43.31 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 17 Dec 2024 14:43:32 -0800 (PST) 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=vgrUOOB9; 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 1tNgHe-0004J9-VO; Tue, 17 Dec 2024 17:43:19 -0500 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 1tNgHc-0004Ii-Sb for qemu-devel@nongnu.org; Tue, 17 Dec 2024 17:43:16 -0500 Received: from mail-pf1-x432.google.com ([2607:f8b0:4864:20::432]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tNgHa-000194-SX for qemu-devel@nongnu.org; Tue, 17 Dec 2024 17:43:16 -0500 Received: by mail-pf1-x432.google.com with SMTP id d2e1a72fcca58-725abf74334so5130225b3a.3 for ; Tue, 17 Dec 2024 14:43:14 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1734475393; x=1735080193; 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=FtDnDxoim/xhxV1Wp1Am01Tmaf0WaBzRac6ychlNj2g=; b=vgrUOOB9Bm9Qh4mcnM3QtJ9vigBbpDj2gykRBjWtvCJk6/D7ribXa5KlRq2/gr/X+2 7tisHupeBuYUPZ1GQLOEZDnNCriHlbSVeuy+djXgSYS4swJqZAslGEYGoyfGWDfdrdlq lZyhevSKhsVrOzYhGRnfF8Fpdzb0utKbsNgMGcYW2d1vYx6gIQaA2YpqNxlZOqVyYJhk 8EvjXIV/rZTRJJ5CyLaep3j/Kna6KrAJtzS/bPC0WnWU5aoUQnXtjOfhXNMNcqMtmgOI p39v/8Y7OXHW4jaqU5znf7q/FvLkzxTIRPvhiLc9Bi/nCIGQ7uAk4JHrl1K9fGFoYYUS QI0A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1734475393; x=1735080193; 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=FtDnDxoim/xhxV1Wp1Am01Tmaf0WaBzRac6ychlNj2g=; b=jCt4f+yNdJW3sHw3G8yJw1mlioAmF+juGWbWxmz1h6es49+GTrcYpAaR9L+dB7Y2yo i269zl1bTmMBCYB5KId6qPAG8ugipK4iihey5tTy1lgmL0jxT/p4o252aA8Ztbs3rLcx Yu+N+28OvOu8Z1kHAUAvGC1Ud6d6pDMsuQW0CXDo+OdOoV7M9iD4LoelHLr3/JfICf1Y rsiJeQqBSxGi7ug/o4s7l/LM5sRqLK367zptNQ3e6/yC1Gu6CUlXX5TTowikMvmVAyH+ 594M+yzgxCmHkMf2gIA3o6/mJjbUlpWQ5zndg8FhHohbyWB2FsFEKKJSwxiAzTpnQ5Qk dVmg== X-Gm-Message-State: AOJu0YyeFYGc4iFZ2jnVGGV5IiKca3MX02YUaC32/y7vrk//tFSzfA6S B0O03RnSy3JFpUYkNXXZ7bR6QuHnT+pFJ+x4nQHrjlkGUt0fXx+105UE9TB+BucUaLMr/dm/aOb 5Sys= X-Gm-Gg: ASbGncvMN8/yYV97u5KfFf//MP8TZPwct63FG0PWueUCsDFJZLC5CU7HWi1VbQRUnr2 JaOYK+SGsp7OzjVHgtUU3BPQxkEgpwMy3MHXE65V7lWyNtj67jr4fqbEDO7N4ylG3rqpO3byRX9 XmNOdSmgxIGSHqs3rIXNptv48vLJZ1ijhUgFFAizXABxaFrpleJdYi7lqQsze1zLs5vCi7fXa9t MdHCl6h97d8r2j47+UxTslEtMfb1pIwUMQNTkmkbddChdGVkwhstkNW X-Received: by 2002:a05:6a20:9183:b0:1e2:2e4:689a with SMTP id adf61e73a8af0-1e5b489b0c1mr1147195637.41.1734475393437; Tue, 17 Dec 2024 14:43:13 -0800 (PST) Received: from pc.. ([38.39.164.180]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-72918ac53f3sm7463214b3a.27.2024.12.17.14.43.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 17 Dec 2024 14:43:13 -0800 (PST) From: Pierrick Bouvier To: qemu-devel@nongnu.org Cc: Pierrick Bouvier , =?utf-8?q?Alex_Benn?= =?utf-8?q?=C3=A9e?= , richard.henderson@linaro.org, philmd@linaro.org, Alexandre Iooss , Mahmoud Mandour , Thomas Huth , Paolo Bonzini Subject: [PATCH v3 03/11] tests/tcg/plugins/syscall: fix 32-bit build Date: Tue, 17 Dec 2024 14:42:58 -0800 Message-Id: <20241217224306.2900490-4-pierrick.bouvier@linaro.org> X-Mailer: git-send-email 2.39.5 In-Reply-To: <20241217224306.2900490-1-pierrick.bouvier@linaro.org> References: <20241217224306.2900490-1-pierrick.bouvier@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::432; envelope-from=pierrick.bouvier@linaro.org; helo=mail-pf1-x432.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 Reviewed-by: Richard Henderson Signed-off-by: Pierrick Bouvier --- tests/tcg/plugins/syscall.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/tcg/plugins/syscall.c b/tests/tcg/plugins/syscall.c index ff452178b18..47aad55fc1b 100644 --- a/tests/tcg/plugins/syscall.c +++ b/tests/tcg/plugins/syscall.c @@ -76,12 +76,12 @@ static int64_t write_sysno = -1; static SyscallStats *get_or_create_entry(int64_t num) { SyscallStats *entry = - (SyscallStats *) g_hash_table_lookup(statistics, GINT_TO_POINTER(num)); + (SyscallStats *) g_hash_table_lookup(statistics, &num); if (!entry) { entry = g_new0(SyscallStats, 1); entry->num = num; - g_hash_table_insert(statistics, GINT_TO_POINTER(num), (gpointer) entry); + g_hash_table_insert(statistics, &entry->num, entry); } return entry; @@ -232,7 +232,7 @@ QEMU_PLUGIN_EXPORT int qemu_plugin_install(qemu_plugin_id_t id, } if (!do_print) { - statistics = g_hash_table_new_full(NULL, g_direct_equal, NULL, g_free); + statistics = g_hash_table_new_full(g_int64_hash, g_int64_equal, NULL, g_free); } if (do_log_writes) { From patchwork Tue Dec 17 22:42:59 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Pierrick Bouvier X-Patchwork-Id: 851462 Delivered-To: patch@linaro.org Received: by 2002:a5d:4888:0:b0:385:e875:8a9e with SMTP id g8csp616343wrq; Tue, 17 Dec 2024 14:43:39 -0800 (PST) X-Forwarded-Encrypted: i=2; AJvYcCWCpqUwPGXMpklIWgZA+x1G5RPK8d+ACmGEcYEaXe/PjCK9YRDZy0dSSFoxz7E/noBJYo840g==@linaro.org X-Google-Smtp-Source: AGHT+IGDYDJ5OtFkuBYgPtNfAm+iYK1eEved5bf/xtEFhzNZ9zxdhhU5dKk3pGsIPjVZqUT/PxW2 X-Received: by 2002:a05:622a:120a:b0:467:6e25:3f3d with SMTP id d75a77b69052e-46908df58f8mr9535331cf.15.1734475419657; Tue, 17 Dec 2024 14:43:39 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1734475419; cv=none; d=google.com; s=arc-20240605; b=ArZPUBXL2juJD9+rYGt3Wz4QrxshdtmGdBXSdrUKHR/XJsvurDfnMy9EMCqZeQ4YIJ bivHiA+cU6esz/8hhSCTHAU5c+L8h/fkoikdmfbcyCeKNaa4Wn+MNtAO/sDsekvNmEFa Jq6llwkeOSjqIsC6qPJ8BlD8zd6fYQrrcNSvAhS5J7hx6dRojn8laMBiom7tA06KOMuk 6dKglRJtDncKBxFJdC14Qeq7Ai6g5953alCPwHlhnRK0ZlcNvGsY1O0s7V6roWl4V8bN G3M3G9BxPJpT7puCrj3Bi0GaBbhsokdTZ1p2w+H9zvSsfkdiZvcwdsaC+0Gd7x2Vislo 2NUQ== 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=+FHNfG1b8pwrU+SQi579sB8c86h/0xjzKBe/XqZ77yg=; fh=e32mLanPjfs41dQwy8Wt4zFa68BQ2A3naWRPcWqt/Vw=; b=DCsePTgDBreoQboCrxVFBwV8n1mKOPa0Gm1eaKcFE2qvaLuq43kzn3sjcswXWH3qKM tBEbNv9gcuYdFBoVMexUeddV8eaoEfp2tcanb9Jj/jikDtVImio3ER/aRz/rot1kPUUE O5sLMGLv6O78cxsDktkodO3+akE5NCKY+01sV5jujRXQU5HVnuAN03rw5uB1O+Rm3+Pj fyresCt7qM14VcGXNH/4yMixtMN+u9seR+OBedrjIrikFchB2Sjk0pH0NCJD3ejE7gkB rgCqpW8QRs9yeVxf4wDASPmecwURSlvZpJOkZkMGXFahV0ABkQBrcEWQsb5nWP9LYgf1 TljQ==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=OOtjmH7k; 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-467b2cbb05csi121768161cf.165.2024.12.17.14.43.39 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 17 Dec 2024 14:43:39 -0800 (PST) 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=OOtjmH7k; 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 1tNgHg-0004Jg-6o; Tue, 17 Dec 2024 17:43:20 -0500 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 1tNgHe-0004J6-7B for qemu-devel@nongnu.org; Tue, 17 Dec 2024 17:43:18 -0500 Received: from mail-pf1-x435.google.com ([2607:f8b0:4864:20::435]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tNgHc-00019D-MI for qemu-devel@nongnu.org; Tue, 17 Dec 2024 17:43:17 -0500 Received: by mail-pf1-x435.google.com with SMTP id d2e1a72fcca58-728eccf836bso5151642b3a.1 for ; Tue, 17 Dec 2024 14:43:15 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1734475394; x=1735080194; 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=+FHNfG1b8pwrU+SQi579sB8c86h/0xjzKBe/XqZ77yg=; b=OOtjmH7k9KPnzozY+LEnKimkvSMRBcc/6kSe+a2I5xfUk1b1OPKROBUs1a2dI/hzf2 X/IRN1jjmfLY5Z5KUgXQFd5tEi7wUaIJ1gZPLh5M1JyNoglhEtF4J8A291/dIFcC1j84 h1zVIT8eQ1tgFx3Xxy2+tsRmjMGcrgYYscsT27MYFa3f2NnfZn2Un1oRmslIJvPLmoc4 49O4/fVifzV2mkCDaXacwkuVy4KS0b40HPFQVNv9Q3BO8AoOcqJxef5HVvIAz0u21nJV UtGcVKkjT0Dlk1nKZz3cODpufsxsw3ZGU7yV+knyNYIZY5Z9jIOZy8NWjcS95teM9MiB jTRg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1734475394; x=1735080194; 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=+FHNfG1b8pwrU+SQi579sB8c86h/0xjzKBe/XqZ77yg=; b=OoargjfdgRxVXrmvA7HNUkrGxc6SPmQJXQaZyeBE7aSD6sfsM/WL25SvSThUVJ4jRr NYURr8TbnBDb9wvHyBCf88iIE/+sz+WIn3tzSLqptCUSv+wRdlYMv2PeCkS8SghWI4fH SiYSkhtAPkt+kIJZbSDnHLFDR7AxWYedoHwgEIHxz3bRJuWew8enAH1tYaxFXxmPD5JM TqsIXDQYNP00AITJcyAs+oE9qjfGAgI5N3/KMOlKyhubyNBbdU05MWgHtLGbU+WUR0lN hYD7IqET599QU+4OKurz6weSZQvZqOYFeqNA0ty+obMfK+jVcBnlj9QwaDQRUmRGO7NB 9E4g== X-Gm-Message-State: AOJu0YwQobHZxvd6vR2rlcgKOmhb/xhorO8FV9/HSZ25ep+YO6AovRUk 8R4N6MOG5trAiUqFy29NHV6JQjJ897ZHj5ANONr5aOV86oEcBedAcM7G43YM6nt2jY1jeeqdsg/ xZcs= X-Gm-Gg: ASbGncvLDiFt5dooZsf/4ebGrZPJGYt1rf+b2Yn+h98inoi2VnBXpMZWx60zu66FMcA r65U/8a4chhnKGO+2cD7Xo/E0BHCPjNul/iTjzikWVS2gpy8nrppt+zaixf9j7ISTeHCSEtekl+ rldQqyTl3zCjAgcTiknAJbofVF7VEBfkvCc7LWziXPALzMzOx2b6CpfNdXLFSTX1e4xkZFLETKT 4nym08ogkLhFgps7W5CdPUl5pr4V7VhsjMza168+7/3oJne562dFKyQ X-Received: by 2002:a05:6a21:9990:b0:1e1:becc:1c81 with SMTP id adf61e73a8af0-1e5b487dfa4mr890237637.32.1734475394339; Tue, 17 Dec 2024 14:43:14 -0800 (PST) Received: from pc.. ([38.39.164.180]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-72918ac53f3sm7463214b3a.27.2024.12.17.14.43.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 17 Dec 2024 14:43:13 -0800 (PST) From: Pierrick Bouvier To: qemu-devel@nongnu.org Cc: Pierrick Bouvier , =?utf-8?q?Alex_Benn?= =?utf-8?q?=C3=A9e?= , richard.henderson@linaro.org, philmd@linaro.org, Alexandre Iooss , Mahmoud Mandour , Thomas Huth , Paolo Bonzini Subject: [PATCH v3 04/11] tests/tcg/plugins/mem: fix 32-bit build Date: Tue, 17 Dec 2024 14:42:59 -0800 Message-Id: <20241217224306.2900490-5-pierrick.bouvier@linaro.org> X-Mailer: git-send-email 2.39.5 In-Reply-To: <20241217224306.2900490-1-pierrick.bouvier@linaro.org> References: <20241217224306.2900490-1-pierrick.bouvier@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::435; envelope-from=pierrick.bouvier@linaro.org; helo=mail-pf1-x435.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 Reviewed-by: Richard Henderson Signed-off-by: Pierrick Bouvier --- tests/tcg/plugins/mem.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/tcg/plugins/mem.c b/tests/tcg/plugins/mem.c index b0fa8a9f277..d87d6628e09 100644 --- a/tests/tcg/plugins/mem.c +++ b/tests/tcg/plugins/mem.c @@ -135,14 +135,14 @@ static void update_region_info(uint64_t region, uint64_t offset, g_assert(offset + size <= region_size); g_mutex_lock(&lock); - ri = (RegionInfo *) g_hash_table_lookup(regions, GUINT_TO_POINTER(region)); + ri = (RegionInfo *) g_hash_table_lookup(regions, ®ion); if (!ri) { ri = g_new0(RegionInfo, 1); ri->region_address = region; ri->data = g_malloc0(region_size); ri->seen_all = true; - g_hash_table_insert(regions, GUINT_TO_POINTER(region), (gpointer) ri); + g_hash_table_insert(regions, &ri->region_address, ri); } if (is_store) { @@ -392,7 +392,7 @@ QEMU_PLUGIN_EXPORT int qemu_plugin_install(qemu_plugin_id_t id, if (do_region_summary) { region_mask = (region_size - 1); - regions = g_hash_table_new(NULL, g_direct_equal); + regions = g_hash_table_new(g_int64_hash, g_int64_equal); } counts = qemu_plugin_scoreboard_new(sizeof(CPUCount)); From patchwork Tue Dec 17 22:43:00 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Pierrick Bouvier X-Patchwork-Id: 851464 Delivered-To: patch@linaro.org Received: by 2002:a5d:4888:0:b0:385:e875:8a9e with SMTP id g8csp616615wrq; Tue, 17 Dec 2024 14:44:27 -0800 (PST) X-Forwarded-Encrypted: i=2; AJvYcCWkt2/IpXYNi3HZgj35dX3WQMhC6banzztFRbZaNgIPgWJ8G09myE1MCCYiMmu6C/GBSTruJA==@linaro.org X-Google-Smtp-Source: AGHT+IEB8GOGbrvYC6j3Qjg54UgjPoVPt9Nw/N+MzhAz8+o6Z4GltsHatDo0AfMmNhsPkZdEW9gF X-Received: by 2002:a05:6214:1d09:b0:6d8:9960:b063 with SMTP id 6a1803df08f44-6dd091c783cmr14896756d6.14.1734475467777; Tue, 17 Dec 2024 14:44:27 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1734475467; cv=none; d=google.com; s=arc-20240605; b=R8hCtLndv7UxLX4FtcRvTt0MbueW85JCgfKsRwbt2+a+YgFvwv5E2TWv5gwkOLNYqv WRQyJMxKYDaKKEv1rhftpAQL4kOiCiTRJFKjrG/fxrRwhXfbx854hM5GrGGipDy72Pfb PF9hS1j6UoBYIxg44Ui8R69XoCMBfc35SvVhSqsOgaE+P3Bi9psLonk871WihUC/f4pU RL9xie7fYmJjvesaToxtEyxfddeVXqb/pJE+Gh2wRQVRcRiOn3ZeZHitnFsht3ng1cUg Yjs1l+E7ZszUfbIQnF88Ngbh+79J8n5/D8fS3ysLwdP9/SIGklemrkxCStj/JmjHX8gZ qbcQ== 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=E0X1MlNNMfXe3fyFvrKoslEpzjFsMN2sr/cA5ARxGXA=; fh=e32mLanPjfs41dQwy8Wt4zFa68BQ2A3naWRPcWqt/Vw=; b=VxaXltnJ2DbkFjEqGnahCKTNrJbvxGGxgj2VxaLo/03sj8sMFLFVg3eOkXn0K5KZwL lqOVpIjlSAwxy3G6gHekw0mONWwGFzO6+Np13sfBUKxqbMkbe+BW1KPslDD78HZSrlhu h5KfF6M/sQW9DXonEQVolfvExbwTk8M7Atpi0dAIbk2lrP/y0NMNvewFbTsaPd54+OSf OcYCcwWbs8qCXHw+LfjBiUbimbwBPsK8DHb0PDiOoM8Er4orcqL4ZOKa7YYnNs+bx2Cf HK+aytkQp/chfuleWrFjBE89VwPcz3ViUC9z6pBYUWIpzvXDulOZD7fzR5Y+j2Cw5z4M tKIQ==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=mzHlmLHc; 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-6dccd1c9ed3si111260676d6.178.2024.12.17.14.44.27 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 17 Dec 2024 14:44:27 -0800 (PST) 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=mzHlmLHc; 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 1tNgHh-0004Ke-In; Tue, 17 Dec 2024 17:43:21 -0500 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 1tNgHf-0004Je-Ps for qemu-devel@nongnu.org; Tue, 17 Dec 2024 17:43:19 -0500 Received: from mail-pf1-x42c.google.com ([2607:f8b0:4864:20::42c]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tNgHc-00019k-Rd for qemu-devel@nongnu.org; Tue, 17 Dec 2024 17:43:19 -0500 Received: by mail-pf1-x42c.google.com with SMTP id d2e1a72fcca58-728ea1e0bdbso4575806b3a.0 for ; Tue, 17 Dec 2024 14:43:16 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1734475395; x=1735080195; 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=E0X1MlNNMfXe3fyFvrKoslEpzjFsMN2sr/cA5ARxGXA=; b=mzHlmLHcZ8Fo7pqVvqGdxzzG9QxkoKMX4Rgvb15Ro1+Hge2csQtIxynVJZrg97tyoW Yk7LCkr5IuYB9yIRDbnFB45gPOYfb7tUuRxUD7SvdE2tmRsofpD0lnBuj5QZKHfIqWE9 m/DsdB+9qE3ruYMDUN5orL25aV3DBSBqLUxf5Wrhy6H6GG8dPZMRsnEg50b5E0GFQ/M+ X8QZU2ImB6wZ6z05Abio2e0bOdSf3/4NnyMq2S/sNsq7Sw/q7viSNGljQf0VOS2a/BZw vmnUVewZzQ2Po5fQwzI57S2ZM5oDl5lrKs6OnFEariDmnB3Zs3r7n0oynYjUNthQA+x6 W4Pg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1734475395; x=1735080195; 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=E0X1MlNNMfXe3fyFvrKoslEpzjFsMN2sr/cA5ARxGXA=; b=gRi2dsIGhrIVLUvweIvXHQGKrguKWowa4pb5sF7VOvdMIU0vUWodgsLV3wsMhOJbEU Vbu1BtxaiJ4fk5bgt0KMABLHEa9EHF2joLhU048oMGqZj8wP/7Lb2dnmnGiL8BEhE/aM JxOoX+1C1ua8IeGN0xzLzV343n5KjOgI0c6fUQgjjZPg1VRTiVf1OLRdBacrKW71NppP +vrJF3NfFK0GkxGIhadIGjnKFfkSzJaFIdvs/5vQWSTK2vB/cP0QrREzL/mfr8wckIf2 CeS7MtfTHcKcTigF7fmTnH+f4MxBbjcBMO8UyusWzhs6xOpk8a0jN956HuRx40OSwJ6X YspA== X-Gm-Message-State: AOJu0YwxEhn4GNeDx9jnMynQt1V4pBQkcVQ1XL+Q5tbnqdpECBIjXO5w hvBrIuJwER6e9vT71F4ZgZF8CHQ2WgJ0gZN46Lfn57e8qZ0hk99/ZOtqLkEoFBlo508T6CNif1j Qp6s= X-Gm-Gg: ASbGnctVRaiO2sQW9BmU5VpOeAVgyP232C62haWdKNcQyaCDh0a1jJTeYVP7GIKR+fc LAwAix3BGk6S2/qTP3TPfwfvpsqwueA6DqZd1lKOE4C+8xnWBXo/wR9hOg6fISk+DA+NHAPprAF /q8PRP8kGWJ/30PF9IITT2FAU6iGF1BqwHbs0N+PXExmycNfUWiZXC2V2qaOC6GL4Luu1EuEIVJ XaloPsLqMO8OvN6bRHkUhUArDh/gUboXzUMGLDVkdkw+KeNGlY5gM7s X-Received: by 2002:a05:6a20:c70a:b0:1e0:d380:fe66 with SMTP id adf61e73a8af0-1e5b4515e91mr1107320637.0.1734475395262; Tue, 17 Dec 2024 14:43:15 -0800 (PST) Received: from pc.. ([38.39.164.180]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-72918ac53f3sm7463214b3a.27.2024.12.17.14.43.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 17 Dec 2024 14:43:14 -0800 (PST) From: Pierrick Bouvier To: qemu-devel@nongnu.org Cc: Pierrick Bouvier , =?utf-8?q?Alex_Benn?= =?utf-8?q?=C3=A9e?= , richard.henderson@linaro.org, philmd@linaro.org, Alexandre Iooss , Mahmoud Mandour , Thomas Huth , Paolo Bonzini Subject: [PATCH v3 05/11] contrib/plugins/stoptrigger: fix 32-bit build Date: Tue, 17 Dec 2024 14:43:00 -0800 Message-Id: <20241217224306.2900490-6-pierrick.bouvier@linaro.org> X-Mailer: git-send-email 2.39.5 In-Reply-To: <20241217224306.2900490-1-pierrick.bouvier@linaro.org> References: <20241217224306.2900490-1-pierrick.bouvier@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::42c; envelope-from=pierrick.bouvier@linaro.org; helo=mail-pf1-x42c.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: Richard Henderson --- contrib/plugins/stoptrigger.c | 48 ++++++++++++++++++++--------------- 1 file changed, 27 insertions(+), 21 deletions(-) diff --git a/contrib/plugins/stoptrigger.c b/contrib/plugins/stoptrigger.c index 03ee22f4c6a..b3a6ed66a7b 100644 --- a/contrib/plugins/stoptrigger.c +++ b/contrib/plugins/stoptrigger.c @@ -21,9 +21,11 @@ QEMU_PLUGIN_EXPORT int qemu_plugin_version = QEMU_PLUGIN_VERSION; /* Scoreboard to track executed instructions count */ typedef struct { uint64_t insn_count; + uint64_t current_pc; } InstructionsCount; static struct qemu_plugin_scoreboard *insn_count_sb; static qemu_plugin_u64 insn_count; +static qemu_plugin_u64 current_pc; static uint64_t icount; static int icount_exit_code; @@ -34,6 +36,11 @@ static bool exit_on_address; /* Map trigger addresses to exit code */ static GHashTable *addrs_ht; +typedef struct { + uint64_t exit_addr; + int exit_code; +} ExitInfo; + static void exit_emulation(int return_code, char *message) { qemu_plugin_outs(message); @@ -43,23 +50,18 @@ static void exit_emulation(int return_code, char *message) static void exit_icount_reached(unsigned int cpu_index, void *udata) { - uint64_t insn_vaddr = GPOINTER_TO_UINT(udata); + uint64_t insn_vaddr = qemu_plugin_u64_get(current_pc, cpu_index); char *msg = g_strdup_printf("icount reached at 0x%" PRIx64 ", exiting\n", insn_vaddr); - exit_emulation(icount_exit_code, msg); } static void exit_address_reached(unsigned int cpu_index, void *udata) { - uint64_t insn_vaddr = GPOINTER_TO_UINT(udata); - char *msg = g_strdup_printf("0x%" PRIx64 " reached, exiting\n", insn_vaddr); - int exit_code; - - exit_code = GPOINTER_TO_INT( - g_hash_table_lookup(addrs_ht, GUINT_TO_POINTER(insn_vaddr))); - - exit_emulation(exit_code, msg); + ExitInfo *ei = udata; + g_assert(ei); + char *msg = g_strdup_printf("0x%" PRIx64 " reached, exiting\n", ei->exit_addr); + exit_emulation(ei->exit_code, msg); } static void vcpu_tb_trans(qemu_plugin_id_t id, struct qemu_plugin_tb *tb) @@ -67,23 +69,25 @@ static void vcpu_tb_trans(qemu_plugin_id_t id, struct qemu_plugin_tb *tb) size_t tb_n = qemu_plugin_tb_n_insns(tb); for (size_t i = 0; i < tb_n; i++) { struct qemu_plugin_insn *insn = qemu_plugin_tb_get_insn(tb, i); - gpointer insn_vaddr = GUINT_TO_POINTER(qemu_plugin_insn_vaddr(insn)); + uint64_t insn_vaddr = qemu_plugin_insn_vaddr(insn); if (exit_on_icount) { /* Increment and check scoreboard for each instruction */ qemu_plugin_register_vcpu_insn_exec_inline_per_vcpu( insn, QEMU_PLUGIN_INLINE_ADD_U64, insn_count, 1); + qemu_plugin_register_vcpu_insn_exec_inline_per_vcpu( + insn, QEMU_PLUGIN_INLINE_STORE_U64, current_pc, insn_vaddr); qemu_plugin_register_vcpu_insn_exec_cond_cb( insn, exit_icount_reached, QEMU_PLUGIN_CB_NO_REGS, - QEMU_PLUGIN_COND_EQ, insn_count, icount + 1, insn_vaddr); + QEMU_PLUGIN_COND_EQ, insn_count, icount + 1, NULL); } if (exit_on_address) { - if (g_hash_table_contains(addrs_ht, insn_vaddr)) { + ExitInfo *ei = g_hash_table_lookup(addrs_ht, &insn_vaddr); + if (ei) { /* Exit triggered by address */ qemu_plugin_register_vcpu_insn_exec_cb( - insn, exit_address_reached, QEMU_PLUGIN_CB_NO_REGS, - insn_vaddr); + insn, exit_address_reached, QEMU_PLUGIN_CB_NO_REGS, ei); } } } @@ -99,11 +103,13 @@ QEMU_PLUGIN_EXPORT int qemu_plugin_install(qemu_plugin_id_t id, const qemu_info_t *info, int argc, char **argv) { - addrs_ht = g_hash_table_new(NULL, g_direct_equal); + addrs_ht = g_hash_table_new_full(g_int64_hash, g_int64_equal, NULL, g_free); insn_count_sb = qemu_plugin_scoreboard_new(sizeof(InstructionsCount)); insn_count = qemu_plugin_scoreboard_u64_in_struct( insn_count_sb, InstructionsCount, insn_count); + current_pc = qemu_plugin_scoreboard_u64_in_struct( + insn_count_sb, InstructionsCount, current_pc); for (int i = 0; i < argc; i++) { char *opt = argv[i]; @@ -124,13 +130,13 @@ QEMU_PLUGIN_EXPORT int qemu_plugin_install(qemu_plugin_id_t id, exit_on_icount = true; } else if (g_strcmp0(tokens[0], "addr") == 0) { g_auto(GStrv) addr_tokens = g_strsplit(tokens[1], ":", 2); - uint64_t exit_addr = g_ascii_strtoull(addr_tokens[0], NULL, 0); - int exit_code = 0; + ExitInfo *ei = g_malloc(sizeof(ExitInfo)); + ei->exit_addr = g_ascii_strtoull(addr_tokens[0], NULL, 0); + ei->exit_code = 0; if (addr_tokens[1]) { - exit_code = g_ascii_strtoull(addr_tokens[1], NULL, 0); + ei->exit_code = g_ascii_strtoull(addr_tokens[1], NULL, 0); } - g_hash_table_insert(addrs_ht, GUINT_TO_POINTER(exit_addr), - GINT_TO_POINTER(exit_code)); + g_hash_table_insert(addrs_ht, &ei->exit_addr, ei); exit_on_address = true; } else { fprintf(stderr, "option parsing failed: %s\n", opt); From patchwork Tue Dec 17 22:43:01 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Pierrick Bouvier X-Patchwork-Id: 851463 Delivered-To: patch@linaro.org Received: by 2002:a5d:4888:0:b0:385:e875:8a9e with SMTP id g8csp616344wrq; Tue, 17 Dec 2024 14:43:40 -0800 (PST) X-Forwarded-Encrypted: i=2; AJvYcCUKHrrSKQNGoW7zLC0ME1DPMV1lXRUShRECxeonSs39NlFGlzp2RVHvNlGifxr86PLKs+rrXw==@linaro.org X-Google-Smtp-Source: AGHT+IGfWsZyig+eZ4+aePso1U5c++434hOQkxLYE2bNP/RvvkiTwV/6yR7AXoUZJIFekqmrVcBK X-Received: by 2002:a05:620a:4706:b0:7b6:d23a:be4e with SMTP id af79cd13be357-7b863724b1dmr94107985a.25.1734475419875; Tue, 17 Dec 2024 14:43:39 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1734475419; cv=none; d=google.com; s=arc-20240605; b=HXxa3UPxS+sBbp1FaV5Z29yY3THp+Y7sligC1k1g63QqJApAj07Rd63hn9wBlVyE+s wJ62DKIk+FdhVBvt9ELL29Uej6Op+B8FTv/swGo1jWZqaLP9xmobtLCuzPQwti74UDOV cswNOq8LQ5e8Q4665Js2IjQD3s2GKjNEXVoka/92R521AInued9hpbS2DygVrZl4Md5j VO4ocD5RnR911NMpmd5Rz1gMlZC3R/QRrhzIGGs7O2x4ZoS+36uncdisGHMHujhEK40x ZYSD6nkiH+fe2yQJK8ujKV+PE3YzsdRIjRZcaEfZeUR/Nxh1AK899j1d1wz9md0kiLVe 4Fsg== 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=7+nQuV745MSVduGtVwWvyxFW8ma4a2v2SK14uCf1mjQ=; fh=e32mLanPjfs41dQwy8Wt4zFa68BQ2A3naWRPcWqt/Vw=; b=j9VoHps6X9hgYV9gw5p9nuQu5sNYOwsupShgZ0dw2pt9WY5MA3OvNATUpiaaFTYtjr WBUg8y+DUa8hp6w8ueZ5GF3X1/aX6LfOSjXtHbCfuG2oijckbleGouF/H29k6o6CcnYR Fx48pR4KvTCPEhhB4cXnIrbOxDekIew+WDxojG89QM7roM9KcubA5iX/SB60gNHIsloi dE+wIBD5+cbMyTnYUM/h1+QViQ2g/wazPu1rfLJeRwZ90PnCHEHhyRbEXVPsy5VNqAOB vaaQDLGhmFW7nQHWa7JtNTFR5mql24X2YsmLKQRaRsoTySgMAf4/qX5wh98pKTx9FocH 6xgQ==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="a/mBksHY"; 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-467b2c98c37si124068351cf.137.2024.12.17.14.43.39 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 17 Dec 2024 14:43:39 -0800 (PST) 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="a/mBksHY"; 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 1tNgHi-0004L8-Rt; Tue, 17 Dec 2024 17:43:22 -0500 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 1tNgHg-0004Jy-QE for qemu-devel@nongnu.org; Tue, 17 Dec 2024 17:43:20 -0500 Received: from mail-pf1-x42d.google.com ([2607:f8b0:4864:20::42d]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tNgHd-00019v-Kb for qemu-devel@nongnu.org; Tue, 17 Dec 2024 17:43:20 -0500 Received: by mail-pf1-x42d.google.com with SMTP id d2e1a72fcca58-728ea1e0bdbso4575812b3a.0 for ; Tue, 17 Dec 2024 14:43:17 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1734475396; x=1735080196; 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=7+nQuV745MSVduGtVwWvyxFW8ma4a2v2SK14uCf1mjQ=; b=a/mBksHYTHQ9MkPGP5YM74WEz2oxK4mDr7QnXTbYQ+MEFSVFNcNjd9BryGmFMugfnl rIcxnJ/BC3FibTJGS3cp/VYsI7ooq8jUpoNopzqxA+W7PZf5KeRQPy6IsrZSgFJObtya miVvADzU+b0CzjGfM6c4mD/30p2FEsXmzgyUcoECW8XrSqNuyMtPeoMufpozEmNNTOy9 afYVAFgzwJkRwYL5164wicbfSK0J7ScfULG3q1l6W4fIFOeM42aDEJLrC/DqO+xqwd0p BeZaFb4atUDB8jrb33EVm4kflANqf5cIK9iS9M48t1Dvm/TPGICwnXMDAsuxFvONIfDc GXVw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1734475396; x=1735080196; 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=7+nQuV745MSVduGtVwWvyxFW8ma4a2v2SK14uCf1mjQ=; b=l7U6OJQexbmEVYBbZX37ccD0QgqtT0B/Szj9uMX/0TfLT8yIbYoRD9r3fg1UW8CPKY 0Et8PadJzz/zGLtiG5+VzIagBaIDYX0WE4wCxCwrz/WVqJN69RwXiOsKhGN3sECgKoGz dGiPN9FQHWevvgfXOXl4ii0eMf3y+fwOKSDQ04ZMfFIcwMOw6Jv5O0Z2KWyGN3GUpIBx S0dUuJLCS32Q4DfA4i1Tu3zkFjQ7226c9PbMD9luztVW8oXLotRirWBM3SeEBQ3Ltk8a ye5IehL8kZCFR0OPq2btCb0PjXLzWWAc+QrBbhQFaMeYbVmj/hXT8gabbGarqxALWupu y55g== X-Gm-Message-State: AOJu0YxIik0dBH56eQFgpaiq6uQQB+oywNoSrKWtWmvj+9bvTFSaArA1 NBlRbfzPyrtvv0wbs21vqwgXlsTTOUscLE5XO37fBVsNH2T5BTW6CZ/iKMhXNY+881wGK0EBILQ MUzQ= X-Gm-Gg: ASbGncsXykDm6gIP9LyxlSwu5uTUOZgni6C3F+QUtYUTI7NzLjnwooaJr1tEnNN9nZE AucKjpnXo1pBo2XLzoXdT+GRa/2cYftOLO3f/BOoj4wyCg/EePpOlqxvulAcEmgyLne9+SJozVl JLo7v1YvrHG4fRZx8S1gqdH9+4s8E0PX6TQW0ZY2W0RGIXQ7IC0m1LfGGiTcEjGZnmqApfYH2VG IgYedQzitSwzOp6p1sH8wns9HJb2e13VG/XoCjKsoMsb/yf5+L7v8cv X-Received: by 2002:a05:6a00:114c:b0:71e:16b3:e5dc with SMTP id d2e1a72fcca58-72a8d2dee69mr1079991b3a.19.1734475396186; Tue, 17 Dec 2024 14:43:16 -0800 (PST) Received: from pc.. ([38.39.164.180]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-72918ac53f3sm7463214b3a.27.2024.12.17.14.43.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 17 Dec 2024 14:43:15 -0800 (PST) From: Pierrick Bouvier To: qemu-devel@nongnu.org Cc: Pierrick Bouvier , =?utf-8?q?Alex_Benn?= =?utf-8?q?=C3=A9e?= , richard.henderson@linaro.org, philmd@linaro.org, Alexandre Iooss , Mahmoud Mandour , Thomas Huth , Paolo Bonzini Subject: [PATCH v3 06/11] contrib/plugins/cache: fix 32-bit build Date: Tue, 17 Dec 2024 14:43:01 -0800 Message-Id: <20241217224306.2900490-7-pierrick.bouvier@linaro.org> X-Mailer: git-send-email 2.39.5 In-Reply-To: <20241217224306.2900490-1-pierrick.bouvier@linaro.org> References: <20241217224306.2900490-1-pierrick.bouvier@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::42d; envelope-from=pierrick.bouvier@linaro.org; helo=mail-pf1-x42d.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: Richard Henderson --- contrib/plugins/cache.c | 18 ++++++------------ 1 file changed, 6 insertions(+), 12 deletions(-) diff --git a/contrib/plugins/cache.c b/contrib/plugins/cache.c index 512ef6776b7..7baff868609 100644 --- a/contrib/plugins/cache.c +++ b/contrib/plugins/cache.c @@ -208,7 +208,7 @@ static int fifo_get_first_block(Cache *cache, int set) static void fifo_update_on_miss(Cache *cache, int set, int blk_idx) { GQueue *q = cache->sets[set].fifo_queue; - g_queue_push_head(q, GINT_TO_POINTER(blk_idx)); + g_queue_push_head(q, (gpointer)(intptr_t) blk_idx); } static void fifo_destroy(Cache *cache) @@ -471,13 +471,8 @@ static void vcpu_tb_trans(qemu_plugin_id_t id, struct qemu_plugin_tb *tb) n_insns = qemu_plugin_tb_n_insns(tb); for (i = 0; i < n_insns; i++) { struct qemu_plugin_insn *insn = qemu_plugin_tb_get_insn(tb, i); - uint64_t effective_addr; - - if (sys) { - effective_addr = (uint64_t) qemu_plugin_insn_haddr(insn); - } else { - effective_addr = (uint64_t) qemu_plugin_insn_vaddr(insn); - } + uint64_t effective_addr = sys ? (uintptr_t) qemu_plugin_insn_haddr(insn) : + qemu_plugin_insn_vaddr(insn); /* * Instructions might get translated multiple times, we do not create @@ -485,14 +480,13 @@ static void vcpu_tb_trans(qemu_plugin_id_t id, struct qemu_plugin_tb *tb) * entry from the hash table and register it for the callback again. */ g_mutex_lock(&hashtable_lock); - data = g_hash_table_lookup(miss_ht, GUINT_TO_POINTER(effective_addr)); + data = g_hash_table_lookup(miss_ht, &effective_addr); if (data == NULL) { data = g_new0(InsnData, 1); data->disas_str = qemu_plugin_insn_disas(insn); data->symbol = qemu_plugin_insn_symbol(insn); data->addr = effective_addr; - g_hash_table_insert(miss_ht, GUINT_TO_POINTER(effective_addr), - (gpointer) data); + g_hash_table_insert(miss_ht, &data->addr, data); } g_mutex_unlock(&hashtable_lock); @@ -853,7 +847,7 @@ int qemu_plugin_install(qemu_plugin_id_t id, const qemu_info_t *info, qemu_plugin_register_vcpu_tb_trans_cb(id, vcpu_tb_trans); qemu_plugin_register_atexit_cb(id, plugin_exit, NULL); - miss_ht = g_hash_table_new_full(NULL, g_direct_equal, NULL, insn_free); + miss_ht = g_hash_table_new_full(g_int64_hash, g_int64_equal, NULL, insn_free); return 0; } From patchwork Tue Dec 17 22:43:02 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Pierrick Bouvier X-Patchwork-Id: 851466 Delivered-To: patch@linaro.org Received: by 2002:a5d:4888:0:b0:385:e875:8a9e with SMTP id g8csp616712wrq; Tue, 17 Dec 2024 14:44:43 -0800 (PST) X-Forwarded-Encrypted: i=2; AJvYcCUo2V0GNo07J3QEuOIeqh+C2Nva0em2lw8PPHBS6B8cn2yLdsLqt8drRDHYqd3uo6ev3xjZxw==@linaro.org X-Google-Smtp-Source: AGHT+IGjysBsdI2OWbGp3+1dP9qiAHBIiBsNFzrBGBMofNAKUZrh5A9yOslBPtOBxllRMwhFoKLl X-Received: by 2002:a05:620a:40c2:b0:7b6:d4a2:f123 with SMTP id af79cd13be357-7b8636f6de1mr71811185a.2.1734475482845; Tue, 17 Dec 2024 14:44:42 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1734475482; cv=none; d=google.com; s=arc-20240605; b=RUwMiKdLSDPsx10CVDxPjsvEU0e1QLwlOP2nrm1yJ39xa2TWsS7Z80Wh9S5U5hWiZ9 LMQoPiEd/65XEep/ve6UQB1AjEBIg5tiv5PUi+vnVWYY2/Sd8veFkxZq5C5NGyWa8Fg9 H8FQwxWGHlZqZQSeo9SnfMbJy7NbDWP1mwiz1mQFMSfZd2CuwOUJBcEe42+2QOH5vb77 CnsfsNdLeZOdxi4xam8hTVyxNWflR149XfeRnnihe2d88oLSzKraxxk+JQ23/9b0JOY+ Ma8bgOxkehk1/mKpn9OLnNKk5SXKIO65orWD1+IWDGooxLbrJo+BmmBnEGLiKLpEnaCD 6WPQ== 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=gSO3SqC3k3PD4UDj10nreaVmTIRbnjLL+fnwPXL6Pds=; fh=e32mLanPjfs41dQwy8Wt4zFa68BQ2A3naWRPcWqt/Vw=; b=AxY1yNTug588Te+JCRpaRk9rpWwaaTCb2UZ/t4xLE4oTOBJz+cO84wVvTOHlqwIOyk DJbkOQLsWA11NxyHwuoZn7wEgo/HVdMn9COsDwYf2rCAW9WVSLGuUcuAF9mj5dkwrlXz 5fGtqszRsE3rH/gFWmopkUiwGmPdN5unGRugCH38L9hQCA34ddMohzndIDs4wbPqY3Qn Blz9bE21DYmOygcJe92mkeQod5Xk8daIg0bcJNlgEdtvbTw12lEBN1mLkD26eIfInblE 2HB7zCaaIgMpqmZmk1D2msoTK86zKuYSDW6ZfZmaYGkwIu8VoxfWJ/voZXGBdGo7GvPq Z4Cg==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=gB5X4eeJ; 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-7b7048ce5f2si1047645685a.454.2024.12.17.14.44.42 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 17 Dec 2024 14:44:42 -0800 (PST) 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=gB5X4eeJ; 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 1tNgHj-0004Lb-6a; Tue, 17 Dec 2024 17:43:23 -0500 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 1tNgHg-0004Jn-Ad for qemu-devel@nongnu.org; Tue, 17 Dec 2024 17:43:20 -0500 Received: from mail-pf1-x431.google.com ([2607:f8b0:4864:20::431]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tNgHe-0001AK-J4 for qemu-devel@nongnu.org; Tue, 17 Dec 2024 17:43:20 -0500 Received: by mail-pf1-x431.google.com with SMTP id d2e1a72fcca58-725f4623df7so5204430b3a.2 for ; Tue, 17 Dec 2024 14:43:18 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1734475397; x=1735080197; 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=gSO3SqC3k3PD4UDj10nreaVmTIRbnjLL+fnwPXL6Pds=; b=gB5X4eeJskPzkm8pmNWS2gNYrLWy4EYVV3NRbKRJsGIjPho2dLFYHWKrScTwjHNo6+ RL6XFQ13t7uTS/XUS0ZizHh1fPNJvFmdHqoh4RSa+ZifX4B+JJJxKwBeX2nU6m/4PTKs 2Xl5tA2wgwAYPHexNRMZ+fjG1bS0x65bSwVN+eHShuf1EYgbxyQDgA6mGyc5fRqetP/q 1IjF5RlDmnDTn7ASxPf+6TiyWTKqaECZGBgcb1Wnt0URetoKTZpnsq7wnhNwUKoV9zSN xhqgERzeAKnG1TM1s9ilVUDyJaGPaj5OPeMIp3xa94StNvRM9q96Oh5X4ko1uD+e0h4n VKIw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1734475397; x=1735080197; 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=gSO3SqC3k3PD4UDj10nreaVmTIRbnjLL+fnwPXL6Pds=; b=wOZ8m+IHJdJFzLwM5+bX+NwpqtTVQvstGOEhVDPFlaZpEG7lVdc6gT7FSK0SGJstpG /45Af/ZgVjyLwFqzQp0AwiVKYppUEdeCHCioFWDSJAPCxQovZ/aylLEirv1wIbWxgJGO COKAyWP3YxpYckPLWnohvDQwOYOk4Szc8XY17bCQXgu6rCDAx+WOAiaSODVsTlbSfukU 8ASWYyavqsnAirwSln0pQMOGYT4RW8s5moJpJO2AJiGoTuGC3hHMbB8ZyyE9YN4R08Gf mKxfi9D+FY+K5oO2PWTvQHMmNrruVQgH4RQ3KnO47gHCicjfJwBk9o5J3dskVTNyiCh7 Injw== X-Gm-Message-State: AOJu0Yy/c442VNdenUR2TgOJq9gxzb2JicVp7+ngiS/mqagVvKkzcRwa HiK7KnXQro8VEwsyxo8jvXQUIa+xc40o9cnNE38U/5L7jHUcr5nJSTCwETIb75ghoaxkY4eAVkt T8hw= X-Gm-Gg: ASbGncvYWXVuVIOAMuHrDFFEKTK/9jhAFv2+uM83NRt85sqXD5xu9tIopWekow6vw5l es1L9HfpokSsuNN6FY/VOijp+MY+557ziLvFFa/GDnSuF0IIFtlJAN0/I5AEhlOZPnfX++QEx7M NMirvfIQZPagMNLkfrw4PFHwyaNx9qhzwbYcIi2QnKYk6HDcEGM3NAv7KcM6SqJxnuc4b0Y3n2h 10LPtp8SkPKdFo/CiOE//PKPYYWx71Qs2pWoxP+X3t67txY/b8xD1k2 X-Received: by 2002:a05:6a00:6c98:b0:729:643:744f with SMTP id d2e1a72fcca58-72a8d2ee4f9mr906549b3a.25.1734475397117; Tue, 17 Dec 2024 14:43:17 -0800 (PST) Received: from pc.. ([38.39.164.180]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-72918ac53f3sm7463214b3a.27.2024.12.17.14.43.16 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 17 Dec 2024 14:43:16 -0800 (PST) From: Pierrick Bouvier To: qemu-devel@nongnu.org Cc: Pierrick Bouvier , =?utf-8?q?Alex_Benn?= =?utf-8?q?=C3=A9e?= , richard.henderson@linaro.org, philmd@linaro.org, Alexandre Iooss , Mahmoud Mandour , Thomas Huth , Paolo Bonzini Subject: [PATCH v3 07/11] contrib/plugins/hotblocks: fix 32-bit build Date: Tue, 17 Dec 2024 14:43:02 -0800 Message-Id: <20241217224306.2900490-8-pierrick.bouvier@linaro.org> X-Mailer: git-send-email 2.39.5 In-Reply-To: <20241217224306.2900490-1-pierrick.bouvier@linaro.org> References: <20241217224306.2900490-1-pierrick.bouvier@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::431; envelope-from=pierrick.bouvier@linaro.org; helo=mail-pf1-x431.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: Richard Henderson --- contrib/plugins/hotblocks.c | 29 ++++++++++++++++++++++++----- 1 file changed, 24 insertions(+), 5 deletions(-) diff --git a/contrib/plugins/hotblocks.c b/contrib/plugins/hotblocks.c index 02bc5078bdd..f12bfb7a267 100644 --- a/contrib/plugins/hotblocks.c +++ b/contrib/plugins/hotblocks.c @@ -29,7 +29,7 @@ static guint64 limit = 20; * * The internals of the TCG are not exposed to plugins so we can only * get the starting PC for each block. We cheat this slightly by - * xor'ing the number of instructions to the hash to help + * checking the number of instructions as well to help * differentiate. */ typedef struct { @@ -50,6 +50,20 @@ static gint cmp_exec_count(gconstpointer a, gconstpointer b) return count_a > count_b ? -1 : 1; } +static guint exec_count_hash(gconstpointer v) +{ + const ExecCount *e = v; + return e->start_addr ^ e->insns; +} + +static gboolean exec_count_equal(gconstpointer v1, gconstpointer v2) +{ + const ExecCount *ea = v1; + const ExecCount *eb = v2; + return (ea->start_addr == eb->start_addr) && + (ea->insns == eb->insns); +} + static void exec_count_free(gpointer key, gpointer value, gpointer user_data) { ExecCount *cnt = value; @@ -91,7 +105,7 @@ static void plugin_exit(qemu_plugin_id_t id, void *p) static void plugin_init(void) { - hotblocks = g_hash_table_new(NULL, g_direct_equal); + hotblocks = g_hash_table_new(exec_count_hash, exec_count_equal); } static void vcpu_tb_exec(unsigned int cpu_index, void *udata) @@ -111,10 +125,15 @@ static void vcpu_tb_trans(qemu_plugin_id_t id, struct qemu_plugin_tb *tb) ExecCount *cnt; uint64_t pc = qemu_plugin_tb_vaddr(tb); size_t insns = qemu_plugin_tb_n_insns(tb); - uint64_t hash = pc ^ insns; g_mutex_lock(&lock); - cnt = (ExecCount *) g_hash_table_lookup(hotblocks, (gconstpointer) hash); + { + ExecCount e; + e.start_addr = pc; + e.insns = insns; + cnt = (ExecCount *) g_hash_table_lookup(hotblocks, &e); + } + if (cnt) { cnt->trans_count++; } else { @@ -123,7 +142,7 @@ static void vcpu_tb_trans(qemu_plugin_id_t id, struct qemu_plugin_tb *tb) cnt->trans_count = 1; cnt->insns = insns; cnt->exec_count = qemu_plugin_scoreboard_new(sizeof(uint64_t)); - g_hash_table_insert(hotblocks, (gpointer) hash, (gpointer) cnt); + g_hash_table_insert(hotblocks, cnt, cnt); } g_mutex_unlock(&lock); From patchwork Tue Dec 17 22:43:03 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Pierrick Bouvier X-Patchwork-Id: 851467 Delivered-To: patch@linaro.org Received: by 2002:a5d:4888:0:b0:385:e875:8a9e with SMTP id g8csp616750wrq; Tue, 17 Dec 2024 14:44:50 -0800 (PST) X-Forwarded-Encrypted: i=2; AJvYcCWIduGz3Lxw2wzmxcG744wGZkzq/zoq8dEbLQWYzYxb4MfzuAkVYS6bIMZRcwPSgAi12wmwwg==@linaro.org X-Google-Smtp-Source: AGHT+IE1WscFUeIpAtod0c6Nlod83F877C4yZ7FrtpFYh4K4d+bgceVdq1A6RSZrZXGH9kbif3fJ X-Received: by 2002:a05:620a:40ca:b0:7b7:869:2e48 with SMTP id af79cd13be357-7b8637ae7f5mr68843485a.47.1734475489912; Tue, 17 Dec 2024 14:44:49 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1734475489; cv=none; d=google.com; s=arc-20240605; b=gViNrkaSSTyCqna2m5v7ELnkaxqCMGblEZluNlGuxd3ErQr+zduiHtuK9BADU0KyR9 GB0Cv9R9S4lCFkw1oD5PQHpwJnxmDBEH8MWiRLGPNA6U/Xn5NtsHA1gBspBlTT9ixM4g IfqUvc6eVSUM2TEZAxCBPopCCEyVJ70BlE7muq334ctniLALQ2xpfKF1K6HeX7L5WZgy DNwZwagOE++CoHwGfLnuGASwMM7W9VGVXI7QpkR3AGQilDYcPtNl1+h1jwRIDJT5NwCN x4vx6mlfXFLEa6svcgELs150UgxxR9Zq1LGRqk4jkq8mWzC38luLHviLKOXLSR0EFvMW BRDw== 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=Fpq9JRkJksoEkEWeOYDLbD75PjoHd4ohCmD67AV53u8=; fh=e32mLanPjfs41dQwy8Wt4zFa68BQ2A3naWRPcWqt/Vw=; b=gAPK86hPqBRKh9kRgl3TDUq+cH6l5BwGVeN5DnWc+AxCS0b6QWUTrUUDGbcK552UTs rVQLKfCGQINJN+mnfTdsQgsm49Auwz7pn8YuXO7qpCeXcVQyb+YUkYDyUO5iE2+6nNMP kePCeDqifBEpLvyAgQsIcrJPVxJMCs9PxO7GVRKx84ZV82X7XNsBLUE1iesKZTVZGD24 wCgSu5jHJZU+UMVHNeudqzVd/CMTK5hg+6wTSk3qgTCsnWDX9SRcNueHODYbEf5BazbE Urq4I9KeLEI2HlVAgX53tTEeE6Yko9rSFVevlYWuYDSFVcNGAm9hRxhloRsHx4GCd9SN srvw==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="Iqk/lGhU"; 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-7b7047e4d7asi1102567385a.148.2024.12.17.14.44.49 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 17 Dec 2024 14:44:49 -0800 (PST) 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="Iqk/lGhU"; 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 1tNgHl-0004Ms-Mb; Tue, 17 Dec 2024 17:43:25 -0500 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 1tNgHg-0004Jz-Ub for qemu-devel@nongnu.org; Tue, 17 Dec 2024 17:43:20 -0500 Received: from mail-pf1-x435.google.com ([2607:f8b0:4864:20::435]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tNgHf-0001AW-98 for qemu-devel@nongnu.org; Tue, 17 Dec 2024 17:43:20 -0500 Received: by mail-pf1-x435.google.com with SMTP id d2e1a72fcca58-728ea1573c0so5112694b3a.0 for ; Tue, 17 Dec 2024 14:43:18 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1734475398; x=1735080198; 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=Fpq9JRkJksoEkEWeOYDLbD75PjoHd4ohCmD67AV53u8=; b=Iqk/lGhU7rni03XzBqYo/YngFsgOgKjsNKz9sSBzBeDWMEOSWAn3E91gKekUKVcAlg EPmKQpYo57xdsKyfAyzj4JKIqY69FUc1c/4a7rsau+f4hNz3krp0w5C6DlFwFo26qY1K ZkGsUEfnxr9sZ+T9bZsrr9CTZgl0nkUPnpTOAO8nrbUyvjr8l8GZ2QXnpgXoABpMHuDz 99zDtYoXvx5j7fjPmrqP83VamhhWcT+exSJg9fzf8uL0TN1XFvSEZIZNxTKwNwFS2/2w WDuIg0+tON2QLA4cPQmRaw/qRqwTRcEMxc9gNdrcen7qH4Cmbfg2i/g/K9oz9niMJsoW C16A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1734475398; x=1735080198; 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=Fpq9JRkJksoEkEWeOYDLbD75PjoHd4ohCmD67AV53u8=; b=uoiLQ4l/wK/+pJcQ6mNfgYkyZKSXhyWZnyhP+oTwIRu28b0BFB9V4J7QJXwEkeYsst ZNDGyOyGzO+ypZH1rj3zljUg5ZA9D2y4ZXRAfihABe/+Cq8zHXI4hpOu+BO6iCJpPvZJ ap3NiOa69SvsPuprgZJ+IGE7ZFN5+M1JrTWZ617OsKAAaYSpU68qgqM4JxKP/njHZLqD +1HLz2JppI0xE+mdk60/60oexs2fcT9w5nmVbcbhVlVMNX83Pa1hwz+T2zI6UezZY71Q 1R6BScwXWKv0aG2ql0rhIUB2waa2hr8TPqn/QCcO5l93hxZfZcEwZDsRfdtow2fRvX5K mXGg== X-Gm-Message-State: AOJu0YxuSiYklh+9050qRx40CVnZeCrJY6a1h+bT0KVxWVihUCIEG7HK 7fC5MiHoNeIRlTrdVIOMSAkUke7c2v4QR60nxBI/aPbNtn8/9rrYnsIweJUCvPNtlKrEHOj6qpW 0guo= X-Gm-Gg: ASbGncss2W2E4NyU8s5truzlOm+0wfBW+/sb7tNuqqPwHlLr8E1evA+u3ONsSJVHO24 wgmuP9dPqhBuzx1sp7zxu85VwrSahqQ1SpXnvYpJpDcoH/k7VGThc2QHhxu5OMJQpPVv+nwZQyH TaoLbDc2oOrTsD+UXQ481es//IaoLwlCRC+eXbp/r6fFMJfx1vD1AO7o7WaBh/0FjKp8K7s0jd8 oYdhT5Wd1YjCYOvQzEw68cRMrjiAewHILdjqrtuJifLIlYw7SSvMxRB X-Received: by 2002:a05:6a00:21c6:b0:728:eb32:356c with SMTP id d2e1a72fcca58-72a8d2611f2mr992157b3a.11.1734475398045; Tue, 17 Dec 2024 14:43:18 -0800 (PST) Received: from pc.. ([38.39.164.180]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-72918ac53f3sm7463214b3a.27.2024.12.17.14.43.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 17 Dec 2024 14:43:17 -0800 (PST) From: Pierrick Bouvier To: qemu-devel@nongnu.org Cc: Pierrick Bouvier , =?utf-8?q?Alex_Benn?= =?utf-8?q?=C3=A9e?= , richard.henderson@linaro.org, philmd@linaro.org, Alexandre Iooss , Mahmoud Mandour , Thomas Huth , Paolo Bonzini Subject: [PATCH v3 08/11] contrib/plugins/cflow: fix 32-bit build Date: Tue, 17 Dec 2024 14:43:03 -0800 Message-Id: <20241217224306.2900490-9-pierrick.bouvier@linaro.org> X-Mailer: git-send-email 2.39.5 In-Reply-To: <20241217224306.2900490-1-pierrick.bouvier@linaro.org> References: <20241217224306.2900490-1-pierrick.bouvier@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::435; envelope-from=pierrick.bouvier@linaro.org; helo=mail-pf1-x435.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 Reviewed-by: Richard Henderson Signed-off-by: Pierrick Bouvier --- contrib/plugins/cflow.c | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/contrib/plugins/cflow.c b/contrib/plugins/cflow.c index b39974d1cf3..930ecb46fcd 100644 --- a/contrib/plugins/cflow.c +++ b/contrib/plugins/cflow.c @@ -76,6 +76,8 @@ typedef struct { /* We use this to track the current execution state */ typedef struct { + /* address of current translated block */ + uint64_t tb_pc; /* address of end of block */ uint64_t end_block; /* next pc after end of block */ @@ -85,6 +87,7 @@ typedef struct { } VCPUScoreBoard; /* descriptors for accessing the above scoreboard */ +static qemu_plugin_u64 tb_pc; static qemu_plugin_u64 end_block; static qemu_plugin_u64 pc_after_block; static qemu_plugin_u64 last_pc; @@ -189,10 +192,11 @@ static void plugin_exit(qemu_plugin_id_t id, void *p) static void plugin_init(void) { g_mutex_init(&node_lock); - nodes = g_hash_table_new(NULL, g_direct_equal); + nodes = g_hash_table_new(g_int64_hash, g_int64_equal); state = qemu_plugin_scoreboard_new(sizeof(VCPUScoreBoard)); /* score board declarations */ + tb_pc = qemu_plugin_scoreboard_u64_in_struct(state, VCPUScoreBoard, tb_pc); end_block = qemu_plugin_scoreboard_u64_in_struct(state, VCPUScoreBoard, end_block); pc_after_block = qemu_plugin_scoreboard_u64_in_struct(state, VCPUScoreBoard, @@ -215,10 +219,10 @@ static NodeData *fetch_node(uint64_t addr, bool create_if_not_found) NodeData *node = NULL; g_mutex_lock(&node_lock); - node = (NodeData *) g_hash_table_lookup(nodes, (gconstpointer) addr); + node = (NodeData *) g_hash_table_lookup(nodes, &addr); if (!node && create_if_not_found) { node = create_node(addr); - g_hash_table_insert(nodes, (gpointer) addr, (gpointer) node); + g_hash_table_insert(nodes, &node->addr, node); } g_mutex_unlock(&node_lock); return node; @@ -234,7 +238,7 @@ static void vcpu_tb_branched_exec(unsigned int cpu_index, void *udata) uint64_t lpc = qemu_plugin_u64_get(last_pc, cpu_index); uint64_t ebpc = qemu_plugin_u64_get(end_block, cpu_index); uint64_t npc = qemu_plugin_u64_get(pc_after_block, cpu_index); - uint64_t pc = GPOINTER_TO_UINT(udata); + uint64_t pc = qemu_plugin_u64_get(tb_pc, cpu_index); /* return early for address 0 */ if (!lpc) { @@ -305,10 +309,11 @@ static void vcpu_tb_trans(qemu_plugin_id_t id, struct qemu_plugin_tb *tb) * handle both early block exits and normal branches in the * callback if we hit it. */ - gpointer udata = GUINT_TO_POINTER(pc); + qemu_plugin_register_vcpu_tb_exec_inline_per_vcpu( + tb, QEMU_PLUGIN_INLINE_STORE_U64, tb_pc, pc); qemu_plugin_register_vcpu_tb_exec_cond_cb( tb, vcpu_tb_branched_exec, QEMU_PLUGIN_CB_NO_REGS, - QEMU_PLUGIN_COND_NE, pc_after_block, pc, udata); + QEMU_PLUGIN_COND_NE, pc_after_block, pc, NULL); /* * Now we can set start/end for this block so the next block can From patchwork Tue Dec 17 22:43:04 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Pierrick Bouvier X-Patchwork-Id: 851471 Delivered-To: patch@linaro.org Received: by 2002:a5d:4888:0:b0:385:e875:8a9e with SMTP id g8csp617075wrq; Tue, 17 Dec 2024 14:45:34 -0800 (PST) X-Forwarded-Encrypted: i=2; AJvYcCVKWUsedbt2TxA5mGIfH3HSmt+0wE/BeFBY5GPVUmteIc3WKr9UplNKnOVNP2Xr85un2B5QIw==@linaro.org X-Google-Smtp-Source: AGHT+IF5OB/Q9N3Ne8bDaBUSDvIV0BI2b3m4tHqzj4fHHxq0JDpgwoiToPzuRIvgQKDiadencL0P X-Received: by 2002:a05:6214:27c2:b0:6d4:dae:6250 with SMTP id 6a1803df08f44-6dd092504famr11745336d6.34.1734475534776; Tue, 17 Dec 2024 14:45:34 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1734475534; cv=none; d=google.com; s=arc-20240605; b=DBWZ7rUydx1lIO1QR8nnqK/lMAWQNCf5A3DrMCOQXHu+pUYtEGooCdroZOzpkDnDNk Q0R6j6G1z/ZklWtVQ8q99BtczW8CQYtS3wswqA3rc8MUAfsQHi4rC5JmsuVIvbbIkpag otwKaJVX3RGzZK373LXbbTA+b+DvxadAKhctylhnBr0vwbEBKdBXbWBP1eeEqcRKnHFC bLxaBH+Q8YdMm9/RzdcRwf0+pMapcdON7xIUya/TFO2LKrONnVV5vfwgGR3FNzj8kBqz 0ChVMicyGPO1dwxnil2SFJG8WZl7/Al3+d5M841XOy/BCOH7GBsE+1N2+zpTN6ZzlRnr +r7A== 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=Rw327xVdkany76CVhD99+3VcZY22zDM8k532HNs8NjQ=; fh=e32mLanPjfs41dQwy8Wt4zFa68BQ2A3naWRPcWqt/Vw=; b=d3bfbGyT/jSAX9TwE3gX8bGeSQTMbDleOoZfWuFHUfieRZvZSQ1wevLyPOmVpVGCeP wWd0MLa+FOApEQCr44MpW+IImipoay1nGOnlpVW9ylyvUlc8y+MJl9+A53+U3L3RrcLV a9y2qhTWAj4fkyyePyFGY+a7j35qlR5vto2vtOAo9Kl1kR8uJ/WfPkhg/0vaqmaGW3h8 O+WdQE6I8SJo2rpoQO3+GrTkE5WvniY8gvuNpl1NBiX5BSB5bf6mE1CPwI9eRsYlwpWL /DSUv2Uh0VNcLchAAJB4RtmOb5RiKKTp+ariH6gyLr5yrRgef6EsB3tH5BiyTCNg6DVT dMWA==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=sACk+fdI; 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-6dcf627940asi31199796d6.402.2024.12.17.14.45.34 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 17 Dec 2024 14:45:34 -0800 (PST) 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=sACk+fdI; 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 1tNgHm-0004NN-Iz; Tue, 17 Dec 2024 17:43:26 -0500 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 1tNgHj-0004Ls-In for qemu-devel@nongnu.org; Tue, 17 Dec 2024 17:43:23 -0500 Received: from mail-pf1-x42e.google.com ([2607:f8b0:4864:20::42e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tNgHg-0001Ap-Io for qemu-devel@nongnu.org; Tue, 17 Dec 2024 17:43:23 -0500 Received: by mail-pf1-x42e.google.com with SMTP id d2e1a72fcca58-728ea1e0bdbso4575847b3a.0 for ; Tue, 17 Dec 2024 14:43:19 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1734475399; x=1735080199; 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=Rw327xVdkany76CVhD99+3VcZY22zDM8k532HNs8NjQ=; b=sACk+fdIJD3tCbI1JA8tK8/Ur0x+MvfyypoCURus24y10/wgEAXYK/dqMtMxo2m0vs /BqD2r46E8ydMkypLwwHlgHSPSaOH7rfQsWSINZEei+x8RIryLaNvBxQWRksDTNulb83 zXXtPx4fSkInSSxtorr6gYYFJB/7TFvjRoXbGa6VVTRMRFTjDgsUp3Y+WBw2m/iRvDrg Dv9q9u6GbqiNwTJ4e/MTQF6GfQQ0l4F2guTh4pcK5/p5EEtocKOXScIGEk9AXZKOeRaQ sqoaOw+axbz98isnHwCevTwA7OzusdQfAibCZJCcnjMt0NQ70ZE4+GqKd2fspDUWnbWy aj6A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1734475399; x=1735080199; 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=Rw327xVdkany76CVhD99+3VcZY22zDM8k532HNs8NjQ=; b=Fabu5T0TnQeevEFiUWf19LfkkIF1evzAZ2IGWsJNr0NCnUV91SBza9CSMc9hYEnu3T FmpbDaxMvA6ukaAlsjTWT52mVuDvXmVjUF8Tae+x03VaAOpmy9/6wX7mlnswXoxuWxQJ vwYJVHHCIKmJRtb4fyFXmTYFteIQVeFhkqAdqSMUVQmDr16RCi3ufUJgASSiWZyiaEqf HHH0RvVKJlO8A3OpAZDRUiO5SyIy4eNypU6m4Ro2H3ARd3owPP6ubiOnVmwfZF1c2+Mk 4m61E28j5O625b59+jT3Dgf9PapOPCXpg+ep65BhCMewCRDZKCDxEbrCYOjY9OyA6ePu Ysrg== X-Gm-Message-State: AOJu0YyQkrhWB3SfMm7FAQ17beaGUYpddX1wyKQNg13o7INssoKD/MVf GdVtzRofZVVzz2oKZDKqCFzJVWXz3RAmTW/KjREU7xMzPKRROXu3YR0elctvPHsrPGByyYfE6JT e6kk= X-Gm-Gg: ASbGnctS/+53ehHrPpoEs0FbKkgG5QUKvdPpCdKCrUIRyoLx55IsQYHiNJZaergk+fd WcvV7IJMWNGaFmAkOY67b4is87aCZOnHi4v9VrQpJ3lbqVY5hBjNPMhBulf0aa00c8u5pI+2ksh bexb0rQLeeJ4UVWv0so0LNmYLz6+wJWp98fO/WFf3STZBxZ8J7eJo2TZUXQS/TQy9YB//0dGfX8 1l1czX0Wtm5CD69hDL0u4IrqiQLPfCtAanjUK1jyCmCLFaPw+rE1Rb7 X-Received: by 2002:a05:6a21:1646:b0:1e0:d73b:15e4 with SMTP id adf61e73a8af0-1e5b487e05fmr1261600637.29.1734475399007; Tue, 17 Dec 2024 14:43:19 -0800 (PST) Received: from pc.. ([38.39.164.180]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-72918ac53f3sm7463214b3a.27.2024.12.17.14.43.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 17 Dec 2024 14:43:18 -0800 (PST) From: Pierrick Bouvier To: qemu-devel@nongnu.org Cc: Pierrick Bouvier , =?utf-8?q?Alex_Benn?= =?utf-8?q?=C3=A9e?= , richard.henderson@linaro.org, philmd@linaro.org, Alexandre Iooss , Mahmoud Mandour , Thomas Huth , Paolo Bonzini Subject: [PATCH v3 09/11] contrib/plugins/hwprofile: fix 32-bit build Date: Tue, 17 Dec 2024 14:43:04 -0800 Message-Id: <20241217224306.2900490-10-pierrick.bouvier@linaro.org> X-Mailer: git-send-email 2.39.5 In-Reply-To: <20241217224306.2900490-1-pierrick.bouvier@linaro.org> References: <20241217224306.2900490-1-pierrick.bouvier@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::42e; envelope-from=pierrick.bouvier@linaro.org; helo=mail-pf1-x42e.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 Reviewed-by: Richard Henderson Signed-off-by: Pierrick Bouvier --- contrib/plugins/hwprofile.c | 27 ++++++++++++++++----------- 1 file changed, 16 insertions(+), 11 deletions(-) diff --git a/contrib/plugins/hwprofile.c b/contrib/plugins/hwprofile.c index 739ac0c66b5..2a4cbc47d40 100644 --- a/contrib/plugins/hwprofile.c +++ b/contrib/plugins/hwprofile.c @@ -43,6 +43,8 @@ typedef struct { static GMutex lock; static GHashTable *devices; +static struct qemu_plugin_scoreboard *source_pc_scoreboard; +static qemu_plugin_u64 source_pc; /* track the access pattern to a piece of HW */ static bool pattern; @@ -159,7 +161,7 @@ static DeviceCounts *new_count(const char *name, uint64_t base) count->name = name; count->base = base; if (pattern || source) { - count->detail = g_hash_table_new(NULL, NULL); + count->detail = g_hash_table_new(g_int64_hash, g_int64_equal); } g_hash_table_insert(devices, (gpointer) name, count); return count; @@ -169,7 +171,7 @@ static IOLocationCounts *new_location(GHashTable *table, uint64_t off_or_pc) { IOLocationCounts *loc = g_new0(IOLocationCounts, 1); loc->off_or_pc = off_or_pc; - g_hash_table_insert(table, (gpointer) off_or_pc, loc); + g_hash_table_insert(table, &loc->off_or_pc, loc); return loc; } @@ -224,12 +226,12 @@ static void vcpu_haddr(unsigned int cpu_index, qemu_plugin_meminfo_t meminfo, /* either track offsets or source of access */ if (source) { - off = (uint64_t) udata; + off = qemu_plugin_u64_get(source_pc, cpu_index); } if (pattern || source) { IOLocationCounts *io_count = g_hash_table_lookup(counts->detail, - (gpointer) off); + &off); if (!io_count) { io_count = new_location(counts->detail, off); } @@ -247,10 +249,14 @@ static void vcpu_tb_trans(qemu_plugin_id_t id, struct qemu_plugin_tb *tb) for (i = 0; i < n; i++) { struct qemu_plugin_insn *insn = qemu_plugin_tb_get_insn(tb, i); - gpointer udata = (gpointer) (source ? qemu_plugin_insn_vaddr(insn) : 0); + if (source) { + uint64_t pc = qemu_plugin_insn_vaddr(insn); + qemu_plugin_register_vcpu_mem_inline_per_vcpu( + insn, rw, QEMU_PLUGIN_INLINE_STORE_U64, + source_pc, pc); + } qemu_plugin_register_vcpu_mem_cb(insn, vcpu_haddr, - QEMU_PLUGIN_CB_NO_REGS, - rw, udata); + QEMU_PLUGIN_CB_NO_REGS, rw, NULL); } } @@ -306,10 +312,9 @@ int qemu_plugin_install(qemu_plugin_id_t id, const qemu_info_t *info, return -1; } - /* Just warn about overflow */ - if (info->system.smp_vcpus > 64 || - info->system.max_vcpus > 64) { - fprintf(stderr, "hwprofile: can only track up to 64 CPUs\n"); + if (source) { + source_pc_scoreboard = qemu_plugin_scoreboard_new(sizeof(uint64_t)); + source_pc = qemu_plugin_scoreboard_u64(source_pc_scoreboard); } plugin_init(); From patchwork Tue Dec 17 22:43:05 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Pierrick Bouvier X-Patchwork-Id: 851470 Delivered-To: patch@linaro.org Received: by 2002:a5d:4888:0:b0:385:e875:8a9e with SMTP id g8csp617036wrq; Tue, 17 Dec 2024 14:45:30 -0800 (PST) X-Forwarded-Encrypted: i=2; AJvYcCXij+gOrw5ZaujaE69+wm/hTQgpK7D3UheTcbeWW5nDSpJUx6F7x7ChrKnRLVqKHfYivQraew==@linaro.org X-Google-Smtp-Source: AGHT+IGTX0ZbrjxPw6T1JI2fmMuQDn/11hUM7f4jEXJQwk6Y/RKkE2qRppMH/3gCSx0t3ZUakArr X-Received: by 2002:a05:620a:444e:b0:7b6:d312:c5c6 with SMTP id af79cd13be357-7b8635cd12cmr91437985a.9.1734475530036; Tue, 17 Dec 2024 14:45:30 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1734475530; cv=none; d=google.com; s=arc-20240605; b=eiGgFem2KssdcpFjDj4D0xiRQ7S5WIzwaEM2ie12iUI0uau6TqeGVNTb/2D4WlU68M bSamVoxqBSu6dZ4BWEGWmtVoisDcvW60zG+20/CC5yL3UzqtlmkmSnD7GEdfhBjYrNdI /8T3plgD4Dtsr2Lfler7jZNTYQ8vNYrNPHjAZ3n7oFQs7cjb3wr5aWwHUq6HMylFXvth 2ZLPH/LCe/gT/RwaxMGbZ4Z7yYRr8/aXfdal0SdsUdEupy93Y/qlzM39AoIngfBvPKR7 QdfHUKpj7vHeQ6DykM7P/c+9BGzJjU7rGWMLkwfTpWrCTYywF/7/e3FAzG+U9Tg4Le/j yLnw== 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=hu3Esp4NNyduPBoo/WasSoSQDzLT4+3rhRtkkpGwr3E=; fh=e32mLanPjfs41dQwy8Wt4zFa68BQ2A3naWRPcWqt/Vw=; b=BUW1jz7gRYUuuQ0dN0nQcj7j466hk+6Iq10LgFuLz5khFii8N9En9uKdsPX5pvU4a1 NgpBeWSw2MhygVbCQkUXeJXg+Hu5xDMSg+wzV35Lxuy76QM9q+qAXaKhIOxarFgqRNap qjiYwXru7UU5RNlLxEVt4RLsB6+YdqkGn8FfMuvjmBrz6RExWMpK/zCRf3uNP1vajwKs vpWNT+a8a8VVr7uxQ9r+by23Qmc0zl6SLQ/xmD71imBTzOKMDhSdq8+VTAXQbxvwZnMU 5TcK9fNglea2ULe94WqxE8lk11Nc12qis1jMJnC/mjGunlHx5kw8OUBarPnt6vcsLKE4 BOoA==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=tjEl73Gm; 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-7b7048c0208si1008918785a.257.2024.12.17.14.45.29 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 17 Dec 2024 14:45:30 -0800 (PST) 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=tjEl73Gm; 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 1tNgHn-0004NT-Dh; Tue, 17 Dec 2024 17:43:27 -0500 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 1tNgHj-0004MJ-Tu for qemu-devel@nongnu.org; Tue, 17 Dec 2024 17:43:24 -0500 Received: from mail-pf1-x42b.google.com ([2607:f8b0:4864:20::42b]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tNgHh-0001BI-CV for qemu-devel@nongnu.org; Tue, 17 Dec 2024 17:43:23 -0500 Received: by mail-pf1-x42b.google.com with SMTP id d2e1a72fcca58-725dc290c00so143138b3a.0 for ; Tue, 17 Dec 2024 14:43:20 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1734475400; x=1735080200; 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=hu3Esp4NNyduPBoo/WasSoSQDzLT4+3rhRtkkpGwr3E=; b=tjEl73Gm4ECZ2jnVitQeAAZEi9eqammy2zCXCe7SnYh/XSK4HJji+AekuW/cVwJzvu zzjbqwmcy4YcfDep8uSn7UKBUrR5sgDiMHngO5wzTFduB//8ZEuX0sDHwX4iblrKI8pP qC2zLFoga/idR+Kp04aHwz+CLuCvySsJGV9mkXSSIbWkqRZCb6LEGD6FExqlmNV1X+p5 yzqIz+y41aVDICx1VW2d1tB996OwtLHuX4BPWdII0v+V8HRsmcNsMdq4+7XddsX9OcYF TS5cfu3nJUNNaJSBBY5GaZjqBEcWf87MGbtLmA2p/lXqyQagxwZkqBdGehFxKy0u0wf6 PZhA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1734475400; x=1735080200; 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=hu3Esp4NNyduPBoo/WasSoSQDzLT4+3rhRtkkpGwr3E=; b=D3jVYWlZ3qd0W1XDyuFBlX/04X4VrPLBb2qO4vu8Z/7B4ch5VnlgmUnjVrKW1Ky8/y FiYF1n+97GiGqp8oECUGziCTaWDdRCePYoaQ3AbnfdIq2uNe8xgj79bSlZoBdUOlhG1U TxHgs3vs++OyanXSL7YiOByGwLokO/Vhd1Jo+QZHb7pamNKUZNblJh1hcrEVTpZ6cVxt ZZjwyfYFnvYH/gZGOmsIosewSkqYoWvu8Pp1BqGyEIRY0r3WiYZvEPHxGEJT+aezbwnT 0AqQ9/W16Vcb6uPfIZXOMYfYF/dG2wL3cEZ38zdV2r1vSAlUKzVF/li3BCWtAskqfTKF Pq7A== X-Gm-Message-State: AOJu0YwGIK5tas0GhlrWDLssub65bP3gi4abSMmBLx/wcORhrpsKMG7A mmjpHaVYFZysyvJUjctxkllraxQR+MqPtbnHAMxuptAYfH7W89zh0N3wQvw9msuTdhvMmv3hn0I rNEc= X-Gm-Gg: ASbGncuFjoM+Vcs6ga6r2ncGamP+tb9wtmam6J0Hauw7iYoRe1Ecn1JALKT+pQxlVbe iDz2jjfZLGmxze8ybtg4uZQa7Cqd3Y5ng+s/a8Ko8HWx69SCpWiz2GfLf1vc17XUQwmzn3aYrvd S/GUIVX1XFxNUxmvmzI00gB6wRL3klCFgu+JTkY9e5BNcrQXKLwE/Dl+38Y4VI4IqknUSFEWerK sxmw0wZRO4CrvXNJ+pyKoFfzok0esJqmUxN6ACyShdfQpd+bQTXKjoR X-Received: by 2002:a05:6a21:3a8c:b0:1e1:adb8:c011 with SMTP id adf61e73a8af0-1e5b5a3e875mr730480637.18.1734475399959; Tue, 17 Dec 2024 14:43:19 -0800 (PST) Received: from pc.. ([38.39.164.180]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-72918ac53f3sm7463214b3a.27.2024.12.17.14.43.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 17 Dec 2024 14:43:19 -0800 (PST) From: Pierrick Bouvier To: qemu-devel@nongnu.org Cc: Pierrick Bouvier , =?utf-8?q?Alex_Benn?= =?utf-8?q?=C3=A9e?= , richard.henderson@linaro.org, philmd@linaro.org, Alexandre Iooss , Mahmoud Mandour , Thomas Huth , Paolo Bonzini Subject: [PATCH v3 10/11] contrib/plugins/hotpages: fix 32-bit build Date: Tue, 17 Dec 2024 14:43:05 -0800 Message-Id: <20241217224306.2900490-11-pierrick.bouvier@linaro.org> X-Mailer: git-send-email 2.39.5 In-Reply-To: <20241217224306.2900490-1-pierrick.bouvier@linaro.org> References: <20241217224306.2900490-1-pierrick.bouvier@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::42b; envelope-from=pierrick.bouvier@linaro.org; helo=mail-pf1-x42b.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 Reviewed-by: Richard Henderson Signed-off-by: Pierrick Bouvier --- contrib/plugins/hotpages.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/contrib/plugins/hotpages.c b/contrib/plugins/hotpages.c index 8316ae50c72..c6e64937194 100644 --- a/contrib/plugins/hotpages.c +++ b/contrib/plugins/hotpages.c @@ -103,7 +103,7 @@ static void plugin_exit(qemu_plugin_id_t id, void *p) static void plugin_init(void) { page_mask = (page_size - 1); - pages = g_hash_table_new(NULL, g_direct_equal); + pages = g_hash_table_new(g_int64_hash, g_int64_equal); } static void vcpu_haddr(unsigned int cpu_index, qemu_plugin_meminfo_t meminfo, @@ -130,12 +130,12 @@ static void vcpu_haddr(unsigned int cpu_index, qemu_plugin_meminfo_t meminfo, page &= ~page_mask; g_mutex_lock(&lock); - count = (PageCounters *) g_hash_table_lookup(pages, GUINT_TO_POINTER(page)); + count = (PageCounters *) g_hash_table_lookup(pages, &page); if (!count) { count = g_new0(PageCounters, 1); count->page_address = page; - g_hash_table_insert(pages, GUINT_TO_POINTER(page), (gpointer) count); + g_hash_table_insert(pages, &count->page_address, count); } if (qemu_plugin_mem_is_store(meminfo)) { count->writes++; From patchwork Tue Dec 17 22:43:06 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Pierrick Bouvier X-Patchwork-Id: 851469 Delivered-To: patch@linaro.org Received: by 2002:a5d:4888:0:b0:385:e875:8a9e with SMTP id g8csp616811wrq; Tue, 17 Dec 2024 14:45:01 -0800 (PST) X-Forwarded-Encrypted: i=2; AJvYcCXIkXx3QEwoQg/i2WjQOU1JkDQIZKQXPkiXDrw/GwFjqs83rSC62gXbgfRH6m1YPNujCDR23g==@linaro.org X-Google-Smtp-Source: AGHT+IEWU9Y8H2wL8uplxeAduYJ4En7v53QTE/lEbloPEFRx1Pz7ujHSyLurrj6yz+ABNAUoLOAq X-Received: by 2002:a05:620a:370b:b0:7ac:abb0:2317 with SMTP id af79cd13be357-7b8637710efmr95725085a.37.1734475501651; Tue, 17 Dec 2024 14:45:01 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1734475501; cv=none; d=google.com; s=arc-20240605; b=JlpDd3gi8UYqiWsNJL18jrjqxX3rQf6Zm5Dqrm8jivEPmOY1KymtfDH1GYN7k4iQKr TnHuRCoP7OYJOoN6jOHHfCcVgsnRKVMpEKiVmFm/TEa5XWv4n6ffNr3wXvA28b63LdcC UqIyWLIK0IDZv9KJawR9JtkGvNevznbw7rooHaFTg5IoksQ4m2kwbgI003KSbf9TvyQZ selMWMo7ds1YoKzJ0ae7qVOYOZb4WJBLrdeTZ9WX8r5wr3K/YH9pKsYbGeGzxaTMK3Mv BvPSyXewWRKTjTOzkh0jRE+dTHgghRdX1KRlqgPRFqmyIfaxt0ZaLiVmuV3XV8gi695/ /37g== 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=jgxR9arESI3Aidanx+cexjGed292D3H2X6RqwRpaLC4=; fh=e32mLanPjfs41dQwy8Wt4zFa68BQ2A3naWRPcWqt/Vw=; b=cNFXIyxIlCAS5WcKT4EmMQSdY5HU3OUWPmEkfozuwd0PNx7plh4Yq1yGdp/HzCFd2V JDkkIquwvDhXDDLOEqK/TGeSLgEpwDf+dykMpcJSaUjMqAyUtqXDhk7zo5+BiK8nG5rl pNy3AJ9jA4sKxnGw29US1mWmPw/wQPx65u+XJ2ZI17L7xTRKgJQSoRbB2b/TjKEwrlQL XZBiKlAUQos+5RNhOb3DHhwIR/NyLc/jNU0gj6gvqdvjxQqtO2ZodTySZXpRyIsCxLVQ PBLnPoTYEkd4hL+G1S1mfidO4gGglc+8NWQg84Uspnb9iv+rIgdM865h3o1/XmyLPlzi b/tg==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="B/Eee2/B"; 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-7b7048e38easi1195724185a.544.2024.12.17.14.45.01 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 17 Dec 2024 14:45:01 -0800 (PST) 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="B/Eee2/B"; 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 1tNgHl-0004NJ-LS; Tue, 17 Dec 2024 17:43:25 -0500 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 1tNgHj-0004M9-Nr for qemu-devel@nongnu.org; Tue, 17 Dec 2024 17:43:23 -0500 Received: from mail-pf1-x434.google.com ([2607:f8b0:4864:20::434]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tNgHi-0001Bb-1o for qemu-devel@nongnu.org; Tue, 17 Dec 2024 17:43:23 -0500 Received: by mail-pf1-x434.google.com with SMTP id d2e1a72fcca58-7292a83264eso2468954b3a.0 for ; Tue, 17 Dec 2024 14:43:21 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1734475401; x=1735080201; 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=jgxR9arESI3Aidanx+cexjGed292D3H2X6RqwRpaLC4=; b=B/Eee2/BQZ6S80+QlreecIwlDk6/dbBNBBjqgkezvwtqEpcnmTEv791tAaDcAiLSkw 30pOxW1Jj8KbxGOU/FOQTrf0RUNNyIaI79nrNkVncJnhFwLONAUPXAaMuLvBDk8EI+2M hMn7PiFIpWF9ay/rgbJ1bL14Waqo+qDzLewjTJBvT2wgj+9x8FRXa4dwrweViD32XCh3 4cC/P8wisHxF4B2ZuWed+shYtql8xxYh69Oa+kDpmTdkWmEEdzwu8jTKuchJm9lXfXg/ PR8xDDyzh159dsAYt4Izb9fh3LrpIMJ5JvndqnKytH413Dm7uF6EKfHun/OJGgjuBPqw 8Idw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1734475401; x=1735080201; 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=jgxR9arESI3Aidanx+cexjGed292D3H2X6RqwRpaLC4=; b=IOt8pi6ORp4MI+FzTxjZI2xGnatoBrA01ysYEmJRjoOkMLGBIHRAiE9Mel78Lkj3m9 oUYl3NZbx+XBx4MXFbnaopglA+RtA3od/qBVV6dhWJZ37M+k6zp9pRWSaiZrl3Nt6T97 Pzn475U25a1+AwLBlcnmg2eEoHNMRyIiq+z7bzDClSSEhZUi4xCIFwChYr9BmCoLJvSh YdQzBEiiGgd9Gm4oYhQIzWboBIjTBSAd/7My8V7rZHJ5+doD/AuvbkOHv78jUrkMG8D0 OXdcmixOd9PNTLTSYhHHyu/oHpcV7xOrkkqZsdcd3NH4+HfIWGSLDJSFsTaKI3f5Bi9r DwrA== X-Gm-Message-State: AOJu0YzdXZXLcq431zl2Fl5hmz+XZ3S1r+IboPs5wuHGVEd5UQYBa5Nk Vs5bfyw2yqCRn2LGSsbQ+F93fKyAsY09tjM463mNtB0DaqRDJRnATX+ik8r4BMQf04CqigSZbz/ /9HA= X-Gm-Gg: ASbGnctAYUKq2jceSpZWucifDkx4JTaGxv14N99KfYxGhcOTMSBQxuwbrWBVylbVdMW Oiyecs4xktnaS6p5zo/7SNe2y/1mVpBnV1Zph3M+TNuQN3tQrqm9abbpTVZRC62o6WxYx9nABFh uhrTcEuQ7PHtPXQcdm6tnz58s8YdJyWc0t16VXNlYuxKMVPZFMLlb5keSrPEqk5INeqStRriG+7 +BPHjVpPmanHtnMsOD38fOVjKPq3LDZni6joUdiSxZWAe+0DUL8EYq9 X-Received: by 2002:a05:6a00:2906:b0:724:f86e:e3d9 with SMTP id d2e1a72fcca58-72a8d260780mr971134b3a.14.1734475400871; Tue, 17 Dec 2024 14:43:20 -0800 (PST) Received: from pc.. ([38.39.164.180]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-72918ac53f3sm7463214b3a.27.2024.12.17.14.43.20 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 17 Dec 2024 14:43:20 -0800 (PST) From: Pierrick Bouvier To: qemu-devel@nongnu.org Cc: Pierrick Bouvier , =?utf-8?q?Alex_Benn?= =?utf-8?q?=C3=A9e?= , richard.henderson@linaro.org, philmd@linaro.org, Alexandre Iooss , Mahmoud Mandour , Thomas Huth , Paolo Bonzini Subject: [PATCH v3 11/11] configure: reenable plugins by default for 32-bit hosts Date: Tue, 17 Dec 2024 14:43:06 -0800 Message-Id: <20241217224306.2900490-12-pierrick.bouvier@linaro.org> X-Mailer: git-send-email 2.39.5 In-Reply-To: <20241217224306.2900490-1-pierrick.bouvier@linaro.org> References: <20241217224306.2900490-1-pierrick.bouvier@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::434; envelope-from=pierrick.bouvier@linaro.org; helo=mail-pf1-x434.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 Reviewed-by: Richard Henderson Signed-off-by: Pierrick Bouvier --- configure | 21 +-------------------- 1 file changed, 1 insertion(+), 20 deletions(-) diff --git a/configure b/configure index 18336376bff..02f1dd2311f 100755 --- a/configure +++ b/configure @@ -528,25 +528,6 @@ case "$cpu" in ;; esac -# Now we have our CPU_CFLAGS we can check if we are targeting a 32 or -# 64 bit host. - -check_64bit_host() { -cat > $TMPC <