From: Jiang Liu <jiang.liu-VuQAYsv1563Yd54FQh9/CA@public.gmane.org>
To: Thomas Gleixner <tglx-hfZtesqFncYOwBW4kG4KsQ@public.gmane.org>,
Alexander Holler <holler-SXC+2es9fhnfWeYVQQPykw@public.gmane.org>,
Mark Rustad
<mark.d.rustad-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>,
Alex Deucher
<alexdeucher-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>,
Joerg Roedel <joro-zLv9SwRftAIdnm+yROfE0A@public.gmane.org>
Cc: Tejun Heo <tj-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>,
x86-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org,
iommu-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org,
Tony Luck <tony.luck-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>,
linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: Re: [Bugfix]
Date: Fri, 31 Jul 2015 00:46:16 +0800 [thread overview]
Message-ID: <55BA54D8.5020300@linux.intel.com> (raw)
In-Reply-To: <1438274680-27916-1-git-send-email-jiang.liu-VuQAYsv1563Yd54FQh9/CA@public.gmane.org>
Hi all,
Sorry, send email too quick. Will resend with correct title.
Thanks!
Gerry
On 2015/7/31 0:44, Jiang Liu wrote:
> Hi Alexander, Mark, Alex,
> Could you please help to apply the debug patch and send me back
> the dmesg? Please also help to turn kernel paramemter "apic=debug".
>
> Hi Mark,
> It seems that this regression is caused by support of multiple-MSI,
> but I have no PCI card supportting multiple-MSI at hand. So may I remotely
> access your system from Intel internal network? That will definitely speed
> up fix.
> Thanks!
> Gerry
>
> Signed-off-by: Jiang Liu <jiang.liu-VuQAYsv1563Yd54FQh9/CA@public.gmane.org>
> ---
> drivers/iommu/amd_iommu.c | 15 +++++++++++++--
> drivers/iommu/intel_irq_remapping.c | 4 ++++
> 2 files changed, 17 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/iommu/amd_iommu.c b/drivers/iommu/amd_iommu.c
> index a57e9b749895..c039ed9333a4 100644
> --- a/drivers/iommu/amd_iommu.c
> +++ b/drivers/iommu/amd_iommu.c
> @@ -3916,8 +3916,8 @@ static void irq_remapping_prepare_irte(struct amd_ir_data *data,
> union irte *irte = &data->irte_entry;
> struct IO_APIC_route_entry *entry;
>
> - data->irq_2_irte.devid = devid;
> - data->irq_2_irte.index = index + sub_handle;
> + irte_info->devid = devid;
> + irte_info->index = index + sub_handle;
>
> /* Setup IRTE for IOMMU */
> irte->val = 0;
> @@ -3926,6 +3926,10 @@ static void irq_remapping_prepare_irte(struct amd_ir_data *data,
> irte->fields.destination = irq_cfg->dest_apicid;
> irte->fields.dm = apic->irq_dest_mode;
> irte->fields.valid = 1;
> + if (info->type == X86_IRQ_ALLOC_TYPE_MSI)
> + pr_warn("irqdomain: IRTE%d vector %d APICID%d data%p cfg%p\n",
> + irte_info->index, irte->fields.vector,
> + irte->fields.destination, data, irq_cfg);
>
> switch (info->type) {
> case X86_IRQ_ALLOC_TYPE_IOAPIC:
> @@ -3972,6 +3976,9 @@ static int irq_remapping_alloc(struct irq_domain *domain, unsigned int virq,
> info->type != X86_IRQ_ALLOC_TYPE_MSIX)
> return -EINVAL;
>
> + if (info->type == X86_IRQ_ALLOC_TYPE_MSI)
> + pr_warn("irqdomain: allocate %d MSI IRQ, VIRQ%d\n", nr_irqs, virq);
> +
> /*
> * With IRQ remapping enabled, don't need contiguous CPU vectors
> * to support multiple MSI interrupts.
> @@ -3986,6 +3993,8 @@ static int irq_remapping_alloc(struct irq_domain *domain, unsigned int virq,
> ret = irq_domain_alloc_irqs_parent(domain, virq, nr_irqs, arg);
> if (ret < 0)
> return ret;
> + if (info->type == X86_IRQ_ALLOC_TYPE_MSI)
> + pr_warn("irqdomain: allocate parent returns %d\n", ret);
>
> ret = -ENOMEM;
> data = kzalloc(sizeof(*data), GFP_KERNEL);
> @@ -4005,6 +4014,8 @@ static int irq_remapping_alloc(struct irq_domain *domain, unsigned int virq,
> kfree(data);
> goto out_free_parent;
> }
> + if (info->type == X86_IRQ_ALLOC_TYPE_MSI)
> + pr_warn("irqdomain: allocate IRTE index %d\n", index);
>
> for (i = 0; i < nr_irqs; i++) {
> irq_data = irq_domain_get_irq_data(domain, virq + i);
> diff --git a/drivers/iommu/intel_irq_remapping.c b/drivers/iommu/intel_irq_remapping.c
> index f15692a410c7..bb093bc6b334 100644
> --- a/drivers/iommu/intel_irq_remapping.c
> +++ b/drivers/iommu/intel_irq_remapping.c
> @@ -1234,6 +1234,8 @@ static void intel_irq_remapping_prepare_irte(struct intel_ir_data *data,
> MSI_ADDR_IR_SHV |
> MSI_ADDR_IR_INDEX1(index) |
> MSI_ADDR_IR_INDEX2(index);
> + if (info->type == X86_IRQ_ALLOC_TYPE_MSI)
> + pr_warn("irqdomain: allocate index%d, subhandle%d, irte%llx,%llx\n", index, sub_handle, irte->high, irte->low);
> break;
>
> default:
> @@ -1305,6 +1307,8 @@ static int intel_irq_remapping_alloc(struct irq_domain *domain,
> kfree(data);
> goto out_free_parent;
> }
> + if (info->type == X86_IRQ_ALLOC_TYPE_MSI)
> + pr_warn("irqdomain: allocate VIRQ%d, count%d, index%d\n", virq, nr_irqs, index);
>
> for (i = 0; i < nr_irqs; i++) {
> irq_data = irq_domain_get_irq_data(domain, virq + i);
>
WARNING: multiple messages have this Message-ID (diff)
From: Jiang Liu <jiang.liu@linux.intel.com>
To: Thomas Gleixner <tglx@linutronix.de>,
Alexander Holler <holler@ahsoftware.de>,
Mark Rustad <mark.d.rustad@intel.com>,
Alex Deucher <alexdeucher@gmail.com>,
Joerg Roedel <joro@8bytes.org>
Cc: Tony Luck <tony.luck@intel.com>, Tejun Heo <tj@kernel.org>,
linux-kernel@vger.kernel.org, x86@kernel.org,
iommu@lists.linux-foundation.org
Subject: Re: [Bugfix]
Date: Fri, 31 Jul 2015 00:46:16 +0800 [thread overview]
Message-ID: <55BA54D8.5020300@linux.intel.com> (raw)
In-Reply-To: <1438274680-27916-1-git-send-email-jiang.liu@linux.intel.com>
Hi all,
Sorry, send email too quick. Will resend with correct title.
Thanks!
Gerry
On 2015/7/31 0:44, Jiang Liu wrote:
> Hi Alexander, Mark, Alex,
> Could you please help to apply the debug patch and send me back
> the dmesg? Please also help to turn kernel paramemter "apic=debug".
>
> Hi Mark,
> It seems that this regression is caused by support of multiple-MSI,
> but I have no PCI card supportting multiple-MSI at hand. So may I remotely
> access your system from Intel internal network? That will definitely speed
> up fix.
> Thanks!
> Gerry
>
> Signed-off-by: Jiang Liu <jiang.liu@linux.intel.com>
> ---
> drivers/iommu/amd_iommu.c | 15 +++++++++++++--
> drivers/iommu/intel_irq_remapping.c | 4 ++++
> 2 files changed, 17 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/iommu/amd_iommu.c b/drivers/iommu/amd_iommu.c
> index a57e9b749895..c039ed9333a4 100644
> --- a/drivers/iommu/amd_iommu.c
> +++ b/drivers/iommu/amd_iommu.c
> @@ -3916,8 +3916,8 @@ static void irq_remapping_prepare_irte(struct amd_ir_data *data,
> union irte *irte = &data->irte_entry;
> struct IO_APIC_route_entry *entry;
>
> - data->irq_2_irte.devid = devid;
> - data->irq_2_irte.index = index + sub_handle;
> + irte_info->devid = devid;
> + irte_info->index = index + sub_handle;
>
> /* Setup IRTE for IOMMU */
> irte->val = 0;
> @@ -3926,6 +3926,10 @@ static void irq_remapping_prepare_irte(struct amd_ir_data *data,
> irte->fields.destination = irq_cfg->dest_apicid;
> irte->fields.dm = apic->irq_dest_mode;
> irte->fields.valid = 1;
> + if (info->type == X86_IRQ_ALLOC_TYPE_MSI)
> + pr_warn("irqdomain: IRTE%d vector %d APICID%d data%p cfg%p\n",
> + irte_info->index, irte->fields.vector,
> + irte->fields.destination, data, irq_cfg);
>
> switch (info->type) {
> case X86_IRQ_ALLOC_TYPE_IOAPIC:
> @@ -3972,6 +3976,9 @@ static int irq_remapping_alloc(struct irq_domain *domain, unsigned int virq,
> info->type != X86_IRQ_ALLOC_TYPE_MSIX)
> return -EINVAL;
>
> + if (info->type == X86_IRQ_ALLOC_TYPE_MSI)
> + pr_warn("irqdomain: allocate %d MSI IRQ, VIRQ%d\n", nr_irqs, virq);
> +
> /*
> * With IRQ remapping enabled, don't need contiguous CPU vectors
> * to support multiple MSI interrupts.
> @@ -3986,6 +3993,8 @@ static int irq_remapping_alloc(struct irq_domain *domain, unsigned int virq,
> ret = irq_domain_alloc_irqs_parent(domain, virq, nr_irqs, arg);
> if (ret < 0)
> return ret;
> + if (info->type == X86_IRQ_ALLOC_TYPE_MSI)
> + pr_warn("irqdomain: allocate parent returns %d\n", ret);
>
> ret = -ENOMEM;
> data = kzalloc(sizeof(*data), GFP_KERNEL);
> @@ -4005,6 +4014,8 @@ static int irq_remapping_alloc(struct irq_domain *domain, unsigned int virq,
> kfree(data);
> goto out_free_parent;
> }
> + if (info->type == X86_IRQ_ALLOC_TYPE_MSI)
> + pr_warn("irqdomain: allocate IRTE index %d\n", index);
>
> for (i = 0; i < nr_irqs; i++) {
> irq_data = irq_domain_get_irq_data(domain, virq + i);
> diff --git a/drivers/iommu/intel_irq_remapping.c b/drivers/iommu/intel_irq_remapping.c
> index f15692a410c7..bb093bc6b334 100644
> --- a/drivers/iommu/intel_irq_remapping.c
> +++ b/drivers/iommu/intel_irq_remapping.c
> @@ -1234,6 +1234,8 @@ static void intel_irq_remapping_prepare_irte(struct intel_ir_data *data,
> MSI_ADDR_IR_SHV |
> MSI_ADDR_IR_INDEX1(index) |
> MSI_ADDR_IR_INDEX2(index);
> + if (info->type == X86_IRQ_ALLOC_TYPE_MSI)
> + pr_warn("irqdomain: allocate index%d, subhandle%d, irte%llx,%llx\n", index, sub_handle, irte->high, irte->low);
> break;
>
> default:
> @@ -1305,6 +1307,8 @@ static int intel_irq_remapping_alloc(struct irq_domain *domain,
> kfree(data);
> goto out_free_parent;
> }
> + if (info->type == X86_IRQ_ALLOC_TYPE_MSI)
> + pr_warn("irqdomain: allocate VIRQ%d, count%d, index%d\n", virq, nr_irqs, index);
>
> for (i = 0; i < nr_irqs; i++) {
> irq_data = irq_domain_get_irq_data(domain, virq + i);
>
next prev parent reply other threads:[~2015-07-30 16:46 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-07-30 16:44 [Bugfix] Jiang Liu
2015-07-30 16:44 ` [Bugfix] Jiang Liu
[not found] ` <1438274680-27916-1-git-send-email-jiang.liu-VuQAYsv1563Yd54FQh9/CA@public.gmane.org>
2015-07-30 16:46 ` Jiang Liu [this message]
2015-07-30 16:46 ` [Bugfix] Jiang Liu
2015-07-30 18:34 ` [Bugfix] Alex Deucher
2015-07-30 18:34 ` [Bugfix] Alex Deucher
-- strict thread matches above, loose matches on Subject: below --
2009-04-02 12:52 [BUGFIX] phcoder
2009-04-02 14:45 ` [BUGFIX] Bean
2009-04-02 14:48 ` [BUGFIX] phcoder
2009-04-02 15:55 ` [BUGFIX] Manoel Rebelo Abranches
2009-04-02 18:19 ` [BUGFIX] phcoder
2009-04-03 5:06 ` [BUGFIX] Bean
2009-04-03 14:48 ` [BUGFIX] phcoder
2009-04-03 16:55 ` [BUGFIX] Pavel Roskin
2009-04-04 12:30 ` [BUGFIX] phcoder
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=55BA54D8.5020300@linux.intel.com \
--to=jiang.liu-vuqaysv1563yd54fqh9/ca@public.gmane.org \
--cc=alexdeucher-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
--cc=holler-SXC+2es9fhnfWeYVQQPykw@public.gmane.org \
--cc=iommu-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org \
--cc=joro-zLv9SwRftAIdnm+yROfE0A@public.gmane.org \
--cc=linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=mark.d.rustad-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org \
--cc=tglx-hfZtesqFncYOwBW4kG4KsQ@public.gmane.org \
--cc=tj-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org \
--cc=tony.luck-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org \
--cc=x86-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.