Bug 921724

Summary: backtrace in dmesg from amd_pmu_init, with kvm -cpu host on AMD
Product: [Fedora] Fedora Reporter: Cole Robinson <crobinso>
Component: kernelAssignee: Kernel Maintainer List <kernel-maint>
Status: CLOSED CURRENTRELEASE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: rawhideCC: collura, dan.mashal, gansalmon, gleb, itamar, japitts0889, johnduchek, jonathan, kernel-maint, knoel, madhu.chinakonda, mtosatti, pbonzini, sysoutfran, tmaki, tobias.pal
Target Milestone: ---Keywords: Triaged
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
: 1183759 (view as bug list) Environment:
Last Closed: 2013-09-16 12:53:13 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
Guest dmesg
none
Guest /proc/cpuinfo
none
Host /proc/cpuinfo none

Description Cole Robinson 2013-03-14 18:53:06 UTC
I get this (seemingly harmless) backtrace in a VM's dmesg on my AMD machine:

    0.031000] Performance Events: 
[    0.031000] ------------[ cut here ]------------
[    0.031000] WARNING: at arch/x86/kernel/cpu/perf_event_amd.c:772 amd_pmu_init+0x18c/0x249()
[    0.031000] Hardware name: Bochs
[    0.031000] Odd, counter constraints enabled but no core perfctrs detected!
[    0.031000] Modules linked in:

[    0.031000] Pid: 1, comm: swapper/0 Not tainted 3.9.0-0.rc1.git0.4.fc19.x86_64 #1
[    0.031000] Call Trace:
[    0.031000]  [<ffffffff81d10c67>] ? amd_pmu_init+0x18c/0x249
[    0.031000]  [<ffffffff8105c9a0>] warn_slowpath_common+0x70/0xa0
[    0.031000]  [<ffffffff81d106b3>] ? check_bugs+0x2d/0x2d
[    0.031000]  [<ffffffff8105ca1c>] warn_slowpath_fmt+0x4c/0x50
[    0.031000]  [<ffffffff81d10c67>] amd_pmu_init+0x18c/0x249
[    0.031000]  [<ffffffff81d106e7>] init_hw_perf_events+0x34/0x428
[    0.031000]  [<ffffffff81d106b3>] ? check_bugs+0x2d/0x2d
[    0.031000]  [<ffffffff8100210a>] do_one_initcall+0x10a/0x160
[    0.031000]  [<ffffffff81d06fa5>] kernel_init_freeable+0xcf/0x1fa
[    0.031000]  [<ffffffff81629800>] ? rest_init+0x80/0x80
[    0.031000]  [<ffffffff8162980e>] kernel_init+0xe/0x190
[    0.031000]  [<ffffffff8164e22c>] ret_from_fork+0x7c/0xb0
[    0.031000]  [<ffffffff81629800>] ? rest_init+0x80/0x80
[    0.031000] ---[ end trace a1e57d3cb8668105 ]---

Seen it on 3.6 and up, that trace is from 3.9.0-0.rc1.git0.4.fc19.x86_64 .

qemu-kvm -cpu host and -cpu Opteron_G4 reproduce it on my AMD machine. -cpu Opteron_G4 does not reproduce it on an intel machine. F18 and rawhide qemu packages affected.


Guest uname -a:
Linux localhost.localdomain 3.9.0-0.rc1.git0.4.fc19.x86_64 #1 SMP Thu Mar 7 01:22:13 UTC 2013 x86_64 x86_64 x86_64 GNU/Linux

Hose uname -a:
Linux colepc 3.8.1-201.fc18.x86_64 #1 SMP Thu Feb 28 19:23:08 UTC 2013 x86_64 x86_64 x86_64 GNU/Linux

Reproducing qemu command:
sudo qemu-kvm -cpu host -drive file=/mnt/data/devel/images/frawhide.qcow2,if=none,id=drive-virtio-disk0,format=qcow2 -device virtio-blk-pci,drive=drive-virtio-disk0

Comment 1 Cole Robinson 2013-03-14 18:53:40 UTC
Created attachment 710159 [details]
Guest dmesg

Comment 2 Cole Robinson 2013-03-14 18:54:01 UTC
Created attachment 710160 [details]
Guest /proc/cpuinfo

Comment 3 Cole Robinson 2013-03-14 18:54:25 UTC
Created attachment 710161 [details]
Host /proc/cpuinfo

Comment 4 Cole Robinson 2013-03-14 18:55:31 UTC
Gleb, any insight? (since this is KVM + PMU related)

Comment 5 Gleb Natapov 2013-03-15 10:38:11 UTC
The warning should be removed from the kernel. The kernel does not expect to find AMD familiy 15h processor without PMU support, but that it exactly what we have in KVM. May be not remove completely, but make it printk instead of WARN.

Comment 6 Gleb Natapov 2013-04-11 13:13:49 UTC
*** Bug 929427 has been marked as a duplicate of this bug. ***

Comment 7 Josh Boyer 2013-05-16 15:11:59 UTC
I emailed upstream with Gleb's suggestion.  We'll see what they say.

http://thread.gmane.org/gmane.linux.kernel/1492071

Comment 8 John Duchek 2013-05-31 14:29:49 UTC
Description of problem:
Intalled xfce version of fedora 18 64bit in a virtualbox under windows.  I am now getting this error on boot up

Version-Release number of selected component:
kernel

Additional info:
reporter:       libreport-2.1.4
cmdline:        BOOT_IMAGE=/boot/vmlinuz-3.9.4-200.fc18.x86_64 root=/dev/mapper/fedora-root ro rd.lvm.lv=fedora/swap rd.md=0 rd.dm=0 rd.luks=0 vconsole.keymap=us rd.lvm.lv=fedora/root rhgb quiet LANG=en_US.UTF-8
kernel:         3.9.4-200.fc18.x86_64
runlevel:       unknown
type:           Kerneloops

Truncated backtrace:
WARNING: at arch/x86/kernel/cpu/perf_event_amd.c:772 amd_pmu_init+0x18c/0x24b()
Hardware name: VirtualBox
Odd, counter constraints enabled but no core perfctrs detected!
Modules linked in:
Pid: 1, comm: swapper/0 Not tainted 3.9.4-200.fc18.x86_64 #1
Call Trace:
 [<ffffffff8105f125>] warn_slowpath_common+0x75/0xa0
 [<ffffffff81d0d5b8>] ? check_bugs+0x2d/0x2d
 [<ffffffff8105f206>] warn_slowpath_fmt+0x46/0x50
 [<ffffffff81d0db84>] amd_pmu_init+0x18c/0x24b
 [<ffffffff81d0d5f7>] init_hw_perf_events+0x3f/0x440
 [<ffffffff81d0d5b8>] ? check_bugs+0x2d/0x2d
 [<ffffffff8100215a>] do_one_initcall+0x12a/0x180
 [<ffffffff81d03f90>] kernel_init_freeable+0xad/0x1df
 [<ffffffff81646300>] ? rest_init+0x80/0x80
 [<ffffffff8164630e>] kernel_init+0xe/0xf0
 [<ffffffff81669eac>] ret_from_fork+0x7c/0xb0
 [<ffffffff81646300>] ? rest_init+0x80/0x80

Comment 9 Josh Boyer 2013-06-11 14:20:02 UTC
*** Bug 972538 has been marked as a duplicate of this bug. ***

Comment 10 Josh Boyer 2013-06-11 14:23:51 UTC
This should be fixed in linux-next (and 3.11).

https://git.kernel.org/cgit/linux/kernel/git/tip/tip.git/commit/?h=perf/x86&id=1b45adcd9a503428e6de6b39bc6892d86c9c1d41

We'll look at backporting later.

Comment 11 Dan Mashal 2013-06-11 15:12:13 UTC
Thanks

Comment 12 japitts0889 2013-06-20 23:18:36 UTC
Description of problem:
Problem happened at initial reboot after install. 

This is also running on as a VM using virtualbox.

Version-Release number of selected component:
kernel

Additional info:
reporter:       libreport-2.1.4
cmdline:        BOOT_IMAGE=/vmlinuz-3.9.2-301.fc19.i686 root=/dev/mapper/fedora-root ro rd.lvm.lv=fedora/swap rd.md=0 rd.dm=0 vconsole.keymap=us rd.luks=0 vconsole.font=latarcyrheb-sun16 rd.lvm.lv=fedora/root rhgb quiet
kernel:         3.9.2-301.fc19.i686
runlevel:       unknown
type:           Kerneloops

Truncated backtrace:
WARNING: at arch/x86/kernel/cpu/perf_event_amd.c:772 amd_pmu_init+0x180/0x231()
Hardware name: VirtualBox
Odd, counter constraints enabled but no core perfctrs detected!
Modules linked in:
Pid: 1, comm: swapper/0 Not tainted 3.9.2-301.fc19.i686 #1
Call Trace:
 [<c043e603>] warn_slowpath_common+0x63/0x80
 [<c0c3c328>] ? amd_pmu_init+0x180/0x231
 [<c0c3c328>] ? amd_pmu_init+0x180/0x231
 [<c0c3bd89>] ? check_bugs+0xc8/0xc8
 [<c043e653>] warn_slowpath_fmt+0x33/0x40
 [<c0c3c328>] amd_pmu_init+0x180/0x231
 [<c0c3bd89>] ? check_bugs+0xc8/0xc8
 [<c0c3bdb4>] init_hw_perf_events+0x2b/0x41f
 [<c0c37ad8>] ? set_real_mode_permissions+0x5d/0x65
 [<c0c3bd89>] ? check_bugs+0xc8/0xc8
 [<c04011fa>] do_one_initcall+0x10a/0x150
 [<c0c417d9>] ? native_smp_prepare_cpus+0x2e1/0x2e6
 [<c0c35b1a>] kernel_init_freeable+0x9a/0x1c9
 [<c095ed90>] kernel_init+0x10/0x140
 [<c097d7f7>] ret_from_kernel_thread+0x1b/0x28
 [<c095ed80>] ? rest_init+0x60/0x60