Re: [tip:x86/urgent] x86, AMD: Disable wrongly set X86_FEATURE_LAHF_LM CPUID bit

H. Peter Anvin
2009-08-21T17:40:44Z

On 08/16/2009 02:49 PM, Borislav Petkov wrote:
> On Sun, Aug 16, 2009 at 08:41:32AM +0200, Ingo Molnar wrote:
>> -tip testing found this build bug caused by this patch:
>>
>> arch/x86/kernel/cpu/amd.c: In function ‘init_amd’:
>> arch/x86/kernel/cpu/amd.c:417: error: implicit declaration of function ‘wrmsr_amd_safe’
>
> Oops, forgot paravirt. Here's a fixed version:
>

One thing that really bothers me about these is that they're horribly
non-generic. It wouldn't be so bad -- if we need something more generic
we can create them -- if it wasn't for that perennial horror called
paravirt_crap, which of course just ends up incorporating whatever
internal interfaces we have.

If we're going to modify the paravirt_crap for yet another MSR
operation, then let's at least make it something like "write_msr_edi"
and have it take a parameter for the EDI value. Perhaps we should let
it set EBX and ESI as well (and the same for the read operation, even
though it already exists.)

-hpa