From: Alex Williamson <alex.williamson@redhat.com>
To: Etienne Martineau <etmartin101@gmail.com>
Cc: Chris Wright <chrisw@sous-sol.org>,
"Michael S. Tsirkin" <mst@redhat.com>,
kvm@vger.kernel.org
Subject: Re: KVM devices assignment; PCIe AER?
Date: Wed, 27 Oct 2010 08:54:36 -0600 [thread overview]
Message-ID: <1288191276.5129.183.camel@x201> (raw)
In-Reply-To: <alpine.DEB.2.00.1010262001320.3242@ubuntu.ubuntu-domain>
On Tue, 2010-10-26 at 20:51 -0700, Etienne Martineau wrote:
>
> On Tue, 26 Oct 2010, Chris Wright wrote:
>
> >> I would totally agree with you if the alternative implementation to
> >> this legacy mode would be available in a relatively short time
> >> frame. I'm not sure about that?
> >
> > Depends on how quickly you can help whip it into shape ;)
>
> Humm, this is not an easy question;
> IMHO the biggest problem of going with VFIO for devices assignment is
> interruption handling. VFIO knows how to signal an eventfd but doesn't
> know about 'kvm_set_irq' for example. I think that VFIO will require
> some adaptation for that matter.
I've actually been working on porting the qemu vfio driver over to
qemu-kvm recently, and nearly have it working. For MSI-X interrupts
I've ported to the common msix.c code, which abstracts how the interrupt
is actually sent to the guest. I've also added irqfd support in the
msix mask notifier so MSI-X interrupts avoid bouncing through qemu. MSI
support should work the same once Michael's msi.c is upstream.
For INTx interrupts, qemu_set_irq will also work with KVM (it has to or
all of the emulated drivers would break). The problem is getting an EOI
back from the KVM kernel apic. I'm currently working on code that adds
a new KVM ioctl to register an eventfd for the EOI, which then triggers
qemu-kvm to re-enable the interrupt. My hope is that we can add irqfd
support to both of these paths, so INTx is injected directly from VFIO
into KVM, and VFIO can directly consume the KVM EOI.
The hard part of this is actually tracking the GSI the device is using
to register the proper EOI handler. I'm working on some pci bridge
callbacks for that now.
> Because qemu device assignment is working on VFIO I'm making the
> assumption that kvm iommu code can be entirely deprecated. Maybe I'm
> totally wrong here?
Yes, VFIO makes no use of it.
Alex
next prev parent reply other threads:[~2010-10-27 14:54 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-10-26 16:41 KVM devices assignment; PCIe AER? etmartin101
2010-10-26 18:10 ` Alex Williamson
2010-10-26 18:21 ` Chris Wright
2010-10-26 18:37 ` Michael S. Tsirkin
2010-10-26 20:24 ` Etienne Martineau
2010-10-26 20:42 ` Chris Wright
2010-10-26 22:08 ` Etienne Martineau
2010-10-26 22:15 ` Chris Wright
2010-10-26 22:17 ` Michael S. Tsirkin
2010-10-26 22:47 ` Etienne Martineau
2010-10-26 23:05 ` Chris Wright
2010-10-27 3:51 ` Etienne Martineau
2010-10-27 14:54 ` Alex Williamson [this message]
2010-10-27 18:23 ` Etienne Martineau
2010-10-27 19:16 ` Alex Williamson
2010-10-27 21:43 ` Etienne Martineau
2010-10-27 22:58 ` Alex Williamson
2010-10-28 4:58 ` Michael S. Tsirkin
2010-10-28 5:17 ` Alex Williamson
2010-10-28 5:39 ` Michael S. Tsirkin
2010-10-28 23:36 ` Etienne Martineau
2010-10-26 20:54 ` Michael S. Tsirkin
2010-10-26 18:38 ` Michael S. Tsirkin
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=1288191276.5129.183.camel@x201 \
--to=alex.williamson@redhat.com \
--cc=chrisw@sous-sol.org \
--cc=etmartin101@gmail.com \
--cc=kvm@vger.kernel.org \
--cc=mst@redhat.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