From patchwork Wed Jul 10 03:28:03 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 811763 Delivered-To: patch@linaro.org Received: by 2002:adf:ee12:0:b0:367:895a:4699 with SMTP id y18csp571528wrn; Tue, 9 Jul 2024 20:30:27 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCW4aT2Yr3Ei/7NGTShdCyZZmKvDBaMsTCz9YVqlDqkCxp7cc+dkxgvtJmwgc12DRP/UOcbCKwKeJuKJifPJ0/qx X-Google-Smtp-Source: AGHT+IGNFgHhhnaA645uv8wBEKjx3u/QCsQMDnYthGeR4BMxV0nti3wygnwF01N1ma1cpix7/MNP X-Received: by 2002:a05:6214:5093:b0:6b5:7eca:24e8 with SMTP id 6a1803df08f44-6b61d9e4e48mr78447216d6.24.1720582226791; Tue, 09 Jul 2024 20:30:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1720582226; cv=none; d=google.com; s=arc-20160816; b=pehSfgp1T0/LAXtUeRuBor89gaaF+OhV8ogx83fyIOpohK9iNEAROtP60EjJwKDqdV Haknos1kmQmHqZH/3iZcMW+rTav46+poUHyAw+swNOkRcR4nI3xQiWVRYjNtYs14wOet DNWfbPPbw5DvGq92Dh/zpBNrpK6A7lOnOU/R7QvwU4SkEap1KB/JKfamK9Q35S/n9rNP yYGr7D2hr5ouzCKYVlsVWQGqIpjGp255ka0iTVvXiVNnLycCbLosnRRx4neoo+E+J5w3 UCtHwLIJWSET2REjBDi0EzrCMn5POxJMd62aT8bC69Hz6PqhCCcIUP5GMVV9X90Fu7tu hesw== 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=O0cIhWH6OEJemS+kJXsh28axF2DAl58UUDvwEZ1uXTo=; fh=ghNV7mL7MT64gEZ5PHgzOSgxQoCZ3IZKAHIIlbKGaqE=; b=L16evhJ4wo1wTgC0pClT1vj000+zKI/0j1Jy/HfgIyTfnrUTiTWeEj5hIbFNF3f38s O/Q50NtvAS59hhxK7NMLARUiP1od6PTNFuba1D19y7ER9cYL6n3LkIhLM/o+0PfnTvUy YyxUagLfq5Tj3oh9UztXGZb/8A/qFqNQxgIvK6w24QXlAVMln6gneWrJntlgqwTNcv54 hgz6KVm/tsKKkheOXrN4kWJ6iHHIC+Fyu9Ubz7ggGR0CbJJCC79pDQpT1AMSPZq3DDhC 8XfnGnBMsZQW+kQmwIzoO0M24nr9furCsQ36NVonUHbFmM0HNmVJisilXptg9cMz8zpD wIdg==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=FwaWKwD6; 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 6a1803df08f44-6b61b9f8264si37853996d6.32.2024.07.09.20.30.26 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 09 Jul 2024 20:30:26 -0700 (PDT) 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=FwaWKwD6; 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 1sRO0M-0008Mo-6R; Tue, 09 Jul 2024 23:28:30 -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 1sRO0G-0008Bl-UB for qemu-devel@nongnu.org; Tue, 09 Jul 2024 23:28:24 -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 1sRO0C-0003ih-7O for qemu-devel@nongnu.org; Tue, 09 Jul 2024 23:28:23 -0400 Received: by mail-pf1-x42a.google.com with SMTP id d2e1a72fcca58-70b04cb28acso288615b3a.0 for ; Tue, 09 Jul 2024 20:28:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1720582098; x=1721186898; 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=O0cIhWH6OEJemS+kJXsh28axF2DAl58UUDvwEZ1uXTo=; b=FwaWKwD6fw41dp84Se4QEk+a9GWDCq/nQiMEe5qQv1dJkAzY0TwkLYh480r+ZXTvLw H8QN7tkiSZKkj3Z8II74sG3LjydQVJqLUZiAnP5hF0uuEcoPTzRJlx7ZMvL9Sqh+eiLo mHWO8QuwD6USu+6QyGLwmiWKHwmuV3p9MnpxKR3R/X2zdcOt81dvBGapTNQb3oH5RL8y vqPjRl/rr0pL5cY5oH750EJvdYrtA/FPQryiRqvG/9/CYAWwQEcD/e7Ap7Z7gM/6H7mG gi3lGYy+R5B25Eg7kinsfiI/KJj4eFphc3fMk0ftDoxmxsYl/+lmN5DpVgvAEgHVYJh0 N+7A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1720582098; x=1721186898; 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=O0cIhWH6OEJemS+kJXsh28axF2DAl58UUDvwEZ1uXTo=; b=ikoS4eUCYu+ftC+E2FtGieW+UOeIzOEnHCOAadHXq5R5SSinAb6MvrFQEY9Wf0UKXx Q8PRu5znoB43XarqLteSjcysHWjSwnQ7E6NLoRlt1EAhK8IzM4LlgFHnv5A6+Us0IqDi 6gTdYD9NJHonni+3kfrsxDA644PNWJ+AjQD5IlTc4XN9+WauTCjOQNdcoGwMkfldRXxv vWEm3H1tkQsCRp2keEQ6bSSKUCH9t9L0Iq13qzWUACjMZYk/bxrSW09fi4BeF+wF6191 I+dxw/aaFIke9CIEdvFLp4FoRfdHXydaWKltaQ5DZbQsn+LtuN4rNPw3oCM6H2jKQUHu dF9w== X-Gm-Message-State: AOJu0YwVD6Eph04gAahFuO63lQzG8YulXUZmr+lFnXPwNi8L9IMwQ8Sd EZmoDoKsxLZkuwuTBcgsUBelHEeGehdsmCW7me+WeOSNVwJSnXLlU3wbEkf7ztm4T7hzQJtlOgl zaUE= X-Received: by 2002:a05:6a00:1da7:b0:707:fa61:1c6a with SMTP id d2e1a72fcca58-70b54edbc15mr239348b3a.10.1720582098138; Tue, 09 Jul 2024 20:28:18 -0700 (PDT) Received: from stoup.. (174-21-76-141.tukw.qwest.net. [174.21.76.141]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-70b438f5679sm2687280b3a.90.2024.07.09.20.28.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 09 Jul 2024 20:28:17 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Cc: qemu-arm@nongnu.org, qemu-ppc@nongu.org, qemu-s390x@nongnu.org, qemu-riscv@nongnu.org, balaton@eik.bme.hu, max.chou@sifive.com Subject: [PATCH v2 02/13] target/arm: Use cpu_env in cpu_untagged_addr Date: Tue, 9 Jul 2024 20:28:03 -0700 Message-ID: <20240710032814.104643-3-richard.henderson@linaro.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240710032814.104643-1-richard.henderson@linaro.org> References: <20240710032814.104643-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::42a; envelope-from=richard.henderson@linaro.org; helo=mail-pf1-x42a.google.com X-Spam_score_int: 4 X-Spam_score: 0.4 X-Spam_bar: / X-Spam_report: (0.4 / 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, SUSPICIOUS_RECIPS=2.51 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 In a completely artifical memset benchmark object_dynamic_cast_assert dominates the profile, even above guest address resolution and the underlying host memset. Signed-off-by: Richard Henderson --- target/arm/cpu.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/target/arm/cpu.h b/target/arm/cpu.h index d8eb986a04..ccfb9349a3 100644 --- a/target/arm/cpu.h +++ b/target/arm/cpu.h @@ -3309,8 +3309,8 @@ extern const uint64_t pred_esz_masks[5]; */ static inline target_ulong cpu_untagged_addr(CPUState *cs, target_ulong x) { - ARMCPU *cpu = ARM_CPU(cs); - if (cpu->env.tagged_addr_enable) { + CPUARMState *env = cpu_env(cs); + if (env->tagged_addr_enable) { /* * TBI is enabled for userspace but not kernelspace addresses. * Only clear the tag if bit 55 is clear.