Re: [kvm-devel] Panic when loading kvm-amd.ko
Hello On Sun, Jun 17, 2007 at 05:27:25PM +0200, Michael Hanselmann wrote: I reproduced it with vanilla-2.6.21.5, vanilla-2.6.22-rc5 and current KVM git. Architecture is x86_64. GCC version is gcc (GCC) 3.4.6 (Gentoo Hardened 3.4.6-r2, ssp-3.4.6-1.0, pie-8.7.10). I've got a similiar backtrace, but well without any PANIC. I can reproduce it on vanilla-2.6.21.1 and .5 (I didn't check the versions between). But it worked once with a 2.6.20.1 and even with 2.6.19. My machine is a HP Compaq dc5750 with a AMD Athlon(tm) 64 X2 Dual Core Processor 4600+ CPU in it. It's fully svm capable and like I already mentioned, worked on earlier versions of the Kernel. Der Kernel is x86_64 and my gcc is: gcc (GCC) 4.1.2 (Gentoo 4.1.2). I also tried version 4.1.1 of gcc. My backtrace in 2.6.21.1: [ 141.850341] general protection fault: [1] PREEMPT SMP [ 141.850622] CPU 0 [ 141.850768] Modules linked in: kvm_amd kvm [ 141.851006] Pid: 6475, comm: modprobe Not tainted 2.6.21.1 #1 [ 141.851195] RIP: 0010:[8801013a] [8801013a] :kvm_amd:svm_hardware_enable+0x91/0xc6 [ 141.851477] RSP: :8100a324fdf8 EFLAGS: 00010006 [ 141.851657] RAX: 1d01 RBX: 0040 RCX: c080 [ 141.851869] RDX: RSI: RDI: 88011278 [ 141.852082] RBP: 81009fea61c0 R08: 8100bd4b2e13 R09: 0009cb65 [ 141.852292] R10: R11: 0001 R12: 880100a9 [ 141.852504] R13: 8100b5bb9438 R14: c205fc70 R15: c205d000 [ 141.852717] FS: 2afeeaaf2ae0() GS:806e8000() knlGS: [ 141.852944] CS: 0010 DS: ES: CR0: 8005003b [ 141.853132] CR2: 2afeea6ba000 CR3: b49a9000 CR4: 06e0 [ 141.853344] Process modprobe (pid: 6475, threadinfo 8100a324e000, task 8100b6b078a0) [ 141.853577] Stack: 806fa080 880100a9 [ 141.853933] 80238f9d 88012980 [ 141.854252] 88012980 88002537 8100b5bb9000 88012980 [ 141.854486] Call Trace: [ 141.854709] [880100a9] :kvm_amd:svm_hardware_enable+0x0/0xc6 [ 141.854915] [80238f9d] on_each_cpu+0x27/0x56 [ 141.855101] [88002537] :kvm:kvm_init_arch+0x87/0x159 [ 141.855294] [80250681] sys_init_module+0x1513/0x1673 [ 141.855488] [802096de] system_call+0x7e/0x83 [ 141.855667] [ 141.855782] [ 141.855782] Code: 0f 30 48 8b 7d 20 e8 08 ca 24 f8 48 8b 7d 20 48 89 c3 c1 e3 [ 141.856681] RIP [8801013a] :kvm_amd:svm_hardware_enable+0x91/0xc6 [ 141.856922] RSP 8100a324fdf8 [ 141.857075] note: modprobe[6475] exited with preempt_count 1 [ 141.857283] BUG: scheduling while atomic: modprobe/0x1001/6475 [ 141.857478] [ 141.857478] Call Trace: [ 141.857729] [8053bb90] __sched_text_start+0x60/0x7f2 [ 141.857922] [8022ba3f] __wake_up_common+0x3e/0x68 [ 141.858111] [8022c02d] __wake_up+0x38/0x4f [ 141.858289] [8022f061] __cond_resched+0x1c/0x44 [ 141.858474] [8053cb99] cond_resched+0x2e/0x39 [ 141.858658] [802656af] unmap_vmas+0x5e9/0x774 [ 141.858842] [802691ac] exit_mmap+0x85/0x121 [ 141.859022] [80231cdd] mmput+0x2c/0x9e [ 141.859197] [802371e0] do_exit+0x20d/0x818 [ 141.859377] [8020b0af] kernel_math_error+0x0/0x90 [ 141.859381] [8020bec1] do_general_protection+0xfe/0x107 [ 141.859387] [880100a9] :kvm_amd:svm_hardware_enable+0x0/0xc6 [ 141.859391] [8053e5ed] error_exit+0x0/0x84 [ 141.859395] [880100a9] :kvm_amd:svm_hardware_enable+0x0/0xc6 [ 141.859400] [8801013a] :kvm_amd:svm_hardware_enable+0x91/0xc6 [ 141.859405] [880100bc] :kvm_amd:svm_hardware_enable+0x13/0xc6 [ 141.859409] [880100a9] :kvm_amd:svm_hardware_enable+0x0/0xc6 [ 141.859412] [80238f9d] on_each_cpu+0x27/0x56 [ 141.859418] [88002537] :kvm:kvm_init_arch+0x87/0x159 [ 141.859422] [80250681] sys_init_module+0x1513/0x1673 [ 141.859426] [802096de] system_call+0x7e/0x83 [ 141.859428] [ 141.859502] BUG: scheduling while atomic: modprobe/0x0001/6475 [ 141.859504] [ 141.859504] Call Trace: [ 141.859507] [8053bb90] __sched_text_start+0x60/0x7f2 [ 141.859511] [8020ac39] dump_trace+0x25a/0x28d [ 141.859515] [8053de5f] __down+0xe8/0x100 [ 141.859518] [8022e88a] default_wake_function+0x0/0xe [ 141.859522] [8053dad3] __down_failed+0x35/0x3a [ 141.859525] [8053e502] lock_kernel+0x25/0x29 [ 141.859532] [8028bd98] __posix_lock_file_conf+0x65/0x3c1 [ 141.859536] [8028cc68] locks_remove_posix+0x9d/0xc0 [ 141.859540] [80280241] generic_shutdown_super+0xa0/0xf4 [ 141.859544] [8027cfe4] filp_close+0x55/0x65 [ 141.859547]
Re: [kvm-devel] Panic when loading kvm-amd.ko
René Nussbaumer wrote: Hello On Sun, Jun 17, 2007 at 05:27:25PM +0200, Michael Hanselmann wrote: I reproduced it with vanilla-2.6.21.5, vanilla-2.6.22-rc5 and current KVM git. Architecture is x86_64. GCC version is gcc (GCC) 3.4.6 (Gentoo Hardened 3.4.6-r2, ssp-3.4.6-1.0, pie-8.7.10). I've got a similiar backtrace, but well without any PANIC. I can reproduce it on vanilla-2.6.21.1 and .5 (I didn't check the versions between). But it worked once with a 2.6.20.1 and even with 2.6.19. My machine is a HP Compaq dc5750 with a AMD Athlon(tm) 64 X2 Dual Core Processor 4600+ CPU in it. It's fully svm capable and like I already mentioned, worked on earlier versions of the Kernel. Der Kernel is x86_64 and my gcc is: gcc (GCC) 4.1.2 (Gentoo 4.1.2). I also tried version 4.1.1 of gcc. Strange. Can you try it with the 'nosmp' kernel parameter? Maybe the machine is initialized assymetrically by the bios somehow. -- error compiling committee.c: too many arguments to function - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ kvm-devel mailing list kvm-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/kvm-devel
Re: [kvm-devel] Panic when loading kvm-amd.ko
Michael, can you send a dump of /proc/cpuinfo? I am interested in the processor version and revision you use. Thanks, Joerg On Sun, Jun 17, 2007 at 09:31:15PM +0300, Avi Kivity wrote: Michael Hanselmann wrote: I suggest trying the same, as well as a bios upgrade. Unfortunately, the BIOS doesn't allow me to configure anything like that and it's already the latest version released by HP. However, EFER.SVME isn't set before enabling it (checked using rdmsrl(MSR_EFER, efer); printk(KERN_CRIT DBG %d\n, efer MSR_EFER_SVME_MASK);). Since I'm completly out of ideas, is there anything more I could do? Maybe the AMD folk have a clue? -- Do not meddle in the internals of kernels, for they are subtle and quick to panic. - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ kvm-devel mailing list kvm-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/kvm-devel -- | AMD Saxony Limited Liability Company Co. KG Operating | Wilschdorfer Landstr. 101, 01109 Dresden, Germany System| Register Court Dresden: HRA 4896 Research | General Partner authorized to represent: Center| AMD Saxony LLC (Wilmington, Delaware, US) | General Manager of AMD Saxony LLC: Dr. Hans-R. Deppe, Thomas McCoy - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ kvm-devel mailing list kvm-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/kvm-devel
Re: [kvm-devel] Panic when loading kvm-amd.ko
Hi Joerg On Mon, Jun 18, 2007 at 12:55:43PM +0200, Joerg Roedel wrote: can you send a dump of /proc/cpuinfo? I am interested in the processor version and revision you use. Here it is: processor : 0 vendor_id : AuthenticAMD cpu family : 15 model : 65 model name : Dual-Core AMD Opteron(tm) Processor 2216 HE stepping: 2 cpu MHz : 2400.000 cache size : 1024 KB physical id : 0 siblings: 2 core id : 0 cpu cores : 2 fpu : yes fpu_exception : yes cpuid level : 1 wp : yes flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ht syscall nx mmxext fxsr_opt rdtscp lm 3dnowext 3dnow pni cx16 lahf_lm cmp_legacy svm extapic cr8_legacy bogomips: 4791.20 TLB size: 1024 4K pages clflush size: 64 cache_alignment : 64 address sizes : 40 bits physical, 48 bits virtual power management: ts fid vid ttp tm stc processor : 1 vendor_id : AuthenticAMD cpu family : 15 model : 65 model name : Dual-Core AMD Opteron(tm) Processor 2216 HE stepping: 2 cpu MHz : 2400.000 cache size : 1024 KB physical id : 0 siblings: 2 core id : 1 cpu cores : 2 fpu : yes fpu_exception : yes cpuid level : 1 wp : yes flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ht syscall nx mmxext fxsr_opt rdtscp lm 3dnowext 3dnow pni cx16 lahf_lm cmp_legacy svm extapic cr8_legacy bogomips: 4788.07 TLB size: 1024 4K pages clflush size: 64 cache_alignment : 64 address sizes : 40 bits physical, 48 bits virtual power management: ts fid vid ttp tm stc Thanks, Michael - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ kvm-devel mailing list kvm-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/kvm-devel
Re: [kvm-devel] Panic when loading kvm-amd.ko
On Sun, Jun 17, 2007 at 09:31:15PM +0300, Avi Kivity wrote: Michael Hanselmann wrote: I suggest trying the same, as well as a bios upgrade. Unfortunately, the BIOS doesn't allow me to configure anything like that and it's already the latest version released by HP. However, EFER.SVME isn't set before enabling it (checked using rdmsrl(MSR_EFER, efer); printk(KERN_CRIT DBG %d\n, efer MSR_EFER_SVME_MASK);). Since I'm completly out of ideas, is there anything more I could do? Maybe the AMD folk have a clue? I proofed that the GPF results from EFER.SVME being set to 1. This is a strong indicator that SVM is disabled by the BIOS. With the help of Michael I try to proof that tomorrow too. The has_svm code will need an update to handle those situations. I will submit a patch. Regards, Joerg -- | AMD Saxony Limited Liability Company Co. KG Operating | Wilschdorfer Landstr. 101, 01109 Dresden, Germany System| Register Court Dresden: HRA 4896 Research | General Partner authorized to represent: Center| AMD Saxony LLC (Wilmington, Delaware, US) | General Manager of AMD Saxony LLC: Dr. Hans-R. Deppe, Thomas McCoy - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ kvm-devel mailing list kvm-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/kvm-devel
Re: [kvm-devel] Panic when loading kvm-amd.ko
Michael Hanselmann wrote: Hello When loading kvm-amd.ko on an HP DL-145 G5 with one AMD Opteron 2216 HE (2 cores, 2.4 GHz), I get a kernel panic. I tried to find the exact cause but was unable to do so. It doesn't crash when I add a return before wrmsrl(MSR_EFER, efer | MSR_EFER_SVME_MASK); in svm_hardware_enable. The backtrace always originates from different functions, but ends up in interrupt handling every time. This isn't a regression because it has been happening since at least 2.6.20.something, but I never bothered to look into it. If you need any more info, please let me know. I reproduced it with vanilla-2.6.21.5, vanilla-2.6.22-rc5 and current KVM git. Architecture is x86_64. GCC version is gcc (GCC) 3.4.6 (Gentoo Hardened 3.4.6-r2, ssp-3.4.6-1.0, pie-8.7.10). This looks remarkably similar to http://thread.gmane.org/gmane.comp.emulators.kvm.devel/3399. The conclusion was I went through my BIOS settings and found: Advanced BIOS Features - CPU Feature - Virtualization However this was already set to Enabled. I tried changing the value to Disabled and now KVM works fine. Stupid ABIT... I suggest trying the same, as well as a bios upgrade. -- error compiling committee.c: too many arguments to function - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ kvm-devel mailing list kvm-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/kvm-devel
Re: [kvm-devel] Panic when loading kvm-amd.ko
On Sun, Jun 17, 2007 at 06:37:19PM +0300, Avi Kivity wrote: I went through my BIOS settings and found: Advanced BIOS Features - CPU Feature - Virtualization However this was already set to Enabled. I tried changing the value to Disabled and now KVM works fine. Stupid ABIT... I suggest trying the same, as well as a bios upgrade. Unfortunately, the BIOS doesn't allow me to configure anything like that and it's already the latest version released by HP. However, EFER.SVME isn't set before enabling it (checked using rdmsrl(MSR_EFER, efer); printk(KERN_CRIT DBG %d\n, efer MSR_EFER_SVME_MASK);). Since I'm completly out of ideas, is there anything more I could do? - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ kvm-devel mailing list kvm-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/kvm-devel
Re: [kvm-devel] Panic when loading kvm-amd.ko
Michael Hanselmann wrote: I suggest trying the same, as well as a bios upgrade. Unfortunately, the BIOS doesn't allow me to configure anything like that and it's already the latest version released by HP. However, EFER.SVME isn't set before enabling it (checked using rdmsrl(MSR_EFER, efer); printk(KERN_CRIT DBG %d\n, efer MSR_EFER_SVME_MASK);). Since I'm completly out of ideas, is there anything more I could do? Maybe the AMD folk have a clue? -- Do not meddle in the internals of kernels, for they are subtle and quick to panic. - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ kvm-devel mailing list kvm-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/kvm-devel