OASIS Virtual I/O Device (VIRTIO) TC

 View Only
  • 1.  [PATCH v2] ccw: clarify device reset

    Posted 11-26-2021 11:47
    Unlike other transports, a reset triggered by the driver is actually complete once the command has been completed. Make this behaviour and the requirements more explicit. Signed-off-by: Cornelia Huck <cohuck@redhat.com> --- v1->v2: drop channel I/O internals, talk more specificly about virtio reset --- conformance.tex 2 ++ content.tex 22 +++++++++++++++++++++- 2 files changed, 23 insertions(+), 1 deletion(-) diff --git a/conformance.tex b/conformance.tex index 80547db4939b..f7975d974c63 100644 --- a/conformance.tex +++ b/conformance.tex @@ -123,6 +123,7 @@ section{Conformance Targets}label{sec:Conformance / Conformance Targets} item
    ef{drivernormative:Virtio Transport Options / Virtio over channel I/O / Device Initialization / Communicating Status Information} item
    ef{drivernormative:Virtio Transport Options / Virtio over channel I/O / Device Operation / Host->Guest Notification / Notification via Adapter I/O Interrupts} item
    ef{drivernormative:Virtio Transport Options / Virtio over channel I/O / Device Operation / Guest->Host Notification} +item
    ef{drivernormative:Virtio Transport Options / Virtio over channel I/O / Device Operation / Resetting Devices} end{itemize} conformance{subsection}{Network Driver Conformance}label{sec:Conformance / Driver Conformance / Network Driver Conformance} @@ -374,6 +375,7 @@ section{Conformance Targets}label{sec:Conformance / Conformance Targets} item
    ef{devicenormative:Virtio Transport Options / Virtio over channel I/O / Device Initialization / Setting Up Indicators / Setting Up Two-Stage Queue Indicators} item
    ef{devicenormative:Virtio Transport Options / Virtio over channel I/O / Device Operation / Host->Guest Notification / Notification via Adapter I/O Interrupts} item
    ef{devicenormative:Virtio Transport Options / Virtio over channel I/O / Device Operation / Guest->Host Notification} +item
    ef{devicenormative:Virtio Transport Options / Virtio over channel I/O / Device Operation / Resetting Devices} end{itemize} conformance{subsection}{Network Device Conformance}label{sec:Conformance / Device Conformance / Network Device Conformance} diff --git a/content.tex b/content.tex index 5d112af206d2..899df5ffde6d 100644 --- a/content.tex +++ b/content.tex @@ -2775,8 +2775,28 @@ subsubsection{Guest->Host Notification}label{sec:Virtio Transport Options / Vi subsubsection{Resetting Devices}label{sec:Virtio Transport Options / Virtio over channel I/O / Device Operation / Resetting Devices} In order to reset a device, a driver sends the -CCW_CMD_VDEV_RESET command. +CCW_CMD_VDEV_RESET command. This command does not carry any payload. +The device signals completion of the virtio reset operation through successful +conclusion of the CCW_CMD_VDEV_RESET channel command. In particular, the +command not only triggers the reset operation, but the reset operation is +already completed when the operation concludes successfully. + +devicenormative{paragraph}{Resetting Devices}{Virtio Transport Options / Virtio over channel I/O / Device Operation / Resetting Devices} + +The device MUST finish the virtio reset operation and reinitialize +field{device status} to zero before it concludes the CCW_CMD_VDEV_RESET +command successfully. + +The device MUST NOT send notifications or interact with the queues after +it signaled successful conclusion of the CCW_CMD_VDEV_RESET command. + +drivernormative{paragraph}{Resetting Devices}{Virtio Transport Options / Virtio over channel I/O / Device Operation / Resetting Devices} + +The driver MAY consider the virtio reset operation to be complete already after +successful conclusion of the CCW_CMD_VDEV_RESET channel command, although it +MAY also choose to verify reset completion by reading field{device status} via +CCW_CMD_READ_STATUS and checking whether it is 0 afterwards. chapter{Device Types}label{sec:Device Types} -- 2.31.1


  • 2.  Re: [PATCH v2] ccw: clarify device reset

    Posted 11-29-2021 02:43
    On Fri, Nov 26, 2021 at 7:47 PM Cornelia Huck <cohuck@redhat.com> wrote:
    >
    > Unlike other transports, a reset triggered by the driver is actually
    > complete once the command has been completed. Make this behaviour
    > and the requirements more explicit.
    >
    > Signed-off-by: Cornelia Huck <cohuck@redhat.com>

    Reviewed-by: Jason Wang <jasowang@redhat.com>

    > ---
    >
    > v1->v2: drop channel I/O internals, talk more specificly about virtio reset
    >
    > ---
    > conformance.tex | 2 ++
    > content.tex | 22 +++++++++++++++++++++-
    > 2 files changed, 23 insertions(+), 1 deletion(-)
    >
    > diff --git a/conformance.tex b/conformance.tex
    > index 80547db4939b..f7975d974c63 100644
    > --- a/conformance.tex
    > +++ b/conformance.tex
    > @@ -123,6 +123,7 @@ \section{Conformance Targets}\label{sec:Conformance / Conformance Targets}
    > \item \ref{drivernormative:Virtio Transport Options / Virtio over channel I/O / Device Initialization / Communicating Status Information}
    > \item \ref{drivernormative:Virtio Transport Options / Virtio over channel I/O / Device Operation / Host->Guest Notification / Notification via Adapter I/O Interrupts}
    > \item \ref{drivernormative:Virtio Transport Options / Virtio over channel I/O / Device Operation / Guest->Host Notification}
    > +\item \ref{drivernormative:Virtio Transport Options / Virtio over channel I/O / Device Operation / Resetting Devices}
    > \end{itemize}
    >
    > \conformance{\subsection}{Network Driver Conformance}\label{sec:Conformance / Driver Conformance / Network Driver Conformance}
    > @@ -374,6 +375,7 @@ \section{Conformance Targets}\label{sec:Conformance / Conformance Targets}
    > \item \ref{devicenormative:Virtio Transport Options / Virtio over channel I/O / Device Initialization / Setting Up Indicators / Setting Up Two-Stage Queue Indicators}
    > \item \ref{devicenormative:Virtio Transport Options / Virtio over channel I/O / Device Operation / Host->Guest Notification / Notification via Adapter I/O Interrupts}
    > \item \ref{devicenormative:Virtio Transport Options / Virtio over channel I/O / Device Operation / Guest->Host Notification}
    > +\item \ref{devicenormative:Virtio Transport Options / Virtio over channel I/O / Device Operation / Resetting Devices}
    > \end{itemize}
    >
    > \conformance{\subsection}{Network Device Conformance}\label{sec:Conformance / Device Conformance / Network Device Conformance}
    > diff --git a/content.tex b/content.tex
    > index 5d112af206d2..899df5ffde6d 100644
    > --- a/content.tex
    > +++ b/content.tex
    > @@ -2775,8 +2775,28 @@ \subsubsection{Guest->Host Notification}\label{sec:Virtio Transport Options / Vi
    > \subsubsection{Resetting Devices}\label{sec:Virtio Transport Options / Virtio over channel I/O / Device Operation / Resetting Devices}
    >
    > In order to reset a device, a driver sends the
    > -CCW_CMD_VDEV_RESET command.
    > +CCW_CMD_VDEV_RESET command. This command does not carry any payload.
    >
    > +The device signals completion of the virtio reset operation through successful
    > +conclusion of the CCW_CMD_VDEV_RESET channel command. In particular, the
    > +command not only triggers the reset operation, but the reset operation is
    > +already completed when the operation concludes successfully.
    > +
    > +\devicenormative{\paragraph}{Resetting Devices}{Virtio Transport Options / Virtio over channel I/O / Device Operation / Resetting Devices}
    > +
    > +The device MUST finish the virtio reset operation and reinitialize
    > +\field{device status} to zero before it concludes the CCW_CMD_VDEV_RESET
    > +command successfully.
    > +
    > +The device MUST NOT send notifications or interact with the queues after
    > +it signaled successful conclusion of the CCW_CMD_VDEV_RESET command.
    > +
    > +\drivernormative{\paragraph}{Resetting Devices}{Virtio Transport Options / Virtio over channel I/O / Device Operation / Resetting Devices}
    > +
    > +The driver MAY consider the virtio reset operation to be complete already after
    > +successful conclusion of the CCW_CMD_VDEV_RESET channel command, although it
    > +MAY also choose to verify reset completion by reading \field{device status} via
    > +CCW_CMD_READ_STATUS and checking whether it is 0 afterwards.
    >
    > \chapter{Device Types}\label{sec:Device Types}
    >
    > --
    > 2.31.1
    >




  • 3.  Re: [virtio-comment] [PATCH v2] ccw: clarify device reset

    Posted 11-29-2021 10:13
    On Fri, Nov 26, 2021 at 12:46:54PM +0100, Cornelia Huck wrote:
    > Unlike other transports, a reset triggered by the driver is actually
    > complete once the command has been completed. Make this behaviour
    > and the requirements more explicit.
    >
    > Signed-off-by: Cornelia Huck <cohuck@redhat.com>
    > ---
    >
    > v1->v2: drop channel I/O internals, talk more specificly about virtio reset
    >
    > ---
    > conformance.tex | 2 ++
    > content.tex | 22 +++++++++++++++++++++-
    > 2 files changed, 23 insertions(+), 1 deletion(-)

    Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>



  • 4.  Re: [virtio-comment] [PATCH v2] ccw: clarify device reset

    Posted 11-29-2021 10:13
    On Fri, Nov 26, 2021 at 12:46:54PM +0100, Cornelia Huck wrote: > Unlike other transports, a reset triggered by the driver is actually > complete once the command has been completed. Make this behaviour > and the requirements more explicit. > > Signed-off-by: Cornelia Huck <cohuck@redhat.com> > --- > > v1->v2: drop channel I/O internals, talk more specificly about virtio reset > > --- > conformance.tex 2 ++ > content.tex 22 +++++++++++++++++++++- > 2 files changed, 23 insertions(+), 1 deletion(-) Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com> Attachment: signature.asc Description: PGP signature


  • 5.  Re: [PATCH v2] ccw: clarify device reset

    Posted 11-29-2021 12:33
    On Fri, Nov 26 2021, Cornelia Huck <cohuck@redhat.com> wrote:

    > Unlike other transports, a reset triggered by the driver is actually
    > complete once the command has been completed. Make this behaviour
    > and the requirements more explicit.

    Fixes: https://github.com/oasis-tcs/virtio-spec/issues/123

    >
    > Signed-off-by: Cornelia Huck <cohuck@redhat.com>
    > ---
    >
    > v1->v2: drop channel I/O internals, talk more specificly about virtio reset
    >
    > ---
    > conformance.tex | 2 ++
    > content.tex | 22 +++++++++++++++++++++-
    > 2 files changed, 23 insertions(+), 1 deletion(-)
    >
    > diff --git a/conformance.tex b/conformance.tex
    > index 80547db4939b..f7975d974c63 100644
    > --- a/conformance.tex
    > +++ b/conformance.tex
    > @@ -123,6 +123,7 @@ \section{Conformance Targets}\label{sec:Conformance / Conformance Targets}
    > \item \ref{drivernormative:Virtio Transport Options / Virtio over channel I/O / Device Initialization / Communicating Status Information}
    > \item \ref{drivernormative:Virtio Transport Options / Virtio over channel I/O / Device Operation / Host->Guest Notification / Notification via Adapter I/O Interrupts}
    > \item \ref{drivernormative:Virtio Transport Options / Virtio over channel I/O / Device Operation / Guest->Host Notification}
    > +\item \ref{drivernormative:Virtio Transport Options / Virtio over channel I/O / Device Operation / Resetting Devices}
    > \end{itemize}
    >
    > \conformance{\subsection}{Network Driver Conformance}\label{sec:Conformance / Driver Conformance / Network Driver Conformance}
    > @@ -374,6 +375,7 @@ \section{Conformance Targets}\label{sec:Conformance / Conformance Targets}
    > \item \ref{devicenormative:Virtio Transport Options / Virtio over channel I/O / Device Initialization / Setting Up Indicators / Setting Up Two-Stage Queue Indicators}
    > \item \ref{devicenormative:Virtio Transport Options / Virtio over channel I/O / Device Operation / Host->Guest Notification / Notification via Adapter I/O Interrupts}
    > \item \ref{devicenormative:Virtio Transport Options / Virtio over channel I/O / Device Operation / Guest->Host Notification}
    > +\item \ref{devicenormative:Virtio Transport Options / Virtio over channel I/O / Device Operation / Resetting Devices}
    > \end{itemize}
    >
    > \conformance{\subsection}{Network Device Conformance}\label{sec:Conformance / Device Conformance / Network Device Conformance}
    > diff --git a/content.tex b/content.tex
    > index 5d112af206d2..899df5ffde6d 100644
    > --- a/content.tex
    > +++ b/content.tex
    > @@ -2775,8 +2775,28 @@ \subsubsection{Guest->Host Notification}\label{sec:Virtio Transport Options / Vi
    > \subsubsection{Resetting Devices}\label{sec:Virtio Transport Options / Virtio over channel I/O / Device Operation / Resetting Devices}
    >
    > In order to reset a device, a driver sends the
    > -CCW_CMD_VDEV_RESET command.
    > +CCW_CMD_VDEV_RESET command. This command does not carry any payload.
    >
    > +The device signals completion of the virtio reset operation through successful
    > +conclusion of the CCW_CMD_VDEV_RESET channel command. In particular, the
    > +command not only triggers the reset operation, but the reset operation is
    > +already completed when the operation concludes successfully.
    > +
    > +\devicenormative{\paragraph}{Resetting Devices}{Virtio Transport Options / Virtio over channel I/O / Device Operation / Resetting Devices}
    > +
    > +The device MUST finish the virtio reset operation and reinitialize
    > +\field{device status} to zero before it concludes the CCW_CMD_VDEV_RESET
    > +command successfully.
    > +
    > +The device MUST NOT send notifications or interact with the queues after
    > +it signaled successful conclusion of the CCW_CMD_VDEV_RESET command.
    > +
    > +\drivernormative{\paragraph}{Resetting Devices}{Virtio Transport Options / Virtio over channel I/O / Device Operation / Resetting Devices}
    > +
    > +The driver MAY consider the virtio reset operation to be complete already after
    > +successful conclusion of the CCW_CMD_VDEV_RESET channel command, although it
    > +MAY also choose to verify reset completion by reading \field{device status} via
    > +CCW_CMD_READ_STATUS and checking whether it is 0 afterwards.
    >
    > \chapter{Device Types}\label{sec:Device Types}
    >
    > --
    > 2.31.1




  • 6.  Re: [PATCH v2] ccw: clarify device reset

    Posted 11-29-2021 12:33
    On Fri, Nov 26 2021, Cornelia Huck <cohuck@redhat.com> wrote: > Unlike other transports, a reset triggered by the driver is actually > complete once the command has been completed. Make this behaviour > and the requirements more explicit. Fixes: https://github.com/oasis-tcs/virtio-spec/issues/123 > > Signed-off-by: Cornelia Huck <cohuck@redhat.com> > --- > > v1->v2: drop channel I/O internals, talk more specificly about virtio reset > > --- > conformance.tex 2 ++ > content.tex 22 +++++++++++++++++++++- > 2 files changed, 23 insertions(+), 1 deletion(-) > > diff --git a/conformance.tex b/conformance.tex > index 80547db4939b..f7975d974c63 100644 > --- a/conformance.tex > +++ b/conformance.tex > @@ -123,6 +123,7 @@ section{Conformance Targets}label{sec:Conformance / Conformance Targets} > item
    ef{drivernormative:Virtio Transport Options / Virtio over channel I/O / Device Initialization / Communicating Status Information} > item
    ef{drivernormative:Virtio Transport Options / Virtio over channel I/O / Device Operation / Host->Guest Notification / Notification via Adapter I/O Interrupts} > item
    ef{drivernormative:Virtio Transport Options / Virtio over channel I/O / Device Operation / Guest->Host Notification} > +item
    ef{drivernormative:Virtio Transport Options / Virtio over channel I/O / Device Operation / Resetting Devices} > end{itemize} > > conformance{subsection}{Network Driver Conformance}label{sec:Conformance / Driver Conformance / Network Driver Conformance} > @@ -374,6 +375,7 @@ section{Conformance Targets}label{sec:Conformance / Conformance Targets} > item
    ef{devicenormative:Virtio Transport Options / Virtio over channel I/O / Device Initialization / Setting Up Indicators / Setting Up Two-Stage Queue Indicators} > item
    ef{devicenormative:Virtio Transport Options / Virtio over channel I/O / Device Operation / Host->Guest Notification / Notification via Adapter I/O Interrupts} > item
    ef{devicenormative:Virtio Transport Options / Virtio over channel I/O / Device Operation / Guest->Host Notification} > +item
    ef{devicenormative:Virtio Transport Options / Virtio over channel I/O / Device Operation / Resetting Devices} > end{itemize} > > conformance{subsection}{Network Device Conformance}label{sec:Conformance / Device Conformance / Network Device Conformance} > diff --git a/content.tex b/content.tex > index 5d112af206d2..899df5ffde6d 100644 > --- a/content.tex > +++ b/content.tex > @@ -2775,8 +2775,28 @@ subsubsection{Guest->Host Notification}label{sec:Virtio Transport Options / Vi > subsubsection{Resetting Devices}label{sec:Virtio Transport Options / Virtio over channel I/O / Device Operation / Resetting Devices} > > In order to reset a device, a driver sends the > -CCW_CMD_VDEV_RESET command. > +CCW_CMD_VDEV_RESET command. This command does not carry any payload. > > +The device signals completion of the virtio reset operation through successful > +conclusion of the CCW_CMD_VDEV_RESET channel command. In particular, the > +command not only triggers the reset operation, but the reset operation is > +already completed when the operation concludes successfully. > + > +devicenormative{paragraph}{Resetting Devices}{Virtio Transport Options / Virtio over channel I/O / Device Operation / Resetting Devices} > + > +The device MUST finish the virtio reset operation and reinitialize > +field{device status} to zero before it concludes the CCW_CMD_VDEV_RESET > +command successfully. > + > +The device MUST NOT send notifications or interact with the queues after > +it signaled successful conclusion of the CCW_CMD_VDEV_RESET command. > + > +drivernormative{paragraph}{Resetting Devices}{Virtio Transport Options / Virtio over channel I/O / Device Operation / Resetting Devices} > + > +The driver MAY consider the virtio reset operation to be complete already after > +successful conclusion of the CCW_CMD_VDEV_RESET channel command, although it > +MAY also choose to verify reset completion by reading field{device status} via > +CCW_CMD_READ_STATUS and checking whether it is 0 afterwards. > > chapter{Device Types}label{sec:Device Types} > > -- > 2.31.1