On Tue, Apr 3, 2012 at 12:53 PM, Zhi Hui Li <zhihu...@linux.vnet.ibm.com> wrote:
>
> I think what you say up is right, I will correct them, thank you very much!
>
>>> +        bdrv_aio_readv(cur_drv->bs, fd_sector(cur_drv),
>>> +&fdctrl->qiov, fdc_sector_num, fdctrl_read_DMA_cb, opaque_cb);
>>> +        return dma_len;
>>
>>
>> Should be return 0 since we haven't completed I/O yet.
>>
>> Stefan
>>
>>
>
> I think the return value is not used not, so no matter what is returned it
> not necessary.

Your patch does not change channel_run():

    n = r->transfer_handler (r->opaque, ichan + (ncont << 2),
                             r->now[COUNT], (r->base[COUNT] + 1) << ncont);
    r->now[COUNT] = n;

So the return value will be written to COUNT and the guest will be
able to see it (until we call DMA_set_return() later).

Stefan

Reply via email to