Skip to content

Commit aedf7db

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 402528c commit aedf7db

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

tests/integration_tests/functional/test_cpu_features_x86_64.py

Lines changed: 9 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,14 @@ 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.
398+
# https://github.com/firecracker-microvm/firecracker/issues/4899
399+
if "Ubuntu" in global_props.os:
400+
expected -= "flush_l1d"
401+
assert host_feats - guest_feats == expected
402+
395403
assert guest_feats - host_feats == {
396404
"hypervisor",
397405
"tsc_known_freq",

0 commit comments

Comments
 (0)