From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:58109) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aVLMV-0008Oh-Dl for qemu-devel@nongnu.org; Mon, 15 Feb 2016 10:46:56 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aVLMR-0000oA-CT for qemu-devel@nongnu.org; Mon, 15 Feb 2016 10:46:55 -0500 Received: from mx1.redhat.com ([209.132.183.28]:58845) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aVLMR-0000o2-65 for qemu-devel@nongnu.org; Mon, 15 Feb 2016 10:46:51 -0500 References: <1453130745-25793-1-git-send-email-davidkiarie4@gmail.com> <1453130745-25793-2-git-send-email-davidkiarie4@gmail.com> <20160204164806-mutt-send-email-mst@redhat.com> From: Marcel Apfelbaum Message-ID: <56C1F2E7.1010706@redhat.com> Date: Mon, 15 Feb 2016 17:46:47 +0200 MIME-Version: 1.0 In-Reply-To: <20160204164806-mutt-send-email-mst@redhat.com> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [V4 1/4] hw/i386: Introduce AMD IO MMU List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: "Michael S. Tsirkin" , David Kiarie Cc: valentine.sinitsyn@gmail.com, crosthwaitepeter@gmail.com, jan.kiszka@web.de, qemu-devel@nongnu.org On 02/04/2016 05:03 PM, Michael S. Tsirkin wrote: > On Mon, Jan 18, 2016 at 06:25:42PM +0300, David Kiarie wrote: >> Add AMD IO MMU emulation to Qemu in addition to Intel IO MMU. >> The IO MMU does basic translation, error checking and has a >> minimal IOTLB implementation. >> >> Signed-off-by: David Kiarie >> --- >> hw/i386/Makefile.objs | 1 + >> hw/i386/amd_iommu.c | 1409 +++++++++++++++++++++++++++++++++++++++++++++++++ >> hw/i386/amd_iommu.h | 399 ++++++++++++++ >> include/hw/pci/pci.h | 2 + >> 4 files changed, 1811 insertions(+) >> create mode 100644 hw/i386/amd_iommu.c >> create mode 100644 hw/i386/amd_iommu.h >> >> diff --git a/hw/i386/Makefile.objs b/hw/i386/Makefile.objs >> index b52d5b8..2f1a265 100644 >> --- a/hw/i386/Makefile.objs >> +++ b/hw/i386/Makefile.objs >> @@ -3,6 +3,7 @@ obj-y += multiboot.o >> obj-y += pc.o pc_piix.o pc_q35.o >> obj-y += pc_sysfw.o >> obj-y += intel_iommu.o >> +obj-y += amd_iommu.o >> obj-$(CONFIG_XEN) += ../xenpv/ xen/ >> >> obj-y += kvmvapic.o >> diff --git a/hw/i386/amd_iommu.c b/hw/i386/amd_iommu.c >> new file mode 100644 >> index 0000000..20111fe >> --- /dev/null >> +++ b/hw/i386/amd_iommu.c >> @@ -0,0 +1,1409 @@ >> +/* >> + * QEMU emulation of AMD IOMMU (AMD-Vi) >> + * >> + * Copyright (C) 2011 Eduard - Gabriel Munteanu >> + * Copyright (C) 2015 David Kiarie, >> + * >> + * This program is free software; you can redistribute it and/or modify >> + * it under the terms of the GNU General Public License as published by >> + * the Free Software Foundation; either version 2 of the License, or >> + * (at your option) any later version. >> + >> + * This program is distributed in the hope that it will be useful, >> + * but WITHOUT ANY WARRANTY; without even the implied warranty of >> + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the >> + * GNU General Public License for more details. >> + >> + * You should have received a copy of the GNU General Public License along >> + * with this program; if not, see . >> + * >> + * Cache implementation inspired by hw/i386/intel_iommu.c > > Link to hardware spec? > Hi David, This is the link, right? http://developer.amd.com/wordpress/media/2012/10/488821.pdf Thanks, Marcel [...]