Skip to content

Commit 5cbc900

Browse files
zulinx86roypat
authored andcommitted
fix(vmm): Set FDP_EXCPTN_ONLY and ZERO_FCS_FDS
Sets FDP_EXCPTN_ONLY bit (CPUID.7h.0:EBX[6]) and ZERO_FCS_FDS bit (CPUID.7h.0:EBX[13]) in Intel's CPUID normalization as recommended in kernel doc. For more details, please refer to https://lore.kernel.org/all/[email protected]/ Signed-off-by: Takahiro Itazuri <[email protected]>
1 parent 28a143d commit 5cbc900

File tree

21 files changed

+71
-20
lines changed

21 files changed

+71
-20
lines changed

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,11 @@
1313
- Added a `cpu-template-helper` tool for assisting with creating and managing
1414
custom CPU templates.
1515

16+
### Changed
17+
18+
- Set FDP_EXCPTN_ONLY bit (CPUID.7h.0:EBX[6]) and ZERO_FCS_FDS bit
19+
(CPUID.7h.0:EBX[13]) in Intel's CPUID normalization process.
20+
1621
### Fixed
1722

1823
- Fixed feature flags in T2S CPU template on Intel Ice Lake.

docs/cpu_templates/cpuid-normalization.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,10 +30,12 @@ See also: [boot protocol settings](boot-protocol.md)
3030
## Intel-specific CPUID normalization
3131

3232
| Description | Leaf | Subleaf | Register | Bits |
33-
|----------------------------------------------------------------|:----------------------------------:|:-------:|:------------------:|:----:|
33+
|----------------------------------------------------------------|:----------------------------------:|:-------:|:------------------:|:-----:|
3434
| Update deterministic cache parameters | 0x4 | all | EAX | 31:14 |
3535
| Disable Intel Turbo Boost technology | 0x6 | - | EAX | 1 |
3636
| Disable frequency selection | 0x6 | - | ECX | 3 |
37+
| Set FDP_EXCPTN_ONLY bit | 0x7 | 0x0 | EBX | 6 |
38+
| Set "Deprecates FPU CS and FPU DS values" bit | 0x7 | 0x0 | EBX | 13 |
3739
| Disable performance monitoring | 0xa | - | EAX, EBX, ECX, EDX | all |
3840
| Update brand string to use a default format and real frequency | 0x80000002, 0x80000003, 0x80000004 | - | EAX, EBX, ECX, EDX | all |
3941

resources/tests/cpu_template_helper/fingerprint_INTEL_CASCADELAKE_4.14host.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -270,7 +270,7 @@
270270
},
271271
{
272272
"register": "ebx",
273-
"bitmap": "0b11010001100111110100011110101011"
273+
"bitmap": "0b11010001100111110110011111101011"
274274
},
275275
{
276276
"register": "ecx",

resources/tests/cpu_template_helper/fingerprint_INTEL_CASCADELAKE_5.10host.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -270,7 +270,7 @@
270270
},
271271
{
272272
"register": "ebx",
273-
"bitmap": "0b11010001100111110100011110101011"
273+
"bitmap": "0b11010001100111110110011111101011"
274274
},
275275
{
276276
"register": "ecx",

resources/tests/cpu_template_helper/fingerprint_INTEL_ICELAKE_4.14host.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -270,7 +270,7 @@
270270
},
271271
{
272272
"register": "ebx",
273-
"bitmap": "0b11110001101111110000011110101011"
273+
"bitmap": "0b11110001101111110010011111101011"
274274
},
275275
{
276276
"register": "ecx",

resources/tests/cpu_template_helper/fingerprint_INTEL_ICELAKE_5.10host.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -270,7 +270,7 @@
270270
},
271271
{
272272
"register": "ebx",
273-
"bitmap": "0b11110001101111110000011110101011"
273+
"bitmap": "0b11110001101111110010011111101011"
274274
},
275275
{
276276
"register": "ecx",

resources/tests/cpu_template_helper/fingerprint_INTEL_SKYLAKE_4.14host.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -270,7 +270,7 @@
270270
},
271271
{
272272
"register": "ebx",
273-
"bitmap": "0b11010001100111110100111110111011"
273+
"bitmap": "0b11010001100111110110111111111011"
274274
},
275275
{
276276
"register": "ecx",

resources/tests/cpu_template_helper/fingerprint_INTEL_SKYLAKE_5.10host.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -270,7 +270,7 @@
270270
},
271271
{
272272
"register": "ebx",
273-
"bitmap": "0b11010001100111110100111110111011"
273+
"bitmap": "0b11010001100111110110111111111011"
274274
},
275275
{
276276
"register": "ecx",

resources/tests/static_cpu_templates/c3.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
"modifiers": [
2727
{
2828
"register": "ebx",
29-
"bitmap": "0b000000000x0x000000x000x0x00000xx"
29+
"bitmap": "0b000000000x0x000000x000x0xx0000xx"
3030
},
3131
{
3232
"register": "ecx",

resources/tests/static_cpu_templates/t2.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
"modifiers": [
2727
{
2828
"register": "ebx",
29-
"bitmap": "0b00000000000x000000000x1xx0x0x0xx"
29+
"bitmap": "0b00000000000x000000x00x1xxxx0x0xx"
3030
},
3131
{
3232
"register": "ecx",

0 commit comments

Comments
 (0)