linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/3] KVM: arm64: Fix a bug of single-step execution enabled by userspace
@ 2022-09-09  4:46 Reiji Watanabe
  2022-09-09  4:46 ` [PATCH 1/3] KVM: arm64: Don't set PSTATE.SS when Software Step state is Active-pending Reiji Watanabe
                   ` (2 more replies)
  0 siblings, 3 replies; 10+ messages in thread
From: Reiji Watanabe @ 2022-09-09  4:46 UTC (permalink / raw)
  To: Marc Zyngier, kvmarm
  Cc: kvm, linux-arm-kernel, James Morse, Alexandru Elisei,
	Suzuki K Poulose, Paolo Bonzini, Ricardo Koller, Oliver Upton,
	Jing Zhang, Raghavendra Rao Anata, Reiji Watanabe

Fix a bug that KVM could erroneously perform an extra single step
execution (without returning to userspace) due to setting PSTATE.SS
to 1 on every guest entry, when single-step execution is enabled for
the vCPU by userspace.

Add a test for KVM_GUESTDBG_SINGLESTEP to the debug-exception test
to verify the single-step behavior.

The series is based on 6.0-rc4.

Reiji Watanabe (3):
  KVM: arm64: Don't set PSTATE.SS when Software Step state is
    Active-pending
  KVM: arm64: selftests: Refactor debug-exceptions to make it amenable
    to new test cases
  KVM: arm64: selftests: Add a test case for KVM_GUESTDBG_SINGLESTEP

 arch/arm64/include/asm/kvm_host.h             |   3 +
 arch/arm64/kvm/debug.c                        |  19 ++-
 arch/arm64/kvm/guest.c                        |   1 +
 arch/arm64/kvm/handle_exit.c                  |   2 +
 .../selftests/kvm/aarch64/debug-exceptions.c  | 149 +++++++++++++++++-
 5 files changed, 169 insertions(+), 5 deletions(-)


base-commit: 7e18e42e4b280c85b76967a9106a13ca61c16179
-- 
2.37.2.789.g6183377224-goog


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2022-09-14  8:13 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-09-09  4:46 [PATCH 0/3] KVM: arm64: Fix a bug of single-step execution enabled by userspace Reiji Watanabe
2022-09-09  4:46 ` [PATCH 1/3] KVM: arm64: Don't set PSTATE.SS when Software Step state is Active-pending Reiji Watanabe
2022-09-09 12:41   ` Marc Zyngier
2022-09-10  4:12     ` Reiji Watanabe
2022-09-10  9:58       ` Marc Zyngier
2022-09-10 10:36   ` Marc Zyngier
2022-09-14  6:13     ` Reiji Watanabe
2022-09-14  8:12       ` Marc Zyngier
2022-09-09  4:46 ` [PATCH 2/3] KVM: arm64: selftests: Refactor debug-exceptions to make it amenable to new test cases Reiji Watanabe
2022-09-09  4:46 ` [PATCH 3/3] KVM: arm64: selftests: Add a test case for KVM_GUESTDBG_SINGLESTEP Reiji Watanabe

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).