Skip to content

Commit

Permalink
KVM: arm64: Remove obsolete kvm_virt_to_phys abstraction
Browse files Browse the repository at this point in the history
This abstraction was introduced to hide the difference between arm and
arm64 but, with the former no longer supported, this abstraction can be
removed and the canonical kernel API used directly instead.

Signed-off-by: Andrew Scull <[email protected]>
Signed-off-by: Marc Zyngier <[email protected]>
CC: Marc Zyngier <[email protected]>
CC: James Morse <[email protected]>
CC: Suzuki K Poulose <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
  • Loading branch information
AndrewScull authored and Marc Zyngier committed May 25, 2020
1 parent 438f711 commit 0a78791
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
2 changes: 0 additions & 2 deletions arch/arm64/include/asm/kvm_mmu.h
Original file line number Diff line number Diff line change
Expand Up @@ -363,8 +363,6 @@ static inline void __kvm_flush_dcache_pud(pud_t pud)
}
}

#define kvm_virt_to_phys(x) __pa_symbol(x)

void kvm_set_way_flush(struct kvm_vcpu *vcpu);
void kvm_toggle_cache(struct kvm_vcpu *vcpu, bool was_enabled);

Expand Down
6 changes: 3 additions & 3 deletions arch/arm64/kvm/mmu.c
Original file line number Diff line number Diff line change
Expand Up @@ -2197,11 +2197,11 @@ int kvm_mmu_init(void)
{
int err;

hyp_idmap_start = kvm_virt_to_phys(__hyp_idmap_text_start);
hyp_idmap_start = __pa_symbol(__hyp_idmap_text_start);
hyp_idmap_start = ALIGN_DOWN(hyp_idmap_start, PAGE_SIZE);
hyp_idmap_end = kvm_virt_to_phys(__hyp_idmap_text_end);
hyp_idmap_end = __pa_symbol(__hyp_idmap_text_end);
hyp_idmap_end = ALIGN(hyp_idmap_end, PAGE_SIZE);
hyp_idmap_vector = kvm_virt_to_phys(__kvm_hyp_init);
hyp_idmap_vector = __pa_symbol(__kvm_hyp_init);

/*
* We rely on the linker script to ensure at build time that the HYP
Expand Down

0 comments on commit 0a78791

Please sign in to comment.