]> git.baikalelectronics.ru Git - kernel.git/commit
arm64: KVM: Dynamically patch the kernel/hyp VA mask
authorMarc Zyngier <marc.zyngier@arm.com>
Sun, 3 Dec 2017 17:36:55 +0000 (17:36 +0000)
committerMarc Zyngier <marc.zyngier@arm.com>
Mon, 19 Mar 2018 13:03:29 +0000 (13:03 +0000)
commitc0d0fc57880a83b0c97006670d6d02442b318d4f
tree452b64c046fa114c695a0846d90047d05ddf1999
parent7c5f0fc11fe929dd3b79d73fa4e4c4cc708a0f3c
arm64: KVM: Dynamically patch the kernel/hyp VA mask

So far, we're using a complicated sequence of alternatives to
patch the kernel/hyp VA mask on non-VHE, and NOP out the
masking altogether when on VHE.

The newly introduced dynamic patching gives us the opportunity
to simplify that code by patching a single instruction with
the correct mask (instead of the mind bending cumulative masking
we have at the moment) or even a single NOP on VHE. This also
adds some initial code that will allow the patching callback
to switch to a more complex patching.

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/arm64/include/asm/kvm_mmu.h
arch/arm64/kvm/Makefile
arch/arm64/kvm/va_layout.c [new file with mode: 0644]