From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 8CBC9C04FFE for ; Wed, 8 May 2024 15:17:56 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:Content-Type: Content-Transfer-Encoding:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:References:Message-ID:In-Reply-To: Subject:cc:To:From:Date:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=EJfMKAweNcWSHCUJChqhgvt4gl6M6B8TaN5KlwdN/Kc=; b=4ToZxOGCRriHnO45tCLxhNFjE3 ZiQo/zEVVFvlF2oTuW7OcKZRKEFXVsbBLLV1kOCwIi2nNIfxTYwWCO4Bb1XZJRLNshcgjWym3mPf4 p+RcLZnqPG4B7wwmU++SbzBUnnRWb4XftYXSw2+E5m1VpK9CgW3vzqtozG0SwQ4fS03ENwxUQR81Z 21j79zQkAc6DFTm7AAfnX4LXz7ahN7jviHL5VEpeRsiII2+UbnPYC09IR6SwZjPhNGqrcIZ6Hwa2z ktNyA1WqriEAScOFdoJYvcoQ++y2Eg+c70IVw6irI/5fTe8yQq+Nk0AUMEyMa3/V4j/MG40laNBW/ ouTXydqQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1s4j36-0000000FyyI-0os3; Wed, 08 May 2024 15:17:40 +0000 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1s4j2y-0000000Fyuh-0b1X for linux-arm-kernel@lists.infradead.org; Wed, 08 May 2024 15:17:37 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1715181449; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=VIad/R/g2y7/8Prfc6dEDdL10xOaoHh1ag7PtNI4GYE=; b=L0uJXlfxg/d5JuwMBdB9WoXP15sabCWxEpeWATCih4PFOd4NItiCzZGVU+FgiA1CM9oiG7 YYJ8b6BsBAXMH9+4YJIMpsWB6IHL2krQVEdNRaZNUDdxqtR+T8DUqYBF7GDu6TigWo5ucc ce78ERu4tzH5oLGVenPZyHwP2KzudsY= Received: from mail-wm1-f72.google.com (mail-wm1-f72.google.com [209.85.128.72]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-314-Ut8vo6x0OEC3NwwF5zyZww-1; Wed, 08 May 2024 11:17:28 -0400 X-MC-Unique: Ut8vo6x0OEC3NwwF5zyZww-1 Received: by mail-wm1-f72.google.com with SMTP id 5b1f17b1804b1-41ab62f535aso17061955e9.0 for ; Wed, 08 May 2024 08:17:27 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1715181447; x=1715786247; h=mime-version:references:message-id:in-reply-to:subject:cc:to:from :date:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=VIad/R/g2y7/8Prfc6dEDdL10xOaoHh1ag7PtNI4GYE=; b=afcDNUEOyWKU3QawPgnW34m6mKuiiVBh0AkBC85H61xjKbDKb7nf+e4vmDHMepYcgQ r/yBEL0jwXLUQA+hjSiekTNC4C2Rs77VZLulzZ3R9EgsteIVKhX51Uyjvo8hNcdWLZht lbmTEh9nPsEOceQOA1Vp6ci+eJ9MNU9JFKaBjpWrRLn2znT/UJQ98bITmb0obr9XZWN1 qTF+AGWV4fIBV2AEtXbB71jETCJKtw+q0keQykqx8dZkCJgcSLLZ6cLeYzoVVgeWUXoo IQkx+yvY25Sv58OtIhqP1lF7PNl2brAS1X7sF5WGWZ4MZMyhCTr1cxM3aEiKV1ti4YWa fJBw== X-Gm-Message-State: AOJu0YwKM7JuSxzTSHQ/YsG02U9VeJPGNFIx3mdJ/GgYmDWmNZ1b2sg5 AGkCwIfFpUG95Swg+PvzzgpkKCS2yk8JMf3vBgEfd9ywRrnLGsZLwySEGHOL9Zs7S77tgz/uWlX Fmb+vzl0oxzEdcACV8ocqFqI3+iS0QqNxMpnn38xL8rj9D/kn/OQ/JV0iVCnYFRoMav5MALKP X-Received: by 2002:a05:600c:19d4:b0:418:ee2:5911 with SMTP id 5b1f17b1804b1-41f719d5e37mr22162085e9.28.1715181447040; Wed, 08 May 2024 08:17:27 -0700 (PDT) X-Google-Smtp-Source: AGHT+IG5Ud+DNGoE9CqTLGhS8uyH+zdil3VjI9FsxdYScCIgSCwwJsBYlhxzIamR62bh7Oj4RwndnA== X-Received: by 2002:a05:600c:19d4:b0:418:ee2:5911 with SMTP id 5b1f17b1804b1-41f719d5e37mr22161935e9.28.1715181446699; Wed, 08 May 2024 08:17:26 -0700 (PDT) Received: from rh (p200300c93f4cc600a5cdf10de606b5e2.dip0.t-ipconnect.de. [2003:c9:3f4c:c600:a5cd:f10d:e606:b5e2]) by smtp.gmail.com with ESMTPSA id v6-20020a5d6106000000b0034d743eb8dfsm15550428wrt.29.2024.05.08.08.17.26 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 08 May 2024 08:17:26 -0700 (PDT) Date: Wed, 8 May 2024 17:17:25 +0200 (CEST) From: Sebastian Ott To: Oliver Upton cc: linux-arm-kernel@lists.infradead.org, kvmarm@lists.linux.dev, linux-kernel@vger.kernel.org, Marc Zyngier , James Morse , Suzuki K Poulose , Catalin Marinas , Will Deacon Subject: Re: [PATCH v2 4/6] KVM: arm64: add emulation for CTR_EL0 register In-Reply-To: Message-ID: <29e7b97b-7a61-9b64-2c57-5a5d0e5f190e@redhat.com> References: <20240426104950.7382-1-sebott@redhat.com> <20240426104950.7382-5-sebott@redhat.com> MIME-Version: 1.0 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240508_081732_288926_8DA97ECF X-CRM114-Status: GOOD ( 11.60 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="us-ascii"; Format="flowed" Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Hej Oliver, On Wed, 1 May 2024, Oliver Upton wrote: >> +static u64 reset_ctr(struct kvm_vcpu *vcpu, const struct sys_reg_desc *rd) >> +{ >> + vcpu->kvm->arch.ctr_el0 = read_sanitised_ftr_reg(SYS_CTR_EL0); >> + return vcpu->kvm->arch.ctr_el0; >> +} >> + > > We definitely do not want this value to change across a vCPU reset, it > should be handled like the other ID registers where they only get reset > once for the VM lifetime. Hm, maybe I'm misreading the code here but I don't think this is true for existing regs e.g. CLIDR_EL1 or the stuff defined via ID_WRITABLE(). Sebastian _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel