Skip to content

Commit 43bd9ef

Browse files
committed
x86: Expose SERIALIZE for supported cpuid
The SERIALIZE instruction is supported by Tntel processors, like Sapphire Rapids. SERIALIZE is a faster serializing instruction which does not modify registers, arithmetic flags or memory, will not cause VM exit. It's availability is indicated by CPUID.(EAX=7,ECX=0):ECX[bit 14]. Expose it in KVM supported CPUID. This way, KVM could pass this information to guests and they can make use of these features accordingly. Signed-off-by: Cathy Zhang <[email protected]> Signed-off-by: Paolo Bonzini <[email protected]>
1 parent 0378dae commit 43bd9ef

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

arch/x86/kvm/cpuid.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -370,7 +370,8 @@ void kvm_set_cpu_caps(void)
370370
kvm_cpu_cap_mask(CPUID_7_EDX,
371371
F(AVX512_4VNNIW) | F(AVX512_4FMAPS) | F(SPEC_CTRL) |
372372
F(SPEC_CTRL_SSBD) | F(ARCH_CAPABILITIES) | F(INTEL_STIBP) |
373-
F(MD_CLEAR) | F(AVX512_VP2INTERSECT) | F(FSRM)
373+
F(MD_CLEAR) | F(AVX512_VP2INTERSECT) | F(FSRM) |
374+
F(SERIALIZE)
374375
);
375376

376377
/* TSC_ADJUST and ARCH_CAPABILITIES are emulated in software. */

0 commit comments

Comments
 (0)