OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

virtio-dev message

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]


Subject: [PATCH 1/1] ccw: Fix requirements for processing adapter interrupts.


We currently mandate that the driver clears the summary indicator
before processing the queue indicator; this is bogus, as the requirement
for interrupt avoidance is rather that the driver unsets the summary
indicator before before it stops looking at the queue indicator.

In fact, the best way to get a race-free implementation of the interrupt
handler is to process the queue indicators twice; let's add a recommondation
to do that.

Signed-off-by: Cornelia Huck <cornelia.huck@de.ibm.com>
---
 content.tex |   13 ++++++++++++-
 1 file changed, 12 insertions(+), 1 deletion(-)

diff --git a/content.tex b/content.tex
index 1066594..1a22a34 100644
--- a/content.tex
+++ b/content.tex
@@ -2569,6 +2569,17 @@ bit in the guest-provided indicator area at the corresponding offset.
 The guest-provided summary indicator is set to 0x01. An adapter I/O
 interrupt for the corresponding interruption subclass is generated.
 
+The recommended way to process an adapter I/O interrupt by the driver
+is as follows:
+
+\begin{itemize}
+\item Process all queue indicator bits associated with the summary indicator.
+\item Clear the summary indicator, performing a synchronization (memory
+barrier) afterwards.
+\item Process all queue indicator bits associated with the summary indicator
+again.
+\end{itemize}
+
 \devicenormative{Virtio Transport Options / Virtio over channel I/O / Device Operation / Host->Guest Notification / Notification via Adapter I/O Interrupts}
 
 The device SHOULD only generate an adapter I/O interrupt if the
@@ -2577,7 +2588,7 @@ summary indicator had not been set prior to notification.
 \drivernormative{Virtio Transport Options / Virtio over channel I/O / Device Operation / Host->Guest Notification / Notification via Adapter I/O Interrupts}
 The driver
 MUST clear the summary indicator after receiving an adapter I/O
-interrupt before it processes the queue indicators.
+interrupt before it finishes processing the queue indicators.
 
 \paragraph{Legacy Interfaces: A Note on Host->Guest Notification}\label{sec:Virtio Transport Options / Virtio over channel I/O / Device Operation / Host->Guest Notification / Legacy Interfaces: A Note on Host->Guest Notification}
 
-- 
1.7.9.5



[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]