OSDN Git Service

KVM: arm64: selftests: Enable single-step without a "full" ucall()
authorSean Christopherson <seanjc@google.com>
Sat, 19 Nov 2022 01:34:44 +0000 (01:34 +0000)
committerPaolo Bonzini <pbonzini@redhat.com>
Fri, 2 Dec 2022 18:22:31 +0000 (13:22 -0500)
commitef16b2dff4d1c71eb32b306d400d4c0f3a383ba7
tree8209f55b3709730fd025e0a26613f1764d64f14f
parentef40757743b47cc95de9b4ed41525c94f8dc73d9
KVM: arm64: selftests: Enable single-step without a "full" ucall()

Add a new ucall hook, GUEST_UCALL_NONE(), to allow tests to make ucalls
without allocating a ucall struct, and use it to enable single-step
in ARM's debug-exceptions test.  Like the disable single-step path, the
enabling path also needs to ensure that no exclusive access sequences are
attempted after enabling single-step, as the exclusive monitor is cleared
on ERET from the debug exception taken to EL2.

The test currently "works" because clear_bit() isn't actually an atomic
operation... yet.

Signed-off-by: Sean Christopherson <seanjc@google.com>
Message-Id: <20221119013450.2643007-4-seanjc@google.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
tools/testing/selftests/kvm/aarch64/debug-exceptions.c
tools/testing/selftests/kvm/include/ucall_common.h