diff options
author | Sebastian Andrzej Siewior <bigeasy@linutronix.de> | 2019-11-28 22:58:05 +0300 |
---|---|---|
committer | Catalin Marinas <catalin.marinas@arm.com> | 2019-12-06 15:14:45 +0300 |
commit | 0492747c72a3db0425a234abafb763c5b28c845d (patch) | |
tree | 971ffafe7f1468781a0b969fe0ae51f69655ca20 /arch/arm64/include | |
parent | df325e05a682e9c624f471835c35bd3f870d5e8c (diff) | |
download | linux-0492747c72a3db0425a234abafb763c5b28c845d.tar.xz |
arm64: KVM: Invoke compute_layout() before alternatives are applied
compute_layout() is invoked as part of an alternative fixup under
stop_machine(). This function invokes get_random_long() which acquires a
sleeping lock on -RT which can not be acquired in this context.
Rename compute_layout() to kvm_compute_layout() and invoke it before
stop_machine() applies the alternatives. Add a __init prefix to
kvm_compute_layout() because the caller has it, too (and so the code can be
discarded after boot).
Reviewed-by: James Morse <james.morse@arm.com>
Acked-by: Marc Zyngier <maz@kernel.org>
Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
Diffstat (limited to 'arch/arm64/include')
-rw-r--r-- | arch/arm64/include/asm/kvm_mmu.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/arch/arm64/include/asm/kvm_mmu.h b/arch/arm64/include/asm/kvm_mmu.h index befe37d4bc0e..53d846f1bfe7 100644 --- a/arch/arm64/include/asm/kvm_mmu.h +++ b/arch/arm64/include/asm/kvm_mmu.h @@ -91,6 +91,7 @@ alternative_cb_end void kvm_update_va_mask(struct alt_instr *alt, __le32 *origptr, __le32 *updptr, int nr_inst); +void kvm_compute_layout(void); static inline unsigned long __kern_hyp_va(unsigned long v) { |