linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Zhang, Lin-Bao (Linux Kernel R&D)" <linbao.zhang@hp.com>
To: Suresh Siddha <suresh.b.siddha@intel.com>
Cc: "linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"alan@lxorguk.ukuu.org.uk" <alan@lxorguk.ukuu.org.uk>,
	"mingo@redhat.com" <mingo@redhat.com>,
	"Croxon, Nigel" <nigel.croxon@hp.com>,
	"tglx@linutronix.de" <tglx@linutronix.de>,
	"hpa@zytor.com" <hpa@zytor.com>,
	"x86@kernel.org" <x86@kernel.org>,
	"a.p.zijlstra@chello.nl" <a.p.zijlstra@chello.nl>,
	"Sakkinen, Jarkko" <jarkko.sakkinen@intel.com>,
	"joerg.roedel@amd.com" <joerg.roedel@amd.com>,
	"agordeev@redhat.com" <agordeev@redhat.com>,
	"yinghai@kernel.org" <yinghai@kernel.org>,
	"stable@kernel.org" <stable@kernel.org>
Subject: RE: [PATCH] fix x2apic defect that Linux kernel doesn't mask 8259A interrupt during the time window between changing VT-d table base address and initializing these VT-d entries(smpboot.c and apic.c )
Date: Wed, 10 Oct 2012 00:26:53 +0000	[thread overview]
Message-ID: <92645B27BF79D04FBD2B0F8494FFD0F90FE41E@G2W2429.americas.hpqcorp.net> (raw)
In-Reply-To: <1349740633.11093.43.camel@sbsiddha-desk.sc.intel.com>

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain; charset="utf-8", Size: 2581 bytes --]

Hi Suresh, 

	Thanks very much for your reply!
I tested this patch in 2.6.32 with our machine , it can indeed can resolve current issue. that 's good. 
I also check 3.x version of kernel source , for example , 3.3.8 and 3.0.0 , they indeed include similar patch , 
I think the key action is this line :
+	/*
+	 * The number of IO-APIC IRQ registers (== #pins):
+	 */
+	nr_ioapic_registers[idx] = entries;

In 3.3.8 , it is like this:
			/*
4011         * The number of IO-APIC IRQ registers (== #pins):
4012         */
4013        ioapics[idx].nr_registers = entries;
I also use 3.3.8 to test , no modification don't reproduce our issue. 
If I comment this line (ioapics[idx].nr_registers = entries;) , it will reproduce the problem that occurs in 2.6.32. 
so this can prove that your patch should work for 2.6.x kernel. 

But I am not sure why it can work. Let's discuss again. I am researching the whole source again. 
It seems that we have 2 directions to fix current problem :
a) your patch : all the IO-APIC RTE's are masked between the time we enable interrupt-remapping to the time 
> when the IO-APIC RTE's are configured correctly.
b) my patch mask interrupt during VT-d table base address changing and VT-d entries initialized successfully. 
I suppose during the time window , we should disable 8259A interrupt. 

> As I mentioned earlier, the current design already ensures that all the IO-APIC
> RTE's are masked between the time we enable interrupt-remapping to the time
> when the IO-APIC RTE's are configured correctly.
> 
So , we can think ,as your patch , during the window , IO-apic is useless or we can think IO-APIC doesn't exist ? 
Could you mind please sharing your design details ? thanks very much! 

> So I looked at why you are seeing the problem with v2.6.32 but not with the
> recent kernels. And I think I found out the reason.
> 
> 2.6.32 kernel is missing this fix,
> 
Yes, 2.6.32 doesn't have this patch. 3.x.x indeed have it. 

> Because of this, in v2.6.32, mask_IO_APIC_setup() is not working as expected
> as nr_ioapic_registers[] are not yet initialized and thus the io-apic RTE's are not
> masked as expected.
> 
> We just need the last hunk of that patch, I think.
> 
> Can you please apply the appended patch to 2.6.32 kernel and see if the issue
> you mentioned gets fixed? If so, we can ask the -stable and OSV's teams to
> pick up this fix.
Yes , it can resolve current issue. 
ÿôèº{.nÇ+‰·Ÿ®‰­†+%ŠËÿ±éݶ\x17¥Šwÿº{.nÇ+‰·¥Š{±þG«éÿŠ{ayº\x1dʇڙë,j\a­¢f£¢·hšïêÿ‘êçz_è®\x03(­éšŽŠÝ¢j"ú\x1a¶^[m§ÿÿ¾\a«þG«éÿ¢¸?™¨è­Ú&£ø§~á¶iO•æ¬z·švØ^\x14\x04\x1a¶^[m§ÿÿÃ\fÿ¶ìÿ¢¸?–I¥

  reply	other threads:[~2012-10-10  0:28 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-10-08  4:53 [PATCH] fix x2apic defect that Linux kernel doesn't mask 8259A interrupt during the time window between changing VT-d table base address and initializing these VT-d entries(smpboot.c and apic.c ) Zhang, Lin-Bao (Linux Kernel R&D)
2012-10-08 23:57 ` Suresh Siddha
2012-10-10  0:26   ` Zhang, Lin-Bao (Linux Kernel R&D) [this message]
2012-10-11  0:07     ` Suresh Siddha
2012-10-11  3:52       ` Zhang, Lin-Bao (Linux Kernel R&D)
2012-10-11  5:26         ` H. Peter Anvin
2012-10-11 15:32           ` Zhang, Lin-Bao (Linux Kernel R&D)
2012-10-10 23:02   ` Zhang, Lin-Bao (Linux Kernel R&D)
2012-10-11  0:01     ` Suresh Siddha
2012-10-11 16:46       ` Zhang, Lin-Bao (Linux Kernel R&D)
  -- strict thread matches above, loose matches on Subject: below --
2012-09-21  7:20 Zhang, Lin-Bao (Linux Kernel R&D)

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=92645B27BF79D04FBD2B0F8494FFD0F90FE41E@G2W2429.americas.hpqcorp.net \
    --to=linbao.zhang@hp.com \
    --cc=a.p.zijlstra@chello.nl \
    --cc=agordeev@redhat.com \
    --cc=alan@lxorguk.ukuu.org.uk \
    --cc=hpa@zytor.com \
    --cc=jarkko.sakkinen@intel.com \
    --cc=joerg.roedel@amd.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=nigel.croxon@hp.com \
    --cc=stable@kernel.org \
    --cc=suresh.b.siddha@intel.com \
    --cc=tglx@linutronix.de \
    --cc=x86@kernel.org \
    --cc=yinghai@kernel.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 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).