From: Alex Williamson <alex.williamson@redhat.com>
To: Pavel Fedin <p.fedin@samsung.com>
Cc: Jason Cooper <jason@lakedaemon.net>,
kvm@vger.kernel.org, Manish Jaggi <mjaggi@caviumnetworks.com>,
Marc Zyngier <marc.zyngier@arm.com>,
Thomas Gleixner <tglx@linutronix.de>,
kvmarm@lists.cs.columbia.edu
Subject: Re: [PATCH v2 0/3] Introduce MSI hardware mapping for VFIO
Date: Wed, 02 Dec 2015 14:32:59 -0700 [thread overview]
Message-ID: <1449091979.15753.134.camel@redhat.com> (raw)
In-Reply-To: <cover.1448372839.git.p.fedin@samsung.com>
On Tue, 2015-11-24 at 16:50 +0300, Pavel Fedin wrote:
> On some architectures (e.g. ARM64) if the device is behind an IOMMU, and
> is being mapped by VFIO, it is necessary to also add mappings for MSI
> translation register for interrupts to work. This series implements the
> necessary API to do this, and makes use of this API for GICv3 ITS on
> ARM64.
>
> v1 => v2:
> - Adde dependency on CONFIG_GENERIC_MSI_IRQ_DOMAIN in some parts of the
> code, should fix build without this option
>
> Pavel Fedin (3):
> vfio: Introduce map and unmap operations
> gicv3, its: Introduce VFIO map and unmap operations
> vfio: Introduce generic MSI mapping operations
>
> drivers/irqchip/irq-gic-v3-its.c | 31 ++++++++++
> drivers/vfio/pci/vfio_pci_intrs.c | 11 ++++
> drivers/vfio/vfio.c | 116 +++++++++++++++++++++++++++++++++++++
> drivers/vfio/vfio_iommu_type1.c | 29 ++++++++++
> include/linux/irqchip/arm-gic-v3.h | 2 +
> include/linux/msi.h | 12 ++++
> include/linux/vfio.h | 17 +++++-
> 7 files changed, 217 insertions(+), 1 deletion(-)
Some good points and bad. I like that you're making this transparent
for the user, but at the same time, directly calling function pointers
through the msi_domain_ops is quite ugly. There needs to be a real,
interface there that isn't specific to vfio. The down side of making it
transparent to the user is that parts of their IOVA space are being
claimed and they have no way to figure out what they are. In fact, the
IOMMU mappings bypass the rb-tree that the type1 driver uses, so these
mappings might stomp on existing mappings for the user or the user might
stomp on these. Neither of which would be much fun to debug.
There have been previous efforts to support MSI mapping in VFIO[1,2],
but none of them have really gone anywhere. Whatever solution we use
needs to support everyone who needs it. Thanks,
Alex
[1] http://www.spinics.net/lists/kvm/msg121669.html, http://www.spinics.net/lists/kvm/msg121662.html
[2] http://www.spinics.net/lists/kvm/msg119236.html
next prev parent reply other threads:[~2015-12-02 21:31 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-11-24 13:50 [PATCH v2 0/3] Introduce MSI hardware mapping for VFIO Pavel Fedin
2015-11-24 13:50 ` [PATCH v2 1/3] vfio: Introduce map and unmap operations Pavel Fedin
2015-11-24 13:50 ` [PATCH v2 2/3] gicv3, its: Introduce VFIO " Pavel Fedin
2015-11-24 13:50 ` [PATCH v2 3/3] vfio: Introduce generic MSI mapping operations Pavel Fedin
2015-12-02 21:32 ` Alex Williamson [this message]
2015-12-03 13:16 ` [PATCH v2 0/3] Introduce MSI hardware mapping for VFIO Pavel Fedin
2015-12-03 14:49 ` Marc Zyngier
2015-12-03 17:05 ` Alex Williamson
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=1449091979.15753.134.camel@redhat.com \
--to=alex.williamson@redhat.com \
--cc=jason@lakedaemon.net \
--cc=kvm@vger.kernel.org \
--cc=kvmarm@lists.cs.columbia.edu \
--cc=marc.zyngier@arm.com \
--cc=mjaggi@caviumnetworks.com \
--cc=p.fedin@samsung.com \
--cc=tglx@linutronix.de \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.