Discussion of the implementations of VIRTIO specification
 help / color / mirror / Atom feed
From: Cornelia Huck <cohuck@redhat.com>
To: Jason Wang <jasowang@redhat.com>,
	Srivatsa Vaddagiri <svaddagi@qti.qualcomm.com>,
	"mst@redhat.com" <mst@redhat.com>,
	"virtio-dev@lists.oasis-open.org"
	<virtio-dev@lists.oasis-open.org>
Cc: Trilok Soni <tsoni@quicinc.com>, Pratik Patel <pratikp@quicinc.com>
Subject: Re: [virtio-dev] [PATCH] virtio-mmio: Specify wait needed in driver during reset
Date: Thu, 22 Jul 2021 12:57:45 +0200	[thread overview]
Message-ID: <87pmva7h06.fsf@redhat.com> (raw)
In-Reply-To: <b380151d-f20e-4e63-f1c3-a3f2220270cf@redhat.com>

On Thu, Jul 22 2021, Jason Wang <jasowang@redhat.com> wrote:

> 在 2021/7/22 下午5:19, Srivatsa Vaddagiri 写道:
>> This is following up on the discussion we had earlier on MMIO reset 
>> behavior:
>>
>> https://lists.oasis-open.org/archives/virtio-dev/202107/msg00012.html 
>> <https://lists.oasis-open.org/archives/virtio-dev/202107/msg00012.html>
>>
>> Suggesting below change to spec to make it explicit what's expected in 
>> driver. If this is accepted, I will follow up with a patch to Linux 
>> driver.
>>
>> ===
>>
>> Device reset is accomplished by writing 0 to Status register. 
>> Explicitly note
>> that a driver needs to wait on Status register read returning 0 before 
>> assuming that
>> device reset operation is complete.
>> Signed-off-by: Srivatsa Vaddagiri <svaddagi@qti.qualcomm.com>
>
>
>
> I wonder if it deserves a feature bit.

Not sure what that feature bit should govern; if it is not negotiated,
the device must assume that the driver considers the reset to be
complete right after writing? I'm not sure what the device is supposed
to do then.

>
>
> Thanks
>
>
>>
>> diff --git a/content.tex b/content.tex
>> index 5c70a3c..7631be4 100644
>> --- a/content.tex
>> +++ b/content.tex
>> @@ -1985,6 +1985,10 @@ \subsubsection{Device 
>> Initialization}\label{sec:Virtio Transport Options / Virti
>>  and if its value is zero (0x0) MUST abort initialization and
>>  MUST NOT access any other register.
>> +After writing 0 to \field{Status}, the driver MUST wait for a read of
>> +\field{Status} to return 0 before proceeding with the remaining steps of
>> +initializing the device.

Maybe move this to the "MMIO Device Register Layout" driver normative
section.

Should that have a companion device normative statement (just as for
PCI)?

>> +
>>  Drivers not expecting shared memory MUST NOT use the shared
>>  memory registers.


---------------------------------------------------------------------
To unsubscribe, e-mail: virtio-dev-unsubscribe@lists.oasis-open.org
For additional commands, e-mail: virtio-dev-help@lists.oasis-open.org


  reply	other threads:[~2021-07-22 10:57 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-07-22  9:19 [virtio-dev] [PATCH] virtio-mmio: Specify wait needed in driver during reset Srivatsa Vaddagiri
2021-07-22  9:26 ` Jason Wang
2021-07-22 10:57   ` Cornelia Huck [this message]
2021-07-22 12:53     ` Jason Wang
2021-07-22 15:41       ` Srivatsa Vaddagiri
2021-07-22 11:09   ` Srivatsa Vaddagiri

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87pmva7h06.fsf@redhat.com \
    --to=cohuck@redhat.com \
    --cc=jasowang@redhat.com \
    --cc=mst@redhat.com \
    --cc=pratikp@quicinc.com \
    --cc=svaddagi@qti.qualcomm.com \
    --cc=tsoni@quicinc.com \
    --cc=virtio-dev@lists.oasis-open.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox