Skip to content
Snippets Groups Projects
Commit eabe7417 authored by Juergen Gross's avatar Juergen Gross Committed by Boris Ostrovsky
Browse files

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: default avatarJan Beulich <jbeulich@suse.com>
Signed-off-by: default avatarJuergen Gross <jgross@suse.com>
Reviewed-by: default avatarJan Beulich <jbeulich@suse.com>
Link: https://lore.kernel.org/r/20201022094907.28560-5-jgross@suse.com


Signed-off-by: default avatarBoris Ostrovsky <boris.ostrovsky@oracle.com>
parent d04b1ae5
No related branches found
No related tags found
No related merge requests found
...@@ -237,6 +237,9 @@ static bool clear_masked_cond(volatile event_word_t *word) ...@@ -237,6 +237,9 @@ static bool clear_masked_cond(volatile event_word_t *word)
w = *word; w = *word;
do { do {
if (!(w & (1 << EVTCHN_FIFO_MASKED)))
return true;
if (w & (1 << EVTCHN_FIFO_PENDING)) if (w & (1 << EVTCHN_FIFO_PENDING))
return false; return false;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment