Skip to content

Commit eabe741

Browse files
jgross1bostrovs
authored andcommitted
xen/events: unmask a fifo event channel only if it was masked
Unmasking an event channel with fifo events channels being used can require a hypercall to be made, so try to avoid that by checking whether the event channel was really masked. Suggested-by: Jan Beulich <jbeulich@suse.com> Signed-off-by: Juergen Gross <jgross@suse.com> Reviewed-by: Jan Beulich <jbeulich@suse.com> Link: https://lore.kernel.org/r/20201022094907.28560-5-jgross@suse.com Signed-off-by: Boris Ostrovsky <boris.ostrovsky@oracle.com>
1 parent d04b1ae commit eabe741

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

drivers/xen/events/events_fifo.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -237,6 +237,9 @@ static bool clear_masked_cond(volatile event_word_t *word)
237237
w = *word;
238238

239239
do {
240+
if (!(w & (1 << EVTCHN_FIFO_MASKED)))
241+
return true;
242+
240243
if (w & (1 << EVTCHN_FIFO_PENDING))
241244
return false;
242245

0 commit comments

Comments
 (0)