From: Takao Indoh <indou.takao@jp.fujitsu.com>
To: Suresh Siddha <suresh.b.siddha@intel.com>,
Bjorn Helgaas <bjorn.helgaas@hp.com>
Cc: "tglx@linutronix.de" <tglx@linutronix.de>,
"mingo@redhat.com" <mingo@redhat.com>,
"hpa@zytor.com" <hpa@zytor.com>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
Kenji Kaneshige <kaneshige.kenji@jp.fujitsu.com>,
Chris Wright <chrisw@sous-sol.org>,
Max Asbock <masbock@linux.vnet.ibm.com>,
Jesse Barnes <jbarnes@virtuousgeek.org>,
David Woodhouse <dwmw2@infradead.org>,
"stable@kernel.org" <stable@kernel.org>,
"Luck, Tony" <tony.luck@intel.com>
Subject: Re: [patch 2/4] x86, vtd: fix the vt-d fault handling irq migration in the x2apic mode
Date: Tue, 07 Dec 2010 12:38:58 -0500 [thread overview]
Message-ID: <F8CB9635A08C18indou.takao@jp.fujitsu.com> (raw)
In-Reply-To: <1291225233.2648.39.camel@sbsiddha-MOBL3>
On Wed, 01 Dec 2010 09:40:32 -0800, Suresh Siddha wrote:
>On Wed, 2010-12-01 at 07:14 -0800, Bjorn Helgaas wrote:
>> On Tue, Nov 30, 2010 at 10:22:27PM -0800, Suresh Siddha wrote:
>> > + if (x2apic_mode)
>> > + msg.address_hi = MSI_ADDR_BASE_HI | MSI_ADDR_EXT_DEST_ID
>> > (dest);
>>
>> Is it necessary to test x2apic_mode here? It looks like
>> MSI_ADDR_EXT_DEST_ID() gives you everything above the low 8
>> bits of the APIC ID. If those bits are always zero except in
>> x2apic_mode, we might not need the test.
>
>True. Appended the updated patch.
I applied this patch against 2.6.36 and confirmed irq migration of
vt-d fault worked.
Tested-by: Takao Indoh <indou.takao@jp.fujitsu.com>
Thanks,
Takao Indoh
>
>> Does the ia64 dmar_msi_set_affinity() need the same fix?
>
>No.
>
>>
>> Why do we have both x2apic_enabled() and x2apic_mode? They
>> seem sort of redundant. (Not related to this patch, of course.)
>
>BIOS can handover to OS in x2apic mode in some cases. x2apic_enabled()
>is used to check for that and it reads the MSR to check the status. Some
>early portions of the kernel boot will use it.
>
>For all others, we should be using x2apic_mode.
>
>thanks,
>suresh
>---
>
>From: Kenji Kaneshige <kaneshige.kenji@jp.fujitsu.com>
>Subject: x86, vtd: fix the vt-d fault handling irq migration in the x2apic
>mode
>
>In x2apic mode, we need to set the upper address register of the fault
>handling interrupt register of the vt-d hardware. Without this
>irq migration of the vt-d fault handling interrupt is broken.
>
>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/io_apic.c | 1 +
> 1 file changed, 1 insertion(+)
>
>Index: tip/arch/x86/kernel/apic/io_apic.c
>===================================================================
>--- tip.orig/arch/x86/kernel/apic/io_apic.c
>+++ tip/arch/x86/kernel/apic/io_apic.c
>@@ -3367,6 +3367,7 @@ dmar_msi_set_affinity(struct irq_data *d
> msg.data |= MSI_DATA_VECTOR(cfg->vector);
> msg.address_lo &= ~MSI_ADDR_DEST_ID_MASK;
> msg.address_lo |= MSI_ADDR_DEST_ID(dest);
>+ msg.address_hi = MSI_ADDR_BASE_HI | MSI_ADDR_EXT_DEST_ID(dest);
>
> dmar_msi_write(irq, &msg);
>
---
印藤隆夫(INDOH Takao)
E-Mail : indou.takao@jp.fujitsu.com
next prev parent reply other threads:[~2010-12-07 17:41 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 [this message]
2010-12-14 1:16 ` [tip:x86/urgent] x86, vt-d: Fix " tip-bot for Kenji Kaneshige
2010-12-01 6:22 ` [patch 3/4] x86: enable the intr-remap fault handling after local apic setup Suresh Siddha
2010-12-01 8:51 ` 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=F8CB9635A08C18indou.takao@jp.fujitsu.com \
--to=indou.takao@jp.fujitsu.com \
--cc=bjorn.helgaas@hp.com \
--cc=chrisw@sous-sol.org \
--cc=dwmw2@infradead.org \
--cc=hpa@zytor.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=suresh.b.siddha@intel.com \
--cc=tglx@linutronix.de \
--cc=tony.luck@intel.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