Commit 74cfa7ea authored by Will Deacon's avatar Will Deacon Committed by Marc Zyngier

KVM: arm64: Remove unused 'pgd' field from 'struct kvm_s2_mmu'

The stage-2 page-tables are entirely encapsulated by the 'pgt' field of
'struct kvm_s2_mmu', so remove the unused 'pgd' field.
Signed-off-by: default avatarWill Deacon <will@kernel.org>
Signed-off-by: default avatarMarc Zyngier <maz@kernel.org>
Reviewed-by: default avatarGavin Shan <gshan@redhat.com>
Cc: Marc Zyngier <maz@kernel.org>
Cc: Quentin Perret <qperret@google.com>
Link: https://lore.kernel.org/r/20200911132529.19844-21-will@kernel.org
parent 3f26ab58
...@@ -79,7 +79,6 @@ struct kvm_s2_mmu { ...@@ -79,7 +79,6 @@ struct kvm_s2_mmu {
* for vEL1/EL0 with vHCR_EL2.VM == 0. In that case, we use the * for vEL1/EL0 with vHCR_EL2.VM == 0. In that case, we use the
* canonical stage-2 page tables. * canonical stage-2 page tables.
*/ */
pgd_t *pgd;
phys_addr_t pgd_phys; phys_addr_t pgd_phys;
struct kvm_pgtable *pgt; struct kvm_pgtable *pgt;
......
...@@ -389,7 +389,6 @@ int kvm_init_stage2_mmu(struct kvm *kvm, struct kvm_s2_mmu *mmu) ...@@ -389,7 +389,6 @@ int kvm_init_stage2_mmu(struct kvm *kvm, struct kvm_s2_mmu *mmu)
mmu->kvm = kvm; mmu->kvm = kvm;
mmu->pgt = pgt; mmu->pgt = pgt;
mmu->pgd_phys = __pa(pgt->pgd); mmu->pgd_phys = __pa(pgt->pgd);
mmu->pgd = (void *)pgt->pgd;
mmu->vmid.vmid_gen = 0; mmu->vmid.vmid_gen = 0;
return 0; return 0;
...@@ -475,7 +474,6 @@ void kvm_free_stage2_pgd(struct kvm_s2_mmu *mmu) ...@@ -475,7 +474,6 @@ void kvm_free_stage2_pgd(struct kvm_s2_mmu *mmu)
spin_lock(&kvm->mmu_lock); spin_lock(&kvm->mmu_lock);
pgt = mmu->pgt; pgt = mmu->pgt;
if (pgt) { if (pgt) {
mmu->pgd = NULL;
mmu->pgd_phys = 0; mmu->pgd_phys = 0;
mmu->pgt = NULL; mmu->pgt = NULL;
free_percpu(mmu->last_vcpu_ran); free_percpu(mmu->last_vcpu_ran);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment