]> git.baikalelectronics.ru Git - kernel.git/commit
KVM: arm/arm64: Do not use kern_hyp_va() with kvm_vgic_global_state
authorMarc Zyngier <marc.zyngier@arm.com>
Sun, 3 Dec 2017 19:28:56 +0000 (19:28 +0000)
committerMarc Zyngier <marc.zyngier@arm.com>
Mon, 19 Mar 2018 13:03:33 +0000 (13:03 +0000)
commitfae423d0fce1e6a19edf3f22b58de88094256328
tree61394ccb03c9e929ca279ba40baf8871cddb118b
parent8550bc33006a94b3192dc8918f84ea0dda2adc37
KVM: arm/arm64: Do not use kern_hyp_va() with kvm_vgic_global_state

kvm_vgic_global_state is part of the read-only section, and is
usually accessed using a PC-relative address generation (adrp + add).

It is thus useless to use kern_hyp_va() on it, and actively problematic
if kern_hyp_va() becomes non-idempotent. On the other hand, there is
no way that the compiler is going to guarantee that such access is
always PC relative.

So let's bite the bullet and provide our own accessor.

Acked-by: Catalin Marinas <catalin.marinas@arm.com>
Reviewed-by: James Morse <james.morse@arm.com>
Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
arch/arm/include/asm/kvm_mmu.h
arch/arm64/include/asm/kvm_mmu.h
arch/arm64/kvm/hyp/vgic-v2-cpuif-proxy.c