[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] question on virtio ccw
From: |
Cornelia Huck |
Subject: |
Re: [Qemu-devel] question on virtio ccw |
Date: |
Fri, 8 Dec 2017 11:08:07 +0100 |
On Thu, 7 Dec 2017 19:18:44 +0200
"Michael S. Tsirkin" <address@hidden> 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.