The stage-2 page-tables are entirely encapsulated by the 'pgt_cookie' field of 'struct kvm_s2_mmu', so remove the unused 'pgd' field. Cc: Marc Zyngier <maz@xxxxxxxxxx> Cc: Quentin Perret <qperret@xxxxxxxxxx> Signed-off-by: Will Deacon <will@xxxxxxxxxx> --- arch/arm64/include/asm/kvm_host.h | 1 - arch/arm64/kvm/mmu.c | 2 -- 2 files changed, 3 deletions(-) diff --git a/arch/arm64/include/asm/kvm_host.h b/arch/arm64/include/asm/kvm_host.h index 072ab1fac98a..3763880dd47b 100644 --- a/arch/arm64/include/asm/kvm_host.h +++ b/arch/arm64/include/asm/kvm_host.h @@ -79,7 +79,6 @@ struct kvm_s2_mmu { * for vEL1/EL0 with vHCR_EL2.VM == 0. In that case, we use the * canonical stage-2 page tables. */ - pgd_t *pgd; phys_addr_t pgd_phys; void *pgt_cookie; diff --git a/arch/arm64/kvm/mmu.c b/arch/arm64/kvm/mmu.c index 66af9c00b9ad..6351c2dfb63e 100644 --- a/arch/arm64/kvm/mmu.c +++ b/arch/arm64/kvm/mmu.c @@ -397,7 +397,6 @@ int kvm_init_stage2_mmu(struct kvm *kvm, struct kvm_s2_mmu *mmu) mmu->kvm = kvm; mmu->pgt_cookie = cookie; mmu->pgd_phys = kvm_pgtable_get_pgd_phys(cookie); - mmu->pgd = __va(mmu->pgd_phys); mmu->vmid.vmid_gen = 0; return 0; @@ -478,7 +477,6 @@ void kvm_free_stage2_pgd(struct kvm_s2_mmu *mmu) spin_lock(&kvm->mmu_lock); cookie = mmu->pgt_cookie; if (cookie) { - mmu->pgd = NULL; mmu->pgd_phys = 0; mmu->pgt_cookie = NULL; free_percpu(mmu->last_vcpu_ran); -- 2.28.0.rc0.142.g3c755180ce-goog _______________________________________________ kvmarm mailing list kvmarm@xxxxxxxxxxxxxxxxxxxxx https://lists.cs.columbia.edu/mailman/listinfo/kvmarm