@samitouri / QOSamiQemu / commits / 1df0984830

target/i386: add new AMD EPYC models for GMET enablement

Add models to expose Guest Mode Execute Trap (GMET) support, and add CPUID_SVM_GMET header definition so that future EPYC models can easily add default support. New models are: AMD EPYC-Milan-v4 AMD EPYC-Genoa-v3 AMD EPYC-Turin-v2 Cc: Babu Moger <babu.moger@amd.com> Cc: Nikunj A Dadhania <nikunj@amd.com> Cc: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Jon Kohler <jon@nutanix.com> Link: https://lore.kernel.org/r/20260330193428.1663253-2-jon@nutanix.com Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>

Jon Kohler committed Mar 30, 2026 at 12:34 UTC 1df0984830b3dcd7f4985367636db046686e7911
2 files changed +35
target/i386/cpu.c
+34
@@ -6836,6 +6836,16 @@ static const X86CPUDefinition builtin_x86_defs[] = {
6836 },
6837 .cache_info = &epyc_milan_v3_cache_info
6838 },
6839 + {
6840 + .version = 4,
6841 + .props = (PropValue[]) {
6842 + { "gmet", "on" },
6843 + { "model-id",
6844 + "AMD EPYC-Milan-v4 Processor" },
6845 + { /* end of list */ }
6846 + },
6847 + .cache_info = &epyc_milan_v3_cache_info
6848 + },
6849 { /* end of list */ }
6850 }
6851 },
@@ -6933,6 +6943,16 @@ static const X86CPUDefinition builtin_x86_defs[] = {
6943 },
6944 .cache_info = &epyc_genoa_v2_cache_info
6945 },
6946 + {
6947 + .version = 3,
6948 + .props = (PropValue[]) {
6949 + { "gmet", "on" },
6950 + { "model-id",
6951 + "AMD EPYC-Genoa-v3 Processor" },
6952 + { /* end of list */ }
6953 + },
6954 + .cache_info = &epyc_genoa_v2_cache_info
6955 + },
6956 { /* end of list */ }
6957 }
6958 },
@@ -7163,6 +7183,20 @@ static const X86CPUDefinition builtin_x86_defs[] = {
7183 .xlevel = 0x80000022,
7184 .model_id = "AMD EPYC-Turin Processor",
7185 .cache_info = &epyc_turin_cache_info,
7186 + .versions = (X86CPUVersionDefinition[]) {
7187 + { .version = 1 },
7188 + {
7189 + .version = 2,
7190 + .props = (PropValue[]) {
7191 + { "gmet", "on" },
7192 + { "model-id",
7193 + "AMD EPYC-Turin-v2 Processor" },
7194 + { /* end of list */ }
7195 + },
7196 + .cache_info = &epyc_turin_cache_info
7197 + },
7198 + { /* end of list */ }
7199 + }
7200 },
7201 };
7202
target/i386/cpu.h
+1
@@ -879,6 +879,7 @@ uint64_t x86_cpu_get_supported_feature_word(X86CPU *cpu, FeatureWord w);
879 #define CPUID_SVM_AVIC (1U << 13)
880 #define CPUID_SVM_V_VMSAVE_VMLOAD (1U << 15)
881 #define CPUID_SVM_VGIF (1U << 16)
882 +#define CPUID_SVM_GMET (1U << 17)
883 #define CPUID_SVM_VNMI (1U << 25)
884 #define CPUID_SVM_SVME_ADDR_CHK (1U << 28)
885