Re: [PATCH v16 2/6] KVM: arm64: Manage GCS access and registers for guests

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, 12 Sep 2025 17:33:36 +0100,
Mark Brown <broonie@xxxxxxxxxx> wrote:
> 
> On Fri, Sep 12, 2025 at 12:59:23PM +0100, Marc Zyngier wrote:
> > On Fri, 12 Sep 2025 10:25:28 +0100,
> > Mark Brown <broonie@xxxxxxxxxx> wrote:
> 
> > >  		MAPPED_EL2_SYSREG(PIR_EL2,     PIR_EL1,     NULL	     );
> > >  		MAPPED_EL2_SYSREG(PIRE0_EL2,   PIRE0_EL1,   NULL	     );
> > >  		MAPPED_EL2_SYSREG(POR_EL2,     POR_EL1,     NULL	     );
> > > +		MAPPED_EL2_SYSREG(GCSCR_EL2,   GCSCR_EL1,   NULL             );
> > > +		MAPPED_EL2_SYSREG(GCSPR_EL2,   GCSPR_EL1,   NULL             );
> > >  		MAPPED_EL2_SYSREG(AMAIR_EL2,   AMAIR_EL1,   NULL	     );
> > >  		MAPPED_EL2_SYSREG(ELR_EL2,     ELR_EL1,	    NULL	     );
> > >  		MAPPED_EL2_SYSREG(SPSR_EL2,    SPSR_EL1,    NULL	     );
> 
> > Just like the previous version, you're missing the accessors that
> > would be this table useful. Meaning that the vcpu_read_sys_reg() and
> > vcpu_write_sys_reg() accessors will fail for all 4 GSC registers.
> 
> Just to confirm, this is __vcpu_{read,write}_sysreg()?

No.

vcpu_{read,write}_sys_reg() and co are the broken high-level
accessors. __vcpu_{read,write}_sysreg() call into those depending on
the context, and __vcpu_{read,write}_sys_reg_{to,from}_cpu() have now
been removed and replaced by similar (but private) accessors.

See -rc4 for the details.

In any case, a bunch of register accesses in this series are broken,
as they don't respect the register life cycle of the guest.

	M.

-- 
Jazz isn't dead. It just smells funny.




[Index of Archives]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Linux FS]     [Yosemite Forum]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]     [Linux Resources]

  Powered by Linux