[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20201022094907.28560-5-jgross@suse.com>
Date: Thu, 22 Oct 2020 11:49:06 +0200
From: Juergen Gross <jgross@...e.com>
To: xen-devel@...ts.xenproject.org, linux-kernel@...r.kernel.org
Cc: Juergen Gross <jgross@...e.com>,
Boris Ostrovsky <boris.ostrovsky@...cle.com>,
Stefano Stabellini <sstabellini@...nel.org>,
Jan Beulich <jbeulich@...e.com>
Subject: [PATCH v2 4/5] 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@...e.com>
Signed-off-by: Juergen Gross <jgross@...e.com>
Reviewed-by: Jan Beulich <jbeulich@...e.com>
---
V2:
- move test for already unmasked into loop (Jan Beulich)
---
drivers/xen/events/events_fifo.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/drivers/xen/events/events_fifo.c b/drivers/xen/events/events_fifo.c
index 243e7b6d7b96..b234f1766810 100644
--- a/drivers/xen/events/events_fifo.c
+++ b/drivers/xen/events/events_fifo.c
@@ -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;
--
2.26.2
Powered by blists - more mailing lists