KVM: selftests: Add EVTCHNOP_send slow path test to xen_shinfo_test
authorDavid Woodhouse <dwmw@amazon.co.uk>
Sat, 4 Feb 2023 02:41:51 +0000 (02:41 +0000)
committerPaolo Bonzini <pbonzini@redhat.com>
Tue, 14 Mar 2023 14:20:08 +0000 (10:20 -0400)
commite6239a4ec5c51e4d5ee4d1604f741f490c32054c
tree7a938b31a8d62e27d312036c55cc870cfc49755d
parente7062a98d0b3e0b42089f4c5da633a1ce41b807f
KVM: selftests: Add EVTCHNOP_send slow path test to xen_shinfo_test

When kvm_xen_evtchn_send() takes the slow path because the shinfo GPC
needs to be revalidated, it used to violate the SRCU vs. kvm->lock
locking rules and potentially cause a deadlock.

Now that lockdep is learning to catch such things, make sure that code
path is exercised by the selftest.

Link: https://lore.kernel.org/all/20230113124606.10221-2-dwmw2@infradead.org
Signed-off-by: David Woodhouse <dwmw@amazon.co.uk>
Signed-off-by: Sean Christopherson <seanjc@google.com>
Message-Id: <20230204024151.1373296-5-seanjc@google.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
tools/testing/selftests/kvm/x86_64/xen_shinfo_test.c