]> git.baikalelectronics.ru Git - kernel.git/commit
KVM: arm/arm64: Move cc/it checks under hyp's Makefile to avoid instrumentation
authorJames Morse <james.morse@arm.com>
Wed, 22 May 2019 17:47:05 +0000 (18:47 +0100)
committerMarc Zyngier <marc.zyngier@arm.com>
Fri, 24 May 2019 13:53:20 +0000 (14:53 +0100)
commite1bc2a03c2e94eb0765bc10068700db2f8cc1a71
tree57452a3307b459d19afb83f83a49e1919f3982e6
parentd807ae2c770dc752463ca9789d225c61e7369e5b
KVM: arm/arm64: Move cc/it checks under hyp's Makefile to avoid instrumentation

KVM has helpers to handle the condition codes of trapped aarch32
instructions. These are marked __hyp_text and used from HYP, but they
aren't built by the 'hyp' Makefile, which has all the runes to avoid ASAN
and KCOV instrumentation.

Move this code to a new hyp/aarch32.c to avoid a hyp-panic when starting
an aarch32 guest on a host built with the ASAN/KCOV debug options.

Fixes: 3106614e4b557 ("KVM: arm64: Make kvm_condition_valid32() accessible from EL2")
Fixes: 4a8effd270401 ("arm64: KVM: Make kvm_skip_instr32 available to HYP")
Signed-off-by: James Morse <james.morse@arm.com>
Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
arch/arm/kvm/hyp/Makefile
arch/arm64/kvm/hyp/Makefile
virt/kvm/arm/aarch32.c
virt/kvm/arm/hyp/aarch32.c [new file with mode: 0644]