diff options
author | Marc Zyngier <maz@kernel.org> | 2021-08-06 14:31:06 +0300 |
---|---|---|
committer | Marc Zyngier <maz@kernel.org> | 2021-08-20 11:03:42 +0300 |
commit | 923a547d71b967c808a596968cf8022102f8b5b2 (patch) | |
tree | a7b6e196d7b966e8bda0e7c35a9df5b703140bbb /arch/arm64/kvm/hyp/vhe/tlb.c | |
parent | c500bee1c5b2f1d59b1081ac879d73268ab0ff17 (diff) | |
download | linux-923a547d71b967c808a596968cf8022102f8b5b2.tar.xz |
KVM: arm64: Move kern_hyp_va() usage in __load_guest_stage2() into the callers
It is a bit awkward to use kern_hyp_va() in __load_guest_stage2(),
specially as the helper is shared between VHE and nVHE.
Instead, move the use of kern_hyp_va() in the nVHE code, and
pass a pointer to the kvm->arch structure instead. Although
this may look a bit awkward, it allows for some further simplification.
Cc: Catalin Marinas <catalin.marinas@arm.com>
Cc: Jade Alglave <jade.alglave@arm.com>
Cc: Shameer Kolothum <shameerali.kolothum.thodi@huawei.com>
Signed-off-by: Marc Zyngier <maz@kernel.org>
Signed-off-by: Will Deacon <will@kernel.org>
Link: https://lore.kernel.org/r/20210806113109.2475-4-will@kernel.org
Diffstat (limited to 'arch/arm64/kvm/hyp/vhe/tlb.c')
-rw-r--r-- | arch/arm64/kvm/hyp/vhe/tlb.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/arm64/kvm/hyp/vhe/tlb.c b/arch/arm64/kvm/hyp/vhe/tlb.c index 66f17349f0c3..5e9fb3989e0b 100644 --- a/arch/arm64/kvm/hyp/vhe/tlb.c +++ b/arch/arm64/kvm/hyp/vhe/tlb.c @@ -53,7 +53,7 @@ static void __tlb_switch_to_guest(struct kvm_s2_mmu *mmu, * place before clearing TGE. __load_guest_stage2() already * has an ISB in order to deal with this. */ - __load_guest_stage2(mmu); + __load_guest_stage2(mmu, mmu->arch); val = read_sysreg(hcr_el2); val &= ~HCR_TGE; write_sysreg(val, hcr_el2); |