qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Cornelia Huck <cohuck@redhat.com>
To: "Michael S. Tsirkin" <mst@redhat.com>
Cc: qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] question on virtio ccw
Date: Fri, 8 Dec 2017 11:08:07 +0100	[thread overview]
Message-ID: <20171208110807.7239fb36.cohuck@redhat.com> (raw)
In-Reply-To: <20171207191726-musend-email-mst@kernel.org>

On Thu, 7 Dec 2017 19:18:44 +0200
"Michael S. Tsirkin" <mst@redhat.com> wrote:

> I see this in ccw in qemu:
> 
>             if (virtio_set_status(vdev, status) == 0) {
>                 if (vdev->status == 0) {
>                     virtio_ccw_reset_virtio(dev, vdev);
>                 }
>                 if (status & VIRTIO_CONFIG_S_DRIVER_OK) {
>                     virtio_ccw_start_ioeventfd(dev);
>                 }
>                 sch->curr_status.scsw.count = ccw.count - sizeof(status);
>                 ret = 0;
>             } else {
>                 /* Trigger a command reject. */
>                 ret = -ENOSYS;
>             }
> 
> virtio_set_status on success sets vdev->status to status.
> Why check vdev->status in one place and status in another?
> 

Probably for symmetry with the check whether to stop ioeventfd right
above. But it does not really matter one way or the other.

      reply	other threads:[~2017-12-08 10:08 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-12-07 17:18 [Qemu-devel] question on virtio ccw Michael S. Tsirkin
2017-12-08 10:08 ` Cornelia Huck [this message]

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=20171208110807.7239fb36.cohuck@redhat.com \
    --to=cohuck@redhat.com \
    --cc=mst@redhat.com \
    --cc=qemu-devel@nongnu.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;
as well as URLs for NNTP newsgroup(s).