qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH v3] Replace bdrv_* to bdrv_aio_* functions in DM


From: Stefan Hajnoczi
Subject: Re: [Qemu-devel] [PATCH v3] Replace bdrv_* to bdrv_aio_* functions in DMA mode in fdc.c.
Date: Tue, 3 Apr 2012 16:53:13 +0100

On Tue, Apr 3, 2012 at 12:53 PM, Zhi Hui Li <address@hidden> 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

[Prev in Thread] Current Thread [Next in Thread]