RE: KVM warning about uncertified CPU for SMP for AMD model 2, stepping 3

2010-04-24 Thread Yuhong Bao

> The point was that everyone can have a multi-core system for cheap
> these days, no real motivation for anyone anymore to use old unsupported
> configurations to get one.
And BTW, another such old once common unsupported configuration that theLinux 
kernel never detected is the old dual Celerons. At first achieved byhacking 
slockets, later ABIT released the BP6 motherboard with dualSocket 370 
specifically wired to allow this config. They were once commonamong 
the enthusiast community, Ars Technica among other review siteshad old articles 
about it.
Yuhong Bao
_
The New Busy is not the too busy. Combine all your e-mail accounts with Hotmail.
http://www.windowslive.com/campaign/thenewbusy?tile=multiaccount&ocid=PID28326::T:WLMTAGL:ON:WL:en-US:WM_HMP:042010_4--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: KVM warning about uncertified CPU for SMP for AMD model 2, stepping 3

2010-03-31 Thread Jiri Kosina
On Wed, 31 Mar 2010, Andre Przywara wrote:

> > > BTW.: I encourage people to test their KVM guests with "-cpu host" (on
> > > newer
> > > QEMUs) and send me any crash logs.
> > 
> > I just quickly checked ...
> > 
> snip
> > [0.147235]  [] init_amd+0x249/0x279
> > [0.148011]  [] identify_cpu+0xc2/0x223
> > [0.149649]  [] identify_boot_cpu+0xa/0x22
> > [0.152010]  [] check_bugs+0x8/0xd2
> > [0.153573]  [] start_kernel+0x32e/0x3a9
> > 
> > But I admit that this isn't the most up-to-date version, so perhaps it's
> > already fixed ...
> No, that is something new. I dug out the kernel (SLES 11.1?) and booted with
> my script, it crashed on FMS 16/9/0, so I guess this machine was a
> Magny-Cours, right?

Yup, it's cpu family 10h.

> Anyway, many thanks for the report, I will investigate this.

Thanks,

-- 
Jiri Kosina
SUSE Labs, Novell Inc.
--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: KVM warning about uncertified CPU for SMP for AMD model 2, stepping 3

2010-03-31 Thread Andre Przywara

Jiri Kosina wrote:

On Wed, 31 Mar 2010, Andre Przywara wrote:


BTW.: I encourage people to test their KVM guests with "-cpu host" (on newer
QEMUs) and send me any crash logs.


I just quickly checked ...


snip

[0.147235]  [] init_amd+0x249/0x279
[0.148011]  [] identify_cpu+0xc2/0x223
[0.149649]  [] identify_boot_cpu+0xa/0x22
[0.152010]  [] check_bugs+0x8/0xd2
[0.153573]  [] start_kernel+0x32e/0x3a9

But I admit that this isn't the most up-to-date version, so perhaps it's 
already fixed ...
No, that is something new. I dug out the kernel (SLES 11.1?) and booted 
with my script, it crashed on FMS 16/9/0, so I guess this machine was a 
Magny-Cours, right?

Anyway, many thanks for the report, I will investigate this.

Regards,
Andre.

--
Andre Przywara
AMD-OSRC (Dresden)
Tel: x29712

--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: KVM warning about uncertified CPU for SMP for AMD model 2, stepping 3

2010-03-31 Thread Pavel Machek
On Wed 2010-03-31 14:51:35, Andi Kleen wrote:
> > >I guess these warnings could be just disabled. With nearly everyone
> > >using multi-core these days they are kind of obsolete anyways.
> > Well, the warning refers to an old single-core only CPU model. Most of 
> > those were able to run in SMP boards, but only a subset of them was 
> > officially certified to do so (Athlon-MP instead of Athlon-XP).
> 
> Thanks for pointing out the obvious.
> 
> > To avoid complaints about instability of such systems, the warning was 
> > introduced. If you consider these systems still supported, I wouldn't 
> > disable this warning, at least the check should be disabled only if the 
> > hypervisor CPUID bit is set.
> 
> The point was that everyone can have a multi-core system for cheap
> these days, no real motivation for anyone anymore to use old unsupported
> configurations to get one.

It still seems better to fix kvm to emulate smp-capable cpu...

-- 
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) 
http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: KVM warning about uncertified CPU for SMP for AMD model 2, stepping 3

2010-03-31 Thread Jiri Kosina
On Wed, 31 Mar 2010, Andre Przywara wrote:

> But the far better solution is to instruct QEMU/KVM to inject a better CPU
> model (as it was suggested by some people two weeks ago). I am about to test
> various guests with respect to their behavior regarding different
> family/model/stepping settings (one issue is already fixed). If this goes
> well, I will send out the patch to inject the host's CPUID F/M/S into the
> guest by default (which has other advantages, but denies migration mostly).
> 
> BTW.: I encourage people to test their KVM guests with "-cpu host" (on newer
> QEMUs) and send me any crash logs.

I just quickly checked ...

[0.048001] Pid: 0, comm: swapper Not tainted (2.6.32.9-0.5-pae #1) Bochs
[0.048001] EIP: 0060:[] EFLAGS: 00010246 CPU: 0
[0.048001] EIP is at init_amd+0x249/0x279
[0.048001] EAX:  EBX:  ECX: 00a21000 EDX: 
[0.048001] ESI: c077de80 EDI: c077de98 EBP: c07e1a14 ESP: c0749f8c
[0.048001]  DS: 007b ES: 007b FS: 00d8 GS:  SS: 0068
[0.048001] Process swapper (pid: 0, ti=c0748000 task=c074fca0 
task.ti=c0748000)
[0.048001] Stack:
[0.048001]  00e8   c07b9720 c077de80 c077debc c077de98 
c0527d74
[0.048001] <0> de816448 de816440   de840580 80d0 
c07b9720 00099d00
[0.048001] <0> c074c000 00bfc003 c078822d c07882c8 c028e762 c07b9720 
c0781a05 0062
[0.048001] Call Trace:
[0.048001]  [] identify_cpu+0xc2/0x223
[0.048001]  [] identify_boot_cpu+0xa/0x22
[0.048001]  [] check_bugs+0x8/0xd2
[0.048001]  [] start_kernel+0x32e/0x3a9
[0.048001] Code: 00 00 39 44 24 08 0f 96 c0 0f b6 d0 0f b7 86 b6 00 00 00 
8b 0c 9d 80 e4 77 c0 8d 04 42 31 d2 66 89 44 0d 00 0f b7 86 b8 00 00 00  74 
24 08 66 89 96 b8 00 00 00 e9 77 fe ff ff 66 c7 05 00 1d 
[0.048001] EIP: [] init_amd+0x249/0x279 SS:ESP 0068:c0749f8c
[0.116025] ---[ end trace 4eaa2a86a8e2da22 ]---
[0.117661] Kernel panic - not syncing: Attempted to kill the idle task!
[0.120008] Pid: 0, comm: swapper Tainted: G  D  2.6.32.9-0.5-pae #1
[0.122115] Call Trace:
[0.124032]  [] try_stack_unwind+0x1b1/0x1f0
[0.125821]  [] dump_trace+0x3f/0xe0
[0.132019]  [] show_trace_log_lvl+0x4b/0x60
[0.136012]  [] show_trace+0x18/0x20
[0.137572]  [] dump_stack+0x6d/0x74
[0.139120]  [] panic+0x42/0x145
[0.140018]  [] do_exit+0x236/0x310
[0.141550]  [] oops_end+0xc3/0xd0
[0.144012]  [] do_divide_error+0x7c/0x90
[0.145643]  [] error_code+0x66/0x6c
[0.147235]  [] init_amd+0x249/0x279
[0.148011]  [] identify_cpu+0xc2/0x223
[0.149649]  [] identify_boot_cpu+0xa/0x22
[0.152010]  [] check_bugs+0x8/0xd2
[0.153573]  [] start_kernel+0x32e/0x3a9

But I admit that this isn't the most up-to-date version, so perhaps it's 
already fixed ...

-- 
Jiri Kosina
SUSE Labs, Novell Inc.
--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH][RFC] x86: remove SMP check/taint for AMD K7 (was Re: KVM warning about uncertified CPU for SMP for AMD model 2, stepping 3)

2010-03-31 Thread Andi Kleen
On Wed, Mar 31, 2010 at 10:15:28AM +0200, Jiri Kosina wrote:
> On Wed, 31 Mar 2010, Andi Kleen wrote:
> 
> > > booting 32bit guest on 32bit host on AMD system gives me the following 
> > > warning when KVM is instructed to boot as SMP:
> > 
> > I guess these warnings could be just disabled. With nearly everyone
> > using multi-core these days they are kind of obsolete anyways.
> 
> Why is it there for K7 only anyway? Was that the only product line which 
> had instances which were explicitly marked as unsuitable for SMP by AMD?

Later ones were fused, so even if you wanted to you couldn't cheat this
way. Earlier CPUs didn't support SMP.

-Andi
--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: KVM warning about uncertified CPU for SMP for AMD model 2, stepping 3

2010-03-31 Thread Andi Kleen
> >I guess these warnings could be just disabled. With nearly everyone
> >using multi-core these days they are kind of obsolete anyways.
> Well, the warning refers to an old single-core only CPU model. Most of 
> those were able to run in SMP boards, but only a subset of them was 
> officially certified to do so (Athlon-MP instead of Athlon-XP).

Thanks for pointing out the obvious.

> To avoid complaints about instability of such systems, the warning was 
> introduced. If you consider these systems still supported, I wouldn't 
> disable this warning, at least the check should be disabled only if the 
> hypervisor CPUID bit is set.

The point was that everyone can have a multi-core system for cheap
these days, no real motivation for anyone anymore to use old unsupported
configurations to get one.

-Andi
--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: KVM warning about uncertified CPU for SMP for AMD model 2, stepping 3

2010-03-31 Thread Andre Przywara

Andi Kleen wrote:

On Wed, Mar 31, 2010 at 01:03:02AM +0200, Jiri Kosina wrote:

Hi,

booting 32bit guest on 32bit host on AMD system gives me the following 
warning when KVM is instructed to boot as SMP:


I guess these warnings could be just disabled. With nearly everyone
using multi-core these days they are kind of obsolete anyways.
Well, the warning refers to an old single-core only CPU model. Most of 
those were able to run in SMP boards, but only a subset of them was 
officially certified to do so (Athlon-MP instead of Athlon-XP).
To avoid complaints about instability of such systems, the warning was 
introduced. If you consider these systems still supported, I wouldn't 
disable this warning, at least the check should be disabled only if the 
hypervisor CPUID bit is set.


But the far better solution is to instruct QEMU/KVM to inject a better 
CPU model (as it was suggested by some people two weeks ago). I am about 
to test various guests with respect to their behavior regarding 
different family/model/stepping settings (one issue is already fixed). 
If this goes well, I will send out the patch to inject the host's CPUID 
F/M/S into the guest by default (which has other advantages, but denies 
migration mostly).


BTW.: I encourage people to test their KVM guests with "-cpu host" (on 
newer QEMUs) and send me any crash logs.


Regards,
Andre.

--
Andre Przywara
AMD-Operating System Research Center (OSRC), Dresden, Germany
Tel: +49 351 448-3567-12

--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH][RFC] x86: remove SMP check/taint for AMD K7 (was Re: KVM warning about uncertified CPU for SMP for AMD model 2, stepping 3)

2010-03-31 Thread Jiri Kosina
On Wed, 31 Mar 2010, Andi Kleen wrote:

> > booting 32bit guest on 32bit host on AMD system gives me the following 
> > warning when KVM is instructed to boot as SMP:
> 
> I guess these warnings could be just disabled. With nearly everyone
> using multi-core these days they are kind of obsolete anyways.

Why is it there for K7 only anyway? Was that the only product line which 
had instances which were explicitly marked as unsuitable for SMP by AMD?


From: Jiri Kosina 
Subject: x86: remove SMP check/taint for AMD K7

Remove code checking of AMD K7 CPU models and warning/tainting kernel if 
it doesn't suit given criteria.

The code has been there originally in order to detect systems which were 
doing SMP with CPUs that were not oficially cerified by AMD as SMP-safe. 

It's not clear whether the checks are either proper or complete. Quoting 
Andi Kleen: "I guess these warnings could be just disabled. With nearly 
everyone using multi-core these days they are kind of obsolete anyways."

Signed-off-by: Jiri Kosina 

--- 
 arch/x86/kernel/cpu/amd.c |   51 -
 1 files changed, 0 insertions(+), 51 deletions(-)

diff --git a/arch/x86/kernel/cpu/amd.c b/arch/x86/kernel/cpu/amd.c
index e485825..6510fe5 100644
--- a/arch/x86/kernel/cpu/amd.c
+++ b/arch/x86/kernel/cpu/amd.c
@@ -144,55 +144,6 @@ static void __cpuinit init_amd_k6(struct cpuinfo_x86 *c)
}
 }
 
-static void __cpuinit amd_k7_smp_check(struct cpuinfo_x86 *c)
-{
-#ifdef CONFIG_SMP
-   /* calling is from identify_secondary_cpu() ? */
-   if (c->cpu_index == boot_cpu_id)
-   return;
-
-   /*
-* Certain Athlons might work (for various values of 'work') in SMP
-* but they are not certified as MP capable.
-*/
-   /* Athlon 660/661 is valid. */
-   if ((c->x86_model == 6) && ((c->x86_mask == 0) ||
-   (c->x86_mask == 1)))
-   goto valid_k7;
-
-   /* Duron 670 is valid */
-   if ((c->x86_model == 7) && (c->x86_mask == 0))
-   goto valid_k7;
-
-   /*
-* Athlon 662, Duron 671, and Athlon >model 7 have capability
-* bit. It's worth noting that the A5 stepping (662) of some
-* Athlon XP's have the MP bit set.
-* See http://www.heise.de/newsticker/data/jow-18.10.01-000 for
-* more.
-*/
-   if (((c->x86_model == 6) && (c->x86_mask >= 2)) ||
-   ((c->x86_model == 7) && (c->x86_mask >= 1)) ||
-(c->x86_model > 7))
-   if (cpu_has_mp)
-   goto valid_k7;
-
-   /* If we get here, not a certified SMP capable AMD system. */
-
-   /*
-* Don't taint if we are running SMP kernel on a single non-MP
-* approved Athlon
-*/
-   WARN_ONCE(1, "WARNING: This combination of AMD"
-   " processors is not suitable for SMP.\n");
-   if (!test_taint(TAINT_UNSAFE_SMP))
-   add_taint(TAINT_UNSAFE_SMP);
-
-valid_k7:
-   ;
-#endif
-}
-
 static void __cpuinit init_amd_k7(struct cpuinfo_x86 *c)
 {
u32 l, h;
@@ -228,8 +179,6 @@ static void __cpuinit init_amd_k7(struct cpuinfo_x86 *c)
}
 
set_cpu_cap(c, X86_FEATURE_K7);
-
-   amd_k7_smp_check(c);
 }
 #endif
 
--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: KVM warning about uncertified CPU for SMP for AMD model 2, stepping 3

2010-03-30 Thread Andi Kleen
On Wed, Mar 31, 2010 at 01:03:02AM +0200, Jiri Kosina wrote:
> Hi,
> 
> booting 32bit guest on 32bit host on AMD system gives me the following 
> warning when KVM is instructed to boot as SMP:

I guess these warnings could be just disabled. With nearly everyone
using multi-core these days they are kind of obsolete anyways.

-Andi


--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


KVM warning about uncertified CPU for SMP for AMD model 2, stepping 3

2010-03-30 Thread Jiri Kosina
Hi,

booting 32bit guest on 32bit host on AMD system gives me the following 
warning when KVM is instructed to boot as SMP:



CPU0: AMD QEMU Virtual CPU version 0.9.1 stepping 03
Booting Node   0, Processors  #1
Initializing CPU#1
Leaving ESR disabled.
Mapping cpu 1 to node 0
[ cut here ]
WARNING: at linux-2.6.32/arch/x86/kernel/cpu/amd.c:187 init_amd_k7+0x178/0x187()
Hardware name: 
WARNING: This combination of AMD processors is not suitable for SMP.
Modules linked in:
Pid: 0, comm: swapper Not tainted 2.6.32.9-0.5-pae #1
Call Trace:
 [] try_stack_unwind+0x1b1/0x1f0
 [] dump_trace+0x3f/0xe0
 [] show_trace_log_lvl+0x4b/0x60
 [] show_trace+0x18/0x20
 [] dump_stack+0x6d/0x74
 [] warn_slowpath_common+0x6f/0xd0
 [] warn_slowpath_fmt+0x2b/0x30
 [] init_amd_k7+0x178/0x187
 [] init_amd+0x138/0x279
 [] identify_cpu+0xc2/0x223
 [] identify_secondary_cpu+0xc/0x1a
 [] smp_callin+0xd4/0x1a1
 [] start_secondary+0xa/0xe7



The virtual CPU identifies itself as cpu family 6, model 2, stepping 3 in 
/proc/cpuinfo.

Model 2 is indeed not handled by amd_k7_smp_check() and thus this warning 
is spit out.

Is that correct? Model 2 refers to Pluto/Orion (K75) if I remember 
correctly, right? That one is not oficially certified for SMP by AMD?

If it is not, maybe KVM should better emulate different CPU for 
SMP-enabled configurations, right? 
On the other hand, if it is certified (I have no idea), amd_k7_smp_check() 
should handle this model properly.

Thanks,

-- 
Jiri Kosina
SUSE Labs, Novell Inc.
--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html