From: "Derrick, Jonathan" <jonathan.derrick@intel.com>
To: "kbusch@kernel.org" <kbusch@kernel.org>
Cc: "lorenzo.pieralisi@arm.com" <lorenzo.pieralisi@arm.com>,
"linux-pci@vger.kernel.org" <linux-pci@vger.kernel.org>,
"helgaas@kernel.org" <helgaas@kernel.org>,
"vicamo.yang@canonical.com" <vicamo.yang@canonical.com>
Subject: Re: [PATCH v2] PCI: vmd: Offset Client VMD MSI/X vectors
Date: Mon, 14 Sep 2020 18:54:53 +0000 [thread overview]
Message-ID: <7f4c254704704fd9d57129fb0d20f27456218d0f.camel@intel.com> (raw)
In-Reply-To: <20200914184238.GA10507@redsun51.ssa.fujisawa.hgst.com>
On Tue, 2020-09-15 at 03:42 +0900, Keith Busch wrote:
> On Mon, Sep 14, 2020 at 01:32:55PM -0400, Jon Derrick wrote:
> > Client VMD platforms have a software-triggered MSI/X vector 0 that will
> > not forward hardware-remapped MSI/X vectors from the sub-device domain.
> > This causes an issue with VMD platforms that use AHCI behind VMD and
> > have a single MSI/X vector mapping to vector 0. Add an MSI/X vector
> > offset for these platforms.
> >
> > Signed-off-by: Jon Derrick <jonathan.derrick@intel.com>
> > ---
> > drivers/pci/controller/vmd.c | 35 +++++++++++++++++++++++++----------
> > 1 file changed, 25 insertions(+), 10 deletions(-)
> >
> > diff --git a/drivers/pci/controller/vmd.c b/drivers/pci/controller/vmd.c
> > index f69ef8c89f72..f8195bad79d1 100644
> > --- a/drivers/pci/controller/vmd.c
> > +++ b/drivers/pci/controller/vmd.c
> > @@ -53,6 +53,12 @@ enum vmd_features {
> > * vendor-specific capability space
> > */
> > VMD_FEAT_HAS_MEMBAR_SHADOW_VSCAP = (1 << 2),
> > +
> > + /*
> > + * Device may use MSI/X vector 0 for software triggering and will not
> > + * be used for MSI/X remapping
> > + */
> > + VMD_FEAT_OFFSET_FIRST_VECTOR = (1 << 3),
> > };
> >
> > /*
> > @@ -104,6 +110,7 @@ struct vmd_dev {
> > struct irq_domain *irq_domain;
> > struct pci_bus *bus;
> > u8 busn_start;
> > + u8 first_vec;
> > };
> >
> > static inline struct vmd_dev *vmd_from_bus(struct pci_bus *bus)
> > @@ -199,25 +206,26 @@ static irq_hw_number_t vmd_get_hwirq(struct msi_domain_info *info,
> > */
> > static struct vmd_irq_list *vmd_next_irq(struct vmd_dev *vmd, struct msi_desc *desc)
> > {
> > - int i, best = 1;
> > unsigned long flags;
> > + int i, best;
> >
> > if (vmd->msix_count == 1)
>
> This condition needs account for the vector offset, right?
>
> if (vmd->msix_count == 1 + vmd->first_vec))
Looks like it, yes
Thank you
>
> > - return &vmd->irqs[0];
> > + return &vmd->irqs[vmd->first_vec];
next prev parent reply other threads:[~2020-09-14 18:55 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-09-14 17:32 [PATCH v2] PCI: vmd: Offset Client VMD MSI/X vectors Jon Derrick
2020-09-14 18:42 ` Keith Busch
2020-09-14 18:54 ` Derrick, Jonathan [this message]
2020-09-14 18:52 ` Bjorn Helgaas
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=7f4c254704704fd9d57129fb0d20f27456218d0f.camel@intel.com \
--to=jonathan.derrick@intel.com \
--cc=helgaas@kernel.org \
--cc=kbusch@kernel.org \
--cc=linux-pci@vger.kernel.org \
--cc=lorenzo.pieralisi@arm.com \
--cc=vicamo.yang@canonical.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