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 9C201C19F4F for ; Wed, 8 May 2024 17:19:07 +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-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID: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=8fRllR8tMJzFxOLMXxtR3bTHz2GwcucU2zwvxPqlDBI=; b=Z2FbG55y6TRUP7 Tj89sin1Clte1OqTmtlMZSdX0Zm1gRBnuTYdg3KqUiJQZRUrBUswFyySR+VqKaKcHggIVitGidgdx GQGfhOzTwcb53/0uUgJgLC6mJmSq6YBC+HUze2n2RSMftno+jk0Wx0FFig9Ajtwt2+n/VjwE/D8HK rzEFYE3Ax87RCyN7VOGU4luLJ7QT+S05ay0K9qRHmorBjM89qaTZEUfvgqOkFA3lEf5Ezy/wbLvtd KOxMlTSkExRCfzl+Wo5QGYt+4uBJbQIFhxFHYLm4PUOVOip3aP+1RGugZ43fREZhIGlM10xaI/IaH XSvY6qYqQXRGbWys76FA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1s4kwR-0000000GKkn-3R8S; Wed, 08 May 2024 17:18:55 +0000 Received: from out-176.mta1.migadu.com ([95.215.58.176]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1s4kwM-0000000GKjO-3dUu for linux-arm-kernel@lists.infradead.org; Wed, 08 May 2024 17:18:54 +0000 Date: Wed, 8 May 2024 12:18:43 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1; t=1715188727; 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=BZ3larZmFR+bN7ztPWWRwB/fEtXJTQLP/bM1SI4qrog=; b=NwDJPz8ekvICd3m5pf6iNYs5hxpRkt3eaSBLs1IpNNmQS42Udd+l+0C49g/GiWe7SSb7dI htEdA2rASUwPs+3HHkF+ag4xw1h+CKZVsRW/RmOhkx0WYFfBtua/ecjURjrexVXMD6yyXX L5V3LDOObgWF3yWn+TYc+kC8nGgVa2w= X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. From: Oliver Upton To: Sebastian Ott 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 Message-ID: References: <20240426104950.7382-1-sebott@redhat.com> <20240426104950.7382-5-sebott@redhat.com> <29e7b97b-7a61-9b64-2c57-5a5d0e5f190e@redhat.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <29e7b97b-7a61-9b64-2c57-5a5d0e5f190e@redhat.com> X-Migadu-Flow: FLOW_OUT X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240508_101851_086003_66D76ECE X-CRM114-Status: GOOD ( 15.44 ) 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-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Wed, May 08, 2024 at 05:17:25PM +0200, Sebastian Ott wrote: > 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(). This works for the feature ID registers we maintain per-VM, but not for the feature ID registers local to a vCPU. Sent some fixes out for this but forgot to Cc you on it, apologies. https://lore.kernel.org/kvmarm/20240502233529.1958459-1-oliver.upton@linux.dev/ -- Thanks, Oliver _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel