|
From: | Avi Kivity |
Subject: | Re: [Qemu-devel] [PATCH] honor IDE_DMA_BUF_SECTORS |
Date: | Thu, 26 Mar 2009 12:23:15 +0200 |
User-agent: | Thunderbird 2.0.0.21 (X11/20090320) |
Stefano Stabellini wrote:
I checked the ide driver in the kernel and it assumes that the max sectors is either 256 or 64K depending on lba support, exactly as qemu does. So now my question is: if I want to reduce the maximum dma request size inside qemu, given that I must fill correctly the guest provided sg list, is it OK to use IDE_DMA_BUF_SECTORS in dma_buf_prepare as I have done in my patch? I don't see any other possible solution, but if you have any other suggestion you are welcome to let me know.
Look at the DMA API (dma-helpers.c) which already knows how to split large dma requests. Splitting is controlled by cpu_physical_memory_map() (which I'm guessing is your real limitation), so you might want to look at that.
The advantage of this approach is that it will apply to scsi and virtio once they are ported to use the DMA API.
-- error compiling committee.c: too many arguments to function
[Prev in Thread] | Current Thread | [Next in Thread] |