qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH 4 of 5] dma api


From: Blue Swirl
Subject: Re: [Qemu-devel] [PATCH 4 of 5] dma api
Date: Fri, 12 Dec 2008 20:55:04 +0200

On 12/12/08, Andrea Arcangeli <address@hidden> wrote:
> From: Andrea Arcangeli <address@hidden>
>
>  One major limitation for KVM today is the lack of a proper way to write 
> drivers
>  in a way that allows the host OS to use direct DMA to the guest physical 
> memory
>  to avoid any intermediate copy. The only API provided to drivers seems to be
>  the cpu_physical_memory_rw and that enforces all drivers to bounce and trash
>  cpu caches and be memory bound. This new DMA API instead allows drivers to 
> use
>  a pci_dma_sg method for SG I/O that will translate the guest physical 
> addresses
>  to host virutal addresses and it will call two operation, one is a submit
>  method and one is the complete method. The pci_dma_sg may have to bounce 
> buffer
>  internally and to limit the max bounce size it may have to submit I/O in 
> pieces
>  with multiple submit calls.
>
>  All we care about is the performance of the direct path, so I tried to
>  avoid dynamic allocations there to avoid entering glibc.
>
>  Signed-off-by: Andrea Arcangeli <address@hidden>

>  + * QEMU PCI DMA operations

>  +typedef struct QEMUPciDmaSgParam {
>  +    QEMUPciDmaSgSubmit *pci_dma_sg_submit;
>  +    QEMUPciDmaSgComplete *pci_dma_sg_complete;
>  +    void *pci_dma_sg_opaque;

>  +    QEMUPciDmaSg *sg;

>  +    struct QEMUPciDmaSgParam *next;

>  +} QEMUPciDmaSgParam;

Still "PCI" here and other places, why? Even the "pci_dev" should be
bus_opaque for other buses.

+/* pci_dma.c */

Here pci_ prefix is even incorrect given that the file is now dma.c.




reply via email to

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