Skip to contentSkip to conversation

arm64: kvm: Remove obsolete kvm_virt_to_phys abstraction

PATCH Applied Andrew Scull 2 participants 2 messages May 19, 2020 – May 25, 2020

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 arm64: kvm: 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.

CC Marc Zyngier <[email protected]>
CC James Morse <[email protected]>
CC Suzuki K Poulose <[email protected]>
---
 arch/arm64/include/asm/kvm_mmu.h | 2 --
 virt/kvm/arm/mmu.c               | 6 +++---
 2 files changed, 3 insertions(+), 5 deletions(-)
arch/arm64/include/asm/kvm_mmu.h +0 -2
index 30b0e8d6b895..e275a85117e8 100644
@@ -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);
 
virt/kvm/arm/mmu.c +3 -3
index e3b9ee268823..2aa853e3c789 100644
@@ -2185,11 +2185,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
Signature · 6 lines
2.26.2.761.g0e0b3e54be-goog

_______________________________________________
kvmarm mailing list
[email protected]
https://lists.cs.columbia.edu/mailman/listinfo/kvmarm
maintainer Applied
#1 lore raw
Quoted 4 lines · Andrew Scull

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.

Quoted 8 lines

[...]

Applied to kvmarm-master/next, thanks!

[1/1] KVM: arm64: Remove obsolete kvm_virt_to_phys abstraction

      commit: 0a78791c0d12fcd5d3f486668defb9ab055e3729 

Note that I rebased it onto next to deal with the path changes.

Cheers,

	M.
Signature · 7 lines
Without deviation from the norm, progress is not possible.


_______________________________________________
kvmarm mailing list
[email protected]
https://lists.cs.columbia.edu/mailman/listinfo/kvmarm