* [Qemu-devel] Bug with smp ppc guest.
@ 2014-04-03 15:19 Frederic Konrad
2014-04-03 15:29 ` Andreas Färber
0 siblings, 1 reply; 5+ messages in thread
From: Frederic Konrad @ 2014-04-03 15:19 UTC (permalink / raw)
To: Alexey Kardashevskiy, gkurz, Andreas Färber
Cc: Alexander Graf, qemu-devel
[-- Attachment #1: Type: text/plain, Size: 6118 bytes --]
Hi everybody,
I tried to boot a mpc85xx smp image with a new platform inside qemu.
This command line reproduce the issue:
./ppc-softmmu/qemu-system-ppc -M mpc8544ds -kernel zImage --smp 2
This use to work but since this commit:
d197fdbc3b83655f3c145722805f0998c04dce16
target-ppc: Reset SPRs on CPU reset
This resets SPR values to defaults on CPU reset. This should help
with little-endian guests reboot issues.
I get some errors inside the guest:
smp_85xx_kick_cpu: timeout waiting for core 1 to ack
smp: failed starting cpu 1 (rc -2)
------------[ cut here ]------------
WARNING: at kernel/cpu.c:206
Modules linked in:
NIP: c003dabc LR: c04e4b78 CTR: c04e4ad4
REGS: c7039d60 TRAP: 0700 Not tainted (3.7.8)
MSR: 00029000 <CE,EE,ME> CR: 42002044 XER: 00000000
TASK = c7034000[1] 'swapper/0' THREAD: c7038000 CPU: 0
GPR00: 00000001 c7039e10 c7034000 00000001 00197000 c70032c0 c04e4b68 c06f87d8
GPR08: c7038000 00000003 00197000 c06b78c4 c06b78c4 00000000 c0002880 00000000
GPR16: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
GPR24: 00000000 c7037200 00000000 fffffffe 00000000 c06ec594 c06fbea0 00000001
NIP [c003dabc] clear_tasks_mm_cpumask+0x34/0xdc
LR [c04e4b78] mmu_context_cpu_notify+0xa4/0xbc
Call Trace:
[c7039e10] [c005b254] kthread_stop+0x74/0xb8 (unreliable)
[c7039e40] [c04e4b78] mmu_context_cpu_notify+0xa4/0xbc
[c7039e50] [c0062654] notifier_call_chain+0x64/0xb4
[c7039e80] [c003d868] __cpu_notify+0x34/0x58
[c7039e90] [c04e50bc] _cpu_up+0x134/0x150
[c7039ed0] [c04e5154] cpu_up+0x7c/0x9c
[c7039ee0] [c0687138] smp_init+0x70/0xd0
[c7039f00] [c0678838] kernel_init_freeable+0x80/0x1cc
[c7039f30] [c000289c] kernel_init+0x1c/0x110
[c7039f40] [c000e1f4] ret_from_kernel_thread+0x5c/0x64
Instruction dump:
7c0802a6 3d20c070 90010034 39298548 546006fe bf61001c 7c7c2e70 7f9c0194
579c103a 7d29e02e 7d200430 540007fe <0f000000> 7c7e2e70 7fde0194 57de2834
---[ end trace 31fd0ba7d8756001 ]---
Brought up 2 CPUs
devtmpfs: initialized
NET: Registered protocol family 16
------------[ cut here ]------------
WARNING: at kernel/rcutree.c:2135
Modules linked in:
NIP: c0099478 LR: c00630c8 CTR: 00000000
REGS: c7061e20 TRAP: 0700 Tainted: G W (3.7.8)
MSR: 00021000 <CE,ME> CR: 20000022 XER: 20000000
TASK = c705c000[18] 'kworker/u:0' THREAD: c7060000 CPU: 1
GPR00: 00000001 c7061ed0 c705c000 c7047d64 c0063490 c06bf700 00000000 00000000
GPR08: ffffffff c06ec665 00000000 ffffffff 00000003 00000000 c005184c c7046b80
GPR16: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
GPR24: 00000000 00000000 00000000 00000000 c7060000 00029000 c08538c8 c7047d64
NIP [c0099478] __call_rcu+0x18c/0x244
LR [c00630c8] __put_cred+0x5c/0x6c
Call Trace:
[c7061ef0] [c00630c8] __put_cred+0x5c/0x6c
[c7061f00] [c00632ac] commit_creds+0x160/0x1d8
[c7061f20] [c0051804] ____call_usermodehelper+0xf4/0x13c
[c7061f40] [c000e1f4] ret_from_kernel_thread+0x5c/0x64
Instruction dump:
88090008 68000001 0f000000 2f800000 419efeb0 38000001 98090008 4bfffea4
3d20c06f 3929c665 88090009 68000001 <0f000000> 2f800000 419eff70 38000001
---[ end trace 31fd0ba7d8756002 ]---
Found FSL PCI host bridge at 0x00000000e0008000. Firmware bus number: 0->255
PCI host bridge /pci@e0008000 (primary) ranges:
MEM 0x00000000c0000000..0x00000000dfffffff -> 0x00000000c0000000
IO 0x00000000e1000000..0x00000000e100ffff -> 0x0000000000000000
/pci@e0008000: PCICSRBAR @ 0xfff00000
PCI: Probing PCI hardware
PCI host bridge to bus 0000:00
pci_bus 0000:00: root bus resource [io 0x0000-0xffff]
pci_bus 0000:00: root bus resource [mem 0xc0000000-0xdfffffff]
pci_bus 0000:00: root bus resource [bus 00-ff]
Unable to handle kernel paging request for data at address 0x00000000
Faulting instruction address: 0xc009aa14
Oops: Kernel access of bad area, sig: 11 [#1]
SMP NR_CPUS=8 MPC8544 DS
Modules linked in:
NIP: c009aa14 LR: c0049320 CTR: c007f818
REGS: c709bc70 TRAP: 0300 Tainted: G W (3.7.8)
MSR: 00021000 <CE,ME> CR: 82004022 XER: 00000000
DEAR: 00000000, ESR: 00000000
TASK = c70c5400[41] 'kworker/u:0' THREAD: c709a000 CPU: 1
GPR00: 00000000 c709bd20 c70c5400 00000001 00000000 00000001 00000001 c06f87d8
GPR08: 00000000 fffffed8 fffedb19 00000000 00000001 00000000 c06bf7a8 c06bf7a4
GPR16: c05f4264 c05f4290 c05f0000 c05f4228 c05f4250 c05fb278 c06ec7d8 c06f2084
GPR24: c06f87d8 00000004 c06bf700 0019f000 c06f85d4 c06b48c8 c06bf700 c08538c8
NIP [c009aa14] rcu_check_callbacks+0x2c0/0x550
LR [c0049320] update_process_times+0x3c/0x60
Call Trace:
[c709bd80] [c0049320] update_process_times+0x3c/0x60
[c709bda0] [c007f750] tick_periodic+0x50/0x118
[c709bdb0] [c007f83c] tick_handle_periodic+0x24/0x128
[c709bde0] [c0009334] timer_interrupt+0x170/0x190
[c709be10] [c000e780] ret_from_except+0x0/0x18
--- Exception: 901 at module_put+0x0/0x6c
LR = do_exit+0x158/0x788
[c709bed0] [c003fd80] do_exit+0x5a8/0x788 (unreliable)
[c709bf20] [c0051840] ____call_usermodehelper+0x130/0x13c
[c709bf40] [c000e1f4] ret_from_kernel_thread+0x5c/0x64
Instruction dump:
48448b7d 4bffff14 801e00a8 7d3dd82e 7c004a78 7c000034 5400d97e 680b0001
396b0004 556b103a 7d7f5a14 816b0008 <800b0000> 2f800000 419e0014 817e00a8
---[ end trace 31fd0ba7d8756003 ]---
pci 0000:00:00.0: bridge configuration invalid ([bus 00-00]), reconfiguring
pci 0000:00:00.0: PCI bridge to [bus 01-ff]
pci 0000:00:00.0: bridge window [io 0x0000-0x0fff]
pci 0000:00:00.0: bridge window [mem 0x00000000-0x000fffff]
pci 0000:00:00.0: bridge window [mem 0x00000000-0x000fffff pref]
pci_bus 0000:01: busn_res: [bus 01-ff] end is updated to 01
pci_bus 0000:00: busn_res: [bus 00-ff] end is updated to 01
Kernel panic - not syncing: Fatal exception in interrupt
Seems the second CPU is not booting anymore.. If I boot with only one
core I don't have any issue.
Did I miss something?
NOTE: You might need this commit to fix an other bug at this time:
181815cd4f2502095660f59811ce22e55019dc2e:
input: add sanity check
Check we've actually found a input handler before trying to call it.
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Thanks,
Fred
[-- Attachment #2: Type: text/html, Size: 9981 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [Qemu-devel] Bug with smp ppc guest.
2014-04-03 15:19 [Qemu-devel] Bug with smp ppc guest Frederic Konrad
@ 2014-04-03 15:29 ` Andreas Färber
2014-04-03 17:00 ` Frederic Konrad
0 siblings, 1 reply; 5+ messages in thread
From: Andreas Färber @ 2014-04-03 15:29 UTC (permalink / raw)
To: Frederic Konrad
Cc: Alexey Kardashevskiy, qemu-devel, qemu-ppc, Alexander Graf, gkurz
Hi Fred,
Am 03.04.2014 17:19, schrieb Frederic Konrad:
> I tried to boot a mpc85xx smp image with a new platform inside qemu.
>
> This command line reproduce the issue:
> ./ppc-softmmu/qemu-system-ppc -M mpc8544ds -kernel zImage --smp 2
>
> This use to work but since this commit:
> d197fdbc3b83655f3c145722805f0998c04dce16
>
>
> target-ppc: Reset SPRs on CPU reset
>
>
>
> This resets SPR values to defaults on CPU reset. This should help
>
> with little-endian guests reboot issues.
>
> I get some errors inside the guest:
Is this after today's fix?
http://git.qemu-project.org/?p=qemu.git;a=commit;h=87d8354de3560eb705bcee83142d775f703177a6
Regards,
Andreas
--
SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany
GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer; HRB 16746 AG Nürnberg
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [Qemu-devel] Bug with smp ppc guest.
2014-04-03 15:29 ` Andreas Färber
@ 2014-04-03 17:00 ` Frederic Konrad
2014-04-03 18:26 ` Alexander Graf
0 siblings, 1 reply; 5+ messages in thread
From: Frederic Konrad @ 2014-04-03 17:00 UTC (permalink / raw)
To: Andreas Färber
Cc: Alexey Kardashevskiy, qemu-devel, qemu-ppc, Alexander Graf, gkurz
On 03/04/2014 17:29, Andreas Färber wrote:
> Hi Fred,
>
> Am 03.04.2014 17:19, schrieb Frederic Konrad:
>> I tried to boot a mpc85xx smp image with a new platform inside qemu.
>>
>> This command line reproduce the issue:
>> ./ppc-softmmu/qemu-system-ppc -M mpc8544ds -kernel zImage --smp 2
>>
>> This use to work but since this commit:
>> d197fdbc3b83655f3c145722805f0998c04dce16
>>
>>
>> target-ppc: Reset SPRs on CPU reset
>>
>>
>>
>> This resets SPR values to defaults on CPU reset. This should help
>>
>> with little-endian guests reboot issues.
>>
>> I get some errors inside the guest:
> Is this after today's fix?
>
> http://git.qemu-project.org/?p=qemu.git;a=commit;h=87d8354de3560eb705bcee83142d775f703177a6
>
> Regards,
> Andreas
>
Hi Andreas,
I just tried seems it doesn't make any difference for me ;).
Thanks,
Fred
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [Qemu-devel] Bug with smp ppc guest.
2014-04-03 17:00 ` Frederic Konrad
@ 2014-04-03 18:26 ` Alexander Graf
2014-04-03 18:39 ` Andreas Färber
0 siblings, 1 reply; 5+ messages in thread
From: Alexander Graf @ 2014-04-03 18:26 UTC (permalink / raw)
To: Frederic Konrad
Cc: Alexey Kardashevskiy, qemu-devel, qemu-ppc, Andreas Färber,
gkurz
On 03.04.2014, at 19:00, Frederic Konrad <fred.konrad@greensocs.com> wrote:
> On 03/04/2014 17:29, Andreas Färber wrote:
>> Hi Fred,
>>
>> Am 03.04.2014 17:19, schrieb Frederic Konrad:
>>> I tried to boot a mpc85xx smp image with a new platform inside qemu.
>>>
>>> This command line reproduce the issue:
>>> ./ppc-softmmu/qemu-system-ppc -M mpc8544ds -kernel zImage --smp 2
>>>
>>> This use to work but since this commit:
>>> d197fdbc3b83655f3c145722805f0998c04dce16
>>>
>>>
>>> target-ppc: Reset SPRs on CPU reset
>>>
>>>
>>> This resets SPR values to defaults on CPU reset. This should help
>>>
>>> with little-endian guests reboot issues.
>>>
>>> I get some errors inside the guest:
>> Is this after today's fix?
>>
>> http://git.qemu-project.org/?p=qemu.git;a=commit;h=87d8354de3560eb705bcee83142d775f703177a6
>>
>> Regards,
>> Andreas
>>
> Hi Andreas,
>
> I just tried seems it doesn't make any difference for me ;).
That patch should only have an effect when you're running with KVM which you probably don't :).
I can see the same breakage here, but only when my guest kernel is e500v2. With an e500mc kernel (even for -M mpc8544ds) it works fine. The secondary core also does get woken up. So it's probably something related to SPE emulation - hrm.
Alex
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [Qemu-devel] Bug with smp ppc guest.
2014-04-03 18:26 ` Alexander Graf
@ 2014-04-03 18:39 ` Andreas Färber
0 siblings, 0 replies; 5+ messages in thread
From: Andreas Färber @ 2014-04-03 18:39 UTC (permalink / raw)
To: Alexander Graf, Frederic Konrad
Cc: Alexey Kardashevskiy, qemu-ppc, qemu-devel, gkurz
Am 03.04.2014 20:26, schrieb Alexander Graf:
>
> On 03.04.2014, at 19:00, Frederic Konrad <fred.konrad@greensocs.com> wrote:
>
>> On 03/04/2014 17:29, Andreas Färber wrote:
>>> Hi Fred,
>>>
>>> Am 03.04.2014 17:19, schrieb Frederic Konrad:
>>>> I tried to boot a mpc85xx smp image with a new platform inside qemu.
>>>>
>>>> This command line reproduce the issue:
>>>> ./ppc-softmmu/qemu-system-ppc -M mpc8544ds -kernel zImage --smp 2
>>>>
>>>> This use to work but since this commit:
>>>> d197fdbc3b83655f3c145722805f0998c04dce16
>>>>
>>>>
>>>> target-ppc: Reset SPRs on CPU reset
>>>>
>>>>
>>>> This resets SPR values to defaults on CPU reset. This should help
>>>>
>>>> with little-endian guests reboot issues.
>>>>
>>>> I get some errors inside the guest:
>>> Is this after today's fix?
>>>
>>> http://git.qemu-project.org/?p=qemu.git;a=commit;h=87d8354de3560eb705bcee83142d775f703177a6
>>>
>>> Regards,
>>> Andreas
>>>
>> Hi Andreas,
>>
>> I just tried seems it doesn't make any difference for me ;).
>
> That patch should only have an effect when you're running with KVM which you probably don't :).
>
> I can see the same breakage here, but only when my guest kernel is e500v2. With an e500mc kernel (even for -M mpc8544ds) it works fine. The secondary core also does get woken up. So it's probably something related to SPE emulation - hrm.
I think I found it:
hw/ppc/e500.c:
env->spr[SPR_BOOKE_PIR] = cs->cpu_index = i;
With this patch this gets overwritten to spr->default_value, so the CPUs
end up having the same value on reset.
http://git.qemu-project.org/?p=qemu.git;a=blobdiff;f=target-ppc/translate_init.c;h=954dee3ec27b6a00559c878b8248ec6a07f35d79;hp=6084f40f28a62903e59db40771f33dd3e2c2996d;hb=d197fdbc3b83655f3c145722805f0998c04dce16;hpb=7aaf4957efad2bf6ac449d0caa9a1535f61006bc
Regards,
Andreas
--
SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany
GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer; HRB 16746 AG Nürnberg
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2014-04-03 18:40 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-04-03 15:19 [Qemu-devel] Bug with smp ppc guest Frederic Konrad
2014-04-03 15:29 ` Andreas Färber
2014-04-03 17:00 ` Frederic Konrad
2014-04-03 18:26 ` Alexander Graf
2014-04-03 18:39 ` Andreas Färber
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).