Skip to content

Commit

Permalink
virtio-entropy: Maintain entropy device spec in separate directory
Browse files Browse the repository at this point in the history
Move virtio entropy device specification to its own file similar to
recent virtio devices.
While at it, place device specification, its driver and device
conformance into its own directory to have self contained device
specification.

Fixes: #153

Acked-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Parav Pandit <parav@nvidia.com>
Signed-off-by: Cornelia Huck <cohuck@redhat.com>
  • Loading branch information
paravmellanox authored and cohuck committed Jan 30, 2023
1 parent d3d0618 commit c71e88e
Show file tree
Hide file tree
Showing 5 changed files with 59 additions and 59 deletions.
18 changes: 2 additions & 16 deletions conformance.tex
Original file line number Diff line number Diff line change
Expand Up @@ -137,14 +137,7 @@ \section{Conformance Targets}\label{sec:Conformance / Conformance Targets}
\input{device-types/net/driver-conformance.tex}
\input{device-types/blk/driver-conformance.tex}
\input{device-types/console/driver-conformance.tex}

\conformance{\subsection}{Entropy Driver Conformance}\label{sec:Conformance / Driver Conformance / Entropy Driver Conformance}

An entropy driver MUST conform to the following normative statements:

\begin{itemize}
\item \ref{drivernormative:Device Types / Entropy Device / Device Operation}
\end{itemize}
\input{device-types/entropy/driver-conformance.tex}

\conformance{\subsection}{Traditional Memory Balloon Driver Conformance}\label{sec:Conformance / Driver Conformance / Traditional Memory Balloon Driver Conformance}

Expand Down Expand Up @@ -372,14 +365,7 @@ \section{Conformance Targets}\label{sec:Conformance / Conformance Targets}
\input{device-types/net/device-conformance.tex}
\input{device-types/blk/device-conformance.tex}
\input{device-types/console/device-conformance.tex}

\conformance{\subsection}{Entropy Device Conformance}\label{sec:Conformance / Device Conformance / Entropy Device Conformance}

An entropy device MUST conform to the following normative statements:

\begin{itemize}
\item \ref{devicenormative:Device Types / Entropy Device / Device Operation}
\end{itemize}
\input{device-types/entropy/device-conformance.tex}

\conformance{\subsection}{Traditional Memory Balloon Device Conformance}\label{sec:Conformance / Device Conformance / Traditional Memory Balloon Device Conformance}

Expand Down
44 changes: 1 addition & 43 deletions content.tex
Original file line number Diff line number Diff line change
Expand Up @@ -3006,49 +3006,7 @@ \chapter{Device Types}\label{sec:Device Types}
\input{device-types/net/description.tex}
\input{device-types/blk/description.tex}
\input{device-types/console/description.tex}

\section{Entropy Device}\label{sec:Device Types / Entropy Device}

The virtio entropy device supplies high-quality randomness for
guest use.

\subsection{Device ID}\label{sec:Device Types / Entropy Device / Device ID}
4

\subsection{Virtqueues}\label{sec:Device Types / Entropy Device / Virtqueues}
\begin{description}
\item[0] requestq
\end{description}

\subsection{Feature bits}\label{sec:Device Types / Entropy Device / Feature bits}
None currently defined

\subsection{Device configuration layout}\label{sec:Device Types / Entropy Device / Device configuration layout}
None currently defined.

\subsection{Device Initialization}\label{sec:Device Types / Entropy Device / Device Initialization}

\begin{enumerate}
\item The virtqueue is initialized
\end{enumerate}

\subsection{Device Operation}\label{sec:Device Types / Entropy Device / Device Operation}

When the driver requires random bytes, it places the descriptor
of one or more buffers in the queue. It will be completely filled
by random data by the device.

\drivernormative{\subsubsection}{Device Operation}{Device Types / Entropy Device / Device Operation}

The driver MUST NOT place device-readable buffers into the queue.

The driver MUST examine the length written by the device to determine
how many random bytes were received.

\devicenormative{\subsubsection}{Device Operation}{Device Types / Entropy Device / Device Operation}

The device MUST place one or more random bytes into the buffer, but it
MAY use less than the entire buffer length.
\input{device-types/entropy/description.tex}

\section{Traditional Memory Balloon Device}\label{sec:Device Types / Memory Balloon Device}

Expand Down
42 changes: 42 additions & 0 deletions device-types/entropy/description.tex
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
\section{Entropy Device}\label{sec:Device Types / Entropy Device}

The virtio entropy device supplies high-quality randomness for
guest use.

\subsection{Device ID}\label{sec:Device Types / Entropy Device / Device ID}
4

\subsection{Virtqueues}\label{sec:Device Types / Entropy Device / Virtqueues}
\begin{description}
\item[0] requestq
\end{description}

\subsection{Feature bits}\label{sec:Device Types / Entropy Device / Feature bits}
None currently defined

\subsection{Device configuration layout}\label{sec:Device Types / Entropy Device / Device configuration layout}
None currently defined.

\subsection{Device Initialization}\label{sec:Device Types / Entropy Device / Device Initialization}

\begin{enumerate}
\item The virtqueue is initialized
\end{enumerate}

\subsection{Device Operation}\label{sec:Device Types / Entropy Device / Device Operation}

When the driver requires random bytes, it places the descriptor
of one or more buffers in the queue. It will be completely filled
by random data by the device.

\drivernormative{\subsubsection}{Device Operation}{Device Types / Entropy Device / Device Operation}

The driver MUST NOT place device-readable buffers into the queue.

The driver MUST examine the length written by the device to determine
how many random bytes were received.

\devicenormative{\subsubsection}{Device Operation}{Device Types / Entropy Device / Device Operation}

The device MUST place one or more random bytes into the buffer, but it
MAY use less than the entire buffer length.
7 changes: 7 additions & 0 deletions device-types/entropy/device-conformance.tex
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
\conformance{\subsection}{Entropy Device Conformance}\label{sec:Conformance / Device Conformance / Entropy Device Conformance}

An entropy device MUST conform to the following normative statements:

\begin{itemize}
\item \ref{devicenormative:Device Types / Entropy Device / Device Operation}
\end{itemize}
7 changes: 7 additions & 0 deletions device-types/entropy/driver-conformance.tex
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
\conformance{\subsection}{Entropy Driver Conformance}\label{sec:Conformance / Driver Conformance / Entropy Driver Conformance}

An entropy driver MUST conform to the following normative statements:

\begin{itemize}
\item \ref{drivernormative:Device Types / Entropy Device / Device Operation}
\end{itemize}

0 comments on commit c71e88e

Please sign in to comment.