From: "Derrick, Jonathan" <jonathan.derrick@intel.com>
To: "helgaas@kernel.org" <helgaas@kernel.org>
Cc: "hch@lst.de" <hch@lst.de>, "x86@kernel.org" <x86@kernel.org>,
"Shevchenko, Andriy" <andriy.shevchenko@intel.com>,
"lorenzo.pieralisi@arm.com" <lorenzo.pieralisi@arm.com>,
"andrzej.jakowski@linux.intel.com"
<andrzej.jakowski@linux.intel.com>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"linux-pci@vger.kernel.org" <linux-pci@vger.kernel.org>,
"Kalakota, SushmaX" <sushmax.kalakota@intel.com>
Subject: Re: [PATCH 5/6] x86/apic/msi: Use Real PCI DMA device when configuring IRTE
Date: Wed, 21 Oct 2020 19:55:01 +0000 [thread overview]
Message-ID: <10b74567985e3c03ac52b0eee58291eebf034444.camel@intel.com> (raw)
In-Reply-To: <20201021022131.GA409218@bjorn-Precision-5520>
On Tue, 2020-10-20 at 21:21 -0500, Bjorn Helgaas wrote:
> On Wed, Oct 21, 2020 at 01:20:24AM +0000, Derrick, Jonathan wrote:
> > On Tue, 2020-10-20 at 15:26 -0500, Bjorn Helgaas wrote:
> > > On Tue, Jul 28, 2020 at 01:49:44PM -0600, Jon Derrick wrote:
> > > > VMD retransmits child device MSI/X with the VMD endpoint's requester-id.
> > > > In order to support direct interrupt remapping of VMD child devices,
> > > > ensure that the IRTE is programmed with the VMD endpoint's requester-id
> > > > using pci_real_dma_dev().
> > > >
> > > > Reviewed-by: Andy Shevchenko <andriy.shevchenko@intel.com>
> > > > Signed-off-by: Jon Derrick <jonathan.derrick@intel.com>
> > >
> > > As Thomas (and Stephen) pointed out, this conflicts with 7ca435cf857d
> > > ("x86/irq: Cleanup the arch_*_msi_irqs() leftovers"), which removes
> > > native_setup_msi_irqs().
> > >
> > > Stephen resolved the conflict by dropping this hunk. I would rather
> > > just drop this patch completely from the PCI tree. If I keep the
> > > patch, (1) Linus will have to resolve the conflict, and worse, (2)
> > > it's not clear what happened to the use of pci_real_dma_dev() here.
> > > It will just vanish into the ether with no explanation other than
> > > "this function was removed."
> > >
> > > Is dropping this patch the correct thing to do? Or do you need to add
> > > pci_real_dma_dev() elsewhere to compensate?
> >
> > It would still need the pci_real_dma_dev() for IRTE programming.
> >
> > I think at this point I would rather see 5+6 dropped and this included
> > for TGL enablement:
> > https://patchwork.kernel.org/project/linux-pci/patch/20200914190128.5114-1-jonathan.derrick@intel.com/
>
> It's too late to add new things for v5.10. I'll drop 5 and I'll be
> happy to drop 6, too, if you want. I have several comments/questions
> on 6 anyway that I haven't finished writing up.
>
> But if you'd rather have 1-4 + 6 in v5.10 instead of just 1-4, let me
> know.
>
> Bjorn
Here's the proposed new location for patch 5 for pci_real_dma_dev(),
but I can't test this at the moment:
diff --git a/arch/x86/kernel/apic/msi.c b/arch/x86/kernel/apic/msi.c
index 6313f0a05db7..707968b234e9 100644
--- a/arch/x86/kernel/apic/msi.c
+++ b/arch/x86/kernel/apic/msi.c
@@ -194,6 +194,7 @@ int pci_msi_prepare(struct irq_domain *domain,
struct device *dev, int nvec,
arg->type = X86_IRQ_ALLOC_TYPE_PCI_MSI;
arg->flags |= X86_IRQ_ALLOC_CONTIGUOUS_VECTORS;
}
+ arg->devid = pci_real_dma_dev(pdev);
return 0;
}
--
2.18.1
Otherwise I would want to drop 5 & 6 because 6 will likely break VMD
without patch 5 when IO APIC is in use
next prev parent reply other threads:[~2020-10-21 19:55 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-07-28 19:49 [PATCH 0/6] VMD MSI Remapping Bypass Jon Derrick
2020-07-28 19:49 ` [PATCH 1/6] PCI: vmd: Create physical offset helper Jon Derrick
2020-07-28 19:49 ` [PATCH 2/6] PCI: vmd: Create bus offset configuration helper Jon Derrick
2020-07-28 19:49 ` [PATCH 3/6] PCI: vmd: Create IRQ Domain " Jon Derrick
2020-07-28 19:49 ` [PATCH 4/6] PCI: vmd: Create IRQ allocation helper Jon Derrick
2020-07-28 19:49 ` [PATCH 5/6] x86/apic/msi: Use Real PCI DMA device when configuring IRTE Jon Derrick
2020-09-07 14:32 ` Lorenzo Pieralisi
2020-09-28 11:32 ` Thomas Gleixner
2020-10-20 20:26 ` Bjorn Helgaas
2020-10-21 1:20 ` Derrick, Jonathan
2020-10-21 2:21 ` Bjorn Helgaas
2020-10-21 19:55 ` Derrick, Jonathan [this message]
2020-07-28 19:49 ` [PATCH 6/6] PCI: vmd: Disable MSI/X remapping when possible Jon Derrick
2020-10-20 20:23 ` Bjorn Helgaas
2020-08-17 16:14 ` [PATCH 0/6] VMD MSI Remapping Bypass Derrick, Jonathan
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=10b74567985e3c03ac52b0eee58291eebf034444.camel@intel.com \
--to=jonathan.derrick@intel.com \
--cc=andriy.shevchenko@intel.com \
--cc=andrzej.jakowski@linux.intel.com \
--cc=hch@lst.de \
--cc=helgaas@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pci@vger.kernel.org \
--cc=lorenzo.pieralisi@arm.com \
--cc=sushmax.kalakota@intel.com \
--cc=x86@kernel.org \
/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;
as well as URLs for NNTP newsgroup(s).