All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Michael S. Tsirkin" <mst@redhat.com>
To: Jason Wang <jasowang@redhat.com>
Cc: Srivatsa Vaddagiri <quic_svaddagi@quicinc.com>,
	Srivatsa Vaddagiri <svaddagi@qti.qualcomm.com>,
	Cornelia Huck <cohuck@redhat.com>,
	"virtio-dev@lists.oasis-open.org"
	<virtio-dev@lists.oasis-open.org>,
	Trilok Soni <quic_tsoni@quicinc.com>,
	Pratik Patel <quic_pratikp@quicinc.com>
Subject: Re: [virtio-dev] Re: [PATCH v1] virtio-mmio: Specify wait needed in driver during reset
Date: Tue, 17 Aug 2021 03:51:47 -0400	[thread overview]
Message-ID: <20210817034312-mutt-send-email-mst@kernel.org> (raw)
In-Reply-To: <af73ed7b-b339-3ba2-87cb-176a9435fa2c@redhat.com>

On Tue, Aug 17, 2021 at 01:45:12PM +0800, Jason Wang wrote:
> 
> 在 2021/8/16 下午7:48, Michael S. Tsirkin 写道:
> > On Mon, Aug 16, 2021 at 12:05:50PM +0530, Srivatsa Vaddagiri wrote:
> > > * Michael S. Tsirkin <mst@redhat.com> [2021-08-16 01:35:46]:
> > > 
> > > > So thinking about all this, quite early in the setup process we
> > > > have:
> > > > 
> > > >          /* Figure out what features the device supports. */
> > > >          device_features = dev->config->get_features(dev);
> > > > 
> > > > 
> > > > isn't this sufficient? this will flush out
> > > > all writes and device can defer responding to reads
> > > > until reset is complete.
> > > Hmm not sure if that's possible in all MMIO devices? I think a while back Jason
> > > felt some of the MMIO devices, their registers could act as plain DRAM for
> > > reads, which means device can't block such reads?
> > > 
> > > - vatsa
> > Is it worth bothering about theoretical issues though? Jason what is
> > your take?
> 
> 
> Re-read the spec, and it said
> 
> "
> 
> MMIO Device Register Layout
> 
> "
> 
> I believe plain DRAM will not behave like a register. So we don't need to
> worry about that.
> 
> But they are indeed devices that act as a plain DRAM for their control path,
> which might requires new transports[1].
> 
> Another question is that what makes PCI differ from MMIO. (E.g PCI requires
> a re-read but MMIO doesn't)

I don't think PCI requires a re-read either.  IIRC from that meeting, it
was intended for a hypervisor so it does not have to block the guest:
the guest can do something else then re-read.
We did similar things elsewhere.

See
https://issues.oasis-open.org/projects/VIRTIO/issues/VIRTIO-103
for the original proposal.

In any case, I would say status register is unlikely to be in regular
DRAM, after all write has side effects.
So before we move on I'd like to know whether we do something as drastic
as incrementing the version number for a theoretical or practical
benefit.


> [1] https://lkml.org/lkml/2020/9/1/255
> 
> 
> > 
> > 
> > > ---
> > > 
> > > Qualcomm Innovation Center, Inc. is submitting the attached "feedback" as a
> > > non-member to the virtio-dev mailing list for consideration and inclusion.


  reply	other threads:[~2021-08-17  7:51 UTC|newest]

Thread overview: 36+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-07-23 14:55 [PATCH v1] virtio-mmio: Specify wait needed in driver during reset Srivatsa Vaddagiri
2021-07-26 11:03 ` [virtio-dev] " Cornelia Huck
2021-07-26 11:25   ` Srivatsa Vaddagiri
2021-07-26 11:36     ` [virtio-dev] " Cornelia Huck
2021-07-26 13:19       ` Michael S. Tsirkin
2021-07-26 14:09         ` [virtio-dev] " Cornelia Huck
2021-07-26 14:17         ` Srivatsa Vaddagiri
2021-07-26 19:03           ` Michael S. Tsirkin
2021-07-27  9:52             ` [virtio-dev] " Srivatsa Vaddagiri
2021-07-29 15:21               ` Cornelia Huck
2021-07-30  3:49                 ` Srivatsa Vaddagiri
2021-08-02  6:06             ` Jason Wang
2021-08-11 10:05               ` [virtio-dev] " Srivatsa Vaddagiri
2021-08-16  2:09                 ` Jason Wang
2021-08-16  5:35                   ` Michael S. Tsirkin
     [not found]                     ` <20210816063550.GD5604@quicinc.com>
2021-08-16 11:48                       ` Michael S. Tsirkin
2021-08-16 13:34                         ` Srivatsa Vaddagiri
2021-08-16 14:37                           ` Michael S. Tsirkin
2021-08-16 14:58                             ` Srivatsa Vaddagiri
2021-08-17  5:45                         ` Jason Wang
2021-08-17  7:51                           ` Michael S. Tsirkin [this message]
2021-08-17  8:15                             ` Jason Wang
2021-08-17 10:03                             ` Srivatsa Vaddagiri
2021-08-17 12:48                               ` Srivatsa Vaddagiri
2021-08-18  2:57                                 ` Jason Wang
2021-08-18  2:54                               ` Jason Wang
2021-08-18  5:15                                 ` Srivatsa Vaddagiri
2021-08-18  5:40                                   ` Jason Wang
2021-08-18  5:51                                     ` Srivatsa Vaddagiri
2021-08-18  6:04                                       ` Jason Wang
2021-08-18  6:13                                         ` Srivatsa Vaddagiri
2021-08-24 16:57                                           ` Srivatsa Vaddagiri
2021-08-20  3:56                     ` Jason Wang
2021-08-20 11:15                       ` Michael S. Tsirkin
2021-07-26 13:18   ` Michael S. Tsirkin
2021-07-26 14:13     ` [virtio-dev] " Cornelia Huck

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=20210817034312-mutt-send-email-mst@kernel.org \
    --to=mst@redhat.com \
    --cc=cohuck@redhat.com \
    --cc=jasowang@redhat.com \
    --cc=quic_pratikp@quicinc.com \
    --cc=quic_svaddagi@quicinc.com \
    --cc=quic_tsoni@quicinc.com \
    --cc=svaddagi@qti.qualcomm.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.