From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:52248) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VnPxC-0006wB-5Y for qemu-devel@nongnu.org; Mon, 02 Dec 2013 04:38:15 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VnPx6-0008KG-HD for qemu-devel@nongnu.org; Mon, 02 Dec 2013 04:38:09 -0500 Received: from aserp1040.oracle.com ([141.146.126.69]:40277) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VnPx6-0008K7-Ag for qemu-devel@nongnu.org; Mon, 02 Dec 2013 04:38:04 -0500 Message-ID: <1385977049.1890.101.camel@abi.no.oracle.com> From: Knut Omang Date: Mon, 02 Dec 2013 10:37:29 +0100 In-Reply-To: References: <528B2BCD.10201@redhat.com> Content-Type: text/plain; charset="UTF-8" Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] Are there any IOMMU emulation in QEMU for x86 platform List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: "Jiang, Yunhong" Cc: Paolo Bonzini , "david@gibson.dropbear.id.au" , "qemu-devel@nongnu.org" , "eduard.munteanu@linux360.ro" On Wed, 2013-11-20 at 00:01 +0000, Jiang, Yunhong wrote: > > > -----Original Message----- > > From: Paolo Bonzini [mailto:paolo.bonzini@gmail.com] On Behalf Of Paolo > > Bonzini > > Sent: Tuesday, November 19, 2013 1:14 AM > > To: Jiang, Yunhong > > Cc: qemu-devel@nongnu.org; david@gibson.dropbear.id.au; > > eduard.munteanu@linux360.ro > > Subject: Re: Are there any IOMMU emulation in QEMU for x86 platform > > > > Il 19/11/2013 07:34, Jiang, Yunhong ha scritto: > > > Hi, all > > > I noticed there are several patchset has been sent out about IOMMU > > emulation like > > > http://lists.gnu.org/archive/html/qemu-devel/2011-10/msg03764.html, > > > http://lists.gnu.org/archive/html/qemu-devel/2011-01/msg03196.html . > > > Also I noticed that PPC platform has IOMMU emulation support in QEMU > > > already. Are there any plan to support IOMMU emulation in QEMU for > > x86 now? > > > > Not that I know of. Of course, patches are welcome. I have been working on some code to emulate an Intel IOMMU - I have a simple patch to SeaBIOS to provide a minimal DMAR table and skeleton device code that answers about what the kernel would expect to the Intel IOMMU Linux driver boot a VM with intel_iommu=on I got as far as when I was going to try to figure out how to emulate the interrupt remapping which appears to be where the kernel gets stuck after I got past the initial setup and invalidation cycles. Unfortunately I haven't had much time to work on it lately, but I'll be happy to share what I have so far. I have created branches of qemu and seabios here: git://github.com/knuto/seabios.git git://github.com/knuto/qemu.git > > > And also, does it requires the real host platform have the IOMMU to > > support the QEMU IOMMU emulation? Or it will be a purely software > > emulation? > > > > For emulated devices it could be purely software. I picture that the way forward should include some way of adapting to what "real" hardware that exists and use the "best" approach from that. > > Nested device > > assignment would require a host IOMMU, and would require the host > > IOMMU driver to do some kind of shadow-paging. > > > > Paolo > Knut Omang