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 <kw...@redhat.com> > Cc: Michael S. Tsirkin <m...@redhat.com> > > Signed-off-by: David Gibson <da...@gibson.dropbear.id.au> > --- > 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