Skip to content

Commit 706471e

Browse files
zulinx86wearyzen
authored andcommitted
fix(vmm): Changes T2A not to unset MMX and FXSR bits
The MMX bit (CPUID.80000001h:EDX[23]) and the FXSR bit (CPUID.80000001h:EDX[24]) are unset on Intel CPUs as they are reserved in Intel specification. However, as described in AMD APM, these bits are same as CPUID.01h:EDX[23] and CPUID.01h:EDX[24] respectively. These bits are set to 1 on T2 instance, Intel Skylake, Intel Cascade Lake, Intel Ice Lake and AMD Milan. Thus, T2A template does not need to unset CPUID.80000001h:EDX[23,24]. Signed-off-by: Takahiro Itazuri <itazur@amazon.com>
1 parent 0956312 commit 706471e

File tree

4 files changed

+4
-6
lines changed

4 files changed

+4
-6
lines changed

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,8 @@
4141
- Fixed the T2A CPU template to disable SVM (nested virtualization).
4242
- Fixed the T2A CPU template to set EferLmsleUnsupported bit
4343
(CPUID.80000008h:EBX[20]), which indicates that EFER[LMSLE] is not supported.
44+
- Fixed the T2A CPU template not to unset the MMX bit (CPUID.80000001h:EDX[23])
45+
and the FXSR bit (CPUID.80000001h:EDX[24]).
4446

4547
## [1.3.0]
4648

resources/tests/static_cpu_templates/t2a.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@
7171
},
7272
{
7373
"register": "edx",
74-
"bitmap": "0bxxxxx00000xxxxxxxxxxxxxxxxxxxxxx"
74+
"bitmap": "0bxxxxx00xx0xxxxxxxxxxxxxxxxxxxxxx"
7575
}
7676
]
7777
},

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

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -208,14 +208,12 @@ pub fn t2a() -> CustomCpuTemplate {
208208
},
209209
// EDX:
210210
// - Bit 22: MmxExt (AMD APM) / Reserved (Intel SDM)
211-
// - Bit 23: MMX (AMD APM) / Reserved (Intel SDM)
212-
// - Bit 24: FSXR (AMD APM) / Reserved (Intel SDM)
213211
// - Bit 25: FFXSR (AMD APM) / Reserved (Intel SDM)
214212
// - Bit 26: Page1GB (AMD APM) / 1-GByte pages (Intel SDM)
215213
CpuidRegisterModifier {
216214
register: CpuidRegister::Edx,
217215
bitmap: RegisterValueFilter {
218-
filter: 0b0000_0111_1100_0000_0000_0000_0000_0000,
216+
filter: 0b0000_0110_0100_0000_0000_0000_0000_0000,
219217
value: 0b0000_0000_0000_0000_0000_0000_0000_0000,
220218
},
221219
},

tests/integration_tests/functional/test_feat_parity.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -125,8 +125,6 @@ def test_feat_parity_cpuid_inst_set(vm):
125125
),
126126
(0x80000001, 0x0, "edx",
127127
(1 << 22) | # MmxExt
128-
(1 << 23) | # MMX
129-
(1 << 24) | # FXSR
130128
(1 << 25) # FFXSR
131129
),
132130
(0x80000008, 0x0, "ebx",

0 commit comments

Comments
 (0)