Skip to content

Commit 681e781

Browse files
committed
fix(vmm): Disable SVM on T2A template
Althought T2A and T2CL templates together aim to provide instruction set feature parity, T2CL disables nested virtualization (VMX) but T2A does not disable it (SVM). This commit disables SVM on T2A template. Signed-off-by: Takahiro Itazuri <[email protected]>
1 parent 921242f commit 681e781

File tree

3 files changed

+4
-2
lines changed

3 files changed

+4
-2
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@
3838
IA32_ARCH_CAPABILITIES MSR from the host in accordance with an Intel microcode
3939
update.
4040
- Fixed passing through cache information from host in CPUID leaf 0x80000005.
41+
- Fixed the T2A CPU template to disable SVM (nested virtualization).
4142

4243
## [1.3.0]
4344

resources/tests/static_cpu_templates/t2a.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@
6767
"modifiers": [
6868
{
6969
"register": "ecx",
70-
"bitmap": "0bxx0xxxxxxxxxxxxxxxxxxxx000xxxxxx"
70+
"bitmap": "0bxx0xxxxxxxxxxxxxxxxxxxx000xxx0xx"
7171
},
7272
{
7373
"register": "edx",

src/vmm/src/cpu_config/x86_64/static_cpu_templates/t2a.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -194,14 +194,15 @@ pub fn t2a() -> CustomCpuTemplate {
194194
flags: KvmCpuidFlags(0),
195195
modifiers: vec![
196196
// ECX:
197+
// - Bit 02: SVM (AMD APM) / Reserved (Intel SDM)
197198
// - Bit 06: SSE4A (AMD APM) / Reserved (Intel SDM)
198199
// - Bit 07: MisAlignSse (AMD APM) / Reserved (Intel SDM)
199200
// - Bit 08: 3DNowPrefetch (AMD APM) / PREFETCHW (Intel SDM)
200201
// - Bit 29: MONITORX (AMD APM) / MONITORX and MWAITX (Intel SDM)
201202
CpuidRegisterModifier {
202203
register: CpuidRegister::Ecx,
203204
bitmap: RegisterValueFilter {
204-
filter: 0b0010_0000_0000_0000_0000_0001_1100_0000,
205+
filter: 0b0010_0000_0000_0000_0000_0001_1100_0100,
205206
value: 0b0000_0000_0000_0000_0000_0000_0000_0000,
206207
},
207208
},

0 commit comments

Comments
 (0)