[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH v3 3/5] virtio-ccw: use ccw data stream
From: |
Halil Pasic |
Subject: |
Re: [Qemu-devel] [PATCH v3 3/5] virtio-ccw: use ccw data stream |
Date: |
Thu, 21 Sep 2017 19:01:12 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.3.0 |
On 09/21/2017 11:44 AM, Pierre Morel wrote:
> On 19/09/2017 20:27, Halil Pasic 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>
>> Reviewed-by: Pierre Morel<address@hidden>
>> ---
>> hw/s390x/virtio-ccw.c | 157
>> +++++++++++++++-----------------------------------
>> 1 file changed, 46 insertions(+), 111 deletions(-)
>>
>> diff --git a/hw/s390x/virtio-ccw.c b/hw/s390x/virtio-ccw.c
>> index b1976fdd19..d024f8b2d3 100644
>> --- a/hw/s390x/virtio-ccw.c
>> +++ b/hw/s390x/virtio-ccw.c
>> @@ -287,49 +287,19 @@ static int virtio_ccw_handle_set_vq(SubchDev *sch,
>> CCW1 ccw, bool check_len,
>> return -EFAULT;
>> }
>> if (is_legacy) {
>> - linfo.queue = address_space_ldq_be(&address_space_memory, ccw.cda,
>> - MEMTXATTRS_UNSPECIFIED, NULL);
>> - linfo.align = address_space_ldl_be(&address_space_memory,
>> - ccw.cda + sizeof(linfo.queue),
>> - MEMTXATTRS_UNSPECIFIED,
>> - NULL);
>> - linfo.index = address_space_lduw_be(&address_space_memory,
>> - ccw.cda + sizeof(linfo.queue)
>> - + sizeof(linfo.align),
>> - MEMTXATTRS_UNSPECIFIED,
>> - NULL);
>> - linfo.num = address_space_lduw_be(&address_space_memory,
>> - ccw.cda + sizeof(linfo.queue)
>> - + sizeof(linfo.align)
>> - + sizeof(linfo.index),
>> - MEMTXATTRS_UNSPECIFIED,
>> - NULL);
>
> Here again, I oversaw this.
> Sorry.
>
>> + ccw_dstream_read(&sch->cds, linfo);
>
> Same as for patch 2/5:
> Shouldn't you test the return value here?
>
It's keep the change minimal policy. Later we can discuss
tightening the checks. For now I don't want to introduce
any new ones.
Halil
- Re: [Qemu-devel] [PATCH v3 4/5] 390x/css: introduce maximum data address checking, (continued)
[Qemu-devel] [PATCH v3 3/5] virtio-ccw: use ccw data stream, Halil Pasic, 2017/09/19
Re: [Qemu-devel] [PATCH v3 3/5] virtio-ccw: use ccw data stream, Pierre Morel, 2017/09/21
- Re: [Qemu-devel] [PATCH v3 3/5] virtio-ccw: use ccw data stream,
Halil Pasic <=