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] Add multiple IRQs support for virtio-mmio


Some platforms such as arm which uses virtio-mmio instead of
virtio-pci, can assign multiple IRQs for virtio-mmio by
connecting multiple IRQ Lines between virtio-mmio and GIC.
So it could use vhost-net with irqfd and multiqueue with
Multi-IRQs capability instead of MSI-X capability.

Signed-off-by: Shannon Zhao <zhaoshenglong@huawei.com>
---
 content.tex |   82 ++++++++++++++++++++++++++++++++++++++++++++++++++++------
 1 files changed, 73 insertions(+), 9 deletions(-)

diff --git a/content.tex b/content.tex
index 5bfb082..9941894 100644
--- a/content.tex
+++ b/content.tex
@@ -2187,19 +2187,83 @@ a queue by writing the index of the updated queue to \field{QueueNotify}.
 
 \subsubsection{Notifications From The Device}\label{sec:Virtio Transport Options / Virtio Over MMIO / MMIO-specific Initialization And Device Operation / Notifications From The Device}
 
-The memory mapped virtio device is using a single, dedicated
-interrupt signal, which is asserted when at least one of the
-bits described in the description of \field{InterruptStatus}
-is set. This is how the device notifies the
-driver about a new used buffer being available in the queue
-or about a change in the device configuration.
-
-\drivernormative{\paragraph}{Notifications From The Device}{Virtio Transport Options / Virtio Over MMIO / MMIO-specific Initialization And Device Operation / Notifications From The Device}
-After receiving an interrupt, the driver MUST read
+The memory mapped virtio device can use multiple, dedicated
+interrupt signals. When the device uses a single interrupt signal,
+it is asserted when at least one of the bits described in the
+description of \field{InterruptStatus} is set. This is how the
+device notifies the driver about a new used buffer being
+available in the queue or about a change in the device
+configuration. When the device uses multiple interrupt signals,
+one for the device configuration change notify and the others for
+a new used buffer being available in the virtqueue.
+
+\paragraph{Virtqueue Interrupts From The
+Device}\label{sec:Virtio Transport Options / Virtio Over MMIO /
+MMIO-specific Initialization And Device Operation / Notifications
+From The Device / Virtqueue Interrupts From The Device}
+
+If an interrupt is necessary for a virtqueue, the device would
+typically act as follows:
+
+\begin{itemize}
+  \item If Multi-IRQs capability is disabled:
+    \begin{enumerate}
+    \item Set the lower bit of the ISR Status field for the
+device.
+
+    \item Send the appropriate LINE interrupt for the device.
+    \end{enumerate}
+
+  \item If Multi-IRQs capability is enabled:
+    \begin{enumerate}
+    \item Send the appropriate LINE interrupt for the virtqueue.
+    \end{enumerate}
+\end{itemize}
+
+\paragraph{Notification of Device Configuration
+Changes}\label{sec:Virtio Transport Options / Virtio Over MMIO /
+MMIO-specific Initialization And Device Operation / Notifications
+From The Device / Notification of Device Configuration Changes}
+
+If an interrupt is necessary for a change of device
+configuration, the device would typically act as follows:
+
+\begin{itemize}
+  \item If Multi-IRQs capability is disabled:
+    \begin{enumerate}
+    \item Set the second lower bit of the ISR Status field for
+the device.
+
+    \item Send the appropriate LINE interrupt for the device.
+    \end{enumerate}
+
+  \item If Multi-IRQs capability is enabled:
+    \begin{enumerate}
+    \item Send the appropriate LINE interrupt for the device.
+    \end{enumerate}
+\end{itemize}
+
+\drivernormative{\paragraph}{Notifications
+From The Device}{Virtio Transport Options / Virtio Over MMIO /
+MMIO-specific Initialization And Device Operation / Notifications
+From The Device}
+
+\begin{itemize}
+  \item If Multi-IRQs capability is disabled:
+    \begin{itemize}
+      \item After receiving an interrupt, the driver MUST read
 \field{InterruptStatus} to check what caused the interrupt
 (see the register description). After the interrupt is handled,
 the driver MUST acknowledge it by writing a bit mask
 corresponding to the handled events to the InterruptACK register.
+    \end{itemize}
+  \item If Multi-IRQs capability is enabled:
+    \begin{itemize}
+      \item As the interrupt is injeted separately for cvq and
+vq, the driver doesn't need read \field{InterruptStatus} and
+assign different interrupt handlers.
+    \end{itemize}
+\end{itemize}
 
 \subsection{Legacy interface}\label{sec:Virtio Transport Options / Virtio Over MMIO / Legacy interface}
 
-- 
1.7.1




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