From patchwork Wed Aug 14 23:36:40 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Pierrick Bouvier X-Patchwork-Id: 1972630 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.a=rsa-sha256 header.s=google header.b=qEDVlhdf; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=patchwork.ozlabs.org) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4Wkl7S6Dd6z1yNr for ; Thu, 15 Aug 2024 09:38:28 +1000 (AEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1seNY4-0001dJ-E0; Wed, 14 Aug 2024 19:37:00 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1seNY3-0001cq-Pf for qemu-devel@nongnu.org; Wed, 14 Aug 2024 19:36:59 -0400 Received: from mail-oa1-x2c.google.com ([2001:4860:4864:20::2c]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1seNY2-0006Vt-Az for qemu-devel@nongnu.org; Wed, 14 Aug 2024 19:36:59 -0400 Received: by mail-oa1-x2c.google.com with SMTP id 586e51a60fabf-26ff51294c4so340074fac.3 for ; Wed, 14 Aug 2024 16:36:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1723678616; x=1724283416; 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=I0fMYCzEpAflnqdXJ+mHKpT1nx2a+UfFr0qfxTWmEKw=; b=qEDVlhdfP5D+8PmPImILA+del3wTY+XKpl1XKwhLzzkr3jR6N0o6x/61UHdPdeuImh PoBQ+ca2wa3J1UN90BEM5q7L/7/w3p2rEXOpnjWIWnRBQcIhGfbXLfI0Qy/3bRLdn3eW /TCCt5878TjbsaG9q1FWz5hMkNGDW60kMt0RT/+2y0dvMnrQq6lYYdKQxCsQaxklSsgK NAZCV5HCO9/VkbhJ/tf2EsljnzMXG/WFXKKp04BZ7KPgSB82oER0qCh0d9PC4xx4kPk8 SoWxiRuxvHY57Fn6pBYvEVkBd1kqL8Gxf5DpVHITLbPn5KadZF1j/miz2npUdqJmc9Ae GkZA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1723678616; x=1724283416; 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=I0fMYCzEpAflnqdXJ+mHKpT1nx2a+UfFr0qfxTWmEKw=; b=rqxwMG4HKH7z6DTol++Vyxdx0BymIgnZyDOeYiA4Pnz+zJpbTwb8LzkZs5nIuUvC5P DfCTMmgUJ+5TGZNX0zeYmq63xCmKlD2jEvSybza4jrg32wB0P4MD/giGSq4mUBI4Aipk 4G4recDQbWjwNL2kSpRcxNnNeCJ7VJ3bBAYZeuJ8KL0gTZOke+dov7JM5emQHh1lelwK wOccmEm0fosi0aKDDDiP2zqX5SH49UruusK51O/JuYxV5uQJmA5HU5BAMRHg67nALVH9 cBmwBq5Vg6rJC9Dk3EJgkEJLDqvn4ghw5oT5J4E/Krbuh4yrLdReujuaLL2u6AuTFDG0 hn/A== X-Gm-Message-State: AOJu0YxP5XlN2NXrky1Df+fypqXymTWFudg1CKSTmAAUW8UkWTYaAxAw G3OodzTaJ4NyhxMDf2yu/nJHo7dKnn2CzKnZ0vtEygyjD7pgmz/YxUlUMf+Xc/ne6j3ywrsh7kD qcAE= X-Google-Smtp-Source: AGHT+IHusb9SoXaxUwrwU67R+ivOHd7P1z/bj2G3qZlCj8wyEnsH0hY6Dj1UMG2uprcFu4MRRYZqFw== X-Received: by 2002:a05:6871:205:b0:260:e7ed:27f4 with SMTP id 586e51a60fabf-26fe5a97efemr5249384fac.27.1723678615795; Wed, 14 Aug 2024 16:36:55 -0700 (PDT) Received: from linaro.vn.shawcable.net ([2604:3d08:9384:1d00::b861]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-7127aef57dfsm112164b3a.115.2024.08.14.16.36.54 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 14 Aug 2024 16:36:55 -0700 (PDT) From: Pierrick Bouvier To: qemu-devel@nongnu.org Cc: =?utf-8?q?Alex_Benn=C3=A9e?= , Paolo Bonzini , Mahmoud Mandour , =?utf-8?q?Daniel_P=2E_Berrang=C3=A9?= , Alexandre Iooss , Thomas Huth , Pierrick Bouvier , =?utf-8?q?Marc-Andr=C3=A9_L?= =?utf-8?q?ureau?= , =?utf-8?q?Philippe_Mathieu?= =?utf-8?q?-Daud=C3=A9?= Subject: [PATCH 1/6] contrib/plugins/execlog: fix warning Date: Wed, 14 Aug 2024 16:36:40 -0700 Message-Id: <20240814233645.944327-2-pierrick.bouvier@linaro.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240814233645.944327-1-pierrick.bouvier@linaro.org> References: <20240814233645.944327-1-pierrick.bouvier@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2001:4860:4864:20::2c; envelope-from=pierrick.bouvier@linaro.org; helo=mail-oa1-x2c.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, T_SCC_BODY_TEXT_LINE=-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+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Found on debian stable. ../contrib/plugins/execlog.c: In function ‘vcpu_tb_trans’: ../contrib/plugins/execlog.c:236:22: error: declaration of ‘n’ shadows a previous local [-Werror=shadow=local] 236 | for (int n = 0; n < all_reg_names->len; n++) { | ^ ../contrib/plugins/execlog.c:184:12: note: shadowed declaration is here 184 | size_t n = qemu_plugin_tb_n_insns(tb); | Signed-off-by: Pierrick Bouvier Reviewed-by: Thomas Huth Reviewed-by: Alexandre Iooss --- contrib/plugins/execlog.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/contrib/plugins/execlog.c b/contrib/plugins/execlog.c index 1c1601cc0b4..d67d0107613 100644 --- a/contrib/plugins/execlog.c +++ b/contrib/plugins/execlog.c @@ -181,8 +181,8 @@ static void vcpu_tb_trans(qemu_plugin_id_t id, struct qemu_plugin_tb *tb) bool check_regs_this = rmatches; bool check_regs_next = false; - size_t n = qemu_plugin_tb_n_insns(tb); - for (size_t i = 0; i < n; i++) { + size_t n_insns = qemu_plugin_tb_n_insns(tb); + for (size_t i = 0; i < n_insns; i++) { char *insn_disas; uint64_t insn_vaddr; From patchwork Wed Aug 14 23:36:41 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Pierrick Bouvier X-Patchwork-Id: 1972631 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.a=rsa-sha256 header.s=google header.b=a/wh6CFn; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=patchwork.ozlabs.org) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4Wkl7V6D9Vz1yNr for ; Thu, 15 Aug 2024 09:38:30 +1000 (AEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1seNY8-0001rh-1J; Wed, 14 Aug 2024 19:37:04 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1seNY5-0001fz-2v for qemu-devel@nongnu.org; Wed, 14 Aug 2024 19:37:01 -0400 Received: from mail-pf1-x42a.google.com ([2607:f8b0:4864:20::42a]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1seNY2-0006Vx-L1 for qemu-devel@nongnu.org; Wed, 14 Aug 2024 19:37:00 -0400 Received: by mail-pf1-x42a.google.com with SMTP id d2e1a72fcca58-70d316f0060so1060332b3a.1 for ; Wed, 14 Aug 2024 16:36:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1723678617; x=1724283417; 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=tYFEGUaBbs4kAr/qhpAyjUWtir2g5OojC1AciDAIaeA=; b=a/wh6CFnrZF+SvqoJIGBE0rNFFquOHRbtwPbnEWcv8oMl8VhVYfthVt9q1NUnieat3 +7rbaWV8I8wR+9dL5Hmj3nsTmr/SAhOZgr6bZT3O+laOETH0ck9mL2Si3+SdbD1qt1DO 4ouyKh8wgsQuTzg2cBwSE+panYpQwHeWJSrGSA8HreEH3ChfFMKAXC9HcQOqZN/xIhgL vzZjIdWtIM2uzfJQh8A/rGuvU83DFZv+pDfz+KGgjugTlbAPZLwzrn4NRxVT5VqcstO0 ZyH2zr75LCc6Zg+y4+DX9iZUaI/mP/bc8JdrHvTpbrj1fGkzIVFCecw52Xx7vESl0cAS zMbQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1723678617; x=1724283417; 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=tYFEGUaBbs4kAr/qhpAyjUWtir2g5OojC1AciDAIaeA=; b=kcg/dFiHURQKvb9T3glR38e6Y4OH2Te7S4/heaUex1/jhcvfj+CJYayp/pIAD/hK0s nBHNr12gPno4Jn+hUH/Kowtupff1XQKDLBAnAHiH8soezGwT8EFq84NXwstzqb2Gxqbv l3rW20gigE2Jy658cuuI/sjqTeQMbtgw7Q5Rr5pzXDl8ar/0hAuKwMONDG0821PsELx9 kGxJ6a+lw7Yq4GMgyEmBWDCrh0/OwU91XB3vrrUmycJj0MPbbptTsh3xhEVnFbEqHe4K lw6V6Jm+d2T9ARvxKE08mRTvMiSghXFZysCMobl/T65iSZXiTA2bo6TSmosZbQR2BHWT HCHg== X-Gm-Message-State: AOJu0Yxpxrb99TdXswdYzHu7LrAa4LmUozzgMhotK5EKKz9bLCLQr0Sm ozaN1C5tsh0c76Yn59NhUGbJGjyon6oY1tcsBdg2uN2wwZWVU3RPhcSLFwF02NcnNzmDspJZLrJ 0hUg= X-Google-Smtp-Source: AGHT+IEK3TwW4ycE/0mRFuPXDeQ5wyJmp0/McRZ5fntPOU3bdIsVbC9LiikVo5iCDBOKLiIN8n0V0A== X-Received: by 2002:a05:6a20:c508:b0:1c0:f630:97a5 with SMTP id adf61e73a8af0-1c8f859e750mr1567761637.10.1723678617181; Wed, 14 Aug 2024 16:36:57 -0700 (PDT) Received: from linaro.vn.shawcable.net ([2604:3d08:9384:1d00::b861]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-7127aef57dfsm112164b3a.115.2024.08.14.16.36.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 14 Aug 2024 16:36:56 -0700 (PDT) From: Pierrick Bouvier To: qemu-devel@nongnu.org Cc: =?utf-8?q?Alex_Benn=C3=A9e?= , Paolo Bonzini , Mahmoud Mandour , =?utf-8?q?Daniel_P=2E_Berrang=C3=A9?= , Alexandre Iooss , Thomas Huth , Pierrick Bouvier , =?utf-8?q?Marc-Andr=C3=A9_L?= =?utf-8?q?ureau?= , =?utf-8?q?Philippe_Mathieu?= =?utf-8?q?-Daud=C3=A9?= Subject: [PATCH 2/6] contrib/plugins/cache: fix warning when compiling on 32bits host Date: Wed, 14 Aug 2024 16:36:41 -0700 Message-Id: <20240814233645.944327-3-pierrick.bouvier@linaro.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240814233645.944327-1-pierrick.bouvier@linaro.org> References: <20240814233645.944327-1-pierrick.bouvier@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::42a; envelope-from=pierrick.bouvier@linaro.org; helo=mail-pf1-x42a.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, T_SCC_BODY_TEXT_LINE=-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+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Found on debian stable (i386). ../contrib/plugins/cache.c: In function 'vcpu_tb_trans': ../contrib/plugins/cache.c:477:30: error: cast from pointer to integer of different size [-Werror=pointer-to-int-cast] 477 | effective_addr = (uint64_t) qemu_plugin_insn_haddr(insn); | Signed-off-by: Pierrick Bouvier --- contrib/plugins/cache.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/contrib/plugins/cache.c b/contrib/plugins/cache.c index 512ef6776b7..82ed734d6d4 100644 --- a/contrib/plugins/cache.c +++ b/contrib/plugins/cache.c @@ -471,12 +471,12 @@ 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; + uintptr_t effective_addr; if (sys) { - effective_addr = (uint64_t) qemu_plugin_insn_haddr(insn); + effective_addr = (uintptr_t) qemu_plugin_insn_haddr(insn); } else { - effective_addr = (uint64_t) qemu_plugin_insn_vaddr(insn); + effective_addr = (uintptr_t) qemu_plugin_insn_vaddr(insn); } /* From patchwork Wed Aug 14 23:36:42 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Pierrick Bouvier X-Patchwork-Id: 1972626 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.a=rsa-sha256 header.s=google header.b=HBLcCOEg; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=patchwork.ozlabs.org) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4Wkl731kv6z1yNr for ; Thu, 15 Aug 2024 09:38:05 +1000 (AEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1seNY6-0001kV-8U; Wed, 14 Aug 2024 19:37:02 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1seNY5-0001hB-B2 for qemu-devel@nongnu.org; Wed, 14 Aug 2024 19:37:01 -0400 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 1seNY3-0006W9-Oc for qemu-devel@nongnu.org; Wed, 14 Aug 2024 19:37:01 -0400 Received: by mail-pf1-x42c.google.com with SMTP id d2e1a72fcca58-70d18d4b94cso276342b3a.2 for ; Wed, 14 Aug 2024 16:36:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1723678618; x=1724283418; 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=OHisr3UikbRag7D0QJ33pcI9STMq6DpazTYXpbTOwMY=; b=HBLcCOEgy0DeFQZLiiV76slyZ9lgCegKElLLLIVNeseNl0Q+gYs9oauvw2tGIJjxmh od5kaI5mcalpQWoz6Z9OZIAhXNN3vQvjxbywkZoOOOPQ7xe9Swhb6bbTfO5aSELPbDpd DnyJG7v9GHwqoyF3mAeTRMaC8QFGnI47HGIeB8lpfj3auROc9yI8BH6TpmhDlvPsupJy 7z/Uy9Ny62CbxAVPDuaw33mdE6gNjXH4oVxyzy2GoV3aFZQ6sP/7vTOBwGuhqlNPUgn8 HvZvRwtJaaWVEXpxOwESdNf98Un24oJf6HI4X+I56baF3Gaa1+n07niWKN0fPykh0vec 37Yg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1723678618; x=1724283418; 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=OHisr3UikbRag7D0QJ33pcI9STMq6DpazTYXpbTOwMY=; b=vvRPne89dE5AQbmPH+bRZRXyKR0lT6IsEb4u0coXNVWO0nxHljWgsit92KhZN0wFvw FNt0PVC6drFhNBRK2f32V8/1a9Xxv+9w93PxYRfC8QGK43feX88KbWY7VCaxVzLu6m4W nErOEL3N1WCbz6qZg8jLBUrSSVoWQLu/kTUw0FzU5MKQVFRKnVxqW56tZARORr5f2ru1 YJ8doIN4v8f4wsXBQ3iMIvdiAiGPUIH2EEyvn7WtCfZbtLaz0m8DNy9XTeCxScPOBKW+ ZHhmucZP/FwxWdrlUGuzwO5FCHDRHpinBcrT/JYMPS94TaD7dpq9l+VUn6FxxdrRkNve yA4A== X-Gm-Message-State: AOJu0Yyg0vmenKneoAU5Axr7VP/ttzve3fi05hfK18qYpqFQVPo8OEWc oQ7SBPwvtxJtU+PCGL/oPy0AXLpiboSMdScKenLercIjiCHaNG7zpHSvHI7tQinKbT6Tku1qbLz aMk0= X-Google-Smtp-Source: AGHT+IHXyYUb+nK7n0KwdvSo1ZfOGSVr8GxiCN3LqPpbhOi8eh+FyIDNujNiCWlLU8tqU6H38Vfcuw== X-Received: by 2002:a05:6a20:6f0e:b0:1c8:92ed:7c5e with SMTP id adf61e73a8af0-1c8eaeb3b5emr5140262637.23.1723678618196; Wed, 14 Aug 2024 16:36:58 -0700 (PDT) Received: from linaro.vn.shawcable.net ([2604:3d08:9384:1d00::b861]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-7127aef57dfsm112164b3a.115.2024.08.14.16.36.57 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 14 Aug 2024 16:36:57 -0700 (PDT) From: Pierrick Bouvier To: qemu-devel@nongnu.org Cc: =?utf-8?q?Alex_Benn=C3=A9e?= , Paolo Bonzini , Mahmoud Mandour , =?utf-8?q?Daniel_P=2E_Berrang=C3=A9?= , Alexandre Iooss , Thomas Huth , Pierrick Bouvier , =?utf-8?q?Marc-Andr=C3=A9_L?= =?utf-8?q?ureau?= , =?utf-8?q?Philippe_Mathieu?= =?utf-8?q?-Daud=C3=A9?= Subject: [PATCH 3/6] contrib/plugins/hwprofile: fix warning when compiling on 32bits host Date: Wed, 14 Aug 2024 16:36:42 -0700 Message-Id: <20240814233645.944327-4-pierrick.bouvier@linaro.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240814233645.944327-1-pierrick.bouvier@linaro.org> References: <20240814233645.944327-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, T_SCC_BODY_TEXT_LINE=-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+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Found on debian stable (i386). ../contrib/plugins/hwprofile.c: In function 'new_location': ../contrib/plugins/hwprofile.c:172:32: error: cast to pointer from integer of different size [-Werror=int-to-pointer-cast] 172 | g_hash_table_insert(table, (gpointer) off_or_pc, loc); | ^ ../contrib/plugins/hwprofile.c: In function 'vcpu_haddr': ../contrib/plugins/hwprofile.c:227:19: error: cast from pointer to integer of different size [-Werror=pointer-to-int-cast] 227 | off = (uint64_t) udata; | ^ ../contrib/plugins/hwprofile.c:232:62: error: cast to pointer from integer of different size [-Werror=int-to-pointer-cast] 232 | (gpointer) off); | ^ ../contrib/plugins/hwprofile.c: In function 'vcpu_tb_trans': ../contrib/plugins/hwprofile.c:250:26: error: cast to pointer from integer of different size [-Werror=int-to-pointer-cast] 250 | gpointer udata = (gpointer) (source ? qemu_plugin_insn_vaddr(insn) : 0); | Signed-off-by: Pierrick Bouvier --- contrib/plugins/hwprofile.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/contrib/plugins/hwprofile.c b/contrib/plugins/hwprofile.c index 739ac0c66b5..ee94a74ad94 100644 --- a/contrib/plugins/hwprofile.c +++ b/contrib/plugins/hwprofile.c @@ -165,7 +165,7 @@ static DeviceCounts *new_count(const char *name, uint64_t base) return count; } -static IOLocationCounts *new_location(GHashTable *table, uint64_t off_or_pc) +static IOLocationCounts *new_location(GHashTable *table, uintptr_t off_or_pc) { IOLocationCounts *loc = g_new0(IOLocationCounts, 1); loc->off_or_pc = off_or_pc; @@ -201,7 +201,7 @@ static void vcpu_haddr(unsigned int cpu_index, qemu_plugin_meminfo_t meminfo, return; } else { const char *name = qemu_plugin_hwaddr_device_name(hwaddr); - uint64_t off = qemu_plugin_hwaddr_phys_addr(hwaddr); + uintptr_t off = qemu_plugin_hwaddr_phys_addr(hwaddr); bool is_write = qemu_plugin_mem_is_store(meminfo); DeviceCounts *counts; @@ -224,7 +224,7 @@ 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 = (uintptr_t) udata; } if (pattern || source) { @@ -247,7 +247,8 @@ 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); + gpointer udata = (gpointer) ( + source ? (uintptr_t) qemu_plugin_insn_vaddr(insn) : 0); qemu_plugin_register_vcpu_mem_cb(insn, vcpu_haddr, QEMU_PLUGIN_CB_NO_REGS, rw, udata); From patchwork Wed Aug 14 23:36:43 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Pierrick Bouvier X-Patchwork-Id: 1972632 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.a=rsa-sha256 header.s=google header.b=CqIMZho1; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=patchwork.ozlabs.org) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4Wkl7W0K0vz1yfL for ; Thu, 15 Aug 2024 09:38:31 +1000 (AEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1seNYA-00023A-ST; Wed, 14 Aug 2024 19:37:06 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1seNY6-0001ki-8h for qemu-devel@nongnu.org; Wed, 14 Aug 2024 19:37:02 -0400 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 1seNY4-0006WR-Lt for qemu-devel@nongnu.org; Wed, 14 Aug 2024 19:37:02 -0400 Received: by mail-pf1-x42b.google.com with SMTP id d2e1a72fcca58-70f5ef740b7so319819b3a.2 for ; Wed, 14 Aug 2024 16:37:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1723678619; x=1724283419; 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=bzoJvs+/ktmRvV/uludFrSeMjpPKw38xy+lGwp2LWAA=; b=CqIMZho1iQIzGr/SHFL9AtS4K0w0BAfgozvIyT26wP3J+eJxtF5m/jjt/1CPhiSrRm 35XlCvnFZbumzBuKYuGA3yhf12ZpuC5lvrxdYI++XzXmPqytzGrt0jJDzRmg5eu+jy6c 0TLXGD5YnTp4JI3qwobtYD4LQ/k13bQ5WU6UOqpC3d3tTSiSGoS0+QzKZEnsp41aei2v HlgHHW/A6cvcJ+59fOrdQLsu2KvXlHXiNjQQnn8McqPKGN2UkjHz8bXWVpWPuk1LwEV8 okfrsylTxNa7u9CoH4I3fE0rVK9pNvAnEk79xpO0FXpFG/Cn+shmisCAxzedYBzuv23o d6IQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1723678619; x=1724283419; 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=bzoJvs+/ktmRvV/uludFrSeMjpPKw38xy+lGwp2LWAA=; b=L8H/DJ00/ipzbaUmNqyiaytLkFhm6zZcOTthgQhb9kHjKc42+EFZiWHzwBP31GLgZj MBqWNTC5D5eoS/RMFXW49g485VtzPXdV3gFT8eL5CtcSxfLGi2CmJCOzt0fh4CI8EmcK iUyhXjyF69+mKAB5wY3n2dxxEg4TxP8qDb9vRpv4JqJcqAaFlYxazhkUXmsnQNgN2kAI VIEc0NQ9btHFGWXt/JpN0efsaWsVGa0M3Z6SETZQVnyJJth8PFPV1OgrW/nJgLxC71k9 m39Xb2UGHy+krRXKbj+ujlZMoNfVHG9T6Uz1GRXTedC9vFwUEo1WduoSxpfwcJxBil5A fZag== X-Gm-Message-State: AOJu0Ywo4uJcrpnd44ZeNueVgJKMzRNevs3X+q3IpSa3yR9MoNZxBJwC 8o2yLWe07xBGgMGuNxkapvBeBGXoX/+xiN/yY/OeKcyCTbXWNGg5R1EtV8IQ4DUMdtqZqwELE3K h1gs= X-Google-Smtp-Source: AGHT+IEerxmprREtG28hemAszEAk+gOmixw605ol/n/naRl7+bng26g1gKIb3JJm1IVAqIZYrhQ9pg== X-Received: by 2002:a05:6a00:1ad1:b0:706:29e6:2ed2 with SMTP id d2e1a72fcca58-712670fa392mr6336540b3a.5.1723678619237; Wed, 14 Aug 2024 16:36:59 -0700 (PDT) Received: from linaro.vn.shawcable.net ([2604:3d08:9384:1d00::b861]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-7127aef57dfsm112164b3a.115.2024.08.14.16.36.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 14 Aug 2024 16:36:58 -0700 (PDT) From: Pierrick Bouvier To: qemu-devel@nongnu.org Cc: =?utf-8?q?Alex_Benn=C3=A9e?= , Paolo Bonzini , Mahmoud Mandour , =?utf-8?q?Daniel_P=2E_Berrang=C3=A9?= , Alexandre Iooss , Thomas Huth , Pierrick Bouvier , =?utf-8?q?Marc-Andr=C3=A9_L?= =?utf-8?q?ureau?= , =?utf-8?q?Philippe_Mathieu?= =?utf-8?q?-Daud=C3=A9?= Subject: [PATCH 4/6] contrib/plugins/hotblocks: fix warning when compiling on 32bits host Date: Wed, 14 Aug 2024 16:36:43 -0700 Message-Id: <20240814233645.944327-5-pierrick.bouvier@linaro.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240814233645.944327-1-pierrick.bouvier@linaro.org> References: <20240814233645.944327-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, T_SCC_BODY_TEXT_LINE=-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+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Found on debian stable (i386). ../contrib/plugins/hotblocks.c: In function 'vcpu_tb_trans': ../contrib/plugins/hotblocks.c:117:56: error: cast to pointer from integer of different size [-Werror=int-to-pointer-cast] 117 | cnt = (ExecCount *) g_hash_table_lookup(hotblocks, (gconstpointer) hash); | ^ ../contrib/plugins/hotblocks.c:126:40: error: cast to pointer from integer of different size [-Werror=int-to-pointer-cast] 126 | g_hash_table_insert(hotblocks, (gpointer) hash, (gpointer) cnt); | Signed-off-by: Pierrick Bouvier --- contrib/plugins/hotblocks.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/contrib/plugins/hotblocks.c b/contrib/plugins/hotblocks.c index 02bc5078bdd..d540f1b7f0b 100644 --- a/contrib/plugins/hotblocks.c +++ b/contrib/plugins/hotblocks.c @@ -109,9 +109,9 @@ static void vcpu_tb_exec(unsigned int cpu_index, void *udata) 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); + uintptr_t pc = qemu_plugin_tb_vaddr(tb); size_t insns = qemu_plugin_tb_n_insns(tb); - uint64_t hash = pc ^ insns; + uintptr_t hash = pc ^ insns; g_mutex_lock(&lock); cnt = (ExecCount *) g_hash_table_lookup(hotblocks, (gconstpointer) hash); From patchwork Wed Aug 14 23:36:44 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Pierrick Bouvier X-Patchwork-Id: 1972628 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.a=rsa-sha256 header.s=google header.b=aiQWDBY6; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=patchwork.ozlabs.org) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4Wkl7Q1Yvnz1yNr for ; Thu, 15 Aug 2024 09:38:26 +1000 (AEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1seNY8-0001to-Jm; Wed, 14 Aug 2024 19:37:04 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1seNY7-0001p8-D1 for qemu-devel@nongnu.org; Wed, 14 Aug 2024 19:37:03 -0400 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 1seNY5-0006Wa-PL for qemu-devel@nongnu.org; Wed, 14 Aug 2024 19:37:03 -0400 Received: by mail-pf1-x42b.google.com with SMTP id d2e1a72fcca58-710bdddb95cso243734b3a.3 for ; Wed, 14 Aug 2024 16:37:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1723678620; x=1724283420; 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=6xxCvfMwAVvNf1Qjn5/JJVvbogoK1VhpQom3xuwjm28=; b=aiQWDBY6zf8f1lj7oc9D7HtAADOZBVFGBccCyPqKtc+1BOlfwk++OO4SoDNC8NJr4B qwNAoT/qeqWHHrOysJwV+A40oMgbQ0EHTKGmHy0sIDOynHUws1e7+MQeq901lfUy1Mzs oiURi0WKVHYkErEenCH/8bRx8DQb5YRsU3wBBlY+LAnAgXIjQB8crsedJJ8AqtmXnhf1 HxJnnq6Ei6V8wIq29qZaeosok+ZWmBiPTih1VosHFfjWsAIoodST/5moYFAc5bj10A1l v/KRiUBBsQX6i5aUoyiI66/ZWQ04IlYYwA80Qz0lIandR5YhTClnyGEkdzr7PHu6ijVe y4CQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1723678620; x=1724283420; 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=6xxCvfMwAVvNf1Qjn5/JJVvbogoK1VhpQom3xuwjm28=; b=aVQ9ld/3zI15o0MbWpr991vQP/+OMe+PbQPRABH6qokz8p6cPZjg/beDavBHrASUoB Hx76TrrDIMPDxwGuQftnr+86QBA07a8qEnGd8lPoKLij6di3i+hM9YNsNiOP5LK9yu5O tlLpwwL/wSswGWOdwmx/gcW0tOLbzKIfR5v2IwmbQK1ZwV+Al0FpUsT5naOEhAuYYpVu EQSkqPr4ZMigwBqScfnKiWnz4hFm9YEV57Y5xR9xPiBSUv7/SYR4R6Ngzc6nERfOyg+F 8eM/+/W5p/FV42w8MnWCFRGCzBHGEzSjC5ToUicqNhKsnKLafvDGrF8oOIaNwDGiGlcn HeyA== X-Gm-Message-State: AOJu0YxLUHk4vqBwMCSUc0O5xsp1MF/9LnQxkyH3TsjEUSLqKc7M0/VP 6M1+RLKWcimvvDQvE0Sg0BfmNw4cuQ/mc6JUMMiVBvJsHc4yhHFMF5NgqaqA4InuKnlUTYe45Ad UFBw= X-Google-Smtp-Source: AGHT+IEB++ca/kEhIM7Xhy6J0p9gyqcx9Z6lEU++DwNjIjAiRgGm0xyZ4Sb71DVMzfeye7LSxlhT0A== X-Received: by 2002:a05:6a20:d49b:b0:1c6:b364:dbd1 with SMTP id adf61e73a8af0-1c8eae6f450mr6196973637.19.1723678620260; Wed, 14 Aug 2024 16:37:00 -0700 (PDT) Received: from linaro.vn.shawcable.net ([2604:3d08:9384:1d00::b861]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-7127aef57dfsm112164b3a.115.2024.08.14.16.36.59 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 14 Aug 2024 16:36:59 -0700 (PDT) From: Pierrick Bouvier To: qemu-devel@nongnu.org Cc: =?utf-8?q?Alex_Benn=C3=A9e?= , Paolo Bonzini , Mahmoud Mandour , =?utf-8?q?Daniel_P=2E_Berrang=C3=A9?= , Alexandre Iooss , Thomas Huth , Pierrick Bouvier , =?utf-8?q?Marc-Andr=C3=A9_L?= =?utf-8?q?ureau?= , =?utf-8?q?Philippe_Mathieu?= =?utf-8?q?-Daud=C3=A9?= Subject: [PATCH 5/6] meson: build contrib/plugins with meson Date: Wed, 14 Aug 2024 16:36:44 -0700 Message-Id: <20240814233645.944327-6-pierrick.bouvier@linaro.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240814233645.944327-1-pierrick.bouvier@linaro.org> References: <20240814233645.944327-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, T_SCC_BODY_TEXT_LINE=-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+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Tried to unify this meson.build with tests/tcg/plugins/meson.build but the resulting modules are not output in the right directory. Originally proposed by Anton Kochkov, thank you! Solves: https://gitlab.com/qemu-project/qemu/-/issues/1710 Signed-off-by: Pierrick Bouvier --- meson.build | 4 ++++ contrib/plugins/meson.build | 23 +++++++++++++++++++++++ 2 files changed, 27 insertions(+) create mode 100644 contrib/plugins/meson.build diff --git a/meson.build b/meson.build index 52e5aa95cc0..4efe1e782ba 100644 --- a/meson.build +++ b/meson.build @@ -3627,6 +3627,10 @@ subdir('accel') subdir('plugins') subdir('ebpf') +if 'CONFIG_TCG' in config_all_accel + subdir('contrib/plugins') +endif + common_user_inc = [] subdir('common-user') diff --git a/contrib/plugins/meson.build b/contrib/plugins/meson.build new file mode 100644 index 00000000000..a0e026d25e2 --- /dev/null +++ b/contrib/plugins/meson.build @@ -0,0 +1,23 @@ +t = [] +if get_option('plugins') + foreach i : ['cache', 'drcov', 'execlog', 'hotblocks', 'hotpages', 'howvec', + 'hwprofile', 'ips', 'lockstep', 'stoptrigger'] + if host_os == 'windows' + t += shared_module(i, files(i + '.c') + 'win32_linker.c', + include_directories: '../../include/qemu', + link_depends: [win32_qemu_plugin_api_lib], + link_args: ['-Lplugins', '-lqemu_plugin_api'], + dependencies: glib) + + else + t += shared_module(i, files(i + '.c'), + include_directories: '../../include/qemu', + dependencies: glib) + endif + endforeach +endif +if t.length() > 0 + alias_target('contrib-plugins', t) +else + run_target('contrib-plugins', command: find_program('true')) +endif From patchwork Wed Aug 14 23:36:45 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Pierrick Bouvier X-Patchwork-Id: 1972627 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.a=rsa-sha256 header.s=google header.b=K48EKCOZ; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=patchwork.ozlabs.org) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4Wkl793Rjpz1yNr for ; Thu, 15 Aug 2024 09:38:13 +1000 (AEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1seNYB-00024M-56; Wed, 14 Aug 2024 19:37:07 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1seNY8-0001uI-Ly for qemu-devel@nongnu.org; Wed, 14 Aug 2024 19:37:04 -0400 Received: from mail-pf1-x436.google.com ([2607:f8b0:4864:20::436]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1seNY6-0006Ws-Rt for qemu-devel@nongnu.org; Wed, 14 Aug 2024 19:37:04 -0400 Received: by mail-pf1-x436.google.com with SMTP id d2e1a72fcca58-710dc3015bfso273299b3a.0 for ; Wed, 14 Aug 2024 16:37:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1723678621; x=1724283421; 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=88ldzGJFn7KJzwoVt5WZkhf1Vk0R2+WAedFjkHAyIrQ=; b=K48EKCOZiqaOEnnrsAxehpKQQee4Xd53aDD8XexaqAVE4E3n2RN9B102AMf/wv+zrL eHpSpbNr2T9heS/H8YQc0JXGsXc3bqF7mxXfn5jYyPSuqwQBjWiKPuz64nHRWALfyCa+ coFvQ5bYcCCdyO8+mMdI83stQTrPvOV5Ll4Hwt5gzOTUpqKHh1yvBnLHs6wk+0pIfH8O pVVArkbkMJVwicQDt7kro+6RQit464eUnn5NMTilI4SAN1TyRAqv2lIhiqRtoPThQY13 wX21eA9IYjVPiv3VSH/PbV0JyIsZ2kP6NUxBF4GaSKD6B2eLoEepKrGoYwiQrVoZp2DM PNMQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1723678621; x=1724283421; 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=88ldzGJFn7KJzwoVt5WZkhf1Vk0R2+WAedFjkHAyIrQ=; b=hW3JorGDnA5z23NTW9mjjA5dli3kM/XS5G74DX7QQ17jmhCl5eokPfaJ9E9vAdW9vS zd4JuGYkBqGuhz5/M9N0IzhgbEB29T5ybN7BZugbzOFWdmFCNso4NQScky0fisGsoeuM VWCedHwPi9zVu0/zX0i1x2HQAix601xHyCwCQNX2BO8V1A5gIo82EqW5ex0daupgTsZN b6fstnDx8uI+ONpbPTT2y1owYbNQR9xC0e0q9h2M+Qsm85zr7nB/0mu6eMjWm0pEFbIT aVhIgmh0C7jMPIMImh4kz3sKUgbHqSPQjNq2F29dLSFAk5FsBZe5oVL7SsTwmhA5Asnv FZXQ== X-Gm-Message-State: AOJu0YzRAxqNbO+EoVCGt7lYX9JXfOiaA/h1eTmFQp75BbI/3Urbi1MY oN3BexRu4UuOXpWBfzI2i7NmTYztIvIBBfLNB2ddKnoYMrUsSWJMhKQiqbgmle2C6yQJZXXE127 W/vI= X-Google-Smtp-Source: AGHT+IHTpXB1r7SxrWpLyZCf18ZQfm08NLcPLsgct9EyGMm8FW1vHPtTpw424UztofHbop/0WqlDww== X-Received: by 2002:a05:6a20:85af:b0:1c8:de01:e7e5 with SMTP id adf61e73a8af0-1c8f85c7766mr1325780637.15.1723678621299; Wed, 14 Aug 2024 16:37:01 -0700 (PDT) Received: from linaro.vn.shawcable.net ([2604:3d08:9384:1d00::b861]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-7127aef57dfsm112164b3a.115.2024.08.14.16.37.00 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 14 Aug 2024 16:37:00 -0700 (PDT) From: Pierrick Bouvier To: qemu-devel@nongnu.org Cc: =?utf-8?q?Alex_Benn=C3=A9e?= , Paolo Bonzini , Mahmoud Mandour , =?utf-8?q?Daniel_P=2E_Berrang=C3=A9?= , Alexandre Iooss , Thomas Huth , Pierrick Bouvier , =?utf-8?q?Marc-Andr=C3=A9_L?= =?utf-8?q?ureau?= , =?utf-8?q?Philippe_Mathieu?= =?utf-8?q?-Daud=C3=A9?= Subject: [PATCH 6/6] contrib/plugins: remove Makefile for contrib/plugins Date: Wed, 14 Aug 2024 16:36:45 -0700 Message-Id: <20240814233645.944327-7-pierrick.bouvier@linaro.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240814233645.944327-1-pierrick.bouvier@linaro.org> References: <20240814233645.944327-1-pierrick.bouvier@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::436; envelope-from=pierrick.bouvier@linaro.org; helo=mail-pf1-x436.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, T_SCC_BODY_TEXT_LINE=-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+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Now replaced by meson build. Signed-off-by: Pierrick Bouvier --- configure | 18 --------- Makefile | 10 ----- contrib/plugins/Makefile | 85 ---------------------------------------- 3 files changed, 113 deletions(-) delete mode 100644 contrib/plugins/Makefile diff --git a/configure b/configure index 019fcbd0ef7..2c0f708cd0a 100755 --- a/configure +++ b/configure @@ -1030,7 +1030,6 @@ if test "$static" = "yes" ; then fi if test "$plugins" != "no"; then plugins=yes - subdirs="$subdirs contrib/plugins" fi cat > $TMPC << EOF @@ -1531,7 +1530,6 @@ LINKS="$LINKS .gdbinit scripts" # scripts needed by relative path in .gdbinit LINKS="$LINKS tests/avocado tests/data" LINKS="$LINKS tests/qemu-iotests/check tests/qemu-iotests/Makefile" LINKS="$LINKS python" -LINKS="$LINKS contrib/plugins/Makefile " for f in $LINKS ; do if [ -e "$source_path/$f" ]; then symlink "$source_path/$f" "$f" @@ -1614,22 +1612,6 @@ if test "$default_targets" = "yes"; then echo "CONFIG_DEFAULT_TARGETS=y" >> $config_host_mak fi -# contrib/plugins configuration -echo "# Automatically generated by configure - do not modify" > contrib/plugins/$config_host_mak -echo "SRC_PATH=$source_path/contrib/plugins" >> contrib/plugins/$config_host_mak -echo "PKG_CONFIG=${pkg_config}" >> contrib/plugins/$config_host_mak -echo "CC=$cc $CPU_CFLAGS" >> contrib/plugins/$config_host_mak -echo "CFLAGS=${CFLAGS-$default_cflags} $EXTRA_CFLAGS" >> contrib/plugins/$config_host_mak -if test "$host_os" = windows; then - echo "DLLTOOL=$dlltool" >> contrib/plugins/$config_host_mak -fi -if test "$host_os" = darwin; then - echo "CONFIG_DARWIN=y" >> contrib/plugins/$config_host_mak -fi -if test "$host_os" = windows; then - echo "CONFIG_WIN32=y" >> contrib/plugins/$config_host_mak -fi - # tests/tcg configuration mkdir -p tests/tcg echo "# Automatically generated by configure - do not modify" > tests/tcg/$config_host_mak diff --git a/Makefile b/Makefile index 02a257584ba..e474fbe50de 100644 --- a/Makefile +++ b/Makefile @@ -186,11 +186,6 @@ SUBDIR_RULES=$(foreach t, all clean distclean, $(addsuffix /$(t), $(SUBDIRS))) $(SUBDIR_RULES): $(call quiet-command,$(MAKE) $(SUBDIR_MAKEFLAGS) -C $(dir $@) V="$(V)" TARGET_DIR="$(dir $@)" $(notdir $@),) -ifneq ($(filter contrib/plugins, $(SUBDIRS)),) -.PHONY: plugins -plugins: contrib/plugins/all -endif - .PHONY: recurse-all recurse-clean recurse-all: $(addsuffix /all, $(SUBDIRS)) recurse-clean: $(addsuffix /clean, $(SUBDIRS)) @@ -306,11 +301,6 @@ help: $(call print-help,cscope,Generate cscope index) $(call print-help,sparse,Run sparse on the QEMU source) @echo '' -ifneq ($(filter contrib/plugins, $(SUBDIRS)),) - @echo 'Plugin targets:' - $(call print-help,plugins,Build the example TCG plugins) - @echo '' -endif @echo 'Cleaning targets:' $(call print-help,clean,Remove most generated files but keep the config) $(call print-help,distclean,Remove all generated files) diff --git a/contrib/plugins/Makefile b/contrib/plugins/Makefile deleted file mode 100644 index edf256cd9d1..00000000000 --- a/contrib/plugins/Makefile +++ /dev/null @@ -1,85 +0,0 @@ -# -*- Mode: makefile -*- -# -# This Makefile example is fairly independent from the main makefile -# so users can take and adapt it for their build. We only really -# include config-host.mak so we don't have to repeat probing for -# programs that the main configure has already done for us. -# - -include config-host.mak - -TOP_SRC_PATH = $(SRC_PATH)/../.. - -VPATH += $(SRC_PATH) - -NAMES := -NAMES += execlog -NAMES += hotblocks -NAMES += hotpages -NAMES += howvec - -# The lockstep example communicates using unix sockets, -# and can't be easily made to work on windows. -ifneq ($(CONFIG_WIN32),y) -NAMES += lockstep -endif - -NAMES += hwprofile -NAMES += cache -NAMES += drcov -NAMES += ips -NAMES += stoptrigger - -ifeq ($(CONFIG_WIN32),y) -SO_SUFFIX := .dll -LDLIBS += $(shell $(PKG_CONFIG) --libs glib-2.0) -else -SO_SUFFIX := .so -endif - -SONAMES := $(addsuffix $(SO_SUFFIX),$(addprefix lib,$(NAMES))) - -# The main QEMU uses Glib extensively so it is perfectly fine to use it -# in plugins (which many example do). -PLUGIN_CFLAGS := $(shell $(PKG_CONFIG) --cflags glib-2.0) -PLUGIN_CFLAGS += -fPIC -Wall -PLUGIN_CFLAGS += -I$(TOP_SRC_PATH)/include/qemu - -# Helper that honours V=1 so we get some output when compiling -quiet-@ = $(if $(V),,@$(if $1,printf " %-7s %s\n" "$(strip $1)" "$(strip $2)" && )) -quiet-command = $(call quiet-@,$2,$3)$1 - -# for including , in command strings -COMMA := , - -all: $(SONAMES) - -%.o: %.c - $(call quiet-command, \ - $(CC) $(CFLAGS) $(PLUGIN_CFLAGS) -c -o $@ $<, \ - BUILD, plugin $@) - -ifeq ($(CONFIG_WIN32),y) -lib%$(SO_SUFFIX): %.o win32_linker.o ../../plugins/libqemu_plugin_api.a - $(call quiet-command, \ - $(CC) -shared -o $@ $^ $(LDLIBS), \ - LINK, plugin $@) -else ifeq ($(CONFIG_DARWIN),y) -lib%$(SO_SUFFIX): %.o - $(call quiet-command, \ - $(CC) -bundle -Wl$(COMMA)-undefined$(COMMA)dynamic_lookup -o $@ $^ $(LDLIBS), \ - LINK, plugin $@) -else -lib%$(SO_SUFFIX): %.o - $(call quiet-command, \ - $(CC) -shared -o $@ $^ $(LDLIBS), \ - LINK, plugin $@) -endif - - -clean: - rm -f *.o *$(SO_SUFFIX) *.d - rm -Rf .libs - -.PHONY: all clean -.SECONDARY: