[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <dc1a5ce2-0414-4f15-9e7b-fcfa4435adb5@email.android.com>
Date: Sun, 03 Oct 2010 15:22:13 -0700
From: "H. Peter Anvin" <hpa@...or.com>
To: Borislav Petkov <bp@...en8.de>
CC: Ingo Molnar <mingo@...e.hu>, Thomas Gleixner <tglx@...utronix.de>,
lkml <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] x86, cpu: X86_FEATURE_NOPL should be disabled on 32-bit only
Sort of... only if the input is a constant.
"Borislav Petkov" <bp@...en8.de> wrote:
>From: "H. Peter Anvin" <hpa@...or.com>
>Date: Sun, Oct 03, 2010 at 11:19:18AM -0700
>
>> I think we actually need to set it on 64 bits.
>
>Ok, correct me if I'm wrong but I think it is already "indirectly" set
>on 64-bits through REQUIRED_MASK3:
>
>#define REQUIRED_MASK3 (NEED_NOPL)
>
>which is defined as
>
>#define NEED_NOPL (1<<(X86_FEATURE_NOPL & 31))
>
>when either CONFIG_X86_P6_NOP or CONFIG_X86_64 are selected.
>
>and cpu_has() does
>
>#define cpu_has(c, bit) \
> (__builtin_constant_p(bit) && \
> ...
> (((bit)>>5)==3 && (1UL<<((bit)&31) & REQUIRED_MASK3)) || \
> ...
> ? 1 : test_cpu_cap(c, bit))
>
>which returns 1 when testing for X86_FEATURE_NOPL, no?
>
>--
>Regards/Gruss,
> Boris.
--
Sent from my mobile phone. Please pardon any lack of formatting.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists