qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Knut Omang <knut.omang@oracle.com>
To: "Jiang, Yunhong" <yunhong.jiang@intel.com>
Cc: Paolo Bonzini <pbonzini@redhat.com>,
	"david@gibson.dropbear.id.au" <david@gibson.dropbear.id.au>,
	"qemu-devel@nongnu.org" <qemu-devel@nongnu.org>,
	"eduard.munteanu@linux360.ro" <eduard.munteanu@linux360.ro>
Subject: Re: [Qemu-devel] Are there any IOMMU emulation in QEMU for x86 platform
Date: Mon, 02 Dec 2013 10:37:29 +0100	[thread overview]
Message-ID: <1385977049.1890.101.camel@abi.no.oracle.com> (raw)
In-Reply-To: <DDCAE26804250545B9934A2056554AA01FBC9D7A@ORSMSX108.amr.corp.intel.com>


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

      reply	other threads:[~2013-12-02  9:38 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-11-19  6:34 [Qemu-devel] Are there any IOMMU emulation in QEMU for x86 platform Jiang, Yunhong
2013-11-19  9:13 ` Paolo Bonzini
2013-11-20  0:01   ` Jiang, Yunhong
2013-12-02  9:37     ` Knut Omang [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1385977049.1890.101.camel@abi.no.oracle.com \
    --to=knut.omang@oracle.com \
    --cc=david@gibson.dropbear.id.au \
    --cc=eduard.munteanu@linux360.ro \
    --cc=pbonzini@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=yunhong.jiang@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).