qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH 08/13] ide/ahci: Use universal DMA helper functi


From: Kevin Wolf
Subject: Re: [Qemu-devel] [PATCH 08/13] ide/ahci: Use universal DMA helper functions
Date: Fri, 09 Mar 2012 10:48:20 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:10.0.1) Gecko/20120209 Thunderbird/10.0.1

Am 09.03.2012 06:01, schrieb David Gibson:
> The AHCI device can provide both PCI and SysBus AHCI device
> emulations.  For this reason, it wasn't previously converted to use
> the pci_dma_*() helper functions.  Now that we have universal DMA
> helper functions, this converts AHCI to use them.
> 
> The DMAContext is obtained from pci_dma_context() in the PCI case and
> set to NULL in the SysBus case (i.e. we assume for now that a SysBus
> AHCI has no IOMMU translation).
> 
> Cc: Kevin Wolf <address@hidden>
> Cc: Michael S. Tsirkin <address@hidden>
> 
> Signed-off-by: David Gibson <address@hidden>
> ---
>  hw/ide/ahci.c |    7 ++++---
>  hw/ide/ahci.h |    3 ++-
>  hw/ide/ich.c  |    2 +-
>  3 files changed, 7 insertions(+), 5 deletions(-)
> 
> diff --git a/hw/ide/ahci.c b/hw/ide/ahci.c
> index 6a218b5..3d31179 100644
> --- a/hw/ide/ahci.c
> +++ b/hw/ide/ahci.c
> @@ -668,7 +668,7 @@ static int ahci_populate_sglist(AHCIDevice *ad, 
> QEMUSGList *sglist)
>          AHCI_SG *tbl = (AHCI_SG *)prdt;
>  
>          /* FIXME: pass the correct DMAContext */
> -        qemu_sglist_init(sglist, sglist_alloc_hint, NULL);
> +        qemu_sglist_init(sglist, sglist_alloc_hint, ad->hba->dma);

Does the FIXME still apply after this change?

Kevin



reply via email to

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