[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1434032371.3907.45.camel@infradead.org>
Date: Thu, 11 Jun 2015 15:19:31 +0100
From: David Woodhouse <dwmw2@...radead.org>
To: Joerg Roedel <jroedel@...e.de>
Cc: Joerg Roedel <joro@...tes.org>, iommu@...ts.linux-foundation.org,
zhen-hual@...com, bhe@...hat.com, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 2/4] iommu/vt-d: Don't consider copied context entries
as present
On Thu, 2015-06-11 at 16:12 +0200, Joerg Roedel wrote:
> On Thu, Jun 11, 2015 at 03:07:02PM +0100, David Woodhouse wrote:
> > On Thu, 2015-06-11 at 15:47 +0200, Joerg Roedel wrote:
> > > From: Joerg Roedel <jroedel@...e.de>
> > >
> > > Hide the copied context entries from the IOMMU driver by
> > > considering them as non-present. This is implemented by
> > > setting the first AVL bit (bit 67) in the context entry to
> > > one. If this bit is set, the context_present() function
> > > returns false.
> > >
> > > Signed-off-by: Joerg Roedel <jroedel@...e.de>
> >
> > In the extended context entry, bit 67 is the PGE bit. There are no
> > bits
> > which are available to software, to my knowledge.
>
> Ah you are right, I was looking at the context-entry format without
> PASID. Then I have to solve this differently. Thanks for pointing
> that out
While looking for spare bits, I was pondering the FPD (fault processing
disable) bit. Which we're likely to want to set when we are seeing
fault storms from misbehaving devices, although that hasn't been
implemented yet.
That code path is going to want to keep some per-device state over and
above what's in the context entry (and it's going to tie in with
generic PCI/device error handling too).
In the short term, perhaps it's not unreasonable to set the FPD bit on
'inherited' domains? That might be what you wanted anyway?
Later on, we'll want to be able to turn that on and off at runtime and
it won't purely serve as a marker for 'inherited' domains. But as I
said, at that point we'll *need* external state anyway. So I think
that's OK, perhaps?
--
dwmw2
Download attachment "smime.p7s" of type "application/x-pkcs7-signature" (5691 bytes)
Powered by blists - more mailing lists