[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [RFC 02/10] AHCI: Update byte count after DMA completio
From: |
Paolo Bonzini |
Subject: |
Re: [Qemu-devel] [RFC 02/10] AHCI: Update byte count after DMA completion |
Date: |
Tue, 16 Sep 2014 09:54:20 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.0 |
Il 15/09/2014 22:07, John Snow ha scritto:
>>>
>>> - /* free sglist that was created in ahci_populate_sglist() */
>>> - qemu_sglist_destroy(&s->sg);
>>> + /* free sglist, update byte count */
>>> + ahci_commit_buf(dma, true);
>>
>> Perhaps you should make dma_buf_commit public (and add the call to the
>> hook), so that ahci_commit_buf does not have to mess with &s->sg.
>>
>
> As above, the ahci layer is already messing around with &s->sg during
> preparation, so I don't see why I'd try to abstract this away from parts
> of that file.
I think it would make sense if you moved the QEMUSGList to the DMA layer
instead of the IDE layer. However, if you leave it in the IDE layer, it
makes sense to leave qemu_sglist_destroy within the IDE layer as well.
That's because qemu_sglist_destroy is idempotent.
Moving the QEMUSGList to the DMA layer would be a relatively large
change, so I would keep it where it is now.
Paolo
[Qemu-devel] [RFC 04/10] ide: Correct handling of malformed/short PRDTs, John Snow, 2014/09/13
[Qemu-devel] [RFC 05/10] AHCI: Rename NCQFIS structure fields, John Snow, 2014/09/13
[Qemu-devel] [RFC 01/10] ide: add is_write() macro for semantic consistency, John Snow, 2014/09/13