linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Suresh Siddha <suresh.b.siddha@intel.com>
To: tglx@linutronix.de, mingo@redhat.com, hpa@zytor.com,
	linux-kernel@vger.kernel.org
Cc: Kenji Kaneshige <kaneshige.kenji@jp.fujitsu.com>,
	Chris Wright <chrisw@sous-sol.org>,
	Max Asbock <masbock@linux.vnet.ibm.com>,
	indou.takao@jp.fujitsu.com,
	Jesse Barnes <jbarnes@virtuousgeek.org>,
	Bjorn Helgaas <bjorn.helgaas@hp.com>,
	David Woodhouse <dwmw2@infradead.org>,
	Suresh Siddha <suresh.b.siddha@intel.com>,
	stable@kernel.org
Subject: [patch 3/4] x86: enable the intr-remap fault handling after local apic setup
Date: Tue, 30 Nov 2010 22:22:28 -0800	[thread overview]
Message-ID: <20101201062244.541996375@intel.com> (raw)
In-Reply-To: 20101201062225.292364637@intel.com

[-- Attachment #1: vtd_fault_handling_after_local_apic_setup.patch --]
[-- Type: text/plain, Size: 2188 bytes --]

From: Kenji Kaneshige <kaneshige.kenji@jp.fujitsu.com>
Subject: x86: enable the intr-remap fault handling after local apic setup

Interrupt-remapping gets enabled very early in the boot, as it determines the
apic mode that the processor can use. And the current code enables the vt-d
fault handling before the setup_local_APIC(). And hence the APIC LDR registers
and data structure in the memory may not be initialized. So the vt-d fault
handling in logical xapic/x2apic modes were broken.

Fix this by enabling the vt-d fault handling in the end_local_APIC_setup()

A cleaner fix of enabling fault handling while enabling intr-remapping
will be addressed for v2.6.38. [ Enabling intr-remapping determines the
usage of x2apic mode and the apic mode determines the fault-handling
configuration. ]

Signed-off-by: Kenji Kaneshige <kaneshige.kenji@jp.fujitsu.com>
Signed-off-by: Suresh Siddha <suresh.b.siddha@intel.com>
Cc: stable@kernel.org [v2.6.32+]
---
 arch/x86/kernel/apic/apic.c     |    8 ++++++++
 arch/x86/kernel/apic/probe_64.c |    7 -------
 2 files changed, 8 insertions(+), 7 deletions(-)

Index: tip/arch/x86/kernel/apic/apic.c
===================================================================
--- tip.orig/arch/x86/kernel/apic/apic.c
+++ tip/arch/x86/kernel/apic/apic.c
@@ -1384,6 +1384,14 @@ void __cpuinit end_local_APIC_setup(void
 #endif
 
 	apic_pm_activate();
+
+	/*
+	 * Now that local APIC setup is completed for BP, configure the fault
+	 * handling for interrupt remapping.
+	 */
+	if (!smp_processor_id() && intr_remapping_enabled)
+		enable_drhd_fault_handling();
+
 }
 
 #ifdef CONFIG_X86_X2APIC
Index: tip/arch/x86/kernel/apic/probe_64.c
===================================================================
--- tip.orig/arch/x86/kernel/apic/probe_64.c
+++ tip/arch/x86/kernel/apic/probe_64.c
@@ -79,13 +79,6 @@ void __init default_setup_apic_routing(v
 		/* need to update phys_pkg_id */
 		apic->phys_pkg_id = apicid_phys_pkg_id;
 	}
-
-	/*
-	 * Now that apic routing model is selected, configure the
-	 * fault handling for intr remapping.
-	 */
-	if (intr_remapping_enabled)
-		enable_drhd_fault_handling();
 }
 
 /* Same for both flat and physical. */



  parent reply	other threads:[~2010-12-01  6:56 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-12-01  6:22 [patch 0/4] x86, intr-remapping patches for addressing kexec/kdump issues Suresh Siddha
2010-12-01  6:22 ` [patch 1/4] vt-d: quirk for masking vtd spec errors to platform error handling logic Suresh Siddha
2010-12-01  7:26   ` Chris Wright
2010-12-06 17:27   ` Jesse Barnes
2010-12-06 20:26     ` Suresh Siddha
2010-12-06 20:44       ` Jesse Barnes
2010-12-06 21:02         ` Suresh Siddha
2010-12-06 23:01           ` Max Asbock
2010-12-14  1:15       ` [tip:x86/urgent] x86, vt-d: Quirk " tip-bot for Suresh Siddha
2010-12-01  6:22 ` [patch 2/4] x86, vtd: fix the vt-d fault handling irq migration in the x2apic mode Suresh Siddha
2010-12-01  8:52   ` Chris Wright
2010-12-01 15:14   ` Bjorn Helgaas
2010-12-01 17:40     ` Suresh Siddha
2010-12-07 17:38       ` Takao Indoh
2010-12-14  1:16       ` [tip:x86/urgent] x86, vt-d: Fix " tip-bot for Kenji Kaneshige
2010-12-01  6:22 ` Suresh Siddha [this message]
2010-12-01  8:51   ` [patch 3/4] x86: enable the intr-remap fault handling after local apic setup Chris Wright
2010-12-14  1:16   ` [tip:x86/urgent] x86: Enable the intr-remap fault handling after local APIC setup tip-bot for Kenji Kaneshige
2010-12-01  6:22 ` [patch 4/4] vt-d: handle previous faults after enabling fault handling Suresh Siddha
2010-12-01  8:52   ` Chris Wright
2010-12-14  1:17   ` [tip:x86/urgent] x86, vt-d: Handle " tip-bot for Suresh Siddha

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=20101201062244.541996375@intel.com \
    --to=suresh.b.siddha@intel.com \
    --cc=bjorn.helgaas@hp.com \
    --cc=chrisw@sous-sol.org \
    --cc=dwmw2@infradead.org \
    --cc=hpa@zytor.com \
    --cc=indou.takao@jp.fujitsu.com \
    --cc=jbarnes@virtuousgeek.org \
    --cc=kaneshige.kenji@jp.fujitsu.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=masbock@linux.vnet.ibm.com \
    --cc=mingo@redhat.com \
    --cc=stable@kernel.org \
    --cc=tglx@linutronix.de \
    /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).