From nobody Sun May 19 23:41:29 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1676033858; cv=none; d=zohomail.com; s=zohoarc; b=Uxfas8hsIHppvxDucFRGvRd4dyyBV3UoAJlsnEh6+fwFQRIM4sRhE3L4BJlzs1NyMXSGcTLDWhBX3aWW9Rs1gRKQHxb2Zj9OWyUjAWKdHiL3QV5G23rhesyDPEgtmgmNvL+jv58unSK/vUJPBWZ7TOg84M4Fa0reZraJMn3FrQo= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1676033858; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Sender:Subject:To; bh=rBGJ/ZhXy98VsBlus7Z3MhlRHFgf7EUoDXRfC8PcIpw=; b=S8PD99ttyP8NCLwIxoU1qk1DmvnU44aPvi1gM+6KCJdXdWZrzD5dkyN1zr6ptJowx98Tjwbs84niMd32SjiDZxm1jISDEdCwOz+YbJVa4TjDWxAhkSIIMMOqXJ5PmlAK8/xD7Z/cYiubIbTreM9dCF1S/PNehhhLZBdArRXBvAM= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1676033858527584.7854323844431; Fri, 10 Feb 2023 04:57:38 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pQSxe-0003a0-RD; Fri, 10 Feb 2023 07:57:06 -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 1pQSxd-0003Zk-C8 for qemu-devel@nongnu.org; Fri, 10 Feb 2023 07:57:05 -0500 Received: from mail-wm1-x32e.google.com ([2a00:1450:4864:20::32e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pQSxb-0007sR-SG for qemu-devel@nongnu.org; Fri, 10 Feb 2023 07:57:05 -0500 Received: by mail-wm1-x32e.google.com with SMTP id bg5-20020a05600c3c8500b003e00c739ce4so3984330wmb.5 for ; Fri, 10 Feb 2023 04:57:03 -0800 (PST) Received: from localhost.localdomain ([81.0.6.76]) by smtp.gmail.com with ESMTPSA id l3-20020a05600012c300b002c54911f50bsm1596725wrx.84.2023.02.10.04.57.01 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Fri, 10 Feb 2023 04:57:01 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=rBGJ/ZhXy98VsBlus7Z3MhlRHFgf7EUoDXRfC8PcIpw=; b=zPtFjQLaG+k122FoRvxVizF0tDnponl7Rw/xkpqgSIb+cBLSn+iFMxEMyva+qEl8SL 8r8xJCA2wjFTvUw+u7Kr4+w3qZc+lFvP4q4hlI1rr4HQTDuNoMrhZojYae5ytgs/ie4B iBTbVGp4wGuq75uGxE+ZkO2zJdY9eKHXr9LW3h+k/MrgjPIzN+gtDiyRkdcZPXWFlVuh vLU0rzIrTphHY5DuJf0Z2PtEBQe8UuMebSEwNEp5KVJNBFHdPjHDYnpM/E8+9XUVLo8m GUyOwtM+nay/z/VbI2CTBo2xRQOlDqPQbSno5wYgYYK0qfnY9V+G3/4Ulg217iEnyrj/ EPOg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; 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=rBGJ/ZhXy98VsBlus7Z3MhlRHFgf7EUoDXRfC8PcIpw=; b=ckZ0dDX26LiPBXd0HK9jg3QcJuFgQUZwputJNwJlE5GkvtcSBTiSyezLJ57CkE61Se v0KFZlS0TifdFkpCf+taJ94nUzmS/CNPlSv7pC0vfr/fjdnbBzP7vuf73OzCvBgmxctC 58+tDgfpsXKU32ooH9yzQao7N7I1M3K7bzkceoWyMVpQhE411+FZQj2V+edD8LRgy03D rBz7fzC8hPse6NvK3rFrUzlwKbTxrUpkfce6p3zBs/8PJcy2oSxPHzymWo0yMuhEpnaR ibuI0d+qc0gasWdHnFAV+jayvFRNmpvolsRnAbYg1XWlo2GOy7ZbbR85T3Qhwl92/PuT a+BQ== X-Gm-Message-State: AO0yUKWZLy/ibF7nbgbBfUSPwkbxt1walMVdcxPAkBN8w7O5XyH+wu8l QZz3XCp9PqV2kDdo8nHo7jBFvmNHw8cDVD4G X-Google-Smtp-Source: AK7set/MWYifCooo/yeKs2nEwqIOWeyNeAQTMwwJOFV8Y6l44/OuZf6mRM+CgJ3QcunFSkLn2U+IDw== X-Received: by 2002:a05:600c:16c4:b0:3df:f71b:3f68 with SMTP id l4-20020a05600c16c400b003dff71b3f68mr12771925wmn.39.1676033822113; Fri, 10 Feb 2023 04:57:02 -0800 (PST) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Richard Henderson , Paolo Bonzini , Eduardo Habkost , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Daniel Henrique Barboza Subject: [PATCH] target/i386: Remove pointless env_archcpu() in helper_rdmsr() Date: Fri, 10 Feb 2023 13:57:00 +0100 Message-Id: <20230210125700.13474-1-philmd@linaro.org> X-Mailer: git-send-email 2.38.1 MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::32e; envelope-from=philmd@linaro.org; helo=mail-wm1-x32e.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=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+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1676033859065100001 We have a X86CPU *cpu pointer available at the start of the function. Inspired-by: Daniel Henrique Barboza Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Daniel Henrique Barboza --- target/i386/tcg/sysemu/misc_helper.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/target/i386/tcg/sysemu/misc_helper.c b/target/i386/tcg/sysemu/= misc_helper.c index e1528b7f80..e47db9376e 100644 --- a/target/i386/tcg/sysemu/misc_helper.c +++ b/target/i386/tcg/sysemu/misc_helper.c @@ -326,7 +326,7 @@ void helper_rdmsr(CPUX86State *env) val =3D env->sysenter_eip; break; case MSR_IA32_APICBASE: - val =3D cpu_get_apic_base(env_archcpu(env)->apic_state); + val =3D cpu_get_apic_base(x86_cpu->apic_state); break; case MSR_EFER: val =3D env->efer; --=20 2.38.1