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>
This commit is contained in:
Родитель
d04b1ae5a9
Коммит
eabe741782
|
@ -237,6 +237,9 @@ static bool clear_masked_cond(volatile event_word_t *word)
|
|||
w = *word;
|
||||
|
||||
do {
|
||||
if (!(w & (1 << EVTCHN_FIFO_MASKED)))
|
||||
return true;
|
||||
|
||||
if (w & (1 << EVTCHN_FIFO_PENDING))
|
||||
return false;
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче