From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Michael S. Tsirkin" Subject: Re: linux 3.13 guest crash with -cpu host Date: Mon, 3 Feb 2014 16:42:47 +0200 Message-ID: <20140203144247.GA24528@redhat.com> References: <20140202205930.GA2157@redhat.com> <20140203125828.GH2221@otherpad.lan.raisama.net> <20140203140601.GA24944@redhat.com> <52EFA2A5.7000203@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: Eduardo Habkost , kvm@vger.kernel.org, Peter Zijlstra To: Paolo Bonzini Return-path: Received: from mx1.redhat.com ([209.132.183.28]:60330 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752857AbaBCOhy (ORCPT ); Mon, 3 Feb 2014 09:37:54 -0500 Content-Disposition: inline In-Reply-To: <52EFA2A5.7000203@redhat.com> Sender: kvm-owner@vger.kernel.org List-ID: On Mon, Feb 03, 2014 at 03:07:33PM +0100, Paolo Bonzini wrote: > Il 03/02/2014 15:06, Michael S. Tsirkin ha scritto: > >>Linux seems to be trying to read IA32_PERF_CAPABILITIES without checking the > >>PDCM flag (CPUID[1].ECX[15]). > >> > >>I can't see why this wasn't crashing before, though. That code seems to be old. > >> > >> * v2 and above have a perf capabilities MSR > >> */ > >> if (version > 1) { > >> u64 capabilities; > >> > >> rdmsrl(MSR_IA32_PERF_CAPABILITIES, capabilities); > >> x86_pmu.intel_cap.capabilities = capabilities; > >> } > >> > >>Where does the "v2 and above have a perf capabilities MSR" claim in the code > >>come from? > > > > > >But why doesn't it crash on baremetal? > >Probably baremetal simply returns 0 or something. > >Let me try .. > > Because KVM doesn't implement the MSR, but your baremetal likely does. > > Paolo Yep. I get 31c3 on bare-metal. So I suppose the claim is actually true, and ideally kvm should emulate this instead of crashing guest. -- MST