From patchwork Sun Jan 28 04:41:58 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 767222 Delivered-To: patch@linaro.org Received: by 2002:adf:ee41:0:b0:33a:e5bd:fedd with SMTP id w1csp348102wro; Sat, 27 Jan 2024 20:45:38 -0800 (PST) X-Google-Smtp-Source: AGHT+IEVtCMLe6zQBf8MrGtpoj9TJX/lt5NgoNo8L6YOtvhtQ2c+BpSgmpECi+5kofvFhrq/sRVQ X-Received: by 2002:a05:622a:45:b0:42a:839e:ea35 with SMTP id y5-20020a05622a004500b0042a839eea35mr3343165qtw.13.1706417138112; Sat, 27 Jan 2024 20:45:38 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1706417138; cv=none; d=google.com; s=arc-20160816; b=phbq9UHCeB+Q3dWb1fUtlO+/kewHw0WYGAjyKnRL59UO5GShlzSKfdoe5nIRzeKF7P y3D7/u5wm/qFT5KffHzIDl3MWjiL7fqtbe0lIv+u0vQT6rG3yxP7QTd/ndh1s9ndfyin WIDO/N4phJWct+xMDLHSfVGklM3keSETPZIirau2OYVaKWg+liy8CjIoaKm+nH4/ZBlk hMLe84v6lSOGLUP1aGwdO9uf9+A13vWKpIVQ/7mbbVPpRq+bOIfNsIAOiDbbW6Se9SXz SD++9d48IPPWjTUnyEXMPuQvaFeLiDvcEOqupEgU7qRQpE1dZQHEBVLsLGVhmLk5XT0Z NQKg== 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=B+aflfBzRNsMkd0BeAo5kBuhp05gLyplvu3a1Wms8SlNlZACfWXaDKYuDSfmXe/jl4 FO1YLCLHie50O1+jluJTXIPtUSj8fEoVebcZWtBfF3i/nfT2x5PRhzX/ZkhxxcBHb9qf gzj03ilefhXgqXN/fGf8N0ilvgM+wPRPSbt3LsPPIQqA+XfmSyq4XsimsBqZS3mvYLMS +mwNwdGa8qCtghxL6P9xm3kwaRYPgCMWGf80cYn5yryb0MM8iwN3TVCPibRRlVzVscUE 0GOzw9Q23YDYO41tNykn1sp/QL7QDp7RFcOcf7BSzx48OEhDLoOrFqgDwJjnM/7Ml9jT OUEQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=cQu9qzDO; 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 y7-20020ac85f47000000b0042a63037ef0si4787387qta.435.2024.01.27.20.45.37 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Sat, 27 Jan 2024 20:45:38 -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=cQu9qzDO; 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 1rTx0d-0004pF-Kv; Sat, 27 Jan 2024 23:43:07 -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 1rTx0b-0004p4-LT for qemu-devel@nongnu.org; Sat, 27 Jan 2024 23:43:05 -0500 Received: from mail-oo1-xc2b.google.com ([2607:f8b0:4864:20::c2b]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rTx0a-0004MY-7L for qemu-devel@nongnu.org; Sat, 27 Jan 2024 23:43:05 -0500 Received: by mail-oo1-xc2b.google.com with SMTP id 006d021491bc7-5957ede4deaso1180363eaf.1 for ; Sat, 27 Jan 2024 20:43:03 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1706416983; x=1707021783; 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=cQu9qzDOk8qh/9nVgpD1JtJCoLFPpNEsrMgzXLSYxeX5TOPiDTRrOfK0vRo4bL41EL wqwpXgE/XdW6WM3TFOKJ2PM59zfdk3Uad71u5iCEXoONm2GvS2uOAgLF2sRoPPwi9rOT dSgayf0qJL1ynOQ52AF5FXXN8CZLwBW4wXN4CV7K4RyJZ4otJiKo3Yo259TVeriODl77 TWvBymbgjOPCEJ+V0Xp2pi/1fssAWIp2UszDsWFPug+FHEzEJpof761XDMWyTJqMKx7k I7bzSaHjBxvMSNlksch5Vjt8BidWCbJKbo2nwjiUde5dRkULlwLbAqbf6DJ+eVktCuDg NtUw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1706416983; x=1707021783; 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=TczMa5ljoD5o56+yn9xco0GLCjtMNU9lUtyxET0doQzW8FMtZSg/ZDDFpKomZ2L9z4 mat2/tvqjDl+m9e51tCewRyKo6KA2hz3+Cu5lCCNb0WFTuqizqRGGts8oAA/9CLQ3qPN 9mt3p7TruEILFa4fUz5CBnMDFOhXOVOdFfYIMNx+7dIDe37bI+Phebp872mIjBoCD2ga BVo7fy1/pKmKoIAGwMF/RKYtKLg1BDxbrsKlvkvbbp3hXII2mHzCyPKjHbfF/c8L+0XT DkQSilivcrfDrsVGd31NdL7YgkL+/6FglfxkgrsRDNEQW2lGAM9U17/xkivwFW8W8veU Qpvw== X-Gm-Message-State: AOJu0YxtXOXhD238YOketFbsPyQSBg/isl+JlfoMHxPFpmrVQO5ZTC90 ruuuWM7kBh0VIUeX6CAV9WUqXuiJ6OxhjpsLFiVc5qIqEzes9PAvJZ0MPIhoyXT0RBUET6c1Zky cXUq7iA== X-Received: by 2002:a05:6359:2b0:b0:176:b25e:a36e with SMTP id ek48-20020a05635902b000b00176b25ea36emr2528020rwb.52.1706416983010; Sat, 27 Jan 2024 20:43:03 -0800 (PST) Received: from stoup.. (ppp121-45-131-89.bri-pow-que-bras31.tpg.internode.on.net. [121.45.131.89]) by smtp.gmail.com with ESMTPSA id w24-20020a17090aaf9800b002906e09e1d1sm5631873pjq.18.2024.01.27.20.43.00 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 27 Jan 2024 20:43:02 -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: [PATCH 18/33] accel/tcg: Make use of qemu_target_page_mask() in perf.c Date: Sun, 28 Jan 2024 14:41:58 +1000 Message-Id: <20240128044213.316480-19-richard.henderson@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240128044213.316480-1-richard.henderson@linaro.org> References: <20240128044213.316480-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::c2b; envelope-from=richard.henderson@linaro.org; helo=mail-oo1-xc2b.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;