Skip to content

Commit 21a3a6d

Browse files
committed
fix: Update static CPU templates with RFDS_NO bit
Passthrough in T2CL template, set to 1 in T2S template. Signed-off-by: Patrick Roy <roypat@amazon.co.uk>
1 parent b8dacc5 commit 21a3a6d

File tree

5 files changed

+11
-4
lines changed

5 files changed

+11
-4
lines changed

CHANGELOG.md

+5
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,11 @@ and this project adheres to
2424
`--config` parameter of `cpu-template-helper` optional. Users no longer need
2525
to prepare kernel, rootfs and Firecracker configuration files to use
2626
`cpu-template-helper`.
27+
- [#4537](https://github.com/firecracker-microvm/firecracker/pull/4537) Changed
28+
T2CL template to pass through bit 27 of `MSR_IA32_ARCH_CAPABILITIES`
29+
(`RFDS_NO`).
30+
- [#4537](https://github.com/firecracker-microvm/firecracker/pull/4537) Changed
31+
T2S template to set bit 27 of `MSR_IA32_ARCH_CAPABILITIES` (`RFDS_NO`) to 1.
2732

2833
### Deprecated
2934

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

+2-1
Original file line numberDiff line numberDiff line change
@@ -277,12 +277,13 @@ pub fn t2cl() -> CustomCpuTemplate {
277277
// - Bit 19: RRSBA
278278
// - Bit 24: PBRSB_NO
279279
// - Bit 26: GDS_NO
280+
// - Bit 27: RFDS_NO
280281
//
281282
// Note that this MSR is specific to Intel processors.
282283
RegisterModifier {
283284
addr: 0x10a,
284285
bitmap: RegisterValueFilter {
285-
filter: 0b1111_1111_1111_1111_1111_1111_1111_1111_1111_1010_1111_0101_0001_1110_0000_0000,
286+
filter: 0b1111_1111_1111_1111_1111_1111_1111_1111_1111_0010_1111_0101_0001_1110_0000_0000,
286287
value: 0b0000_0000_0000_0000_0000_0000_0000_0000_0000_0000_0000_0000_0000_0000_0000_0000,
287288
},
288289
},

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

+2-1
Original file line numberDiff line numberDiff line change
@@ -255,12 +255,13 @@ pub fn t2s() -> CustomCpuTemplate {
255255
// - Bit 23: OVERCLOCKING_STATUS
256256
// - Bit 24: PBRSB_NO
257257
// - Bit 26: GDS_NO
258+
// - BIT 27: RFDS_NO
258259
// - Bits 63-25: Reserved
259260
RegisterModifier {
260261
addr: 0x10a,
261262
bitmap: RegisterValueFilter {
262263
filter: 0b1111_1111_1111_1111_1111_1111_1111_1111_1111_1111_1111_1111_1111_1111_1111_1111,
263-
value: 0b0000_0000_0000_0000_0000_0000_0000_0000_0000_0100_0000_1000_0000_1100_0100_1100,
264+
value: 0b0000_0000_0000_0000_0000_0000_0000_0000_0000_1100_0000_1000_0000_1100_0100_1100,
264265
},
265266
}],
266267
..Default::default()

tests/data/static_cpu_templates/t2cl.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@
9090
"msr_modifiers": [
9191
{
9292
"addr": "0x10a",
93-
"bitmap": "0b0000000000000000000000000000000000000x0x0000x0x0xxx0000xxxxxxxxx"
93+
"bitmap": "0b000000000000000000000000000000000000xx0x0000x0x0xxx0000xxxxxxxxx"
9494
}
9595
]
9696
}

tests/data/static_cpu_templates/t2s.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@
9090
"msr_modifiers": [
9191
{
9292
"addr": "0x10a",
93-
"bitmap": "0b0000000000000000000000000000000000000100000010000000110001001100"
93+
"bitmap": "0b0000000000000000000000000000000000001100000010000000110001001100"
9494
}
9595
]
9696
}

0 commit comments

Comments
 (0)