From: Tvrtko Ursulin on
On Wednesday 04 Aug 2010 10:16:08 Tvrtko Ursulin wrote:
> On Wednesday 04 Aug 2010 10:05:36 Yinghai Lu wrote:
> > On 08/04/2010 01:18 AM, Tvrtko Ursulin wrote:
> > > On Tuesday 03 Aug 2010 21:57:48 Yinghai Lu wrote:
> > >> On Tue, Aug 3, 2010 at 8:59 AM, Tvrtko Ursulin
> > >>
> > >> <tvrtko.ursulin(a)sophos.com> wrote:
> > >>> On Tuesday 03 Aug 2010 16:17:20 Tvrtko Ursulin wrote:
> > >>>> On Tuesday 03 Aug 2010 15:57:03 Tvrtko Ursulin wrote:
> > >>>>> On Tuesday 03 Aug 2010 15:51:08 Avi Kivity wrote:
> > >>>>>> On 08/03/2010 12:28 PM, Tvrtko Ursulin wrote:
> > >>>>>>> I have basically built 2.6.35 with make oldconfig from a working
> > >>>>>>> 2.6.34. Latter works fine in kvm while 2.6.35 hangs very early. I
> > >>>>>>> see nothing after grub (have early printk and verbose bootup
> > >>>>>>> enabled), just a blinking VGA cursor and CPU at 100%.
> > >>>>>>
> > >>>>>> Please copy kvm(a)vger.kernel.org on kvm issues.
> > >>>>>>
> > >>>>>>> CONFIG_PRINTK_TIME=y
> > >>>>>>
> > >>>>>> Try disabling this as a workaround.
> > >>>>>
> > >>>>> I am in the middle of a bisect run with five builds left to go,
> > >>>>> currently I have:
> > >>>>>
> > >>>>> bad 537b60d17894b7c19a6060feae40299d7109d6e7
> > >>>>> good 93c9d7f60c0cb7715890b1f9e159da6f4d1f5a65
> > >>>>
> > >>>> Bisect is looking good, narrowed it to ten revisions, but I am not
> > >>>> sure to make it to the end today:
> > >>>>
> > >>>> bad cb41838bbc4403f7270a94b93a9a0d9fc9c2e7ea
> > >>>> good 41d59102e146a4423a490b8eca68a5860af4fe1c
> > >>>
> > >>> Bisect points the finger to "x86, ioapic: In mpparse use
> > >>> mp_register_ioapic" (cf7500c0ea133d66f8449d86392d83f840102632), so I
> > >>> am copying Eric. No idea whether this commit is solely to blame or
> > >>> it is a combined interaction with KVM, but I am sure you guys will
> > >>> know.
> > >>>
> > >>> If you want me to test something else please shout.
> > >>
> > >> please try attached patch, to see if it help.
> > >
> > > No luck (no visible difference, no output on VGA or serial console).
> > > (Btw there is a typo in pin_2_irq_leagcy so that you do not push it
> > > directly).
> >
> > can you try current tip with
> > earlyprintk=ttyS0,115200 or console=uart8250,io,0x3f8,115200?
>
> Not the tip but 2.6.35 with earlyprintk=ttyS0,115200:

Correction, crash log was from 2.6.35 plus your smp_mptable_2.patch.

Tvrtko




Sophos Plc, The Pentagon, Abingdon Science Park, Abingdon, OX14 3YP, United Kingdom.
Company Reg No 2096520. VAT Reg No GB 348 3873 20.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo(a)vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
From: Gleb Natapov on
On Wed, Aug 04, 2010 at 10:16:08AM +0100, Tvrtko Ursulin wrote:
> On Wednesday 04 Aug 2010 10:05:36 Yinghai Lu wrote:
> > On 08/04/2010 01:18 AM, Tvrtko Ursulin wrote:
> > > On Tuesday 03 Aug 2010 21:57:48 Yinghai Lu wrote:
> > >> On Tue, Aug 3, 2010 at 8:59 AM, Tvrtko Ursulin
> > >>
> > >> <tvrtko.ursulin(a)sophos.com> wrote:
> > >>> On Tuesday 03 Aug 2010 16:17:20 Tvrtko Ursulin wrote:
> > >>>> On Tuesday 03 Aug 2010 15:57:03 Tvrtko Ursulin wrote:
> > >>>>> On Tuesday 03 Aug 2010 15:51:08 Avi Kivity wrote:
> > >>>>>> On 08/03/2010 12:28 PM, Tvrtko Ursulin wrote:
> > >>>>>>> I have basically built 2.6.35 with make oldconfig from a working
> > >>>>>>> 2.6.34. Latter works fine in kvm while 2.6.35 hangs very early. I
> > >>>>>>> see nothing after grub (have early printk and verbose bootup
> > >>>>>>> enabled), just a blinking VGA cursor and CPU at 100%.
> > >>>>>>
> > >>>>>> Please copy kvm(a)vger.kernel.org on kvm issues.
> > >>>>>>
> > >>>>>>> CONFIG_PRINTK_TIME=y
> > >>>>>>
> > >>>>>> Try disabling this as a workaround.
> > >>>>>
> > >>>>> I am in the middle of a bisect run with five builds left to go,
> > >>>>> currently I have:
> > >>>>>
> > >>>>> bad 537b60d17894b7c19a6060feae40299d7109d6e7
> > >>>>> good 93c9d7f60c0cb7715890b1f9e159da6f4d1f5a65
> > >>>>
> > >>>> Bisect is looking good, narrowed it to ten revisions, but I am not
> > >>>> sure to make it to the end today:
> > >>>>
> > >>>> bad cb41838bbc4403f7270a94b93a9a0d9fc9c2e7ea
> > >>>> good 41d59102e146a4423a490b8eca68a5860af4fe1c
> > >>>
> > >>> Bisect points the finger to "x86, ioapic: In mpparse use
> > >>> mp_register_ioapic" (cf7500c0ea133d66f8449d86392d83f840102632), so I am
> > >>> copying Eric. No idea whether this commit is solely to blame or it is a
> > >>> combined interaction with KVM, but I am sure you guys will know.
> > >>>
> > >>> If you want me to test something else please shout.
> > >>
> > >> please try attached patch, to see if it help.
> > >
> > > No luck (no visible difference, no output on VGA or serial console). (Btw
> > > there is a typo in pin_2_irq_leagcy so that you do not push it directly).
> >
> > can you try current tip with
> > earlyprintk=ttyS0,115200 or console=uart8250,io,0x3f8,115200?
>
> Not the tip but 2.6.35 with earlyprintk=ttyS0,115200:
>
> [ 0.000000] Processor #0 (Bootup-CPU)
> [ 0.000000] I/O APIC #1 Version 17 at 0xFEC00000.
> [ 0.000000] BUG: unable to handle kernel paging request at ffffb030
> [ 0.000000] IP: [<c011d136>] native_apic_mem_read+0x16/0x20
> [ 0.000000] *pde = 00832067 *pte = 00000000
Accessing APIC version register before APIC is mapped.

--
Gleb.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo(a)vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
From: Yinghai Lu on
On 08/04/2010 02:16 AM, Tvrtko Ursulin wrote:
> On Wednesday 04 Aug 2010 10:05:36 Yinghai Lu wrote:
>> On 08/04/2010 01:18 AM, Tvrtko Ursulin wrote:
>>> On Tuesday 03 Aug 2010 21:57:48 Yinghai Lu wrote:
>>>> On Tue, Aug 3, 2010 at 8:59 AM, Tvrtko Ursulin
>>>>
>>>> <tvrtko.ursulin(a)sophos.com> wrote:
>>>>> On Tuesday 03 Aug 2010 16:17:20 Tvrtko Ursulin wrote:
>>>>>> On Tuesday 03 Aug 2010 15:57:03 Tvrtko Ursulin wrote:
>>>>>>> On Tuesday 03 Aug 2010 15:51:08 Avi Kivity wrote:
>>>>>>>> On 08/03/2010 12:28 PM, Tvrtko Ursulin wrote:
>>>>>>>>> I have basically built 2.6.35 with make oldconfig from a working
>>>>>>>>> 2.6.34. Latter works fine in kvm while 2.6.35 hangs very early. I
>>>>>>>>> see nothing after grub (have early printk and verbose bootup
>>>>>>>>> enabled), just a blinking VGA cursor and CPU at 100%.
>>>>>>>>
>>>>>>>> Please copy kvm(a)vger.kernel.org on kvm issues.
>>>>>>>>
>>>>>>>>> CONFIG_PRINTK_TIME=y
>>>>>>>>
>>>>>>>> Try disabling this as a workaround.
>>>>>>>
>>>>>>> I am in the middle of a bisect run with five builds left to go,
>>>>>>> currently I have:
>>>>>>>
>>>>>>> bad 537b60d17894b7c19a6060feae40299d7109d6e7
>>>>>>> good 93c9d7f60c0cb7715890b1f9e159da6f4d1f5a65
>>>>>>
>>>>>> Bisect is looking good, narrowed it to ten revisions, but I am not
>>>>>> sure to make it to the end today:
>>>>>>
>>>>>> bad cb41838bbc4403f7270a94b93a9a0d9fc9c2e7ea
>>>>>> good 41d59102e146a4423a490b8eca68a5860af4fe1c
>>>>>
>>>>> Bisect points the finger to "x86, ioapic: In mpparse use
>>>>> mp_register_ioapic" (cf7500c0ea133d66f8449d86392d83f840102632), so I am
>>>>> copying Eric. No idea whether this commit is solely to blame or it is a
>>>>> combined interaction with KVM, but I am sure you guys will know.
>>>>>
>>>>> If you want me to test something else please shout.
>>>>
>>>> please try attached patch, to see if it help.
>>>
>>> No luck (no visible difference, no output on VGA or serial console). (Btw
>>> there is a typo in pin_2_irq_leagcy so that you do not push it directly).
>>
>> can you try current tip with
>> earlyprintk=ttyS0,115200 or console=uart8250,io,0x3f8,115200?
>
> Not the tip but 2.6.35 with earlyprintk=ttyS0,115200:
>
> [ 0.000000] Initializing cgroup subsys cpuset
> [ 0.000000] Initializing cgroup subsys cpu
> [ 0.000000] Linux version 2.6.35 (root(a)kvm-ktest-32) (gcc version 4.4.3 (Ubuntu 4.4.3-4ubuntu5) ) #4
> SMP Wed Aug 4 09:15:10 BST 2010
> [ 0.000000] BIOS-provided physical RAM map:
> [ 0.000000] BIOS-e820: 0000000000000000 - 000000000009f400 (usable)
> [ 0.000000] BIOS-e820: 000000000009f400 - 00000000000a0000 (reserved)
> [ 0.000000] BIOS-e820: 00000000000f0000 - 0000000000100000 (reserved)
> [ 0.000000] BIOS-e820: 0000000000100000 - 000000002bbfd000 (usable)
> [ 0.000000] BIOS-e820: 000000002bbfd000 - 000000002bc00000 (reserved)
> [ 0.000000] BIOS-e820: 00000000fffbc000 - 0000000100000000 (reserved)
> [ 0.000000] bootconsole [earlyser0] enabled
> [ 0.000000] Notice: NX (Execute Disable) protection cannot be enabled: non-PAE kernel!
> [ 0.000000] DMI 2.4 present.
> [ 0.000000] last_pfn = 0x2bbfd max_arch_pfn = 0x100000
> [ 0.000000] PAT not supported by CPU.
> [ 0.000000] Scanning 1 areas for low memory corruption
> [ 0.000000] modified physical RAM map:
> [ 0.000000] modified: 0000000000000000 - 0000000000001000 (reserved)
> [ 0.000000] modified: 0000000000001000 - 0000000000002000 (usable)
> [ 0.000000] modified: 0000000000002000 - 0000000000010000 (reserved)
> [ 0.000000] modified: 0000000000010000 - 000000000009f400 (usable)
> [ 0.000000] modified: 000000000009f400 - 00000000000a0000 (reserved)
> [ 0.000000] modified: 00000000000f0000 - 0000000000100000 (reserved)
> [ 0.000000] modified: 0000000000100000 - 000000002bbfd000 (usable)
> [ 0.000000] modified: 000000002bbfd000 - 000000002bc00000 (reserved)
> [ 0.000000] modified: 00000000fffbc000 - 0000000100000000 (reserved)
> [ 0.000000] found SMP MP-table at [c00f85c0] f85c0
> [ 0.000000] init_memory_mapping: 0000000000000000-000000002bbfd000
> [ 0.000000] RAMDISK: 1fa29000 - 20d3e000
> [ 0.000000] 699MB LOWMEM available.
> [ 0.000000] mapped low ram: 0 - 2bbfd000
> [ 0.000000] low ram: 0 - 2bbfd000
> [ 0.000000] kvm-clock: Using msrs 12 and 11
> [ 0.000000] kvm-clock: cpu 0, msr 0:82a341, boot clock
> [ 0.000000] Zone PFN ranges:
> [ 0.000000] DMA 0x00000001 -> 0x00001000
> [ 0.000000] Normal 0x00001000 -> 0x0002bbfd
> [ 0.000000] Movable zone start PFN for each node
> [ 0.000000] early_node_map[3] active PFN ranges
> [ 0.000000] 0: 0x00000001 -> 0x00000002
> [ 0.000000] 0: 0x00000010 -> 0x0000009f
> [ 0.000000] 0: 0x00000100 -> 0x0002bbfd
> [ 0.000000] Using APIC driver default
> [ 0.000000] Intel MultiProcessor Specification v1.4
> [ 0.000000] Virtual Wire compatibility mode.
> [ 0.000000] MPTABLE: OEM ID: BOCHSCPU
> [ 0.000000] MPTABLE: Product ID: 0.1
> [ 0.000000] MPTABLE: APIC at: 0xFEE00000
> [ 0.000000] Processor #0 (Bootup-CPU)
> [ 0.000000] I/O APIC #1 Version 17 at 0xFEC00000.

so your host is 32bit or 64bit?

can you use working 32bit guest to dump mptable like "debug apic=debug acpi=off earlyprintk..." ?

Yinghai
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo(a)vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
From: Tvrtko Ursulin on
On Wednesday 04 Aug 2010 10:34:28 Yinghai Lu wrote:

[snip]

> so your host is 32bit or 64bit?

Host is 64-bit.

> can you use working 32bit guest to dump mptable like "debug apic=debug
> acpi=off earlyprintk..." ?

This? From 2.6.34...

[ 0.000000] Using APIC driver default
[ 0.000000] Intel MultiProcessor Specification v1.4
[ 0.000000] Virtual Wire compatibility mode.
[ 0.000000] mpc: f85d0-f86b8
[ 0.000000] MPTABLE: OEM ID: BOCHSCPU
[ 0.000000] MPTABLE: Product ID: 0.1
[ 0.000000] MPTABLE: APIC at: 0xFEE00000
[ 0.000000] Processor #0 (Bootup-CPU)
[ 0.000000] Bus #0 is PCI
[ 0.000000] Bus #1 is ISA
[ 0.000000] I/O APIC #1 Version 17 at 0xFEC00000.
[ 0.000000] Int: type 0, pol 1, trig 0, bus 00, IRQ 04, APIC ID 1, APIC INT 09
[ 0.000000] Int: type 0, pol 1, trig 0, bus 00, IRQ 0c, APIC ID 1, APIC INT 0b
[ 0.000000] Int: type 0, pol 1, trig 0, bus 00, IRQ 10, APIC ID 1, APIC INT 0b
[ 0.000000] Int: type 0, pol 0, trig 0, bus 01, IRQ 00, APIC ID 1, APIC INT 02
[ 0.000000] Int: type 0, pol 0, trig 0, bus 01, IRQ 01, APIC ID 1, APIC INT 01
[ 0.000000] Int: type 0, pol 0, trig 0, bus 01, IRQ 03, APIC ID 1, APIC INT 03
[ 0.000000] Int: type 0, pol 0, trig 0, bus 01, IRQ 04, APIC ID 1, APIC INT 04
[ 0.000000] Int: type 0, pol 0, trig 0, bus 01, IRQ 05, APIC ID 1, APIC INT 05
[ 0.000000] Int: type 0, pol 0, trig 0, bus 01, IRQ 06, APIC ID 1, APIC INT 06
[ 0.000000] Int: type 0, pol 0, trig 0, bus 01, IRQ 07, APIC ID 1, APIC INT 07
[ 0.000000] Int: type 0, pol 0, trig 0, bus 01, IRQ 08, APIC ID 1, APIC INT 08
[ 0.000000] Int: type 0, pol 0, trig 0, bus 01, IRQ 0a, APIC ID 1, APIC INT 0a
[ 0.000000] Int: type 0, pol 0, trig 0, bus 01, IRQ 0c, APIC ID 1, APIC INT 0c
[ 0.000000] Int: type 0, pol 0, trig 0, bus 01, IRQ 0d, APIC ID 1, APIC INT 0d
[ 0.000000] Int: type 0, pol 0, trig 0, bus 01, IRQ 0e, APIC ID 1, APIC INT 0e
[ 0.000000] Int: type 0, pol 0, trig 0, bus 01, IRQ 0f, APIC ID 1, APIC INT 0f
[ 0.000000] Lint: type 3, pol 0, trig 0, bus 01, IRQ 00, APIC ID 0, APIC LINT 00
[ 0.000000] Lint: type 1, pol 0, trig 0, bus 01, IRQ 00, APIC ID 0, APIC LINT 01
[ 0.000000] Processors: 1
[ 0.000000] SMP: Allowing 1 CPUs, 0 hotplug CPUs
[ 0.000000] mapped APIC to ffffb000 (fee00000)
[ 0.000000] mapped IOAPIC to ffffa000 (fec00000)
[ 0.000000] nr_irqs_gsi: 24

....

[ 0.116253] Enabling APIC mode: Flat. Using 1 I/O APICs
[ 0.117328] Getting VERSION: 50014
[ 0.118109] Getting VERSION: 50014
[ 0.118888] Getting ID: 0
[ 0.119553] Getting ID: f000000
[ 0.120021] Getting LVT0: 8700
[ 0.120749] Getting LVT1: 8400
[ 0.122213] enabled ExtINT on CPU#0
[ 0.124650] ENABLING IO-APIC IRQs
[ 0.125451] Setting 1 in the phys_id_present_map
[ 0.126393] ...changing IO-APIC physical APIC ID to 1 ... ok.
[ 0.127575] init IO_APIC IRQs
[ 0.128011] 1-0 (apicid-pin) not connected
[ 0.128981] IOAPIC[0]: Set routing entry (1-1 -> 0x31 -> IRQ 1 Mode:0 Active:0)
[ 0.130542] IOAPIC[0]: Set routing entry (1-2 -> 0x30 -> IRQ 0 Mode:0 Active:0)
[ 0.132030] IOAPIC[0]: Set routing entry (1-3 -> 0x33 -> IRQ 3 Mode:0 Active:0)
[ 0.133591] IOAPIC[0]: Set routing entry (1-4 -> 0x34 -> IRQ 4 Mode:0 Active:0)
[ 0.135128] IOAPIC[0]: Set routing entry (1-5 -> 0x35 -> IRQ 5 Mode:0 Active:0)
[ 0.136042] IOAPIC[0]: Set routing entry (1-6 -> 0x36 -> IRQ 6 Mode:0 Active:0)
[ 0.137580] IOAPIC[0]: Set routing entry (1-7 -> 0x37 -> IRQ 7 Mode:0 Active:0)
[ 0.140026] IOAPIC[0]: Set routing entry (1-8 -> 0x38 -> IRQ 8 Mode:0 Active:0)
[ 0.141626] IOAPIC[0]: Set routing entry (1-9 -> 0x39 -> IRQ 9 Mode:1 Active:0)
[ 0.144026] IOAPIC[0]: Set routing entry (1-10 -> 0x3a -> IRQ 10 Mode:0 Active:0)
[ 0.145586] IOAPIC[0]: Set routing entry (1-11 -> 0x3b -> IRQ 11 Mode:1 Active:0)
[ 0.147153] IOAPIC[0]: Set routing entry (1-12 -> 0x3c -> IRQ 12 Mode:0 Active:0)
[ 0.148026] IOAPIC[0]: Set routing entry (1-13 -> 0x3d -> IRQ 13 Mode:0 Active:0)
[ 0.149605] IOAPIC[0]: Set routing entry (1-14 -> 0x3e -> IRQ 14 Mode:0 Active:0)
[ 0.152028] IOAPIC[0]: Set routing entry (1-15 -> 0x3f -> IRQ 15 Mode:0 Active:0)
[ 0.154255] 1-16 1-17 1-18 1-19 1-20 1-21 1-22 1-23 (apicid-pin) not connected
[ 0.156173] ..TIMER: vector=0x30 apic1=0 pin1=2 apic2=-1 pin2=-1
[ 0.157281] CPU0: Intel QEMU Virtual CPU version 0.12.3 stepping 03
[ 0.158645] Using local APIC timer interrupts.
[ 0.158646] calibrating APIC timer ...
[ 0.164000] ... lapic delta = 6250358
[ 0.164000] ..... delta 6250358
[ 0.164000] ..... mult: 268434054
[ 0.164000] ..... calibration result: 4000229
[ 0.164000] ..... CPU clock speed is 2926.0767 MHz.
[ 0.164000] ..... host bus clock speed is 1000.0229 MHz.
[ 0.164000] ... verify APIC timer
[ 0.274657] ... jiffies delta = 25
[ 0.275438] ... jiffies result ok
[ 0.276577] Brought up 1 CPUs
[ 0.277281] Total of 1 processors activated (5852.84 BogoMIPS).

....

[ 0.356006] printing PIC contents
[ 0.357286] ... PIC IMR: fffb
[ 0.358013] ... PIC IRR: 0001
[ 0.358736] ... PIC ISR: 0000
[ 0.359453] ... PIC ELCR: 0c00
[ 0.360023] printing local APIC contents on CPU#0/0:
[ 0.360998] ... APIC ID: 00000000 (0)
[ 0.361859] ... APIC VERSION: 00050014
[ 0.362734] ... APIC TASKPRI: 00000000 (00)
[ 0.363607] ... APIC PROCPRI: 00000000
[ 0.364000] ... APIC LDR: 01000000
[ 0.364000] ... APIC DFR: ffffffff
[ 0.364000] ... APIC SPIV: 000001ff
[ 0.364000] ... APIC ISR field:
[ 0.364000] 0000000000000000000000000000000000000000000000000000000000000000
[ 0.364000] ... APIC TMR field:
[ 0.364000] 0000000000000000000000000000000000000000000000000000000000000000
[ 0.364000] ... APIC IRR field:
[ 0.364000] 0000000000000000000000000000000000000000000000000000000000008000
[ 0.364000] ... APIC ESR: 00000000
[ 0.364000] ... APIC ICR: 000c4610
[ 0.364000] ... APIC ICR2: 00000000
[ 0.364000] ... APIC LVTT: 000200ef
[ 0.364000] ... APIC LVTPC: 00010000
[ 0.364000] ... APIC LVT0: 00010700
[ 0.364000] ... APIC LVT1: 00000400
[ 0.364000] ... APIC LVTERR: 000000fe
[ 0.364000] ... APIC TMICT: 0003d09e
[ 0.364000] ... APIC TMCCT: 0002c433
[ 0.364000] ... APIC TDCR: 00000003
[ 0.364000]
[ 0.368005] number of MP IRQ sources: 16.
[ 0.372004] number of IO-APIC #1 registers: 24.
[ 0.372920] testing the IO APIC.......................
[ 0.373935]
[ 0.374439] IO APIC #1......
[ 0.375131] .... register #00: 01000000
[ 0.376002] ....... : physical APIC id: 01
[ 0.376893] ....... : Delivery Type: 0
[ 0.377738] ....... : LTS : 0
[ 0.378626] .... register #01: 00170011
[ 0.379477] ....... : max redirection entries: 0017
[ 0.380003] ....... : PRQ implemented: 0
[ 0.380872] ....... : IO APIC version: 0011
[ 0.381783] .... register #02: 01000000
[ 0.382604] ....... : arbitration: 01
[ 0.384002] .... IRQ redirection table:
[ 0.384825] NR Dst Mask Trig IRR Pol Stat Dmod Deli Vect:
[ 0.385880] 00 000 1 0 0 0 0 0 0 00
[ 0.386972] 01 001 0 0 0 0 0 1 1 31
[ 0.388785] 02 001 0 0 0 0 0 1 1 30
[ 0.389908] 03 001 0 0 0 0 0 1 1 33
[ 0.390997] 04 001 0 0 0 0 0 1 1 34
[ 0.392020] 05 001 0 0 0 0 0 1 1 35
[ 0.393111] 06 001 0 0 0 0 0 1 1 36
[ 0.394199] 07 001 0 0 0 0 0 1 1 37
[ 0.395288] 08 001 0 0 0 0 0 1 1 38
[ 0.396016] 09 001 1 1 0 0 0 1 1 39
[ 0.397169] 0a 001 0 0 0 0 0 1 1 3A
[ 0.398262] 0b 001 1 1 0 0 0 1 1 3B
[ 0.399348] 0c 001 0 0 0 0 0 1 1 3C
[ 0.400753] 0d 001 0 0 0 0 0 1 1 3D
[ 0.401844] 0e 001 0 0 0 0 0 1 1 3E
[ 0.402937] 0f 001 0 0 0 0 0 1 1 3F
[ 0.404016] 10 000 1 0 0 0 0 0 0 00
[ 0.405104] 11 000 1 0 0 0 0 0 0 00
[ 0.406229] 12 000 1 0 0 0 0 0 0 00
[ 0.407330] 13 000 1 0 0 0 0 0 0 00
[ 0.408759] 14 000 1 0 0 0 0 0 0 00
[ 0.410255] 15 000 1 0 0 0 0 0 0 00
[ 0.411355] 16 000 1 0 0 0 0 0 0 00
[ 0.412017] 17 000 1 0 0 0 0 0 0 00
[ 0.413101] IRQ to pin mappings:
[ 0.413843] IRQ0 -> 0:2
[ 0.414758] IRQ1 -> 0:1
[ 0.416003] IRQ3 -> 0:3
[ 0.416784] IRQ4 -> 0:4
[ 0.417571] IRQ5 -> 0:5
[ 0.419026] IRQ6 -> 0:6
[ 0.419827] IRQ7 -> 0:7
[ 0.420495] IRQ8 -> 0:8
[ 0.421270] IRQ9 -> 0:9
[ 0.422058] IRQ10 -> 0:10
[ 0.422871] IRQ11 -> 0:11
[ 0.423673] IRQ12 -> 0:12
[ 0.424580] IRQ13 -> 0:13
[ 0.425387] IRQ14 -> 0:14
[ 0.426182] IRQ15 -> 0:15
[ 0.427028] .................................... done.



Sophos Plc, The Pentagon, Abingdon Science Park, Abingdon, OX14 3YP, United Kingdom.
Company Reg No 2096520. VAT Reg No GB 348 3873 20.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo(a)vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
From: Eric W. Biederman on
Gleb Natapov <gleb(a)redhat.com> writes:

> On Wed, Aug 04, 2010 at 10:16:08AM +0100, Tvrtko Ursulin wrote:
>>
>> Not the tip but 2.6.35 with earlyprintk=ttyS0,115200:
>>
>> [ 0.000000] Processor #0 (Bootup-CPU)
>> [ 0.000000] I/O APIC #1 Version 17 at 0xFEC00000.
>> [ 0.000000] BUG: unable to handle kernel paging request at ffffb030
>> [ 0.000000] IP: [<c011d136>] native_apic_mem_read+0x16/0x20
>> [ 0.000000] *pde = 00832067 *pte = 00000000
> Accessing APIC version register before APIC is mapped.

Yep. I see it now. We have some of the silliest code. We only
go down this path for certain revs of Intel cpus, and I double checked
this change on an AMD cpu which explains why I missed hitting this
case.

The call path that is new in they bisected commit is:
MP_ioapic_info()
mp_register_ioapic()
io_apic_unique_id()
io_apic_get_unique_id()
get_physical_broadcast()
modern_apic()
lapic_get_version()
apic_read(APIC_LVR)


Tvrtko can you test this patch and verify it fixes the kvm booting
issue?

This patch just maps the lapic early in the mmparse.c just like we
do in acpi/boot.c when parsing the acpi tables.

Eric


---

diff --git a/arch/x86/kernel/apic/apic.c b/arch/x86/kernel/apic/apic.c
index a96489e..c07e513 100644
--- a/arch/x86/kernel/apic/apic.c
+++ b/arch/x86/kernel/apic/apic.c
@@ -1606,7 +1606,7 @@ void __init init_apic_mappings(void)
* acpi lapic path already maps that address in
* acpi_register_lapic_address()
*/
- if (!acpi_lapic)
+ if (!acpi_lapic && !smp_found_config)
set_fixmap_nocache(FIX_APIC_BASE, apic_phys);

apic_printk(APIC_VERBOSE, "mapped APIC to %08lx (%08lx)\n",
diff --git a/arch/x86/kernel/mpparse.c b/arch/x86/kernel/mpparse.c
index d86dbf7..d7b6f7f 100644
--- a/arch/x86/kernel/mpparse.c
+++ b/arch/x86/kernel/mpparse.c
@@ -274,6 +274,18 @@ static void __init smp_dump_mptable(struct mpc_table *mpc, unsigned char *mpt)

void __init default_smp_read_mpc_oem(struct mpc_table *mpc) { }

+static void __init smp_register_lapic_address(unsigned long address)
+{
+ mp_lapic_addr = address;
+
+ set_fixmap_nocache(FIX_APIC_BASE, address);
+ if (boot_cpu_physical_apicid == -1U) {
+ boot_cpu_physical_apicid = read_apic_id();
+ apic_version[boot_cpu_physical_apicid] =
+ GET_APIC_VERSION(apic_read(APIC_LVR));
+ }
+}
+
static int __init smp_read_mpc(struct mpc_table *mpc, unsigned early)
{
char str[16];
@@ -295,6 +307,10 @@ static int __init smp_read_mpc(struct mpc_table *mpc, unsigned early)
if (early)
return 1;

+ /* Initialize the lapic mapping */
+ if (!acpi_lapic)
+ smp_register_lapic_address(mpc->lapic);
+
if (mpc->oemptr)
x86_init.mpparse.smp_read_mpc_oem(mpc);


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo(a)vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/