From patchwork Tue Mar 4 22:24:27 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Alex_Benn=C3=A9e?= X-Patchwork-Id: 870146 Delivered-To: patch@linaro.org Received: by 2002:a05:6000:178f:b0:38f:210b:807b with SMTP id e15csp494971wrg; Tue, 4 Mar 2025 14:33:30 -0800 (PST) X-Forwarded-Encrypted: i=2; AJvYcCW9Mj/BRB/i49wi1APuC6cEPxTcg2ypDPinsyGGiaE6cFui3/odpJwIxf+IFQ18IuBA+umclQ==@linaro.org X-Google-Smtp-Source: AGHT+IGKoZBsihajM+x68cJPFVtLegRGhIDYAEg+oGgXBBvxocgt9r5+bJOFwbc5eoLL0Ds+t1Pu X-Received: by 2002:ac8:5fcc:0:b0:474:bc66:a905 with SMTP id d75a77b69052e-4750b23c752mr13230661cf.4.1741127610344; Tue, 04 Mar 2025 14:33:30 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1741127610; cv=none; d=google.com; s=arc-20240605; b=N16WThnxsVgO1XSVfqsPxPe+/UjD8xnRa9Jy54eMMVA42x/sZQ/ZvZ3d8tzEJhDeN4 oi3DkUGvCcLd3852mIhOOZY6tQo0zo4fYWsfxGEWEeKhbGrhUz+K31eipVFiumw+ykBS b6xYg67bGb9xh6mUXavveuMWQ7w6s+HTCDRBknkl3nNf1dDP7BSNh4s3nyLkitsKszKS U2YZZKZxAfppihenrPv+jWpV3wRsgBdtkjxExEPu11fTG6RYpVheS0/ncO3EWPJUpcIr xWQjDSRVNTjChz1araNXo7DPORfACh+lhwPtWwIIyoNvuwIesLEfo2pHEfzRdE3TuVNv cKRQ== 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=Vs8Rq5vK4O3QcQ93DYTQizcZdV8tDfXluF6Fck8WA/w=; fh=6Bzz00MUAZSz1sM9FDoE/jB6E9D8TQzH70NWpntkZX8=; b=EoOPHvVwh3jNJeML+LQKP8TxDrWHZkDped11PT0la0nFyt68M2yZzR9qauAKF/LZIx gd9SuMWVccx+YAHLMVv6/PZ2k55wtwv4kNoz0I6xrEGkSB7mEUIRLKGEKC+q0Fc4VLHX BP4bFfU94HQypfs3k/pchlpTdEGGQPvB27MM9AxsQI2v/8/LDoOgrRg0lNU3F/jPTolF pTa7OZPUmznpeM5nH6CpgKxBEYmNlnaiF6tWpSxJwByZ9ifH+CGqgXANbd281TiInD2J M5l9b867wv3CC0UPEDn0lQ0r6SIbtQT5IsViGNN5Fud04/J3F6+0ffmqERqsIoIm/FMz wZ2w==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=ANe3VcYB; 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-474ed9128dasi44821061cf.591.2025.03.04.14.33.30 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 04 Mar 2025 14:33: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=ANe3VcYB; 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 1tpaoL-00032D-O7; Tue, 04 Mar 2025 17:32: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 1tpamC-0008FM-Hg for qemu-devel@nongnu.org; Tue, 04 Mar 2025 17:30:17 -0500 Received: from mail-ej1-x62a.google.com ([2a00:1450:4864:20::62a]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tpam4-0007nK-MA for qemu-devel@nongnu.org; Tue, 04 Mar 2025 17:30:08 -0500 Received: by mail-ej1-x62a.google.com with SMTP id a640c23a62f3a-aaf0f1adef8so1142626766b.3 for ; Tue, 04 Mar 2025 14:29:55 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1741127394; x=1741732194; 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=Vs8Rq5vK4O3QcQ93DYTQizcZdV8tDfXluF6Fck8WA/w=; b=ANe3VcYBrJflqJsd5isrrmoijLUGlbFhZWU7Uputxcg4MeSpiRgJF31mDog0Lv0y1r hjC6tpw89hTKI3JFjbpc3Rkn7aOv+sTh7cQY15ZylKPTwjyYZ3X9AQ+ogCTIkUpDCOlC s7BzNwOH3V8ZN2jPQIP2mGcG9DmZeJE5gOzKGg6MVQU7MIQoUzpECydAfvcNMan99hke rP8EU6s6GpYVMw0CFu2Hx93c/S+mlY+cI4o0ePzfnreFpNQrLkqRcwi1fkHWCleg8zj2 SO3JlENrgtDnJxgjtQdzuYijJOtzvulqMKCHY3sXsDiu8ezoSF2DdpdCmtvALv6emn2s 1MIA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1741127394; x=1741732194; 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=Vs8Rq5vK4O3QcQ93DYTQizcZdV8tDfXluF6Fck8WA/w=; b=nxAOpCEUwv7gd25joxn/FOYHbTr71+YcU72PkafWCkKuyE9w6gCwUjnbFAgttqPz8o tYMNCTPiOFt2ZH7M+Q2yAW37DDLr7ewv4K03OzVhPzlwLFkCgZxyJuS1OC/Xg23bUMHr IrNAmsXQDdxoZQAPx+GV0Yf8EpQnD4/5/1OexRZQUTMb7rRqFvXT2L48WHZtJv0hJP/B YbnxFFs7T9jPpOBaTZe4bNghhUWduow26b9WBkUtu8Xzbzv6hvnr+wLZj/llXE0ddCsn dXNL+G0QymuNCATbskwWqcNQJvxQalfeBWqR5y55bBIl/K6FGnISnYGLYuzY3jICqAP1 XdTw== X-Gm-Message-State: AOJu0YwKv+ycqn4fyVQ+oVDkq3fpyg9KTNDWkfhyOnDkrrIf95cx2SmQ 1UJfgqowBIduPmWfcmMX5C4d1Z0sHrZF0Fqj1uPjNOG/SV12FwINyna2JVA2KqY= X-Gm-Gg: ASbGncsnPahFrMim/7wzGtwkxN4QtZLvNQD2SmpYSsxotjh00REosNDAvj/Rm+/nfTz mP6tad6hEcXM1JeiJzmtY0SdRNzVBygBmn2ZH0jthEQ56YupKuC8hi8IAK+Ncbrc9NqZzB/vlW+ Wrwb2GLsYN1nZnladSYnXsWse0nYeFYmKdkRazRr6mF+Vgt5hSodwWW7Gx1gQdwEeMYl/kNTcUu 5Uwo7Z29v4UNCLWM/0lqLt8NjOw7oSRH604AwFUO8Xb5AMg+gMxt2PX2Ca3AWW4IVHhGasaJxPn UEKcugFAnaKEYd9UYyeb26vPF5QeAVTMTJ+UbmN6ZEmwm/A= X-Received: by 2002:a17:907:94cc:b0:ac1:ed46:7bf5 with SMTP id a640c23a62f3a-ac20d8bcbcbmr76665866b.19.1741127394284; Tue, 04 Mar 2025 14:29:54 -0800 (PST) Received: from draig.lan ([185.126.160.109]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-ac1e87587basm253720166b.66.2025.03.04.14.29.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 04 Mar 2025 14:29:53 -0800 (PST) Received: from draig.lan (localhost [IPv6:::1]) by draig.lan (Postfix) with ESMTP id 657FD5FC87; Tue, 4 Mar 2025 22:24:41 +0000 (GMT) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Eduardo Habkost , Li-Wen Hsu , Peter Maydell , Laurent Vivier , qemu-arm@nongnu.org, Alexandre Iooss , Paolo Bonzini , Richard Henderson , Riku Voipio , Warner Losh , Brian Cain , Mahmoud Mandour , Kyle Evans , =?utf-8?q?Daniel_P=2E_Berrang=C3=A9?= , Ed Maste , Pierrick Bouvier , =?utf-8?q?Marc-Andr=C3=A9_L?= =?utf-8?q?ureau?= , =?utf-8?q?Alex_Benn=C3=A9e?= , Thomas Huth Subject: [PATCH v2 20/32] plugins/api: use qemu_target_page_mask() to get value Date: Tue, 4 Mar 2025 22:24:27 +0000 Message-Id: <20250304222439.2035603-21-alex.bennee@linaro.org> X-Mailer: git-send-email 2.39.5 In-Reply-To: <20250304222439.2035603-1-alex.bennee@linaro.org> References: <20250304222439.2035603-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::62a; envelope-from=alex.bennee@linaro.org; helo=mail-ej1-x62a.google.com X-Spam_score_int: 12 X-Spam_score: 1.2 X-Spam_bar: + X-Spam_report: (1.2 / 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, RCVD_IN_SBL_CSS=3.335, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org Requiring TARGET_PAGE_MASK to be defined gets in the way of building this unit once. qemu_target_page_mask() will tell us what it is. Signed-off-by: Alex Bennée Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson Message-Id: <20250226140343.3907080-16-alex.bennee@linaro.org> --- v2 - use the proper qemu_target_page_mask() api --- plugins/api.c | 3 ++- tests/tcg/hexagon/Makefile.target | 2 +- tests/tcg/multiarch/Makefile.target | 2 +- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/plugins/api.c b/plugins/api.c index cf8cdf076a..fa4d495277 100644 --- a/plugins/api.c +++ b/plugins/api.c @@ -43,6 +43,7 @@ #include "tcg/tcg.h" #include "exec/exec-all.h" #include "exec/gdbstub.h" +#include "exec/target_page.h" #include "exec/translation-block.h" #include "exec/translator.h" #include "disas/disas.h" @@ -287,7 +288,7 @@ uint64_t qemu_plugin_insn_vaddr(const struct qemu_plugin_insn *insn) void *qemu_plugin_insn_haddr(const struct qemu_plugin_insn *insn) { const DisasContextBase *db = tcg_ctx->plugin_db; - vaddr page0_last = db->pc_first | ~TARGET_PAGE_MASK; + vaddr page0_last = db->pc_first | ~qemu_target_page_mask(); if (db->fake_insn) { return NULL; diff --git a/tests/tcg/hexagon/Makefile.target b/tests/tcg/hexagon/Makefile.target index 4dfc39bc98..e5182c01d8 100644 --- a/tests/tcg/hexagon/Makefile.target +++ b/tests/tcg/hexagon/Makefile.target @@ -18,7 +18,7 @@ # Hexagon doesn't support gdb, so skip the EXTRA_RUNS EXTRA_RUNS = -CFLAGS += -Wno-incompatible-pointer-types -Wno-undefined-internal -Wno-unknown-warning-option +CFLAGS += -Wno-incompatible-pointer-types -Wno-undefined-internal CFLAGS += -fno-unroll-loops -fno-stack-protector HEX_SRC=$(SRC_PATH)/tests/tcg/hexagon diff --git a/tests/tcg/multiarch/Makefile.target b/tests/tcg/multiarch/Makefile.target index c769a7d69d..45c9cfe18c 100644 --- a/tests/tcg/multiarch/Makefile.target +++ b/tests/tcg/multiarch/Makefile.target @@ -51,7 +51,7 @@ sigreturn-sigmask: LDFLAGS+=-pthread # Since this is just a standard piece of library code we've borrowed for a # TCG test case, suppress the warning rather than trying to modify the # code to work around the compiler. -sha1: CFLAGS+=-Wno-stringop-overread +sha1: CFLAGS+=-Wno-stringop-overread -Wno-unknown-warning-option # The vma-pthread seems very sensitive on gitlab and we currently # don't know if its exposing a real bug or the test is flaky.