[PATCH 02/20] KVM: arm64: Add support for creating kernel-agnostic stage-1 page tables

Quentin Perret qperret at google.com
Fri Jul 31 04:36:06 EDT 2020


On Friday 31 Jul 2020 at 09:22:15 (+0100), Will Deacon wrote:
> No, I think you're right. The hyp stage-1 PGD is always a single page, so I
> can simplify the free() path.

OK, cool. The current code does support concatenated pgds for the hyp
stage 1, which is what confused me. Would you mind adding something to
the commit message explaining why this is no longer needed or something?
Or at least mention it here so I understand :) ?

> At one point, I had a common free() path for
> stage-1 and stage-2, but that didn't last very long, as the stage-2
> page-table pages are refcounted so you end up having to deal with them
> differently anyway.

Right, though refcounting the pages for stage 1 might be a good idea
too. The current code does it, and I think we'll need it later on for
the Protected KVM stuff as unmap() will be needed for stage 1 as well.
I'm fine if this is done in a separate series, though. I don't think we
need any of that just yet, so we can definitely start 'simple'.

Cheers,
Quentin



More information about the linux-arm-kernel mailing list