Skip to content

Commit 7f528b4

Browse files
committed
chore: Add ibpb_exit_to_user as host only feature
Backport commit 8221464 from main. New Amazon Linux host kernels enable mitigation against VMScape that is IBPB before exit to userspace. However, our guest kernels still haven't had the patches yet. Note that Intel Ice Lake is not affected by VMScape as long as BHB clearing sequence is used to mitigate BHI. Signed-off-by: Takahiro Itazuri <[email protected]>
1 parent 13ffca9 commit 7f528b4

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

tests/integration_tests/functional/test_cpu_features_host_vs_guest.py

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@
4949
"hwp_act_window",
5050
"hwp_epp",
5151
"hwp_pkg_req",
52+
"ibpb_exit_to_user",
5253
"ida",
5354
"intel_ppin",
5455
"intel_pt",
@@ -94,6 +95,7 @@
9495
"extd_apicid",
9596
"flushbyasid",
9697
"hw_pstate",
98+
"ibpb_exit_to_user",
9799
"ibs",
98100
"irperf",
99101
"lbrv",
@@ -211,7 +213,14 @@ def test_host_vs_guest_cpu_features(uvm_plain_any):
211213
assert guest_feats - host_feats == expected_guest_minus_host
212214

213215
case CpuModel.INTEL_ICELAKE:
214-
host_guest_diff_5_10 = INTEL_HOST_ONLY_FEATS - {"cdp_l3"} | {
216+
expected_host_minus_guest = INTEL_HOST_ONLY_FEATS
217+
218+
# As long as BHB clearing software mitigation is enabled, Intel Ice Lake is not
219+
# vulnerable to VMScape and "IBPB before exit to userspace" is not needed.
220+
# https://docs.kernel.org/admin-guide/hw-vuln/vmscape.html#affected-processors
221+
expected_host_minus_guest -= {"ibpb_exit_to_user"}
222+
223+
host_guest_diff_5_10 = expected_host_minus_guest - {"cdp_l3"} | {
215224
"pconfig",
216225
"tme",
217226
"split_lock_detect",

0 commit comments

Comments
 (0)