Re: [PATCH v4 00/26] Opt-in always-on nVHE hypervisor

From: Marc Zyngier
Date: Tue Dec 08 2020 - 15:26:50 EST


On Tue, 08 Dec 2020 19:14:47 +0000,
David Brazdil <dbrazdil@xxxxxxxxxx> wrote:
>
> Hey Marc,
>
> On Thu, Dec 03, 2020 at 07:23:19PM +0000, Marc Zyngier wrote:
> > On Wed, 2 Dec 2020 18:40:56 +0000, David Brazdil wrote:
> > > As we progress towards being able to keep guest state private to the
> > > host running nVHE hypervisor, this series allows the hypervisor to
> > > install itself on newly booted CPUs before the host is allowed to run
> > > on them.
> > >
> > > All functionality described below is opt-in, guarded by an early param
> > > 'kvm-arm.mode=protected'. Future patches specific to the new protected
> > > mode should be hidden behind the same param.
> > >
> > > [...]
> >
> > Applied to kvm-arm64/psci-relay, thanks!
> >
> > Note that although I pushed it to -next, I still need people to
> > eyeball it and give it some Acks. The commit-IDs below will
> > thus change as I apply tags, if any.
> >
>
> I'm looking at -next and I think the merge with Mark Rutland's el2_setup
> refactor didn't go as planned.
>
> The `#ifdef CONFIG_ARM64_VHE` section needs to cover everything between
> init_el2 and init_el2_nvhe. Currently the code falls through into VHE init
> when CONFIG_ARM64_VHE is not set.

Oops, well spotted. I wasn't thinking straight.

I came up with a slightly different fix though, keeping the whole of
the VHE code and instead restoring the "mov x2, xzr" we had before.

I've pushed something out, do yell if you spot anything else.

Thanks again,

M.

--
Without deviation from the norm, progress is not possible.