]> git.baikalelectronics.ru Git - kernel.git/commit
KVM: arm64: Allow patching EL2 vectors even with KASLR is not enabled
authorWill Deacon <will@kernel.org>
Mon, 28 Sep 2020 10:45:24 +0000 (11:45 +0100)
committerWill Deacon <will@kernel.org>
Tue, 29 Sep 2020 15:08:17 +0000 (16:08 +0100)
commit91246fc4156b9cf0977d42f026818740c6cbf325
tree78ee8e1e33c1baf46d920331edfa1a7980316b78
parent2448e34ce276ace0de2d4230669afe2d4d0cbdba
KVM: arm64: Allow patching EL2 vectors even with KASLR is not enabled

Patching the EL2 exception vectors is integral to the Spectre-v2
workaround, where it can be necessary to execute CPU-specific sequences
to nobble the branch predictor before running the hypervisor text proper.

Remove the dependency on CONFIG_RANDOMIZE_BASE and allow the EL2 vectors
to be patched even when KASLR is not enabled.

Fixes: 7a132017e7a5 ("KVM: arm64: Replace CONFIG_KVM_INDIRECT_VECTORS with CONFIG_RANDOMIZE_BASE")
Reported-by: kernel test robot <lkp@intel.com>
Link: https://lore.kernel.org/r/202009221053.Jv1XsQUZ%lkp@intel.com
Signed-off-by: Will Deacon <will@kernel.org>
arch/arm64/include/asm/kvm_asm.h
arch/arm64/include/asm/kvm_mmu.h
arch/arm64/kernel/proton-pack.c
arch/arm64/kvm/arm.c
arch/arm64/kvm/hyp/Makefile
arch/arm64/kvm/hyp/hyp-entry.S