target/i386: add new Intel models for MMIO/GDS/RFDS mitigation status
PATCH 2/3 target/i386: add new Intel models for MMIO/GDS/RFDS mitigation status
In reply to a message not in the archiveAdd new bits to ARCH_CAPABILITIES MSR to enumerate the status of the MMIO/GDS/RFDS mitigations on Cascade Lake, Ice Lake, Sapphire Rapids, and Granite Rapids processors.
These have been advertised in Intel microcode updates for a while now, but require user space to opt in to advertise them to guests.
New models are:
- Cascadelake-Server-v6
- Icelake-Server-v8
- SapphireRapids-v7 (note, already got MMIO fixes on commit [1])
- GraniteRapids-v6
[1] 3baf7ae63505 ("target/i386: Add few security fix bits in ARCH_CAPABILITIES into SapphireRapids CPU model")
--- target/i386/cpu.c | 41 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+)
target/i386/cpu.c +41 -0
@@ -4901,6 +4901,17 @@ static const X86CPUDefinition builtin_x86_defs[] = { {/* end of list */ } }, }, + { .version = 6, + .note = "with MMIO/GDS/RFDS mitigation status", + .props = (PropValue[]) { + { "fb-clear", "on" }, + { "gds-no", "on" }, + { "psdp-no", "on" }, + { "rfds-no", "on" }, + { "sbdr-ssdp-no", "on" }, + { /* end of list */ } + }, + }, {/* end of list */ } } },
@@ -5183,6 +5194,18 @@ static const X86CPUDefinition builtin_x86_defs[] = { {/* end of list */ } }, }, + { + .version = 8, + .note = "with MMIO/GDS/RFDS mitigation status", + .props = (PropValue[]) { + { "fb-clear", "on" }, + { "gds-no", "on" }, + { "psdp-no", "on" }, + { "rfds-no", "on" }, + { "sbdr-ssdp-no", "on" }, + { /* end of list */ } + }, + }, {/* end of list */ } } },
@@ -5360,6 +5383,15 @@ static const X86CPUDefinition builtin_x86_defs[] = { { /* end of list */ }, } }, + { + .version = 7, + .note = "with GDS and RFDS mitigation status", + .props = (PropValue[]) { + { "gds-no", "on" }, + { "rfds-no", "on" }, + { /* end of list */ }, + } + }, {/* end of list */ } } },
@@ -5541,6 +5573,15 @@ static const X86CPUDefinition builtin_x86_defs[] = { { /* end of list */ }, } }, + { + .version = 6, + .note = "with GDS and RFDS mitigation status", + .props = (PropValue[]) { + { "gds-no", "on" }, + { "rfds-no", "on" }, + { /* end of list */ }, + } + }, { /* end of list */ }, }, },
Signature · 1 line
2.43.0
PATCH 1/3 target/i386: add new AMD EPYC models for GMET enablement
In reply to a message not in the archiveAdd 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
--- target/i386/cpu.c | 34 ++++++++++++++++++++++++++++++++++ target/i386/cpu.h | 1 + 2 files changed, 35 insertions(+)
target/i386/cpu.c +34 -0
@@ -6836,6 +6836,16 @@ static const X86CPUDefinition builtin_x86_defs[] = { }, .cache_info = &epyc_milan_v3_cache_info }, + { + .version = 4, + .props = (PropValue[]) { + { "gmet", "on" }, + { "model-id", + "AMD EPYC-Milan-v4 Processor" }, + { /* end of list */ } + }, + .cache_info = &epyc_milan_v3_cache_info + }, {/* end of list */ } } },
@@ -6933,6 +6943,16 @@ static const X86CPUDefinition builtin_x86_defs[] = { }, .cache_info = &epyc_genoa_v2_cache_info }, + { + .version = 3, + .props = (PropValue[]) { + { "gmet", "on" }, + { "model-id", + "AMD EPYC-Genoa-v3 Processor" }, + { /* end of list */ } + }, + .cache_info = &epyc_genoa_v2_cache_info + }, {/* end of list */ } } },
@@ -7163,6 +7183,20 @@ static const X86CPUDefinition builtin_x86_defs[] = { .xlevel = 0x80000022, .model_id = "AMD EPYC-Turin Processor", .cache_info = &epyc_turin_cache_info, + .versions = (X86CPUVersionDefinition []) { + { .version =1 }, + { + .version =2 , + .props = (PropValue []) { + {"gmet" ,"on" }, + {"model-id" , +"AMD EPYC-Turin-v2 Processor" }, + {/* end of list */ } + }, + .cache_info = &epyc_turin_cache_info + }, + {/* end of list */ } + } }, };
target/i386/cpu.h +1 -0
@@ -879,6 +879,7 @@ uint64_t x86_cpu_get_supported_feature_word(X86CPU *cpu, FeatureWord w);#define CPUID_SVM_AVIC (1U << 13)#define CPUID_SVM_V_VMSAVE_VMLOAD (1U << 15)#define CPUID_SVM_VGIF (1U << 16) +#define CPUID_SVM_GMET (1U << 17)#define CPUID_SVM_VNMI (1U << 25)#define CPUID_SVM_SVME_ADDR_CHK (1U << 28)
Signature · 1 line
2.43.0
PATCH 3/3 target/i386: add new Intel models for MBEC enablement
In reply to a message not in the archiveAdd models to expose Mode Based Execute Control (MBEC) support, which is a Skylake++ feature.
Note: Future models can use VMX_SECONDARY_EXEC_MODE_BASED_EPT_EXEC to easily add default support.
New models are:
- Skylake-Server-v6
- Cascadelake-Server-v7
- Icelake-Server-v9
- SapphireRapids-v8
- GraniteRapids-v7
- DiamondRapids-v2
- SierraForest-v6
- ClearwaterForest-v4
--- target/i386/cpu.c | 67 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 67 insertions(+)
target/i386/cpu.c +67 -0
@@ -4767,6 +4767,14 @@ static const X86CPUDefinition builtin_x86_defs[] = { {/* end of list */ } } }, + { + .version = 6, + .note = "with MBEC enabled", + .props = (PropValue[]) { + { "vmx-mbec", "on" }, + { /* end of list */ } + } + }, {/* end of list */ } } },
@@ -4912,6 +4920,13 @@ static const X86CPUDefinition builtin_x86_defs[] = { {/* end of list */ } }, }, + { .version = 7, + .note = "with MBEC enabled", + .props = (PropValue[]) { + { "vmx-mbec", "on" }, + { /* end of list */ } + }, + }, {/* end of list */ } } },
@@ -5206,6 +5221,14 @@ static const X86CPUDefinition builtin_x86_defs[] = { {/* end of list */ } }, }, + { + .version = 9, + .note = "with MBEC enabled", + .props = (PropValue[]) { + { "vmx-mbec", "on" }, + { /* end of list */ } + } + }, {/* end of list */ } } },
@@ -5392,6 +5415,14 @@ static const X86CPUDefinition builtin_x86_defs[] = { { /* end of list */ }, } }, + { + .version = 8, + .note = "with MBEC enabled", + .props = (PropValue[]) { + { "vmx-mbec", "on" }, + { /* end of list */ }, + } + }, {/* end of list */ } } },
@@ -5582,6 +5613,14 @@ static const X86CPUDefinition builtin_x86_defs[] = { { /* end of list */ }, } }, + { + .version = 7, + .note = "with MBEC enabled", + .props = (PropValue[]) { + { "vmx-mbec", "on" }, + { /* end of list */ }, + } + }, { /* end of list */ }, }, },
@@ -5776,6 +5815,18 @@ static const X86CPUDefinition builtin_x86_defs[] = { .features[FEAT_VMX_VMFUNC] = MSR_VMX_VMFUNC_EPT_SWITCHING, .xlevel = 0x80000008, .model_id = "Intel Xeon Processor (DiamondRapids)", + .versions = (X86CPUVersionDefinition []) { + { .version =1 }, + { + .version =2 , + .note ="with MBEC enabled" , + .props = (PropValue []) { + {"vmx-mbec" ,"on" }, + {/* end of list */ }, + } + }, + {/* end of list */ }, + }, }, { .name = "SierraForest",
@@ -5947,6 +5998,14 @@ static const X86CPUDefinition builtin_x86_defs[] = { { /* end of list */ }, } }, + { + .version = 6, + .note = "with MBEC enabled", + .props = (PropValue[]) { + { "vmx-mbec", "on" }, + { /* end of list */ }, + } + }, { /* end of list */ }, }, },
@@ -6103,6 +6162,14 @@ static const X86CPUDefinition builtin_x86_defs[] = { { /* end of list */ }, } }, + { + .version = 4, + .note = "with MBEC enabled", + .props = (PropValue[]) { + { "vmx-mbec", "on" }, + { /* end of list */ }, + } + }, { /* end of list */ }, }, },
Signature · 1 line
2.43.0