OSDN Git Service

KVM: arm64: Factor out vector address calculation
authorQuentin Perret <qperret@google.com>
Fri, 19 Mar 2021 10:01:23 +0000 (10:01 +0000)
committerMarc Zyngier <maz@kernel.org>
Fri, 19 Mar 2021 12:01:20 +0000 (12:01 +0000)
commitbc1d2892e9aa6dcf6cd83adbd3616051cbd4c429
treea14a48403337fa84c9d7991d9ff448cd72137559
parentd460df12926825a3926da91f054f9f11f88bb33e
KVM: arm64: Factor out vector address calculation

In order to re-map the guest vectors at EL2 when pKVM is enabled,
refactor __kvm_vector_slot2idx() and kvm_init_vector_slot() to move all
the address calculation logic in a static inline function.

Acked-by: Will Deacon <will@kernel.org>
Signed-off-by: Quentin Perret <qperret@google.com>
Signed-off-by: Marc Zyngier <maz@kernel.org>
Link: https://lore.kernel.org/r/20210319100146.1149909-16-qperret@google.com
arch/arm64/include/asm/kvm_mmu.h
arch/arm64/kvm/arm.c