From 2a75834b5fa8813c3fa11ea41ff581463a030092 Mon Sep 17 00:00:00 2001
From: rusty <rusty@0c8fb4dd-22a2-4bb5-bc14-6c75a5f43652>
Date: Wed, 26 Feb 2014 04:21:14 +0000
Subject: 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>
Signed-off-by: Rusty Russell <rusty@au1.ibm.com> (merged)

git-svn-id: https://tools.oasis-open.org/version-control/svn/virtio@281 0c8fb4dd-22a2-4bb5-bc14-6c75a5f43652
---
 content.tex | 11 +++++++++++
 1 file changed, 11 insertions(+)

(limited to 'content.tex')

diff --git a/content.tex b/content.tex
index 315cb25..c4cbe81 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{\subparagraph}{Notification via Adapter I/O Interrupts}{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
-- 
cgit v1.2.3

