[PATCH v3 18/18] KVM: arm64: Plumb the pKVM MMU in KVM
Marc Zyngier
maz at kernel.org
Tue Dec 17 07:38:21 PST 2024
On Tue, 17 Dec 2024 14:31:35 +0000,
Quentin Perret <qperret at google.com> wrote:
>
> On Tuesday 17 Dec 2024 at 14:03:37 (+0000), Marc Zyngier wrote:
> > My gripe with this is that it makes it much harder to follow what is
> > happening by using tags (ctags, etags, whatever). I ended up with the
> > hack below, which is super ugly, but preserves the tagging
> > functionality for non-pKVM.
>
> Ack.
>
> > I'll scratch my head to find something more elegant...
>
> I find your proposal pretty reasonable -- I had a few different ideas
> but they were all really over-engineered, so I figured relying on a
> naming convention was the simplest. And any divergence will be flagged
> at compile time, so that shouldn't be too hard to maintain looking
> forward.
>
> The __S2 name isn't massively descriptive though. Maybe KVM_PGT_CALL()
> or something? Thinking about it, this abstraction doesn't need to be
> restricted to stage-2 stuff. We could most likely hide the
> __pkvm_host_{un}share_hyp() logic behind a pkvm_pgtable_hyp_{un}map()
> implementation in pkvm.c as well...
Oh, I'm happy with *any* name. I just changed it to make sure any
missing occurrence would blow up.
And yes, if we can make that more uniform, I'm all for that.
Thanks,
M.
--
Without deviation from the norm, progress is not possible.
More information about the linux-arm-kernel
mailing list