|
@@ -634,6 +634,7 @@ typedef enum FeatureWord {
|
|
|
FEAT_8000_0007_EDX, /* CPUID[8000_0007].EDX */
|
|
|
FEAT_8000_0008_EBX, /* CPUID[8000_0008].EBX */
|
|
|
FEAT_8000_0021_EAX, /* CPUID[8000_0021].EAX */
|
|
|
+ FEAT_8000_0021_EBX, /* CPUID[8000_0021].EBX */
|
|
|
FEAT_8000_0022_EAX, /* CPUID[8000_0022].EAX */
|
|
|
FEAT_C000_0001_EDX, /* CPUID[C000_0001].EDX */
|
|
|
FEAT_KVM, /* CPUID[4000_0001].EAX (KVM_CPUID_FEATURES) */
|
|
@@ -1022,6 +1023,8 @@ uint64_t x86_cpu_get_supported_feature_word(X86CPU *cpu, FeatureWord w);
|
|
|
#define CPUID_8000_0021_EAX_NULL_SEL_CLR_BASE (1U << 6)
|
|
|
/* Automatic IBRS */
|
|
|
#define CPUID_8000_0021_EAX_AUTO_IBRS (1U << 8)
|
|
|
+/* Enhanced Return Address Predictor Scurity */
|
|
|
+#define CPUID_8000_0021_EAX_ERAPS (1U << 24)
|
|
|
/* Selective Branch Predictor Barrier */
|
|
|
#define CPUID_8000_0021_EAX_SBPB (1U << 27)
|
|
|
/* IBPB includes branch type prediction flushing */
|
|
@@ -1031,6 +1034,12 @@ uint64_t x86_cpu_get_supported_feature_word(X86CPU *cpu, FeatureWord w);
|
|
|
/* Not vulnerable to SRSO at the user-kernel boundary */
|
|
|
#define CPUID_8000_0021_EAX_SRSO_USER_KERNEL_NO (1U << 30)
|
|
|
|
|
|
+/*
|
|
|
+ * Return Address Predictor size. RapSize x 8 is the minimum number of
|
|
|
+ * CALL instructions software needs to execute to flush the RAP.
|
|
|
+ */
|
|
|
+#define CPUID_8000_0021_EBX_RAPSIZE (8U << 16)
|
|
|
+
|
|
|
/* Performance Monitoring Version 2 */
|
|
|
#define CPUID_8000_0022_EAX_PERFMON_V2 (1U << 0)
|
|
|
|