]> xenbits.xensource.com Git - people/pauldu/linux.git/commit
KVM: xen: don't block on pfncache locks in kvm_xen_set_evtchn_fast()
authorPaul Durrant <pdurrant@amazon.com>
Mon, 4 Dec 2023 10:06:08 +0000 (10:06 +0000)
committerPaul Durrant <pdurrant@amazon.com>
Mon, 4 Dec 2023 11:31:08 +0000 (11:31 +0000)
commit362c9daae6448e632b0d140a9ba390b6043e85d4
tree423e1dde9f9c017adad97907a2b73f2d94580de3
parentb9ccc306240487e5ed1fd20c89c9c47fc83c4c59
KVM: xen: don't block on pfncache locks in kvm_xen_set_evtchn_fast()

As described in [1] compiling with CONFIG_PROVE_RAW_LOCK_NESTING shows that
kvm_xen_set_evtchn_fast() is blocking on pfncache locks in IRQ context.
Instead, use read_trylock() and treat failure to lock the same as an
invalid cache.

[1] https://lore.kernel.org/lkml/99771ef3a4966a01fefd3adbb2ba9c3a75f97cf2.camel@infradead.org/T/#mbd06e5a04534ce9c0ee94bd8f1e8d942b2d45bd6

Signed-off-by: Paul Durrant <pdurrant@amazon.com>
---
Cc: Sean Christopherson <seanjc@google.com>
Cc: Paolo Bonzini <pbonzini@redhat.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: Borislav Petkov <bp@alien8.de>
Cc: Dave Hansen <dave.hansen@linux.intel.com>
Cc: "H. Peter Anvin" <hpa@zytor.com>
Cc: David Woodhouse <dwmw2@infradead.org>
Cc: x86@kernel.org
v10:
 - New in this version.
arch/x86/kvm/xen.c