Re: [PATCH v6 08/33] KVM: arm64: Use accessor functions for core regs

Steffen Eiden <[email protected]>
Newsgroups dev.linux.lists.kvmarm,org.infradead.lists.linux-arm-kernel,org.kernel.vger.kvm,org.kernel.vger.linux-kernel,org.kernel.vger.linux-s390
Message-ID <[email protected]>
On Tue, Aug 18, 2026 at 01:54:07PM +0100, Marc Zyngier wrote:
> On Tue, 18 Aug 2026 10:29:24 +0100,
> Steffen Eiden <[email protected]> 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 <[email protected]> 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?

	Steffen
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.