Skip to content

Commit 4109dcb

Browse files
committed
fix(tests): bring back the AMD Genoa check
Fixes: f4f7536 Signed-off-by: Pablo Barbáchano <[email protected]>
1 parent fbe5930 commit 4109dcb

File tree

1 file changed

+57
-46
lines changed

1 file changed

+57
-46
lines changed

tests/integration_tests/functional/test_cpu_features_host_vs_guest.py

Lines changed: 57 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,52 @@
7070
"xtpr",
7171
}
7272

73+
AMD_HOST_ONLY_FEATS = {
74+
"amd_ppin",
75+
"aperfmperf",
76+
"bpext",
77+
"cat_l3",
78+
"cdp_l3",
79+
"cpb",
80+
"cqm",
81+
"cqm_llc",
82+
"cqm_mbm_local",
83+
"cqm_mbm_total",
84+
"cqm_occup_llc",
85+
"decodeassists",
86+
"extapic",
87+
"extd_apicid",
88+
"flushbyasid",
89+
"hw_pstate",
90+
"ibs",
91+
"irperf",
92+
"lbrv",
93+
"mba",
94+
"monitor",
95+
"mwaitx",
96+
"overflow_recov",
97+
"pausefilter",
98+
"perfctr_llc",
99+
"perfctr_nb",
100+
"pfthreshold",
101+
"rdpru",
102+
"rdt_a",
103+
"sev",
104+
"sev_es",
105+
"skinit",
106+
"smca",
107+
"sme",
108+
"succor",
109+
"svm_lock",
110+
"tce",
111+
"tsc_scale",
112+
"v_vmsave_vmload",
113+
"vgif",
114+
"vmcb_clean",
115+
"wdt",
116+
}
117+
118+
73119

74120
def test_host_vs_guest_cpu_features(uvm_nano):
75121
"""Check CPU features host vs guest"""
@@ -82,52 +128,8 @@ def test_host_vs_guest_cpu_features(uvm_nano):
82128

83129
match CPU_MODEL:
84130
case CpuModel.AMD_MILAN:
85-
host_guest_diff_5_10 = {
86-
"amd_ppin",
87-
"aperfmperf",
88-
"bpext",
89-
"cat_l3",
90-
"cdp_l3",
91-
"cpb",
92-
"cqm",
93-
"cqm_llc",
94-
"cqm_mbm_local",
95-
"cqm_mbm_total",
96-
"cqm_occup_llc",
97-
"decodeassists",
98-
"extapic",
99-
"extd_apicid",
100-
"flushbyasid",
101-
"hw_pstate",
102-
"ibs",
103-
"irperf",
104-
"lbrv",
105-
"mba",
106-
"monitor",
107-
"mwaitx",
108-
"overflow_recov",
109-
"pausefilter",
110-
"perfctr_llc",
111-
"perfctr_nb",
112-
"pfthreshold",
113-
"rdpru",
114-
"rdt_a",
115-
"sev",
116-
"sev_es",
117-
"skinit",
118-
"smca",
119-
"sme",
120-
"succor",
121-
"svm_lock",
122-
"tce",
123-
"tsc_scale",
124-
"v_vmsave_vmload",
125-
"vgif",
126-
"vmcb_clean",
127-
"wdt",
128-
}
129131

130-
host_guest_diff_6_1 = host_guest_diff_5_10 - {
132+
host_guest_diff_6_1 = AMD_HOST_ONLY_FEATS - {
131133
"lbrv",
132134
"pausefilter",
133135
"pfthreshold",
@@ -139,7 +141,7 @@ def test_host_vs_guest_cpu_features(uvm_nano):
139141
} | {"brs", "rapl", "v_spec_ctrl"}
140142

141143
if global_props.host_linux_version_tpl < (6, 1):
142-
assert host_feats - guest_feats == host_guest_diff_5_10
144+
assert host_feats - guest_feats == AMD_HOST_ONLY_FEATS
143145
else:
144146
assert host_feats - guest_feats == host_guest_diff_6_1
145147

@@ -150,6 +152,15 @@ def test_host_vs_guest_cpu_features(uvm_nano):
150152
"tsc_known_freq",
151153
}
152154

155+
case CpuModel.AMD_GENOA:
156+
assert host_feats - guest_feats == AMD_HOST_ONLY_FEATS
157+
assert guest_feats - host_feats == {
158+
"hypervisor",
159+
"tsc_adjust",
160+
"tsc_deadline_timer",
161+
"tsc_known_freq",
162+
}
163+
153164
case CpuModel.INTEL_SKYLAKE:
154165
assert host_feats - guest_feats == INTEL_HOST_ONLY_FEATS
155166
assert guest_feats - host_feats == {

0 commit comments

Comments
 (0)