public inbox for kvm@vger.kernel.org
 help / color / mirror / Atom feed
From: Christoffer Dall <christoffer.dall@linaro.org>
To: Bhushan Bharat <Bharat.Bhushan@freescale.com>
Cc: Alex Williamson <alex.williamson@redhat.com>,
	"marc.zyngier@arm.com" <marc.zyngier@arm.com>,
	"kvmarm@lists.cs.columbia.edu" <kvmarm@lists.cs.columbia.edu>,
	"kvm@vger.kernel.org" <kvm@vger.kernel.org>,
	"eric.auger@linaro.org" <eric.auger@linaro.org>,
	"pranavkumar@linaro.org" <pranavkumar@linaro.org>,
	"will.deacon@arm.com" <will.deacon@arm.com>,
	Andre Przywara <andre.przywara@arm.com>
Subject: Re: [RFC PATCH 6/6] arm-smmu: Allow to set iommu mapping for MSI
Date: Mon, 26 Oct 2015 16:40:59 +0100	[thread overview]
Message-ID: <20151026154059.GE20298@cbox> (raw)
In-Reply-To: <BN3PR0301MB1265E14339BD005A912624B990370@BN3PR0301MB1265.namprd03.prod.outlook.com>

On Tue, Oct 06, 2015 at 10:26:34AM +0000, Bhushan Bharat wrote:

[...]

> > 
> > I'm certainly not interested in applying an maintaining an interim solution that
> > isn't the right one.  It seems like VFIO is too involved in this process in your
> > example.  On x86 we have per vector isolation and the only thing we're
> > missing is reporting back of the region used by MSI vectors as reserved IOVA
> > space (but it's standard on x86, so an x86 VM user will never use it for IOVA).
> 
> I remember you mentioned that there is no problem when running an x86 guest on an x86 host.  But it will interesting when running a non-x86 VMs on an x86 host  or non-VM userspace use of VFIO though. 
> 
> > In your model, the MSI IOVA space is programmable,
> 
> Yes, on PowerPC and ARM-SMMU case also we have to create mapping with an IOVA. First question is which IOVA to be used, and we added the reserved iova ioctl for same.
> 
> Second problem is we needed an msi-page physical address for setting up iommu-mapping, and so we needed to reserve an msi-page. I did this for PowerPC but not in a generic extension in msi-driver and will look the code a bit more details on adding an interface to reserve an msi-page or get a shared msi-page with allow-unsafe-interrupt.

Sorry, I'm far from familiar with how x86 does interrupt handling and
I know very little of PCIe and MSIs, so please allow me to ask some
stupid questions:

What does an msi-page physical address mean?

> 
> Third problem is to report the reserved IOVA to be used for MSI vectors for the given set of devices (devices in a vfio-group). 

What do MSI vectors mean in this context?  Is this a Linux kernel
construct, something tied to PCIe, something tied to the interrupt
controller, or?

In the case of ARM, AFAIU, you have a single doorbell register per ITS
and devices can write to this register with their device id and the
eventid.  So it's a register in a page somewhere.

Now, what is the problem you don't understand with ARM here?

> 
> Mark/Christopher,
> I am not an expert in this area so I might have to understand that code. If you think you can give solution to 2nd and 3rd problem quickly then please let me know.
> 
I don't really understand what you're asking, but if you can educate me
on the concepts above I may be able to offer some advice.

Thanks,
-Christoffer

  reply	other threads:[~2015-10-26 15:40 UTC|newest]

Thread overview: 37+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <1443624989-24346-1-git-send-email-Bharat.Bhushan@freescale.com>
2015-09-30 14:56 ` [RFC PATCH 2/6] iommu: Add interface to get msi-pages mapping attributes Bharat Bhushan
2015-10-02 22:45   ` Alex Williamson
2015-10-05  5:17     ` Bhushan Bharat
2015-10-05  5:56     ` Bhushan Bharat
2015-09-30 14:56 ` [RFC PATCH 3/6] vfio: Extend iommu-info to return MSIs automap state Bharat Bhushan
2015-10-02 22:46   ` Alex Williamson
2015-10-05  6:00     ` Bhushan Bharat
2015-10-05 22:45       ` Alex Williamson
2015-10-06  8:53         ` Bhushan Bharat
2015-10-06 15:11           ` Alex Williamson
2015-09-30 14:56 ` [RFC PATCH 4/6] vfio: Add interface to iommu-map/unmap MSI pages Bharat Bhushan
2015-10-02 22:46   ` Alex Williamson
2015-10-05  6:27     ` Bhushan Bharat
2015-10-05 22:45       ` Alex Williamson
2015-10-06  9:05         ` Bhushan Bharat
2015-10-06 15:12           ` Alex Williamson
2015-09-30 14:56 ` [RFC PATCH 5/6] vfio-pci: Create iommu mapping for msi interrupt Bharat Bhushan
2015-09-30 11:02   ` kbuild test robot
2015-09-30 11:32     ` Bhushan Bharat
2015-09-30 11:34   ` kbuild test robot
2015-10-02 22:46   ` Alex Williamson
2015-10-05  7:20     ` Bhushan Bharat
2015-10-05 22:44       ` Alex Williamson
2015-10-06  8:32         ` Bhushan Bharat
2015-10-06 15:06           ` Alex Williamson
2015-09-30 14:56 ` [RFC PATCH 6/6] arm-smmu: Allow to set iommu mapping for MSI Bharat Bhushan
2015-10-02 22:46   ` Alex Williamson
2015-10-05  8:33     ` Bhushan Bharat
2015-10-05 22:54       ` Alex Williamson
2015-10-06 10:26         ` Bhushan Bharat
2015-10-26 15:40           ` Christoffer Dall [this message]
2015-11-02  2:53           ` Pranavkumar Sawargaonkar
2015-10-02 22:45 ` [RFC PATCH 1/6] vfio: Add interface for add/del reserved iova region Alex Williamson
2015-10-05  4:55   ` Bhushan Bharat
2015-10-05 22:45     ` Alex Williamson
2015-10-06  9:39       ` Bhushan Bharat
2015-10-06 15:21         ` 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=20151026154059.GE20298@cbox \
    --to=christoffer.dall@linaro.org \
    --cc=Bharat.Bhushan@freescale.com \
    --cc=alex.williamson@redhat.com \
    --cc=andre.przywara@arm.com \
    --cc=eric.auger@linaro.org \
    --cc=kvm@vger.kernel.org \
    --cc=kvmarm@lists.cs.columbia.edu \
    --cc=marc.zyngier@arm.com \
    --cc=pranavkumar@linaro.org \
    --cc=will.deacon@arm.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