[PATCH 1/2] irqchip/gicv3-its: Support share device ID

Stuart Yoder stuart.yoder at freescale.com
Fri Apr 24 11:09:39 PDT 2015



> -----Original Message-----
> From: Will Deacon [mailto:will.deacon at arm.com]
> Sent: Friday, April 24, 2015 11:18 AM
> To: Yoder Stuart-B08248
> Cc: Sethi Varun-B16395; Lian Minghuan-B31939; linux-pci at vger.kernel.org; Arnd Bergmann; Hu Mingkai-B21284;
> Zang Roy-R61911; Bjorn Helgaas; Wood Scott-B07421; linux-arm-kernel at lists.infradead.org; marc.zyngier at arm.com
> Subject: Re: [PATCH 1/2] irqchip/gicv3-its: Support share device ID
> 
> On Wed, Apr 22, 2015 at 08:41:02PM +0100, Stuart Yoder wrote:
> > > > However, there is an improvement we envision as possible due to
> > > > the limited number of SMMU contexts (i.e. 64).  If there are
> > > > 64 SMMU context registers it means that there is a max of
> > > > 64 software contexts where things can be isolated.  But, say I have
> > > > an SRIOV card with 64 VFs, and I want to assign 8 of the VFs
> > > > to a KVM VM.  Those 8 PCI devices could share the same
> > > > streamID/ITS-device-ID since they all share the same isolation
> > > > context.
> > > >
> > > > What would be nice is at the time the 8 VFS are being added
> > > > to the IOMMU domain is for the pcidevid -> streamID mapping
> > > > table to be updated dynamically.  It simply lets us make
> > > > more efficient use of the limited streamIDs we have.
> > > >
> > > > I think it is this improvement that Minghuan had in mind
> > > > in this patch.
> > >
> > > Ok, but in this case it should be possible to use a single context bank for
> > > all of the VF streamIDs by configuring the appropriate SMR, no?
> >
> > Yes, but there are limited SMRs.  In our case there are only
> > 128 SMRs in SMMU-500 and we have potentially way more masters than
> > that.
> 
> Right, but you still only have 64 context banks at the end of the day, so do
> you really anticipate having more than 128 masters concurrently using the
> SMMU?

Yes.  We anticiapte quite possibly quite a few more than 128 masters sharing
the 64 context banks.

> If so, then we have devices sharing context banks so we could consider
> reusing SMRs across masters, but historically that's not been something that
> we've managed to solve.

But isn't that what iommu groups are all about?... multiple masters that share
an IOMMU context because of the isolation characteristics of the hardware
like PCI devices behind a PCI bridge.   All the devices might be in
one iommu group.

What is not solved?

Stuart



More information about the linux-arm-kernel mailing list