From patchwork Mon Jan 29 23:01:06 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 767445 Delivered-To: patch@linaro.org Received: by 2002:adf:ee41:0:b0:33a:e5bd:fedd with SMTP id w1csp1119045wro; Mon, 29 Jan 2024 15:10:00 -0800 (PST) X-Google-Smtp-Source: AGHT+IHnMtzDXF6doKF4Qx3cbu7d7bVVDC1EHodhuPeheJmuEC2LdeQcavnD3Ln1vnSietFe1I7/ X-Received: by 2002:ad4:5b89:0:b0:68c:4f4d:ccea with SMTP id 9-20020ad45b89000000b0068c4f4dcceamr2665346qvp.23.1706569799916; Mon, 29 Jan 2024 15:09:59 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1706569799; cv=none; d=google.com; s=arc-20160816; b=C9+oy2UoyAZe/gMSQVB5EsGoE35cJuzFbbDl+YpAoBZnuVT2/lDX/q30PpUmy0gWUo vRmNdL+eXpyuKUmudaJ8gE+9n38MgQ0+i3dzzflSIaJ/cibGS94oQzz5/YsyLDG358My U3MFEowrzI1mdedEhw5e/UaWMFUm/6Qxs9qdQZn4jcjiSnqetwyexymWoabzkiswNqFS n+5D9ormkaghtHn3mQl1UYzZG9OvQFTds/1LMsmX5wZft3pOBiOsyPaslT0+IMz2tIyM yC9dxTW+vHnyav7R0+kmwU2EttR3F7S54emuHHASO5pL45dRVbT8YgK6Mxe3gGDVeuSb eYJQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; 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=qYcGKO9y7L+9nQKGBMKS98rrLGXyxY/fBFTDvtgcJC4=; fh=U8v/Dtss/m4oPeJtZ17DHKEvZGyePY/+mu3CqtBX2ks=; b=zUebCCXZXjrwfF0TtYzf8LPyi+VpwxI3U6P9gg5cS5/I06GBCWpU17OtB9FX301QDp dwEoFka8rUjk3yCNga86f6cgEWO3fEXHZtw9fO5sFLVtlraWweRZBErrPo0vk+j3HpaB PnyaFNDcuZTYkqATHVOTgW8AWlWPzzNKFG3JMugH3BpuWmVeWRoL9Ca1PYUcB9LIpk95 i7MCFRawchdKgtLCYrQRXb6AiOjldfEZglefuCNBNMU9N1I9qcLPvhXVp+6p2ztlqKh6 4X85NqNBR5V7cST/KgHjgCSspeLCozBNv3aCy2myFgkPeL1f+DRyjq3Bs89khG2tNqCX id7Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="Rxl/VITV"; 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 Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id jz7-20020a0562140e6700b0068c55a05ac9si1810330qvb.309.2024.01.29.15.09.59 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 29 Jan 2024 15:09:59 -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="Rxl/VITV"; 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 Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rUady-0006Vs-2y; Mon, 29 Jan 2024 18:02: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 1rUadp-0006BN-8r for qemu-devel@nongnu.org; Mon, 29 Jan 2024 18:02:13 -0500 Received: from mail-oi1-x230.google.com ([2607:f8b0:4864:20::230]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rUadn-0008S0-Ju for qemu-devel@nongnu.org; Mon, 29 Jan 2024 18:02:12 -0500 Received: by mail-oi1-x230.google.com with SMTP id 5614622812f47-3be3753e002so805653b6e.1 for ; Mon, 29 Jan 2024 15:02:11 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1706569330; x=1707174130; 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=qYcGKO9y7L+9nQKGBMKS98rrLGXyxY/fBFTDvtgcJC4=; b=Rxl/VITV8Y/bXMaO62TtB9n2lta5ynEBH8WEs0TzcrqJtqdo83mATO85xHH1JjC7LQ CXGDanNmnf1irhZdTXK+OR8tp7xcv9Ny1eXLyQePBUf3dRE9gzviL0EdQk0CJOSwU3v+ bBxylUcPKATNwpQSa0FlH6XzVhEP/UOO9Cb7DzjPmkb59HU1cAjE/gMgHnOGO3wekCH1 uWu+/i4slzpVeFWS2qCK67C7ghmBiJWgINBO5KGzvf9nsOQxeJz1U6O520ighJWhWtyP gW4RkgDEVrgoOzHfdmSCCaCVU4OXoE/TFmhNKF1GV8oBoNQ0mnXep0fw+Wh84KIM+CCf 2w5g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1706569330; x=1707174130; 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=qYcGKO9y7L+9nQKGBMKS98rrLGXyxY/fBFTDvtgcJC4=; b=TRHrExM1hwxkZ1Uwdija4sxm9I6kGM3dhrSSLoesX9V7PqRNJ+CyEr9aB4SPsqgN6l 1mIKwpDGqgtKwIIy1eqP5+ay5dSEKcS8E1poyrQC9XpwFAlNXLuV9rCRW3V/QlgBUHAT QE+ZENSYdCWsRfaiEtACM3sE56378FfwibDATjbY2uDDT3PaOh9chmWAyNgyzyJANW5T FPx+Z4UrDXbkh1h3HMrvr1LJQfgtWcS0uo4zCyNyKWfDPMrgCSemqMG6P5Ot3jkifWYK xuMduXj05kqQTT+XbXpfoYPWGvqby6LKROrZQzr3SKyrLQ+k6NCO90CMYFXYQEwo7RB6 oJUQ== X-Gm-Message-State: AOJu0YwYBZBpcqp2xyd31WWiZSF9184rib8OirGjld2swhx2dzRWs1+v GPkVuzNHnSQE3pXZwSZv2TJ4jCGnmlUVJ5E/5KI9vysWwmapOtelTHKye60c6B6GFWKKiL2SRe1 SDbA= X-Received: by 2002:a05:6808:144e:b0:3be:c63:adb7 with SMTP id x14-20020a056808144e00b003be0c63adb7mr5908986oiv.38.1706569330243; Mon, 29 Jan 2024 15:02:10 -0800 (PST) Received: from stoup.. ([103.210.27.218]) by smtp.gmail.com with ESMTPSA id r10-20020aa78b8a000000b006ddcf56fb78sm6419368pfd.62.2024.01.29.15.02.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 29 Jan 2024 15:02:09 -0800 (PST) From: Richard Henderson To: qemu-devel@nongnu.org Cc: Ilya Leoshkevich , =?utf-8?q?Alex_Benn=C3=A9e?= , =?utf-8?q?Philippe_M?= =?utf-8?q?athieu-Daud=C3=A9?= Subject: [PULL 16/31] accel/tcg: Make use of qemu_target_page_mask() in perf.c Date: Tue, 30 Jan 2024 09:01:06 +1000 Message-Id: <20240129230121.8091-17-richard.henderson@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240129230121.8091-1-richard.henderson@linaro.org> References: <20240129230121.8091-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::230; envelope-from=richard.henderson@linaro.org; helo=mail-oi1-x230.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+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org From: Ilya Leoshkevich Stop using TARGET_PAGE_MASK in order to make perf.c more target-agnostic. Signed-off-by: Ilya Leoshkevich Reviewed-by: Alex Bennée Reviewed-by: Philippe Mathieu-Daudé Message-ID: <20231212003837.64090-2-iii@linux.ibm.com> Reviewed-by: Richard Henderson Message-Id: <20240125054631.78867-2-philmd@linaro.org> Signed-off-by: Richard Henderson --- accel/tcg/perf.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/accel/tcg/perf.c b/accel/tcg/perf.c index cd1aa99a7e..ba75c1bbe4 100644 --- a/accel/tcg/perf.c +++ b/accel/tcg/perf.c @@ -10,6 +10,7 @@ #include "qemu/osdep.h" #include "elf.h" +#include "exec/target_page.h" #include "exec/exec-all.h" #include "qemu/timer.h" #include "tcg/tcg.h" @@ -335,7 +336,7 @@ void perf_report_code(uint64_t guest_pc, TranslationBlock *tb, /* FIXME: This replicates the restore_state_to_opc() logic. */ q[insn].address = gen_insn_data[insn * start_words + 0]; if (tb_cflags(tb) & CF_PCREL) { - q[insn].address |= (guest_pc & TARGET_PAGE_MASK); + q[insn].address |= (guest_pc & qemu_target_page_mask()); } else { #if defined(TARGET_I386) q[insn].address -= tb->cs_base;