Skip to content

Move __hyp_text code under no-asan Makefiles

James Morse kvmarm linux-arm-kernel 2 versions – New

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest2 patches 0 repliesNew
  2. v12 patches 1 replySuperseded

Changes in v2 from the cover letter

* Made the two functions static in patch 1, removed the header entries.

Patches in v2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2KVM: arm64: Move pmu hyp code under hyp's Makefile to avoid instrumentationarch/arm64/include/asm/kvm_host.h arch/arm64/kvm/hyp/switch.c arch/arm64/kvm/pmu.c+39 -410 replies
2/2KVM: arm/arm64: Move cc/it checks under hyp's Makefile to avoid instrumentationarch/arm/kvm/hyp/Makefile arch/arm64/kvm/hyp/Makefile virt/kvm/arm/aarch32.c +1 more+138 -1210 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v2 yet.

Read the v2 thread

Cover letter [PATCH v2 0/2] Move __hyp_text code under no-asan Makefiles

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.

--
Changes since v1:
* Made the two functions static in patch 1, removed the header entries.

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/include/asm/kvm_host.h |   3 -
 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 ++++++++++++++++++++++++++++++
 7 files changed, 177 insertions(+), 162 deletions(-)
 create mode 100644 virt/kvm/arm/hyp/aarch32.c
Signature · 6 lines
2.20.1

_______________________________________________
kvmarm mailing list
[email protected]
https://lists.cs.columbia.edu/mailman/listinfo/kvmarm