Wind River Support Network

HomeDefectsOVP-379
Fixed

OVP-379 : kvm-guest: offline cpu print call trace

Created: May 22, 2013    Updated: Mar 11, 2016
Resolved Date: Dec 23, 2013
Found In Version: 5.0.1
Fix Version: 5.0.1
Severity: Severe
Applicable for: Wind River Linux 5
Component/s: Kernel

Description

root@localhost:~# echo 0 > /sys/devices/system/cpu/cpu1/online
Unregister pv shared memory for cpu 1
BUG: sleeping function called from invalid context at /buildarea1/lyang0/guest-new/bitbake_build/tmp/work/x86_64_kvm_guest-wrs-linux/linux-windriver-3.4-r1/linux/kernel/rtmutex.c:659
in_atomic(): 1, irqs_disabled(): 1, pid: 0, name: swapper/1
Preemption disabled at:[<ffffffff816180d6>] start_secondary+0x1b1/0x1b6

Pid: 0, comm: swapper/1 Not tainted 3.4.34-ovp1-rt40-WR5.0.1.0_preempt-rt #2
Call Trace:
 <IRQ>  [<ffffffff81068f27>] __might_sleep+0x107/0x170
 [<ffffffff81627134>] rt_spin_lock+0x24/0x50
 [<ffffffff81026096>] apf_task_wake_all+0x46/0xb0
 [<ffffffff810262d9>] kvm_guest_cpu_offline+0x59/0x60
 [<ffffffff8108ef56>] generic_smp_call_function_single_interrupt+0xe6/0x140
 [<ffffffff8101c647>] smp_call_function_single_interrupt+0x27/0x40
 [<ffffffff8162ffaa>] call_function_single_interrupt+0x6a/0x70
 <EOI>  [<ffffffff8102672b>] ? native_safe_halt+0xb/0x10
 [<ffffffff8100a6a3>] default_idle+0x63/0x2e0
 [<ffffffff8100b5cf>] cpu_idle+0x8f/0xe0
 [<ffffffff816180d6>] start_secondary+0x1b1/0x1b6
------------[ cut here ]------------
WARNING: at /buildarea1/lyang0/guest-new/bitbake_build/tmp/work/x86_64_kvm_guest-wrs-linux/linux-windriver-3.4-r1/linux/kernel/irq_work.c:98 irq_work_needs_cpu+0x67/0x80()
Hardware name: Bochs
Modules linked in: parport parport_pc floppy exportfs nfsd
Pid: 0, comm: swapper/1 Not tainted 3.4.34-ovp1-rt40-WR5.0.1.0_preempt-rt #2
Call Trace:
 [<ffffffff81035dcf>] warn_slowpath_common+0x7f/0xc0
 [<ffffffff81035e2a>] warn_slowpath_null+0x1a/0x20
 [<ffffffff810e3077>] irq_work_needs_cpu+0x67/0x80
 [<ffffffff810881f5>] __tick_nohz_idle_enter+0x2e5/0x4d0
 [<ffffffff8108844e>] tick_nohz_idle_enter+0x4e/0x80
 [<ffffffff8100b573>] cpu_idle+0x33/0xe0
 [<ffffffff816180d6>] start_secondary+0x1b1/0x1b6
---[ end trace 0000000000000002 ]---
CPU 1 is now offline

Steps to Reproduce

but guest with: 
/usr/bin/qemu-system-x86_64 -enable-kvm -smp 8 -m 5000 -net none -drive file=/boot/guest_raw.test,if=virtio  -kernel /boot/guest.kernel -append "root=/dev/vda rw console=ttyS0,115200 "  -nographic

#echo 0 > /sys/devices/system/cpu/cpu1/online
Live chat
Online