Skip to content

Commit a0aea13

Browse files
robert-hoobonzini
authored andcommitted
KVM: x86: Add CPUID support for new instruction WBNOINVD
Signed-off-by: Robert Hoo <robert.hu@linux.intel.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
1 parent 57d5edf commit a0aea13

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

arch/x86/include/asm/cpufeatures.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -281,6 +281,7 @@
281281
#define X86_FEATURE_CLZERO (13*32+ 0) /* CLZERO instruction */
282282
#define X86_FEATURE_IRPERF (13*32+ 1) /* Instructions Retired Count */
283283
#define X86_FEATURE_XSAVEERPTR (13*32+ 2) /* Always save/restore FP error pointers */
284+
#define X86_FEATURE_WBNOINVD (13*32+ 9) /* WBNOINVD instruction */
284285
#define X86_FEATURE_AMD_IBPB (13*32+12) /* "" Indirect Branch Prediction Barrier */
285286
#define X86_FEATURE_AMD_IBRS (13*32+14) /* "" Indirect Branch Restricted Speculation */
286287
#define X86_FEATURE_AMD_STIBP (13*32+15) /* "" Single Thread Indirect Branch Predictors */

arch/x86/kvm/cpuid.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -378,7 +378,7 @@ static inline int __do_cpuid_ent(struct kvm_cpuid_entry2 *entry, u32 function,
378378

379379
/* cpuid 0x80000008.ebx */
380380
const u32 kvm_cpuid_8000_0008_ebx_x86_features =
381-
F(AMD_IBPB) | F(AMD_IBRS) | F(AMD_SSBD) | F(VIRT_SSBD) |
381+
F(WBNOINVD) | F(AMD_IBPB) | F(AMD_IBRS) | F(AMD_SSBD) | F(VIRT_SSBD) |
382382
F(AMD_SSB_NO) | F(AMD_STIBP);
383383

384384
/* cpuid 0xC0000001.edx */

0 commit comments

Comments
 (0)