mbox series

[0/2] Move __hyp_text code under no-asan Makefiles

Message ID 20190521172531.89309-1-james.morse@arm.com (mailing list archive)
Headers show
Series Move __hyp_text code under no-asan Makefiles | expand

Message

James Morse May 21, 2019, 5:25 p.m. UTC
The fancy new pmu code added its __hyp_text code in part of the tree that
doesn't get covered by the no-asan/no-kcov kconfig decorations.
This shows up as a hyp-panic on v8.0 hardware when the host kernel is
built with debug options like kasan.

This same bug has been living happily in the aarch32 emulation code
since v4.9. (commit 8cebe750c4d9a "arm64: KVM: Make kvm_skip_instr32
available to HYP"). Patch 2 has the two relevant fixes tag, but won't
apply cleanly before v4.19 due to the churn.

Fix them both by shuffling the code around.


Thanks,

James Morse (2):
  KVM: arm64: Move pmu hyp code under hyp's Makefile to avoid
    instrumentation
  KVM: arm/arm64: Move cc/it checks under hyp's Makefile to avoid
    instrumentation

 arch/arm/kvm/hyp/Makefile   |   1 +
 arch/arm64/kvm/hyp/Makefile |   1 +
 arch/arm64/kvm/hyp/switch.c |  39 +++++++++++
 arch/arm64/kvm/pmu.c        |  38 ----------
 virt/kvm/arm/aarch32.c      | 121 --------------------------------
 virt/kvm/arm/hyp/aarch32.c  | 136 ++++++++++++++++++++++++++++++++++++
 6 files changed, 177 insertions(+), 159 deletions(-)
 create mode 100644 virt/kvm/arm/hyp/aarch32.c