From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:45074) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1S5wNy-0004xn-FC for qemu-devel@nongnu.org; Fri, 09 Mar 2012 04:45:19 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1S5wNe-00078S-Ba for qemu-devel@nongnu.org; Fri, 09 Mar 2012 04:45:18 -0500 Received: from mx1.redhat.com ([209.132.183.28]:39052) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1S5wNe-00078H-3B for qemu-devel@nongnu.org; Fri, 09 Mar 2012 04:44:58 -0500 Message-ID: <4F59D1E4.7030807@redhat.com> Date: Fri, 09 Mar 2012 10:48:20 +0100 From: Kevin Wolf MIME-Version: 1.0 References: <1331269308-22372-1-git-send-email-david@gibson.dropbear.id.au> <1331269308-22372-9-git-send-email-david@gibson.dropbear.id.au> In-Reply-To: <1331269308-22372-9-git-send-email-david@gibson.dropbear.id.au> Content-Type: text/plain; charset=ISO-8859-15 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH 08/13] ide/ahci: Use universal DMA helper functions List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: David Gibson Cc: rth@twiddle.net, eduard.munteanu@linux360.ro, mst@redhat.com, qemu-devel@nongnu.org, agraf@suse.de 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 > Cc: Michael S. Tsirkin > > Signed-off-by: David Gibson > --- > 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