lkml.org 
[lkml]   [2014]   [Mar]   [21]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: GPF in intel_pmu_lbr_reset() with qemu -cpu host
On 03/21/2014 02:48 PM, Andi Kleen wrote:
> "H. Peter Anvin" <hpa@zytor.com> writes:
>>
>> That's why at least to some extent The Right Thing is not to try to
>> pretend to be a CPU you don't even know how to emulate.
>>
>> But again, that has its own issues, too, mostly with userspace
>> optimization, and making the Linux code more resilient wouldn't hurt.
>> In that sense #GP(0) is *much* better than 0: it unambiguously gives an
>> error to work with.
>
> That means we could just throw rdmsr() away and it would be completely
> replaced with rdmsr_safe(). But then that will likely cause all kinds
> of problems with how to handle these errors and where and how to handle
> these exceptions.
>
> I much prefer just to fix KVM. I cannot think of any case
> where 0 would cause a major issue.
>
> After all it's virtualization not "rewrite complete kernel for it"
>

Actually, Ingo, Borislav and I have been discussing making rdmsr_safe()
more of the default, especially for things like this where the error
handling is obvious (doesn't work? Disable the PMU.)

-hpa




\
 
 \ /
  Last update: 2014-03-21 23:21    [W:0.057 / U:1.340 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site