Skip to contentSkip to conversation

x86/cpufeature: Add AMD AVIC bit

PATCH In review Borislav Petkov 3 participants 5 messages Jan 16, 2016 – Jan 19, 2016 x86

lore
Share & tools
lore

Borislav Petkov

author maintainer
#0 lore raw

PATCH 1/1 x86/cpufeature: Add AMD AVIC bit

From: Borislav Petkov <[email protected]>

CPUID Fn8000_000A_EDX[13] denotes support for AMD's Virtual Interrupt controller, i.e., APIC virtualization.

Cc David Kaplan <[email protected]>
Cc Tom Lendacky <[email protected]>
---
 arch/x86/include/asm/cpufeature.h | 1 +
 1 file changed, 1 insertion(+)
arch/x86/include/asm/cpufeature.h +1 -0
index 7ad8c9464297..bbf166e805be 100644
@@ -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 */
 
 /*
  * BUG word(s)
Signature · 1 line
2.3.5
#1 lore raw
Quoted 17 lines · Borislav Petkov

From: Borislav Petkov <[email protected]>

CPUID Fn8000_000A_EDX[13] denotes support for AMD's Virtual Interrupt controller, i.e., APIC virtualization.

Cc David Kaplan <[email protected]>
Cc Tom Lendacky <[email protected]>
---
 arch/x86/include/asm/cpufeature.h | 1 +
 1 file changed, 1 insertion(+)
arch/x86/include/asm/cpufeature.h +0 -0
index 7ad8c9464297..bbf166e805be 100644

arch/x86/include/asm/cpufeature.h line 271

Quoted 4 lines
arch/x86/include/asm/cpufeature.h +1 -0
@@ -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

author maintainer
#2 lore raw
Quoted 3 lines · Joerg Roedel

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.

2ccd71f1b278 ("x86/cpufeature: Move some of the scattered feature bits to x86_capability")

Signature · 4 lines
Regards/Gruss,
    Boris.

ECO tip #101: Trim your mails when you reply.
Reviewed-by
#3 lore raw
Quoted 6 lines · Borislav Petkov
Quoted 3 lines · Joerg Roedel

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.

2ccd71f1b278 ("x86/cpufeature: Move some of the scattered feature bits to x86_capability")

Ah I see, that commit wasn't present in the tree I looked at. In that case:

#4 lore raw
In reply to Borislav Petkov
x86/cpufeature: Add AMD AVIC bit
Commit-ID:  a1ff5726081858a9ad98934eff7af6616c576875
Gitweb:     http://git.kernel.org/tip/a1ff5726081858a9ad98934eff7af6616c576875
Author:     Borislav Petkov <[email protected]>
AuthorDate: Sat, 16 Jan 2016 10:58:12 +0100
Committer:  Ingo Molnar <[email protected]>
CommitDate: Tue, 19 Jan 2016 08:29:28 +0100

x86/cpufeature: Add AMD AVIC bit

CPUID Fn8000_000A_EDX[13] denotes support for AMD's Virtual Interrupt controller, i.e., APIC virtualization.

Cc Andy Lutomirski <[email protected]>
Cc Borislav Petkov <[email protected]>
Cc Brian Gerst <[email protected]>
Cc David Kaplan <[email protected]>
Cc Denys Vlasenko <[email protected]>
Cc H. Peter Anvin <[email protected]>
Cc Joerg Roedel <[email protected]>
Cc Linus Torvalds <[email protected]>
Cc Peter Zijlstra <[email protected]>
Cc Thomas Gleixner <[email protected]>
Cc Tom Lendacky <[email protected]>
---
 arch/x86/include/asm/cpufeature.h | 1 +
 1 file changed, 1 insertion(+)
arch/x86/include/asm/cpufeature.h +1 -0
index 7ad8c94..bbf166e 100644
@@ -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 */
 
 /*
  * BUG word(s)