From: "Michael S. Tsirkin" <mst@redhat.com>
To: Srivatsa Vaddagiri <vatsa@codeaurora.org>
Cc: virtio-dev@lists.oasis-open.org, vatsa.ml@gmail.com
Subject: [virtio-dev] Re: virtio mmio reset - driver requirements
Date: Mon, 5 Jul 2021 14:04:15 -0400 [thread overview]
Message-ID: <20210705140337-mutt-send-email-mst@kernel.org> (raw)
In-Reply-To: <75e7814a85767f111aefda0c173c83d4@codeaurora.org>
On Mon, Jul 05, 2021 at 10:07:15PM +0530, Srivatsa Vaddagiri wrote:
> I noticed this in virtio spec for PCI transport based devices:
>
> "After writing 0 to device_status, the driver MUST wait for a read of
> device_status to return 0 before reinitializing the device."
>
> I was wondering why the spec does not recommend a similar "wait after
> writing 0
> to status register" for other transports such as MMIO.
>
> Even the Linux code for virtio_mmio does not have any such wait:
>
> static void vm_reset(struct virtio_device *vdev)
> {
> struct virtio_mmio_device *vm_dev = to_virtio_mmio_device(vdev);
>
> /* 0 status means a reset. */
> writel(0, vm_dev->base + VIRTIO_MMIO_STATUS);
> }
>
> Does that assume that backends are implemented in software when MMIO writes
> result in trap and backend synchronously does everything needed to handle
> reset
> as part of trap handling? Wouldn't it break if we were to have backends
> implemented in hardware device accessed via MMIO transport?
>
> Thanks
> vatsa
I guess yes.
> --
> QUALCOMM INDIA, on behalf of Qualcomm Innovation Center, Inc. is a member
> of Code Aurora Forum, hosted by The Linux Foundation
---------------------------------------------------------------------
To unsubscribe, e-mail: virtio-dev-unsubscribe@lists.oasis-open.org
For additional commands, e-mail: virtio-dev-help@lists.oasis-open.org
parent reply other threads:[~2021-07-05 18:04 UTC|newest]
Thread overview: expand[flat|nested] mbox.gz Atom feed
[parent not found: <75e7814a85767f111aefda0c173c83d4@codeaurora.org>]
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=20210705140337-mutt-send-email-mst@kernel.org \
--to=mst@redhat.com \
--cc=vatsa.ml@gmail.com \
--cc=vatsa@codeaurora.org \
--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.