Hi Will, On 9/11/20 2:25 PM, Will Deacon wrote: > Add stage-2 map() and unmap() operations to the generic page-table code. > > Cc: Marc Zyngier <[email protected]> > Cc: Quentin Perret <[email protected]> > Reviewed-by: Gavin Shan <[email protected]> > Signed-off-by: Will Deacon <[email protected]> > --- > arch/arm64/include/asm/kvm_pgtable.h | 46 +++++ > arch/arm64/kvm/hyp/pgtable.c | 273 +++++++++++++++++++++++++++ > 2 files changed, 319 insertions(+) > > diff --git a/arch/arm64/include/asm/kvm_pgtable.h > b/arch/arm64/include/asm/kvm_pgtable.h > index 21d71395a377..895b2238062b 100644 > --- a/arch/arm64/include/asm/kvm_pgtable.h > +++ b/arch/arm64/include/asm/kvm_pgtable.h > @@ -140,6 +140,52 @@ int kvm_pgtable_stage2_init(struct kvm_pgtable *pgt, > struct kvm *kvm); > */ > void kvm_pgtable_stage2_destroy(struct kvm_pgtable *pgt); > > +/** > + * kvm_pgtable_stage2_map() - Install a mapping in a guest stage-2 > page-table. > + * @pgt: Page-table structure initialised by kvm_pgtable_stage2_init(). > + * @addr: Intermediate physical address at which to place the mapping. > + * @size: Size of the mapping. > + * @phys: Physical address of the memory to map. > + * @prot: Permissions and attributes for the mapping. > + * @mc: Cache of pre-allocated GFP_PGTABLE_USER memory from > which to > + * allocate page-table pages.
In v5.9-rc5, kvm_mmu_topup_memory_cache() allocates GFP_KERNEL_ACCOUNT == GFP_KERNEL|__GFP_ACCOUNT memory, not GFP_PGTABLE_USER == GFP_KERNEL|__GFP_ZERO|__GFP_ACCOUNT. Thanks, Alex _______________________________________________ kvmarm mailing list [email protected] https://lists.cs.columbia.edu/mailman/listinfo/kvmarm
