Skip to content

Commit f760a42

Browse files
committed
fix(test): Add invpcid_single to guest-host feature diff on ubuntu
Linux kernel v6.6+ drops the synthetic feature flag. While our ubuntu host kernel is v6.8 that has the change, Amazon Linux kernels and our guest kernel doesn't. Fixes: 4e014a1 ("test(x86_64): add host vs guest cpu feature test") Signed-off-by: Takahiro Itazuri <[email protected]>
1 parent 46ce60d commit f760a42

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
@@ -401,11 +401,18 @@ def test_host_vs_guest_cpu_features_x86_64(uvm_nano):
401401
expected -= {"flush_l1d"}
402402
assert host_feats - guest_feats == expected
403403

404-
assert guest_feats - host_feats == {
404+
expected = {
405405
"hypervisor",
406406
"tsc_known_freq",
407407
"umip",
408408
}
409+
# TODO: Remove the below ubuntu exception once our guest kernel and Amazon Linux host
410+
# kernels pick the following kernel commit and remove the synthetic feature flag.
411+
# https://github.com/torvalds/linux/commit/54e3d9434ef61b97fd3263c141b928dc5635e50d
412+
# See also https://github.com/firecracker-microvm/firecracker/issues/4901
413+
if "Ubuntu" in global_props.os:
414+
expected += {"invpcid_single"}
415+
assert guest_feats - host_feats == expected
409416
case CpuModel.INTEL_ICELAKE:
410417
host_guest_diff_5_10 = {
411418
"dtes64",

0 commit comments

Comments
 (0)