Skip to content

Commit 35db43d

Browse files
zulinx86roypat
authored andcommitted
fix(vmm): Pass through IA32_ARCH_CAPABILITIES.{RSBA,RRSBA} with T2CL
We updated the fingerprint files in PR #3813, since Intel microcode release (microcode-20230512) changed to set IA32_ARCH_CAPABILITIES.RRSBA (bit 19) to 1 on Intel CascadeLake CPU. The mitigation itself is already in place which is eIBRS. Since the kernel enables eIBRS by default using SPECTRE_V2_EIBRS mode regardless of the IA32_ARCH_CAPABILITIES.RRSBA bit, hosts and guests should not get impacted by this change. However, it has a role to inform softwares whether the part has the RRSBA behavior. The T2CL template has set the RRSBA bit to 0 explicitly before, but this commit changes to pass through the bit from the host so that guest kernels and applications can know that the processor has the RRSBA behavior. The reason why it passes through the bit from the host opposed to the T2S template is that the T2CL template is not designed to allow snapshot migration between different CPU models. In addition to the RRSBA bit, this comit also changes to pass through the RSBA bit, as it is safer to let guest know these informative bits of the host CPU than to overwrite them with templates. Signed-off-by: Takahiro Itazuri <[email protected]>
1 parent 13963c2 commit 35db43d

File tree

4 files changed

+7
-2
lines changed

4 files changed

+7
-2
lines changed

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,9 @@
3131
- Fixed passing through cache information from host in CPUID leaf 0x80000006.
3232
- Fixed the T2S CPU template to set the RRSBA bit of the IA32_ARCH_CAPABILITIES
3333
MSR to 1 in accordance with an Intel microcode update.
34+
- Fixed the T2CL CPU template to pass through the RSBA and RRSBA bits of the
35+
IA32_ARCH_CAPABILITIES MSR from the host in accordance with an Intel microcode
36+
update.
3437

3538
## [1.3.0]
3639

resources/tests/static_cpu_templates/t2cl.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@
9090
"msr_modifiers": [
9191
{
9292
"addr": "0x10a",
93-
"bitmap": "0b0000000000000000000000000000000000000000000000000000000011101011"
93+
"bitmap": "0b00000000000000000000000000000000000000000000x0000000000011101x11"
9494
}
9595
]
9696
}

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ pub fn t2cl() -> CustomCpuTemplate {
131131
msr_modifiers: vec![RegisterModifier {
132132
addr: 0x10a,
133133
bitmap: RegisterValueFilter {
134-
filter: 0b1111111111111111111111111111111111111111111111111111111111111111,
134+
filter: 0b1111111111111111111111111111111111111111111101111111111111111011,
135135
value: 0b0000000000000000000000000000000000000000000000000000000011101011,
136136
},
137137
}],

tests/integration_tests/functional/test_feat_parity.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -257,6 +257,8 @@ def test_feat_parity_msr_arch_cap(vm):
257257
(1 << 6) | # IF_PSCHANGE_MC_NO
258258
(1 << 7) # TSX_CTRL
259259
)
260+
if global_props.cpu_codename == "INTEL_CASCADELAKE":
261+
expected |= (1 << 19) # RRSBA
260262
# fmt: on
261263
assert actual == expected, f"{actual=:#x} != {expected=:#x}"
262264
elif cpu_template == "T2A":

0 commit comments

Comments
 (0)