@@ -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;
@@ -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);
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@kernel.org> Cc: Quentin Perret <qperret@google.com> Signed-off-by: Will Deacon <will@kernel.org> --- arch/arm64/include/asm/kvm_host.h | 1 - arch/arm64/kvm/mmu.c | 2 -- 2 files changed, 3 deletions(-)