Hi Jeremy, 32bit machine...on 64bit pm works... <snip> xenbus_probe_backend_init bus registered ok xenbus_probe_frontend_init bus registered ok BUG: unable to handle kernel NULL pointer dereference at 00000029 IP: [<c1649e85>] xen_acpi_processor_extcntl_init+0x8/0x43 *pdpt = 0000000001689001 *pde = 0000000000000000 Oops: 0000 [#1] SMP last sysfs file: Pid: 1, comm: swapper Not tainted (2.6.31-rc6 #3) EIP: 0060:[<c1649e85>] EFLAGS: 00010246 CPU: 0 EIP is at xen_acpi_processor_extcntl_init+0x8/0x43 EAX: 00000000 EBX: c1672eb0 ECX: c15e916c EDX: 00000000 ESI: c1649e7d EDI: 00000000 EBP: c784bf54 ESP: c784bf54 DS: 007b ES: 007b FS: 00d8 GS: 0000 SS: 0068 Process swapper (pid: 1, ti=c784a000 task=c7849bc0 task.ti=c784a000) Stack: c784bfc4 c100203a 0000003f c7864540 c155b4d1 c784bfa4 c784bf84 c10d7cc4 <0> 00000001 c7864600 0000000f c160e300 c784bfb0 c106a814 c1497a60 0000000f <0> 0000000f 3531bfb0 00000000 00000000 000001ff c161e120 c161e124 c784bfc4 Call Trace: [<c100203a>] ? do_one_initcall+0x2a/0x160 [<c10d7cc4>] ? create_proc_entry+0x54/0xb0 [<c106a814>] ? register_irq_proc+0xa4/0xc0 [<c106a895>] ? init_irq_proc+0x65/0x80 [<c162931d>] ? kernel_init+0x13c/0x195 [<c16291e1>] ? kernel_init+0x0/0x195 [<c1009607>] ? kernel_thread_helper+0x7/0x10 Code: ba 08 98 5e c1 a1 b8 b8 6c c1 e8 d7 6d a9 ff ba f0 97 5e c1 a1 b8 b8 6c c1 e8 d8 49 a9 ff e9 51 ff ff ff 55 a1 44 30 69 c1 89 e5 <0f> b6 40 29 85 c0 74 2a a8 01 74 0a c7 05 98 99 5e c1 e0 b1 2c EIP: [<c1649e85>] xen_acpi_processor_extcntl_init+0x8/0x43 SS:ESP 0068:c784bf54 CR2: 0000000000000029 ---[ end trace 4eaa2a86a8e2da22 ]--- Kernel panic - not syncing: Attempted to kill init! Pid: 1, comm: swapper Tainted: G D 2.6.31-rc6 #3 Call Trace: [<c148d491>] ? printk+0x18/0x1a [<c148d3d0>] panic+0x43/0xec [<c103a1db>] do_exit+0x59b/0x670 [<c148d491>] ? printk+0x18/0x1a [<c100c532>] oops_end+0x92/0xa0 [<c148d491>] ? printk+0x18/0x1a [<c10234b6>] no_context+0xb6/0x1a0 [<c10235fb>] __bad_area_nosemaphore+0x5b/0x170 [<c12655e1>] ? __const_udelay+0x31/0x40 [<c12f48e2>] ? wait_for_xmitr+0x52/0xc0 [<c12f4950>] ? serial8250_console_putchar+0x0/0x30 [<c12f4c70>] ? serial8250_console_write+0x0/0x110 [<c1036df0>] ? __call_console_drivers+0x60/0x70 [<c104f44a>] ? up+0x2a/0x40 [<c1037311>] ? release_console_sem+0x1a1/0x1e0 [<c1023722>] bad_area_nosemaphore+0x12/0x20 [<c1023a6c>] do_page_fault+0x1bc/0x260 [<c1649e7d>] ? xen_acpi_processor_extcntl_init+0x0/0x43 [<c10238b0>] ? do_page_fault+0x0/0x260 [<c148fba6>] error_code+0x66/0x6c [<c1649e7d>] ? xen_acpi_processor_extcntl_init+0x0/0x43 [<c10238b0>] ? do_page_fault+0x0/0x260 [<c1649e85>] ? xen_acpi_processor_extcntl_init+0x8/0x43 [<c100203a>] do_one_initcall+0x2a/0x160 [<c10d7cc4>] ? create_proc_entry+0x54/0xb0 [<c106a814>] ? register_irq_proc+0xa4/0xc0 [<c106a895>] ? init_irq_proc+0x65/0x80 [<c162931d>] kernel_init+0x13c/0x195 [<c16291e1>] ? kernel_init+0x0/0x195 [<c1009607>] kernel_thread_helper+0x7/0x10 </snap> _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Jeremy Fitzhardinge
2009-Aug-25 18:29 UTC
[Xen-devel] Re: pvops dom0 20090825 xen_acpi panic
On 08/25/09 10:50, Daniel Schroeder wrote:> Hi Jeremy, >(CC:d Ke)> 32bit machine...on 64bit pm works... > <snip> > xenbus_probe_backend_init bus registered ok > > > xenbus_probe_frontend_init bus registered ok > > > BUG: unable to handle kernel NULL pointer dereference at 00000029 > > > IP: [<c1649e85>] xen_acpi_processor_extcntl_init+0x8/0x43 > > > *pdpt = 0000000001689001 *pde = 0000000000000000 > > > Oops: 0000 [#1] SMP > > > last sysfs file: > > > > > > Pid: 1, comm: swapper Not tainted (2.6.31-rc6 #3) > > > EIP: 0060:[<c1649e85>] EFLAGS: 00010246 CPU: 0 > EIP is at xen_acpi_processor_extcntl_init+0x8/0x43 > EAX: 00000000 EBX: c1672eb0 ECX: c15e916c EDX: 00000000 > ESI: c1649e7d EDI: 00000000 EBP: c784bf54 ESP: c784bf54 > DS: 007b ES: 007b FS: 00d8 GS: 0000 SS: 0068 > Process swapper (pid: 1, ti=c784a000 task=c7849bc0 task.ti=c784a000) > Stack: > c784bfc4 c100203a 0000003f c7864540 c155b4d1 c784bfa4 c784bf84 c10d7cc4 > <0> 00000001 c7864600 0000000f c160e300 c784bfb0 c106a814 c1497a60 0000000f > <0> 0000000f 3531bfb0 00000000 00000000 000001ff c161e120 c161e124 c784bfc4 > Call Trace: > [<c100203a>] ? do_one_initcall+0x2a/0x160 > [<c10d7cc4>] ? create_proc_entry+0x54/0xb0 > [<c106a814>] ? register_irq_proc+0xa4/0xc0 > [<c106a895>] ? init_irq_proc+0x65/0x80 > [<c162931d>] ? kernel_init+0x13c/0x195 > [<c16291e1>] ? kernel_init+0x0/0x195 > [<c1009607>] ? kernel_thread_helper+0x7/0x10 > Code: ba 08 98 5e c1 a1 b8 b8 6c c1 e8 d7 6d a9 ff ba f0 97 5e c1 a1 b8 > b8 6c c1 e8 d8 49 a9 ff e9 51 ff ff ff 55 a1 44 30 69 c1 89 e5 <0f> b6 > 40 29 85 c0 74 2a a8 01 74 0a c7 05 98 99 5e c1 e0 b1 2c > EIP: [<c1649e85>] xen_acpi_processor_extcntl_init+0x8/0x43 SS:ESP > 0068:c784bf54 > CR2: 0000000000000029 > ---[ end trace 4eaa2a86a8e2da22 ]--- > Kernel panic - not syncing: Attempted to kill init! > Pid: 1, comm: swapper Tainted: G D 2.6.31-rc6 #3 > Call Trace: > [<c148d491>] ? printk+0x18/0x1a > [<c148d3d0>] panic+0x43/0xec > [<c103a1db>] do_exit+0x59b/0x670 > [<c148d491>] ? printk+0x18/0x1a > [<c100c532>] oops_end+0x92/0xa0 > [<c148d491>] ? printk+0x18/0x1a > [<c10234b6>] no_context+0xb6/0x1a0 > [<c10235fb>] __bad_area_nosemaphore+0x5b/0x170 > [<c12655e1>] ? __const_udelay+0x31/0x40 > [<c12f48e2>] ? wait_for_xmitr+0x52/0xc0 > [<c12f4950>] ? serial8250_console_putchar+0x0/0x30 > [<c12f4c70>] ? serial8250_console_write+0x0/0x110 > [<c1036df0>] ? __call_console_drivers+0x60/0x70 > [<c104f44a>] ? up+0x2a/0x40 > [<c1037311>] ? release_console_sem+0x1a1/0x1e0 > [<c1023722>] bad_area_nosemaphore+0x12/0x20 > [<c1023a6c>] do_page_fault+0x1bc/0x260 > [<c1649e7d>] ? xen_acpi_processor_extcntl_init+0x0/0x43 > [<c10238b0>] ? do_page_fault+0x0/0x260 > [<c148fba6>] error_code+0x66/0x6c > [<c1649e7d>] ? xen_acpi_processor_extcntl_init+0x0/0x43 > [<c10238b0>] ? do_page_fault+0x0/0x260 > [<c1649e85>] ? xen_acpi_processor_extcntl_init+0x8/0x43 > [<c100203a>] do_one_initcall+0x2a/0x160 > [<c10d7cc4>] ? create_proc_entry+0x54/0xb0 > [<c106a814>] ? register_irq_proc+0xa4/0xc0 > [<c106a895>] ? init_irq_proc+0x65/0x80 > [<c162931d>] kernel_init+0x13c/0x195 > [<c16291e1>] ? kernel_init+0x0/0x195 > [<c1009607>] kernel_thread_helper+0x7/0x10 > </snap> > >_______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
> >Hi Jeremy, > >32bit machine...on 64bit pm works... ><snip> >xenbus_probe_backend_init bus registered ok > > >xenbus_probe_frontend_init bus registered ok > > >BUG: unable to handle kernel NULL pointer dereference at 00000029Thanks for reporting this issue. Looks xen_start_info is NULL in code "pmbits = (xen_start_info->flags & SIF_PM_MASK) >> 8" in xen_acpi_processor_extcntl_init(). It is abnormal that xen_start_info become NULL. Could you share more info on your configuration, so that I can reproduce it? E.g. is it 32bit dom0 under 64bit hypervisor? Also do you mind attach the domi0 .config file? Best Regards Ke _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Hi Ke,> > Could you share more info on your configuration, so that I can reproduce it? E.g. is it 32bit dom0 under 64bit hypervisor? Also do you mind attach the domi0 .config file? >this is under a 32bit dom0 but it even happens on bare metal...under kvm the same panic occurs... .config is here http://x17.eu/xen_acpi_panic.config.gz - daniel _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Oh I see. The following patch should fix the panic in bare metal, could you please have a try? For the 32bit, I am still trying to reproduce it, will make you updated later. Best Regards Ke ============== Fix xen_acpi_processor_extcntl_init xen_start_info NULL pointer issue when kernel runs in bare metal, the xen_start_info could be a NULL pointer, so add condition check to avoid the kernel panic. Signed-off-by: Yu Ke <ke.yu@intel.com> diff --git a/drivers/xen/acpi_processor.c b/drivers/xen/acpi_processor.c index d2b76e9..6a4e8e4 100644 --- a/drivers/xen/acpi_processor.c +++ b/drivers/xen/acpi_processor.c @@ -430,10 +430,14 @@ static int xen_hotplug_notifier(struct acpi_processor *pr, int event) static int __init xen_acpi_processor_extcntl_init(void) { - unsigned int pmbits = (xen_start_info->flags & SIF_PM_MASK) >> 8; + unsigned int pmbits; - if (!pmbits) + /* Only xen dom0 is allowed to handle ACPI processor info */ + if (!xen_initial_domain()) return 0; + + pmbits = (xen_start_info->flags & SIF_PM_MASK) >> 8; + if (pmbits & XEN_PROCESSOR_PM_CX) xen_ops.pm_ops[PM_TYPE_IDLE] = xen_cx_notifier; if (pmbits & XEN_PROCESSOR_PM_PX)>-----Original Message----- >From: Daniel Schroeder [mailto:sec@dschroeder.info] >Sent: Friday, August 28, 2009 3:27 AM >To: Yu, Ke >Cc: Jeremy Fitzhardinge; xen-devel@lists.xensource.com >Subject: Re: [Xen-devel] pvops dom0 20090825 xen_acpi panic > >Hi Ke, > >> >> Could you share more info on your configuration, so that I can reproduce it? E.g. >is it 32bit dom0 under 64bit hypervisor? Also do you mind attach the >domi0 .config file? >> >this is under a 32bit dom0 but it even happens on bare metal...under kvm > the same panic occurs... >.config is here http://x17.eu/xen_acpi_panic.config.gz > >- >daniel_______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
I have tried 32bit case, however I cannot reproduce the kernel panic, either in 32bit dom0/32bit hypervisor case or 32bit dom0/64bit hypervisor case. if you still meet the kernel panic after applying the patch I posted, please let me know. I will dig it more. Best Regards Ke>-----Original Message----- >From: xen-devel-bounces@lists.xensource.com >[mailto:xen-devel-bounces@lists.xensource.com] On Behalf Of Yu, Ke >Sent: Friday, August 28, 2009 11:06 AM >To: Daniel Schroeder >Cc: Jeremy Fitzhardinge; xen-devel@lists.xensource.com >Subject: RE: [Xen-devel] pvops dom0 20090825 xen_acpi panic > >Oh I see. The following patch should fix the panic in bare metal, could you please >have a try? For the 32bit, I am still trying to reproduce it, will make you updated >later. > >Best Regards >Ke > >==============> >Fix xen_acpi_processor_extcntl_init xen_start_info NULL pointer issue > >when kernel runs in bare metal, the xen_start_info could be a NULL pointer, >so add condition check to avoid the kernel panic. > >Signed-off-by: Yu Ke <ke.yu@intel.com> > >diff --git a/drivers/xen/acpi_processor.c b/drivers/xen/acpi_processor.c >index d2b76e9..6a4e8e4 100644 >--- a/drivers/xen/acpi_processor.c >+++ b/drivers/xen/acpi_processor.c >@@ -430,10 +430,14 @@ static int xen_hotplug_notifier(struct acpi_processor >*pr, int event) > > static int __init xen_acpi_processor_extcntl_init(void) > { >- unsigned int pmbits = (xen_start_info->flags & SIF_PM_MASK) >> 8; >+ unsigned int pmbits; > >- if (!pmbits) >+ /* Only xen dom0 is allowed to handle ACPI processor info */ >+ if (!xen_initial_domain()) > return 0; >+ >+ pmbits = (xen_start_info->flags & SIF_PM_MASK) >> 8; >+ > if (pmbits & XEN_PROCESSOR_PM_CX) > xen_ops.pm_ops[PM_TYPE_IDLE] = xen_cx_notifier; > if (pmbits & XEN_PROCESSOR_PM_PX) > >>-----Original Message----- >>From: Daniel Schroeder [mailto:sec@dschroeder.info] >>Sent: Friday, August 28, 2009 3:27 AM >>To: Yu, Ke >>Cc: Jeremy Fitzhardinge; xen-devel@lists.xensource.com >>Subject: Re: [Xen-devel] pvops dom0 20090825 xen_acpi panic >> >>Hi Ke, >> >>> >>> Could you share more info on your configuration, so that I can reproduce it? >E.g. >>is it 32bit dom0 under 64bit hypervisor? Also do you mind attach the >>domi0 .config file? >>> >>this is under a 32bit dom0 but it even happens on bare metal...under kvm >> the same panic occurs... >>.config is here http://x17.eu/xen_acpi_panic.config.gz >> >>- >>daniel_______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
> I have tried 32bit case, however I cannot reproduce the kernel panic, either in 32bit dom0/32bit hypervisor case or 32bit dom0/64bit hypervisor case. if you still meet the kernel panic after applying the patch I posted, please let me know. I will dig it more. >i have tried the patch on bare metal (works) and under 32bit 3.4.2-rc1-pre (panic)...i dont get netconsole working, so i have no output...hope that helps...> Best Regards > Ke > >> -----Original Message----- >> From: xen-devel-bounces@lists.xensource.com >> [mailto:xen-devel-bounces@lists.xensource.com] On Behalf Of Yu, Ke >> Sent: Friday, August 28, 2009 11:06 AM >> To: Daniel Schroeder >> Cc: Jeremy Fitzhardinge; xen-devel@lists.xensource.com >> Subject: RE: [Xen-devel] pvops dom0 20090825 xen_acpi panic >> >> Oh I see. The following patch should fix the panic in bare metal, could you please >> have a try? For the 32bit, I am still trying to reproduce it, will make you updated >> later. >> >> Best Regards >> Ke >> >> ==============>> >> Fix xen_acpi_processor_extcntl_init xen_start_info NULL pointer issue >> >> when kernel runs in bare metal, the xen_start_info could be a NULL pointer, >> so add condition check to avoid the kernel panic. >> >> Signed-off-by: Yu Ke <ke.yu@intel.com> >> >> diff --git a/drivers/xen/acpi_processor.c b/drivers/xen/acpi_processor.c >> index d2b76e9..6a4e8e4 100644 >> --- a/drivers/xen/acpi_processor.c >> +++ b/drivers/xen/acpi_processor.c >> @@ -430,10 +430,14 @@ static int xen_hotplug_notifier(struct acpi_processor >> *pr, int event) >> >> static int __init xen_acpi_processor_extcntl_init(void) >> { >> - unsigned int pmbits = (xen_start_info->flags & SIF_PM_MASK) >> 8; >> + unsigned int pmbits; >> >> - if (!pmbits) >> + /* Only xen dom0 is allowed to handle ACPI processor info */ >> + if (!xen_initial_domain()) >> return 0; >> + >> + pmbits = (xen_start_info->flags & SIF_PM_MASK) >> 8; >> + >> if (pmbits & XEN_PROCESSOR_PM_CX) >> xen_ops.pm_ops[PM_TYPE_IDLE] = xen_cx_notifier; >> if (pmbits & XEN_PROCESSOR_PM_PX) >> >>> -----Original Message----- >>> From: Daniel Schroeder [mailto:sec@dschroeder.info] >>> Sent: Friday, August 28, 2009 3:27 AM >>> To: Yu, Ke >>> Cc: Jeremy Fitzhardinge; xen-devel@lists.xensource.com >>> Subject: Re: [Xen-devel] pvops dom0 20090825 xen_acpi panic >>> >>> Hi Ke, >>> >>>> Could you share more info on your configuration, so that I can reproduce it? >> E.g. >>> is it 32bit dom0 under 64bit hypervisor? Also do you mind attach the >>> domi0 .config file? >>> this is under a 32bit dom0 but it even happens on bare metal...under kvm >>> the same panic occurs... >>> .config is here http://x17.eu/xen_acpi_panic.config.gz >>> >>> - >>> daniel >_______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel