Skip to content

Commit f51fbd5

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

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+
# Linux kernel v6.4+ passes through the CPUID bit for "flush_l1d" to guests.
396+
# https://github.com/torvalds/linux/commit/45cf86f26148e549c5ba4a8ab32a390e4bde216e
397+
#
398+
# Our test ubuntu host kernel is v6.8 and has the commit.
399+
if global_props.host_linux_version_tpl >= (6, 4):
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)