[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Wed, 10 Oct 2012 00:26:53 +0000
From: "Zhang, Lin-Bao (Linux Kernel R&D)" <linbao.zhang@...com>
To: Suresh Siddha <suresh.b.siddha@...el.com>
CC: "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
"alan@...rguk.ukuu.org.uk" <alan@...rguk.ukuu.org.uk>,
"mingo@...hat.com" <mingo@...hat.com>,
"Croxon, Nigel" <nigel.croxon@...com>,
"tglx@...utronix.de" <tglx@...utronix.de>,
"hpa@...or.com" <hpa@...or.com>, "x86@...nel.org" <x86@...nel.org>,
"a.p.zijlstra@...llo.nl" <a.p.zijlstra@...llo.nl>,
"Sakkinen, Jarkko" <jarkko.sakkinen@...el.com>,
"joerg.roedel@....com" <joerg.roedel@....com>,
"agordeev@...hat.com" <agordeev@...hat.com>,
"yinghai@...nel.org" <yinghai@...nel.org>,
"stable@...nel.org" <stable@...nel.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 )
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.
Powered by blists - more mailing lists