Skip to content

Commit

Permalink
fix(test): Remove flush_l1d from host-guest feature diff on ubuntu
Browse files Browse the repository at this point in the history
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]>
  • Loading branch information
zulinx86 committed Nov 7, 2024
1 parent bd6c7f4 commit 46ce60d
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion tests/integration_tests/functional/test_cpu_features_x86_64.py
Original file line number Diff line number Diff line change
Expand Up @@ -343,7 +343,7 @@ def test_host_vs_guest_cpu_features_x86_64(uvm_nano):
"umip",
}
case CpuModel.INTEL_CASCADELAKE:
assert host_feats - guest_feats == {
expected = {
"acpi",
"aperfmperf",
"arch_perfmon",
Expand Down Expand Up @@ -392,6 +392,15 @@ def test_host_vs_guest_cpu_features_x86_64(uvm_nano):
"vpid",
"xtpr",
}
# TODO: Remove the below ubuntu exception and "flush_l1d" from the above expected list
# once Amazon Linux 2 and Amazon Linux 2023 picks the following kernel commit and passes
# through the "flush_l1d" CPUID bit to guests.
# https://github.com/torvalds/linux/commit/45cf86f26148e549c5ba4a8ab32a390e4bde216e
# See also https://github.com/firecracker-microvm/firecracker/issues/4899
if "Ubuntu" in global_props.os:
expected -= {"flush_l1d"}
assert host_feats - guest_feats == expected

assert guest_feats - host_feats == {
"hypervisor",
"tsc_known_freq",
Expand Down

0 comments on commit 46ce60d

Please sign in to comment.