Skip to content

Commit 0a78791

Browse files
AndrewScullMarc Zyngier
authored andcommitted
KVM: arm64: Remove obsolete kvm_virt_to_phys abstraction
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]
1 parent 438f711 commit 0a78791

File tree

2 files changed

+3
-5
lines changed

2 files changed

+3
-5
lines changed

arch/arm64/include/asm/kvm_mmu.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -363,8 +363,6 @@ static inline void __kvm_flush_dcache_pud(pud_t pud)
363363
}
364364
}
365365

366-
#define kvm_virt_to_phys(x) __pa_symbol(x)
367-
368366
void kvm_set_way_flush(struct kvm_vcpu *vcpu);
369367
void kvm_toggle_cache(struct kvm_vcpu *vcpu, bool was_enabled);
370368

arch/arm64/kvm/mmu.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2197,11 +2197,11 @@ int kvm_mmu_init(void)
21972197
{
21982198
int err;
21992199

2200-
hyp_idmap_start = kvm_virt_to_phys(__hyp_idmap_text_start);
2200+
hyp_idmap_start = __pa_symbol(__hyp_idmap_text_start);
22012201
hyp_idmap_start = ALIGN_DOWN(hyp_idmap_start, PAGE_SIZE);
2202-
hyp_idmap_end = kvm_virt_to_phys(__hyp_idmap_text_end);
2202+
hyp_idmap_end = __pa_symbol(__hyp_idmap_text_end);
22032203
hyp_idmap_end = ALIGN(hyp_idmap_end, PAGE_SIZE);
2204-
hyp_idmap_vector = kvm_virt_to_phys(__kvm_hyp_init);
2204+
hyp_idmap_vector = __pa_symbol(__kvm_hyp_init);
22052205

22062206
/*
22072207
* We rely on the linker script to ensure at build time that the HYP

0 commit comments

Comments
 (0)