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 2E664C5DF81 for ; Tue, 18 Aug 2026 16:14:49 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Content-Type:MIME-Version: References:In-Reply-To:Subject:Cc:To:From:Message-ID:Date:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=E0J6en3McpYf9F3IxCn2pxIwSRX4Sv7Jj1OiegFfc7A=; b=TMpqRN3tJHwlw7jgsTt2VRhLPY X9bcFZ0L02NW4vgWp4hyGsDfs+22U+3RXa3uSM0we6uzjYlybtzpB0NBuY17NkW39dUaEZraWe7Ya 0Fm59KMRoUMnewc4fhA+TWDhA0ze6Ln+s7nj/M11sZH5yDE2aeJ1qlp9OH1PFSVrq859z8QedazGf kIMV6xud3LnxOpl4NP64YMui4w+iI5YhKaYQohiAtdyrrwHIpt+NvWytiJJ39F35PSJWnO1Khdxy6 NOL9PmdyirryqdnT/xBU0oiOAl/B1ZFL3EAmhb2pka9M0xBCAylfZA4cfXxyKl1oXRVJG3NJzwK5i IQMEuGbg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.99.1 #2 (Red Hat Linux)) id 1wwMSX-00000008KYE-3db5; Tue, 18 Aug 2026 16:14:41 +0000 Received: from tor.source.kernel.org ([172.105.4.254]) by bombadil.infradead.org with esmtps (Exim 4.99.1 #2 (Red Hat Linux)) id 1wwMSW-00000008KY7-47Os for linux-arm-kernel@lists.infradead.org; Tue, 18 Aug 2026 16:14:41 +0000 Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) by tor.source.kernel.org (Postfix) with ESMTP id 0DFC7601FB; Tue, 18 Aug 2026 16:14:40 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id B0F941F000E9; Tue, 18 Aug 2026 16:14:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1787069679; bh=E0J6en3McpYf9F3IxCn2pxIwSRX4Sv7Jj1OiegFfc7A=; h=Date:From:To:Cc:Subject:In-Reply-To:References; b=L2M24O0hdXxRP3tm59T84NCNnDVISHqkiqUYrBmFkaK9Zxn+UU6RY+1ibYtLAOP4P w77I7rJ1UVIqEBvr7OYNHw5Evgs1a61TzJj4bqv/9WtPio7GVIp9AnrUaEgobojg0s VrRatuspsj24LXb0d1/r/xKxa3dDKh8tAfPFPH+xS4TyZG8rHSOZtshjBxfXaLxY/C Wbqufj5/2TLQ1fWWwhROhy9xhOS0ZPqvhx5fV5X3QGIyRjObBlI2GNjvxV1mWEUTIc T2i492GYAQe8+nAxmplV9Q5m8VYXju5lKqUafLRI3HTS5AmBtj701x/aYgzgo2wqgJ vl/TJGCBio2XA== Received: from sofa.misterjones.org ([185.219.108.64] helo=goblin-girl.misterjones.org) by disco-boy.misterjones.org with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.98.2) (envelope-from ) id 1wwMST-0000000GhFw-37bp; Tue, 18 Aug 2026 16:14:37 +0000 Date: Tue, 18 Aug 2026 17:14:37 +0100 Message-ID: <868q635rte.wl-maz@kernel.org> From: Marc Zyngier To: Steffen Eiden Cc: kvm@vger.kernel.org, kvmarm@lists.linux.dev, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-s390@vger.kernel.org, Alexander Gordeev , Andreas Grapentin , Arnd Bergmann , Catalin Marinas , Christian Borntraeger , Claudio Imbrenda , David Hildenbrand , Friedrich Welter , Fuad Tabba , Gautam Gala , Hariharan Mari , Heiko Carstens , Hendrik Brueckner , Ilya Leoshkevich , Janosch Frank , Joey Gouly , Nico Boehr , Nina Schoetterl-Glausch , Oliver Upton , Paolo Bonzini , Sean Christopherson , Suzuki K Poulose , Sven Schnelle , Ulrich Weigand , Vasily Gorbik , Will Deacon , Zenghui Yu Subject: Re: [PATCH v6 08/33] KVM: arm64: Use accessor functions for core regs In-Reply-To: <20260818142931.21865-G-seiden@linux.ibm.com> References: <20260812153631.3376090-1-seiden@linux.ibm.com> <20260812153631.3376090-9-seiden@linux.ibm.com> <86a4qq1gyy.wl-maz@kernel.org> <20260818092924.21865-C-seiden@linux.ibm.com> <86ecfv613k.wl-maz@kernel.org> <20260818142931.21865-G-seiden@linux.ibm.com> User-Agent: Wanderlust/2.15.9 (Almost Unreal) SEMI-EPG/1.14.7 (Harue) FLIM-LB/1.14.9 (=?UTF-8?B?R29qxY0=?=) APEL-LB/10.8 EasyPG/1.0.0 Emacs/30.1 (aarch64-unknown-linux-gnu) MULE/6.0 (HANACHIRUSATO) MIME-Version: 1.0 (generated by SEMI-EPG 1.14.7 - "Harue") Content-Type: text/plain; charset=US-ASCII X-SA-Exim-Connect-IP: 185.219.108.64 X-SA-Exim-Rcpt-To: seiden@linux.ibm.com, kvm@vger.kernel.org, kvmarm@lists.linux.dev, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-s390@vger.kernel.org, agordeev@linux.ibm.com, gra@linux.ibm.com, arnd@arndb.de, catalin.marinas@arm.com, borntraeger@linux.ibm.com, imbrenda@linux.ibm.com, david@kernel.org, fritz@linux.ibm.com, tabba@google.com, ggala@linux.ibm.com, hari55@linux.ibm.com, hca@linux.ibm.com, brueckner@linux.ibm.com, iii@linux.ibm.com, frankja@linux.ibm.com, joey.gouly@arm.com, nrb@linux.ibm.com, oss@nina.schoetterlglausch.eu, oupton@kernel.org, pbonzini@redhat.com, seanjc@google.com, suzuki.poulose@arm.com, svens@linux.ibm.com, Ulrich.Weigand@de.ibm.com, gor@linux.ibm.com, will@kernel.org, yuzenghui@huawei.com X-SA-Exim-Mail-From: maz@kernel.org X-SA-Exim-Scanned: No (on disco-boy.misterjones.org); SAEximRunCond expanded to false 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: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Tue, 18 Aug 2026 15:29:31 +0100, Steffen Eiden wrote: > > On Tue, Aug 18, 2026 at 01:54:07PM +0100, Marc Zyngier wrote: > > On Tue, 18 Aug 2026 10:29:24 +0100, > > Steffen Eiden wrote: > > > > > > On Thu, Aug 13, 2026 at 10:56:37AM +0100, Marc Zyngier wrote: > > > > On Wed, 12 Aug 2026 16:36:04 +0100, > > > > Steffen Eiden wrote: > > > > > > > > > [...] > > > > > > > diff --git a/arch/arm64/kvm/guest.c b/arch/arm64/kvm/guest.c > > > > > index b01d6622b872..773f6c8e5026 100644 > > > > > --- a/arch/arm64/kvm/guest.c > > > > > +++ b/arch/arm64/kvm/guest.c > > > > > @@ -134,19 +134,19 @@ static void *core_reg_addr(struct kvm_vcpu *vcpu, const struct kvm_one_reg *reg) > > > > > KVM_REG_ARM_CORE_REG(regs.regs[30]): > > > > > off -= KVM_REG_ARM_CORE_REG(regs.mregs[0]); > > > > > off /= 2; > > > > > - return &vcpu->arch.ctxt.regs.regs[off]; > > > > > + return &vcpu_gp_regs(vcpu)[off]; > > > > > > > > Doesn't this belong to the previous patch? > > > > > > > > > > My thoughts about positioning this change in this patch: > > > > > > The previous patch changes the semantics of vcpu_gp_regs and just > > > touched the part where the old semantic of the function was used. > > > This is mainly done by not using vcpu_gp_regs where it was used before > > > as it cannot be used to access e.g. pstate anymore. > > > > > > This patch then introduces and *uses* new accessor functions for > > > abstractions (and uses the vcpu_gp_regs abstraction where it was not > > > used before). > > > -> The patch changes direct accesses to using accessor functions. > > > > > > However, I have no strong feelings for this. If you want this in the > > > previous patch, I can do that. > > > > I think it'd make more sense. You can capture this in the commit > > message to make it clear. > > Just that we are on the same page: you want me to move the change to the > previous patch? Yes, please. M. -- Without deviation from the norm, progress is not possible.