From patchwork Fri Mar 7 15:06:52 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Peter Maydell X-Patchwork-Id: 871185 Delivered-To: patch@linaro.org Received: by 2002:a5d:64c8:0:b0:38f:210b:807b with SMTP id f8csp808751wri; Fri, 7 Mar 2025 07:08:29 -0800 (PST) X-Forwarded-Encrypted: i=2; AJvYcCWqN1aTVQ8Q446vVDzFRmzS2hYgoKObsVu4vO47CaNtY71xiaeIQbJz4UAh+xtKGHNM7/N5Eg==@linaro.org X-Google-Smtp-Source: AGHT+IHS4OQ1N3S8vytWRPGfD43x4z92JGrGBtDnR/FRtBegpCBnH7GujcH604UPIf02awi4yPaW X-Received: by 2002:a05:6122:8297:b0:51b:a11f:cbdb with SMTP id 71dfb90a1353d-523e4172c0amr3004903e0c.4.1741360107863; Fri, 07 Mar 2025 07:08:27 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1741360107; cv=none; d=google.com; s=arc-20240605; b=TS+9eM53OZ7Au5stKEA7jAH1IgLJuJmXUM1pIxBgTitWcxPQxNQjNiUvoqH3SJDejK 6JwxYeOIMepbLkacPjNUvIsOpy61GxiEKZqoPoYdBFCBITm50dpKrW77zZssIO+f/H/9 baO0xW0TtFBvu0HpJCwwvwKsyxNv/CzbcAX+9eal+zcnu7X1PvWTLq32maip0f6YGrlF FXvIyhvl1kIZOAhWWhQpTsN9/HPjOa+IGjv9ZiTh4mFkxgpUchBRS9G51HmfEE4xkHA9 nyURRUnPl9KRWpqHoZfmY12Cd/JRYGitIdQU3atIM9JQLAzfJukDqeti6IlMeV6yXq6t kndQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; 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:to:from :dkim-signature; bh=li357AJWMFZ6xWx4JegFBm32HWxf9f0kQo9Ln4K3jaE=; fh=PnYt+qEB9tAfMKoqBm2xjKOFpYyFFGPudh5cVIoieJM=; b=UEp7n98bVAZbRfXuWoCHK27Mpa+jqevjW1c7QJCNNFVdyFwrUTvPD11df9PFs+BiHF PaHrZ5BDEFHy1fKI6+y0etpZzImogpAVfQwJQsnHorP+g6S1tcl55WbU0QRTGecOH6EM OaRyT88L30xHETjubWsGc5Ngn95vKbNIGsRVcq2IwJW+jaNL4W1vMJhRsfmoRFBIqdEH TmkaWLNIujhxHfFsP0bkWNguk7PSW/XdNXMHSoou2ZlVi+8rM6ZJ4O3Mg9A/Plyy+OSI s+Fn+lS7j+m3ghVipi8pSn38qDC1e/O/Orjedgq5EFD01HrgtY9zNlgTAEvogGzR6sC2 ++lg==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=rAFbZoZD; 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; dara=neutral header.i=@linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id 71dfb90a1353d-523d8cc49bcsi741538e0c.229.2025.03.07.07.08.27 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 07 Mar 2025 07:08:27 -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=rAFbZoZD; 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; dara=neutral header.i=@linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tqZIK-0000w1-0K; Fri, 07 Mar 2025 10:07:24 -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 1tqZIG-0000uw-RK for qemu-devel@nongnu.org; Fri, 07 Mar 2025 10:07:20 -0500 Received: from mail-wm1-x330.google.com ([2a00:1450:4864:20::330]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tqZIF-0008Cr-Al for qemu-devel@nongnu.org; Fri, 07 Mar 2025 10:07:20 -0500 Received: by mail-wm1-x330.google.com with SMTP id 5b1f17b1804b1-4394a823036so16559685e9.0 for ; Fri, 07 Mar 2025 07:07:18 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1741360038; x=1741964838; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=li357AJWMFZ6xWx4JegFBm32HWxf9f0kQo9Ln4K3jaE=; b=rAFbZoZD7Z+XAWCfSCJdAfQA37BplM5I/e1KlMYrhAo17inz/dHnuSANh3ahoWhYFp qVSoRJ/dF6n/4JB834fDTwq3vNH5iNDgrH7RD9jv1yWpkcseFAhFZOzxCa1Ob/O7kp3N P8KLIuHKEftjEbUJtAiKlfuPdwwB4dYOlQ2U1sSctCpAomktLyakI2c2q+BKThy00w1w K69CWuwEKAAtebR7Eg1V22GyKe3Z+sfcVvlWGjt1mEyr2LM/G3HK5VwPsUJO/Xp2Qa2g HfaKPtw0MZPxeNe5njyznWQf1yZ2JEAlzjCjl8tHgVkJdONGJor+xN/lULvk7GFR4OX6 yF9Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1741360038; x=1741964838; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=li357AJWMFZ6xWx4JegFBm32HWxf9f0kQo9Ln4K3jaE=; b=omYcfchgilXtyIsdBkq6c/PMtPtmmyCnfnuo9ftDLGM+4/nkRpu+ZpPsEKJKeJCD+0 y7HoUS+ZYFKJGMztu6OnjXrF3FiSzNjbqMRDc48B3FSLN4nusclskqA4N/MeSzjp6R4Q gJ6g60+rtYMyqIRn3HqXYpO9jZyjCNPIcfQ3iggcNBAFau39VdaCJbu+2v2mZZO42Vc+ wNST0bh9uUXIqYEoCE3xeUoLsKcYnW1wvyLqUxIcEHlWcop10Enjv7moxEuszFEeoOyE n70KLtM2ykjmO1vrdEQpYlLId29tflv857xWfXAqkqI1B36fW5pFDVTcbJYvb5eBZNUL XXEA== X-Gm-Message-State: AOJu0YwKvovV0kdKRrt/zzCpevhy0kzwSIwRq2sSPLKUUw5kjYpu1xd8 6dmquT3EJbuXDXjstut2H5bKTyXmWsigCIXPzODMw8hOwC9/vzCEU7HUcCqDQaqIP+Rp60wlZw/ / X-Gm-Gg: ASbGncv4YmRBIZ4ZEIObSyN/7llxL0y6avmvlC/i77oGNensiROHp0apLjAfjQLxnDv +Waz/GJTdQeoGSd5rPvcu4O+Gxbz8Lb02lbJ+5LCe7o1MvFrLCZ8cjSXO818RV7T9/6ujhgOdxM 7D2boRSFYpvWJ1E2CcOMCANEQVRd6JrESkfXjFavik2O3HVixEB+Gl0pdxPYHJ54FBem4Dz7LCJ iZ6AdgrPPG1zYGktfxjBv6E2jzVeQRFcFYDDUp8eJ50Fzr9ZUCvE9AbzrNr5WMVOLzV8N9ggJXq QgVU7CYnTs0CjvJ/FxAVi6aYzyUcgj0kGNicl0y7ppzumsZHGRg= X-Received: by 2002:a5d:5f93:0:b0:38a:88ac:f115 with SMTP id ffacd0b85a97d-39132d98703mr2426220f8f.34.1741360037542; Fri, 07 Mar 2025 07:07:17 -0800 (PST) Received: from orth.archaic.org.uk (orth.archaic.org.uk. [2001:8b0:1d0::2]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-3912c1031fdsm5443627f8f.89.2025.03.07.07.07.16 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 07 Mar 2025 07:07:16 -0800 (PST) From: Peter Maydell To: qemu-devel@nongnu.org Subject: [PULL 05/21] target/arm: Don't apply CNTVOFF_EL2 for EL2_VIRT timer Date: Fri, 7 Mar 2025 15:06:52 +0000 Message-ID: <20250307150708.3222813-6-peter.maydell@linaro.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250307150708.3222813-1-peter.maydell@linaro.org> References: <20250307150708.3222813-1-peter.maydell@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::330; envelope-from=peter.maydell@linaro.org; helo=mail-wm1-x330.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+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org The CNTVOFF_EL2 offset register should only be applied for accessses to CNTVCT_EL0 and for the EL1 virtual timer (CNTV_*). We were incorrectly applying it for the EL2 virtual timer (CNTHV_*). Cc: qemu-stable@nongnu.org Signed-off-by: Peter Maydell Reviewed-by: Alex Bennée Message-id: 20250204125009.2281315-3-peter.maydell@linaro.org --- target/arm/helper.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/target/arm/helper.c b/target/arm/helper.c index 7f341d753cd..5729b313f84 100644 --- a/target/arm/helper.c +++ b/target/arm/helper.c @@ -2604,7 +2604,6 @@ static uint64_t gt_tval_read(CPUARMState *env, const ARMCPRegInfo *ri, switch (timeridx) { case GTIMER_VIRT: - case GTIMER_HYPVIRT: offset = gt_virt_cnt_offset(env); break; case GTIMER_PHYS: @@ -2624,7 +2623,6 @@ static void gt_tval_write(CPUARMState *env, const ARMCPRegInfo *ri, switch (timeridx) { case GTIMER_VIRT: - case GTIMER_HYPVIRT: offset = gt_virt_cnt_offset(env); break; case GTIMER_PHYS: