From: Jiang Liu <jiang.liu-VuQAYsv1563Yd54FQh9/CA@public.gmane.org>
To: Joerg Roedel <joro-zLv9SwRftAIdnm+yROfE0A@public.gmane.org>,
Thomas Gleixner <tglx-hfZtesqFncYOwBW4kG4KsQ@public.gmane.org>,
Ingo Molnar <mingo-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>,
hpa-YMNOUZJC4hwAvxtiuMwx3w@public.gmane.org,
x86-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org,
Borislav Petkov <bp-Gina5bIWoIWzQB+pC5nmwQ@public.gmane.org>
Cc: iommu-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org,
linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: Re: [PATCH 0/5] Fix Intel IRQ remapping initialization order
Date: Mon, 15 Dec 2014 23:30:16 +0800 [thread overview]
Message-ID: <548EFE88.3000307@linux.intel.com> (raw)
In-Reply-To: <1418656404-28575-1-git-send-email-joro-zLv9SwRftAIdnm+yROfE0A@public.gmane.org>
On 2014/12/15 23:13, Joerg Roedel wrote:
> Hi,
>
> here is a patch-set against tip/x86/apic to fix an initialization order
> problem with the IRQ remapping code. The problem is in the ordering of
> the irq_remapping_prepare and irq_remapping_supported functions.
>
> Currently the call-order is irq_remapping_prepare ->
> irq_remapping_supported, so that 'prepare' can succeed but 'supported'
> fails, so that interrupt remapping gets initialized but not enabled.
> This causes a broken interrupt setup on affected systems (machines with
> an Intel IOMMU without, or broken, IRQ remapping support). The result
> are lost interrupts and a non-bootable system.
>
> Both functions do checks whether IRQ remapping can be enabled on the
> machine. The reason for this is that some checks rely on
> dmar_table_init() and thus have to be done in irq_remapping_prepare().
>
> This patch-set moves all these checks into the irq_remapping_prepare()
> path with the right ordering and removes the irq_remapping_supported()
> function and its call-backs. This fixes the initializion order problem
> and simplifies the exported API from the IOMMU code.
>
> Please review.
Hi Joerg,
I have posted a patch set for the same purpose at:
https://lkml.org/lkml/2014/12/10/20
Seems we need to combine these two patch sets:)
Regards!
Gerry
>
> Thanks,
>
> Joerg
>
> Joerg Roedel (5):
> iommu/vt-d: Allocate IRQ remapping data structures only for all IOMMUs
> iommu/vt-d: Don't check for ecap_ir_support in
> intel_irq_remapping_supported
> iommu/vt-d: Move supported-checks to intel_prepare_irq_remapping()
> iommu/amd: Check for irq-remap support amd_iommu_prepare()
> iommu, x86, apic: Remove irq_remapping_supported()
>
> arch/x86/kernel/apic/apic.c | 5 ---
> drivers/iommu/amd_iommu.c | 1 -
> drivers/iommu/amd_iommu_init.c | 8 ++---
> drivers/iommu/amd_iommu_proto.h | 1 -
> drivers/iommu/intel_irq_remapping.c | 62 +++++++++++++++++--------------------
> drivers/iommu/irq_remapping.c | 11 -------
> drivers/iommu/irq_remapping.h | 3 --
> 7 files changed, 31 insertions(+), 60 deletions(-)
>
WARNING: multiple messages have this Message-ID (diff)
From: Jiang Liu <jiang.liu@linux.intel.com>
To: Joerg Roedel <joro@8bytes.org>,
Thomas Gleixner <tglx@linutronix.de>,
Ingo Molnar <mingo@redhat.com>,
hpa@zytor.com, x86@kernel.org, Borislav Petkov <bp@alien8.de>
Cc: linux-kernel@vger.kernel.org, iommu@lists.linux-foundation.org
Subject: Re: [PATCH 0/5] Fix Intel IRQ remapping initialization order
Date: Mon, 15 Dec 2014 23:30:16 +0800 [thread overview]
Message-ID: <548EFE88.3000307@linux.intel.com> (raw)
In-Reply-To: <1418656404-28575-1-git-send-email-joro@8bytes.org>
On 2014/12/15 23:13, Joerg Roedel wrote:
> Hi,
>
> here is a patch-set against tip/x86/apic to fix an initialization order
> problem with the IRQ remapping code. The problem is in the ordering of
> the irq_remapping_prepare and irq_remapping_supported functions.
>
> Currently the call-order is irq_remapping_prepare ->
> irq_remapping_supported, so that 'prepare' can succeed but 'supported'
> fails, so that interrupt remapping gets initialized but not enabled.
> This causes a broken interrupt setup on affected systems (machines with
> an Intel IOMMU without, or broken, IRQ remapping support). The result
> are lost interrupts and a non-bootable system.
>
> Both functions do checks whether IRQ remapping can be enabled on the
> machine. The reason for this is that some checks rely on
> dmar_table_init() and thus have to be done in irq_remapping_prepare().
>
> This patch-set moves all these checks into the irq_remapping_prepare()
> path with the right ordering and removes the irq_remapping_supported()
> function and its call-backs. This fixes the initializion order problem
> and simplifies the exported API from the IOMMU code.
>
> Please review.
Hi Joerg,
I have posted a patch set for the same purpose at:
https://lkml.org/lkml/2014/12/10/20
Seems we need to combine these two patch sets:)
Regards!
Gerry
>
> Thanks,
>
> Joerg
>
> Joerg Roedel (5):
> iommu/vt-d: Allocate IRQ remapping data structures only for all IOMMUs
> iommu/vt-d: Don't check for ecap_ir_support in
> intel_irq_remapping_supported
> iommu/vt-d: Move supported-checks to intel_prepare_irq_remapping()
> iommu/amd: Check for irq-remap support amd_iommu_prepare()
> iommu, x86, apic: Remove irq_remapping_supported()
>
> arch/x86/kernel/apic/apic.c | 5 ---
> drivers/iommu/amd_iommu.c | 1 -
> drivers/iommu/amd_iommu_init.c | 8 ++---
> drivers/iommu/amd_iommu_proto.h | 1 -
> drivers/iommu/intel_irq_remapping.c | 62 +++++++++++++++++--------------------
> drivers/iommu/irq_remapping.c | 11 -------
> drivers/iommu/irq_remapping.h | 3 --
> 7 files changed, 31 insertions(+), 60 deletions(-)
>
next prev parent reply other threads:[~2014-12-15 15:30 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-12-15 15:13 [PATCH 0/5] Fix Intel IRQ remapping initialization order Joerg Roedel
2014-12-15 15:13 ` Joerg Roedel
[not found] ` <1418656404-28575-1-git-send-email-joro-zLv9SwRftAIdnm+yROfE0A@public.gmane.org>
2014-12-15 15:13 ` [PATCH 1/5] iommu/vt-d: Allocate IRQ remapping data structures only for all IOMMUs Joerg Roedel
2014-12-15 15:13 ` Joerg Roedel
2014-12-15 15:13 ` [PATCH 2/5] iommu/vt-d: Don't check for ecap_ir_support in intel_irq_remapping_supported Joerg Roedel
2014-12-15 15:13 ` Joerg Roedel
2014-12-15 15:13 ` [PATCH 3/5] iommu/vt-d: Move supported-checks to intel_prepare_irq_remapping() Joerg Roedel
2014-12-15 15:13 ` Joerg Roedel
2014-12-15 15:13 ` [PATCH 4/5] iommu/amd: Check for irq-remap support amd_iommu_prepare() Joerg Roedel
2014-12-15 15:13 ` Joerg Roedel
2014-12-15 15:13 ` [PATCH 5/5] iommu, x86, apic: Remove irq_remapping_supported() Joerg Roedel
2014-12-15 15:13 ` Joerg Roedel
2014-12-15 15:30 ` Jiang Liu [this message]
2014-12-15 15:30 ` [PATCH 0/5] Fix Intel IRQ remapping initialization order Jiang Liu
[not found] ` <548EFE88.3000307-VuQAYsv1563Yd54FQh9/CA@public.gmane.org>
2014-12-15 19:54 ` Thomas Gleixner
2014-12-15 19:54 ` Thomas Gleixner
2014-12-16 1:45 ` Jiang Liu
2014-12-16 1:45 ` Jiang Liu
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=548EFE88.3000307@linux.intel.com \
--to=jiang.liu-vuqaysv1563yd54fqh9/ca@public.gmane.org \
--cc=bp-Gina5bIWoIWzQB+pC5nmwQ@public.gmane.org \
--cc=hpa-YMNOUZJC4hwAvxtiuMwx3w@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=mingo-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org \
--cc=tglx-hfZtesqFncYOwBW4kG4KsQ@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.