evtchn: let evtchn_set_priority() acquire the per-channel lock
authorJan Beulich <jbeulich@suse.com>
Fri, 23 Oct 2020 08:12:31 +0000 (10:12 +0200)
committerJan Beulich <jbeulich@suse.com>
Fri, 23 Oct 2020 08:12:31 +0000 (10:12 +0200)
commitb76c3a1b878b1897b7166a46a8cb341ef6dfa854
treefb82c82aa94866c70ba04ddc0fa95051e89b0761
parent451a9098608976ec164307a80eef40a2186fd5b3
evtchn: let evtchn_set_priority() acquire the per-channel lock

Some lock wants to be held to make sure the port doesn't change state,
but there's no point holding the per-domain event lock here. Switch to
using the finer grained per-channel lock instead (albeit as a downside
for the time being this requires disabling interrupts for a short
period of time).

FAOD this doesn't guarantee anything towards in particular
evtchn_fifo_set_pending(), as for interdomain channels that function
would be called with the remote side's per-channel lock held.

Signed-off-by: Jan Beulich <jbeulich@suse.com>
Reviewed-by: Roger Pau Monné <roger.pau@citrix.com>
xen/common/event_channel.c