From mboxrd@z Thu Jan 1 00:00:00 1970 From: Avi Kivity Subject: Re: OpenBSD 5.0 kernel panic in AMD K10 cpu power state Date: Wed, 09 Nov 2011 15:40:10 +0200 Message-ID: <4EBA82BA.1090602@redhat.com> References: <4EB8F576.9040203@gmx.at> <4EBA5848.7070404@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Cc: kvm@vger.kernel.org To: Walter Haidinger Return-path: Received: from mx1.redhat.com ([209.132.183.28]:40363 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752570Ab1KINkP (ORCPT ); Wed, 9 Nov 2011 08:40:15 -0500 In-Reply-To: <4EBA5848.7070404@redhat.com> Sender: kvm-owner@vger.kernel.org List-ID: On 11/09/2011 12:39 PM, Avi Kivity wrote: > > More from misc@openbsd.org: > > > OpenBSD 5.0 (GENERIC) #43: Wed Aug 17 10:10:52 MDT 2011 > > > deraadt@i386.openbsd.org:/usr/src/sys/arch/i386/compile/GENERIC > > > cpu0: AMD Phenom(tm) II X6 1100T Processor ("AuthenticAMD" 686-class, 512KB L2 cache) 3.31 GHz > > > ... > > > kernel: protection fault trap, code=0 > > > Stopped at k1x_init+0x56: rdmsr > > > k1x_init(d0ad7540,d09ae620,d0b8ce58,d059ce20,30000002) at k1x_init+0x56 > > > > k1x_init() is not related to vmt, it is from k1x-pstate.c, which > > is cpu power state driver for K10 processors. > > > > Thread on misc@openbsd.org with full OpenBSD dmesg: > > http://marc.info/?l=openbsd-misc&m=132067866208188&w=2 > > > > Since both qemu-kvm 0.14.1 and 0.15.1 show identical > > symptoms, I assume this is in deed a KVM kernel bug. > > It doesn't actually follow, but happens to be correct. > > > Can somebody reproduce this? > > I'll try it out and see. > Actually, it looks like an OpenBSD bug. According to the AMD documentation: "The current P-state value can be read using the P-State Status Register. The P-State Current Limit Register and the P-State Status Register are read-only registers. Writes to these registers cause a #GP exception. Support for hardware P-state control is indicated by EDX bit 7 as returned by CPUID function 8000_0007h. Figure 18-1 shows the format of the P-State Current Limit register." Can you check what cpuid 80000007 returns by running 'x86info -r | grep 80000007' in a Linux guest with the same command line? if edx returns zero, then it's OpenBSD not checking cpuid correctly. -- error compiling committee.c: too many arguments to function