On Tue, Oct 01, 2024 at 09:05:52PM GMT, Daniel Henrique Barboza wrote: > > > On 10/1/24 8:28 PM, Tomasz Jeznach wrote: > > On Tue, Sep 3, 2024 at 4:46 AM Daniel Henrique Barboza > > <dbarb...@ventanamicro.com> wrote: > > > > > > > > > > > > On 8/26/24 11:18 PM, Tomasz Jeznach wrote: > > > > On Fri, Aug 23, 2024 at 5:42 AM Daniel Henrique Barboza > > > > <dbarb...@ventanamicro.com> wrote: > > > > > > > > > > > > > > > > > > > > On 8/20/24 12:16 PM, Jason Chien wrote: > > > > > > Hi Daniel, > > > > > > > > (...) > > > > > iotlb->target_as = &s->trap_as; > > > > > > > > I'd suggest fixing the missing en_s check, to enable proper handling of > > > > MSIP. > > > > > > The '!en_s' check was removed because it was breaking irqbypass. I'll let > > > Drew explain > > > more about it since he's been working in the kernel support for this use > > > case. > > > > > > > > > > Is the missing `!en_s` check still problematic? > > Re-reading the code I'd say it's required here to catch only GPAs if S > > stage is BARE, not untranslated IOVA. > > > Yeah, for some reason the existence of that check breaks irqbypass, removing > it fixes it. > > I don't think it has to do with the check per se, but perhaps with a missing > conditional to proper handle the irqbypass case. This is one of the TODOs that > we should look at later, in particular when the irqbypass support starts to > get reviewed in the kernel.
Right. VFIO only uses S-stage to translate GPAs. When irqbypass support is added, as it is here [1] (which is a series I've been waiting to post as an RFC after the first round of IOMMU driver patches gets merged), then this '!en_s' check breaks MSI translations. Thanks, drew