Re: linux 3.13 guest crash with -cpu host

Michael S. Tsirkin
2014-02-03T14:37:54Z

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