Re: [PATCH] x86/cpufeature: Add AMD AVIC bit
From: Joerg Roedel
Date: Tue Jan 19 2016 - 07:39:18 EST
On Sat, Jan 16, 2016 at 10:58:12AM +0100, Borislav Petkov wrote:
> From: Borislav Petkov <bp@xxxxxxx>
>
> CPUID Fn8000_000A_EDX[13] denotes support for AMD's Virtual Interrupt
> controller, i.e., APIC virtualization.
>
> Cc: David Kaplan <david.kaplan@xxxxxxx>
> Cc: Tom Lendacky <thomas.lendacky@xxxxxxx>
> Signed-off-by: Borislav Petkov <bp@xxxxxxx>
> ---
> arch/x86/include/asm/cpufeature.h | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/arch/x86/include/asm/cpufeature.h b/arch/x86/include/asm/cpufeature.h
> index 7ad8c9464297..bbf166e805be 100644
> --- a/arch/x86/include/asm/cpufeature.h
> +++ b/arch/x86/include/asm/cpufeature.h
> @@ -268,6 +268,7 @@
> #define X86_FEATURE_DECODEASSISTS (15*32+ 7) /* Decode Assists support */
> #define X86_FEATURE_PAUSEFILTER (15*32+10) /* filtered pause intercept */
> #define X86_FEATURE_PFTHRESHOLD (15*32+12) /* pause filter threshold */
> +#define X86_FEATURE_AVIC (15*32+13) /* Virtual Interrupt Controller */
That is not enough, you also need to add the feature to the scattered
cpuid_bits in arch/x86/kernel/cpu/scattered.c.
The cpuid Fn8000_000A_EDX is not mapped 1-1 into the x86_capability
array.
Joerg