[PATCH v1 1/3] KVM: arm64: Initialize HCRX_EL2 traps in pKVM

Fuad Tabba tabba at google.com
Wed Feb 26 10:54:10 PST 2025


Hi,

On Wed, 26 Feb 2025 at 10:53, Oliver Upton <oliver.upton at linux.dev> wrote:
>
> Hey,
>
> On Wed, Feb 26, 2025 at 03:28:22PM +0000, Marc Zyngier wrote:
> > On Wed, 26 Feb 2025 12:44:49 +0000, Fuad Tabba <tabba at google.com> wrote:
> > > On Wed, 26 Feb 2025 at 02:45, Marc Zyngier <maz at kernel.org> wrote:
> > > > This is a copy/paste of what we have in kvm_calculate_traps(), and the
> > > > result of the removal of the dreaded HCRX_GUEST_FLAGS.
>
> Ah, I missed that.
>
> We probably should've just tossed it at that point, doing configuration
> for features we don't support is a bit confusing.
>
> > > > > Any objection to dropping this bit? I can fix it when applying the
> > > > > series, no need to respin.
> > > >
> > > > Whatever we do, I think we should keep the two side of the trap
> > > > configuration in sync, as this is otherwise a cause of bugs.
> > >
> > > I could take the initialization of hcrx part from
> > > kvm_calculate_traps() and place it in an inline function in
> > > kvm_emulate.h. This then would be called by kvm_calculate_traps() and
> > > pkvm_vcpu_init_traps().
> > >
> > > What do you think?
> >
> > That could be a good option indeed, irrespective of the fate of SMPME.
> >
>
> Agreed. Fuad, would you mind taking another pass at this with the shared
> helper?

I'm on it!

Cheers,
/fuad

> Thanks,
> Oliver
>



More information about the linux-arm-kernel mailing list