Skip to content

Commit 7add1bc

Browse files
committed
fix(test): Remove ssbs from host-guest feature diff on ubuntu
Linux kernel should hide "ssbs" since Neoverse-N1 and Neoverse-V1 have an errata whereby an MSR to the SSBS special-purpose register does not affect subsequent speculative instructions, permitting speculative store bypassing for a window of time. Not only our guest kernel but also host ubuntu kernel (currently, v6.8.0-1016-aws) lack the change that hides it while the Amazon Linux host kernels have it. Fixes: 2babc80 ("test(aarch64): add host vs guest cpu feature test") Signed-off-by: Takahiro Itazuri <[email protected]>
1 parent 0614ed7 commit 7add1bc

File tree

1 file changed

+15
-8
lines changed

1 file changed

+15
-8
lines changed

tests/integration_tests/functional/test_cpu_features_aarch64.py

Lines changed: 15 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010

1111
import framework.utils_cpuid as cpuid_utils
1212
from framework import utils
13+
from framework.properties import global_props
1314
from framework.utils_cpuid import CPU_FEATURES_CMD, CpuModel
1415

1516
PLATFORM = platform.machine()
@@ -82,11 +83,16 @@ def test_host_vs_guest_cpu_features_aarch64(uvm_nano):
8283
match cpu_model:
8384
case CpuModel.ARM_NEOVERSE_N1:
8485
assert host_feats - guest_feats == set()
85-
# Kernel should hide this feature, but our guest kernel
86-
# currently lacks the commit with this change.
87-
# The commit that introduces the change:
88-
# https://github.com/torvalds/linux/commit/7187bb7d0b5c7dfa18ca82e9e5c75e13861b1d88
89-
assert guest_feats - host_feats == {"ssbs"}
86+
# TODO: Remove "ssbs" once our guest kernel picks the following commit.
87+
# https://github.com/torvalds/linux/commit/adeec61a4723fd3e39da68db4cc4d924e6d7f641
88+
# See also https://github.com/firecracker-microvm/firecracker/issues/4898
89+
expected = {"ssbs"}
90+
# TODO: Delete "ssbs" removal once our host ubuntu kernel picks the following commit.
91+
# https://github.com/torvalds/linux/commit/adeec61a4723fd3e39da68db4cc4d924e6d7f641
92+
# See also https://github.com/firecracker-microvm/firecracker/issues/4898
93+
if global_props.os.contains("Ubuntu"):
94+
expected -= "ssbs"
95+
assert guest_feats - host_feats == expected
9096
case CpuModel.ARM_NEOVERSE_V1:
9197
# KVM does not enable PAC or SVE features by default
9298
# and Firecracker does not enable them either.
@@ -97,9 +103,10 @@ def test_host_vs_guest_cpu_features_aarch64(uvm_nano):
97103
"svebf16",
98104
"svei8mm",
99105
}
100-
# kernel should hide this feature, but our guest kernel
101-
# is not recent enough for this.
102-
assert guest_feats - host_feats == {"ssbs"}
106+
# TODO: Remove "ssbs" once our guest kernel picks the following commit.
107+
# https://github.com/torvalds/linux/commit/adeec61a4723fd3e39da68db4cc4d924e6d7f641
108+
# See also https://github.com/firecracker-microvm/firecracker/issues/4898
109+
expected = {"ssbs"}
103110
case _:
104111
if os.environ.get("BUILDKITE") is not None:
105112
assert False, f"Cpu model {cpu_model} is not supported"

0 commit comments

Comments
 (0)