From patchwork Tue Jul 2 15:49:11 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 809128 Delivered-To: patch@linaro.org Received: by 2002:adf:a199:0:b0:367:895a:4699 with SMTP id u25csp278655wru; Tue, 2 Jul 2024 08:50:15 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCWjKSl+LO1YAMb9fBpZ3YCfDO474JTR6Xp1DSeHhA5cih39Fethm8sO1+8st+CudUrNzF+pZxMHTsafEyTw9Bz9 X-Google-Smtp-Source: AGHT+IFvPyGGwE9U3hsHJUT0FfTHJLtHIGsHD0CvqANP/ClqhNPb92CYdv5PybKLQ6s8HaGD8WLM X-Received: by 2002:ad4:5d6d:0:b0:6b5:de3b:dc24 with SMTP id 6a1803df08f44-6b5de3bde4fmr2396756d6.48.1719935415023; Tue, 02 Jul 2024 08:50:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1719935415; cv=none; d=google.com; s=arc-20160816; b=wnkxEmSaqiu1fMq+l2QnwbI4DOQT8jQgjdHM/KXeqFb4sgcLiazuh6+epP61wPsHGW pCuwM7BNeLyCsQ5nv9a00rxewiBdtkGVTm3R3ZYZqdRsmnFVlcTUOG9k+1ITl+tGD3vE 76YotmvKsMcNRfMZtbphstRU+rSmSQ93YL3zOEUzq5PmGJJH0HhypmtyaLUAy/j01Bqr +99/SHE/hFEA8TnFG/mO++94T5oYgZNddGZC4SZHOlCEV6XIVjLay2vdAqd2cINVHCQC W2MdCHSgzg9Aknb1iZsYlplRHwiTdwY3H7kq08l3Bpp5jnSd5u9sgShMZPd/r7pY/Hju wzuA== 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:message-id:date:subject:cc:to:from:dkim-signature; bh=EYRoGF2stDqYWIzGESxh6OgaaDeyMSanepz7ZjBZqBw=; fh=9Ev+QBUhk6P6vR3LT1wYeDLexozsz44nqjfoyPajZCc=; b=RsYA4phPTq5g7JBLkmGuTGCQWy9jyAAkjtmxbTjDyA1VeioaLKSFoq8y6DGuoEeCI7 S2uYWQzkJnMx1RL0yjO6YGIuOW01vPOhMHU5hWLGbOwRgHvF2A92eiD698Ygi0ZFRSSn OLKw62Ivxx9tRyLp1enu4LtZbLx45EeOo9StpfOHdGFON5iigS4PvSqW9z4nhrc6cyRB JwZojA4770q23zF1FRrDvjzyYEdx4d1TGofz3ekgrDdhYgGSraPhZb9wEjBIQSc1wSg2 vwYkOT3hAwxb1limX93QWuWZCQNv476pQd/BKTcPA59ibx8wiODPyK2e2aqe2aFKlvJF d/TQ==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=cfZtSi6o; 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-6b59e618aa1si108529176d6.579.2024.07.02.08.50.14 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 02 Jul 2024 08:50:14 -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=cfZtSi6o; 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 1sOfkt-0003mZ-MX; Tue, 02 Jul 2024 11:49:19 -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 1sOfkq-0003hd-Lj for qemu-devel@nongnu.org; Tue, 02 Jul 2024 11:49:16 -0400 Received: from mail-pl1-x635.google.com ([2607:f8b0:4864:20::635]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sOfkp-0006uF-0G for qemu-devel@nongnu.org; Tue, 02 Jul 2024 11:49:16 -0400 Received: by mail-pl1-x635.google.com with SMTP id d9443c01a7336-1f9b364faddso26792665ad.3 for ; Tue, 02 Jul 2024 08:49:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1719935353; x=1720540153; darn=nongnu.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=EYRoGF2stDqYWIzGESxh6OgaaDeyMSanepz7ZjBZqBw=; b=cfZtSi6o7ivI9vZDiluwWcWWAaZXNag2+1xbKD+Dt+hWnLDnj4M5LP76nmA3A1ShH0 1ds1cqXHxbMcNgo7qkyI5ef2m+xtwKWplMFLtL5EyO268DeQicc6CiKqkc7OBbICUPWS 9qhBfKxsdEi/RlsJSvKxGiXNtCzKbVqiqpd1tsDYllZpTvWefE/mNFgYnIxhexsblKko aSM2lOGB63Mj3IKHScGFTPJ+H89zwEYLQs7J5MEwHDRGdWOSYKJY6exa8oAozqLHUtcH yWcnTEgW6sYqm6qKCSr4wwALPiG8uimYJNXk071GdClH04mxSz1o5aMGIYtx485RKNyY OzEg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1719935353; x=1720540153; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=EYRoGF2stDqYWIzGESxh6OgaaDeyMSanepz7ZjBZqBw=; b=JLyPNnAV+aviavocBr/Zmo/V5+vWN9FPjvMv7COBhnSttHUY8J+d0qGw6B+N0FFOj8 Qw5AsjtpupaU+kuWUp72t4UX2spVJK9hcE9e3wpauKBSSzRHT7jJd6qHxCOGgFn/13eO PN9v+p/tSqzz2RT+V0MAeTbJ5/UkaVT5rdzHIQSg2yFn10owMOztcIiLTrPe7joPsCTl FVCEMST4vO4mBIVtEzkW3QylLBvF1anDOspo1e9EgBGJLpRIfAotgw8t75JBZrXT5si8 Lke2/qPyhqeXhyY8pY4jXEGm2LhoDoUobLe8KGGdP5lpwm31zy1CVLHa7nrtndVe6WOA nhTw== X-Gm-Message-State: AOJu0YwXT3d96uBUZmm3pBUQfej3NFcV/EdrLc7BQPvZYVJCe4dsO+PL KuW/0Jz1PQ4cygmDnHUnEkgbNtBDrcd4f9dplDtfGatSAovleDmd94jEka7melaeP7CtESZV6yZ 0 X-Received: by 2002:a17:902:ceca:b0:1f9:cbe1:af0 with SMTP id d9443c01a7336-1fadbc5b80amr50721595ad.5.1719935353277; Tue, 02 Jul 2024 08:49:13 -0700 (PDT) Received: from stoup.. (174-21-76-141.tukw.qwest.net. [174.21.76.141]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-1fac1569d28sm86197275ad.230.2024.07.02.08.49.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 02 Jul 2024 08:49:12 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Cc: qemu-arm@nongnu.org Subject: [PATCH] target/arm: Use cpu_env in cpu_untagged_addr Date: Tue, 2 Jul 2024 08:49:11 -0700 Message-Id: <20240702154911.1667418-1-richard.henderson@linaro.org> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::635; envelope-from=richard.henderson@linaro.org; helo=mail-pl1-x635.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 autolearn=unavailable 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 Reviewed-by: Philippe Mathieu-Daudé --- 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.