Skip to content

Commit f65f4b4

Browse files
committed
fix(test): Remove flush_l1d from host-guest feature diff on ubuntu
Linux kernel v6.4+ passes through the "l1d_flush" CPUID bit to guests. While our ubuntu host kernel is 6.8 that has the change, the latest Amazon Linux 2 and Amazon Linux 2023 haven't. Fixes: 4e014a1 ("test(x86_64): add host vs guest cpu feature test") Signed-off-by: Takahiro Itazuri <[email protected]>
1 parent 7add1bc commit f65f4b4

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

tests/integration_tests/functional/test_cpu_features_x86_64.py

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -343,7 +343,7 @@ def test_host_vs_guest_cpu_features_x86_64(uvm_nano):
343343
"umip",
344344
}
345345
case CpuModel.INTEL_CASCADELAKE:
346-
assert host_feats - guest_feats == {
346+
expected = {
347347
"acpi",
348348
"aperfmperf",
349349
"arch_perfmon",
@@ -392,6 +392,13 @@ def test_host_vs_guest_cpu_features_x86_64(uvm_nano):
392392
"vpid",
393393
"xtpr",
394394
}
395+
# TODO: Remove the below ubuntu exception and "flush_l1d" from the above expected list
396+
# once Amazon Linux 2 and Amazon Linux 2023 starts to pass through the "flush_l1d" CPUID
397+
# bit to guests. See https://github.com/firecracker-microvm/firecracker/issues/4899
398+
if "Ubuntu" in global_props.os:
399+
expected -= "flush_l1d"
400+
assert host_feats - guest_feats == expected
401+
395402
assert guest_feats - host_feats == {
396403
"hypervisor",
397404
"tsc_known_freq",

0 commit comments

Comments
 (0)