[Top][All Lists]
[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
- Re: [Qemu-devel] [PATCH 05/13] iommu: Add universal DMA helper functions, (continued)
- [Qemu-devel] [PATCH 04/13] Implement cpu_physical_memory_zero(), David Gibson, 2012/03/09
- [Qemu-devel] [PATCH 12/13] iommu: Allow PCI to use IOMMU infrastructure, David Gibson, 2012/03/09
- [Qemu-devel] [PATCH 07/13] iommu: Make sglists and dma_bdrv helpers use new universal DMA helpers, David Gibson, 2012/03/09
- [Qemu-devel] [PATCH 01/13] Use DMADirection type for dma_bdrv_io, David Gibson, 2012/03/09
- [Qemu-devel] [PATCH 08/13] ide/ahci: Use universal DMA helper functions, David Gibson, 2012/03/09
- Re: [Qemu-devel] [PATCH 08/13] ide/ahci: Use universal DMA helper functions,
Kevin Wolf <=
- [Qemu-devel] [PATCH 13/13] pseries: Implement IOMMU and DMA for PAPR PCI devices, David Gibson, 2012/03/09
- [Qemu-devel] [PATCH 06/13] usb-ohci: Use universal DMA helper functions, David Gibson, 2012/03/09
- [Qemu-devel] [PATCH 03/13] usb-xhci: Use PCI DMA helper functions, David Gibson, 2012/03/09
- [Qemu-devel] [PATCH 10/13] iommu: Introduce IOMMU emulation infrastructure, David Gibson, 2012/03/09