[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH v2 3/4] virtio-ccw: use ccw data stream
From: |
Cornelia Huck |
Subject: |
Re: [Qemu-devel] [PATCH v2 3/4] virtio-ccw: use ccw data stream |
Date: |
Thu, 14 Sep 2017 10:47:39 +0200 |
On Wed, 13 Sep 2017 13:50:28 +0200
Halil Pasic <address@hidden> wrote:
> Replace direct access which implicitly assumes no IDA
> or MIDA with the new ccw data stream interface which should
> cope with these transparently in the future.
>
> Signed-off-by: Halil Pasic <address@hidden>
> @@ -488,7 +446,7 @@ static int virtio_ccw_cb(SubchDev *sch, CCW1 ccw)
> } else {
> virtio_bus_get_vdev_config(&dev->bus, vdev->config);
> /* XXX config space endianness */
> - cpu_physical_memory_write(ccw.cda, vdev->config, len);
> + ccw_dstream_write_buf(&sch->cds, vdev->config, len);
> sch->curr_status.scsw.count = ccw.count - len;
> ret = 0;
> }
> @@ -501,21 +459,13 @@ static int virtio_ccw_cb(SubchDev *sch, CCW1 ccw)
> }
> }
> len = MIN(ccw.count, vdev->config_len);
> - hw_len = len;
> if (!ccw.cda) {
> ret = -EFAULT;
> } else {
> - config = cpu_physical_memory_map(ccw.cda, &hw_len, 0);
> - if (!config) {
> - ret = -EFAULT;
> - } else {
> - len = hw_len;
> - /* XXX config space endianness */
> - memcpy(vdev->config, config, len);
> - cpu_physical_memory_unmap(config, hw_len, 0, hw_len);
> + ret = ccw_dstream_read_buf(&sch->cds, vdev->config, len);
> + if (!ret) {
> virtio_bus_set_vdev_config(&dev->bus, vdev->config);
> sch->curr_status.scsw.count = ccw.count - len;
> - ret = 0;
> }
> }
> break;
It feels a bit odd that you remove the stale XXX comment only for one
direction. Care to post a patch that removes them separately? Else I
can do that as well.
[I'd queue that patch in front of this patchset, but no need to resend
for that.]
- [Qemu-devel] [PATCH v2 1/4] s390x/css: introduce css data stream, (continued)
[Qemu-devel] [PATCH v2 3/4] virtio-ccw: use ccw data stream, Halil Pasic, 2017/09/13
Re: [Qemu-devel] [PATCH v2 3/4] virtio-ccw: use ccw data stream, Pierre Morel, 2017/09/19
Re: [Qemu-devel] [PATCH v2 0/4] add CCW indirect data access support, Cornelia Huck, 2017/09/14
Re: [Qemu-devel] [PATCH v2 0/4] add CCW indirect data access support, Cornelia Huck, 2017/09/14