Skip to content

Commit 8523232

Browse files
vmm_tests: memory validation CI/CD pipeline tests for main (#1995)
Description: This PR updates the VMM test pipeline to evaluate VTL2 memory usage. This is done to track changes in memory usage and produce a failed test for builds that result in an increase in memory usage beyond reasonable variance. **Changes** - Implement module to collect all relevant VTL2 memory usage information - Add tests for VMs with 2VPs and 64VPs with 16GB VTL0 memory across TDX, SNP, and ARM architectures - Add test for VMs with 2VPs and 32VPs with 16GB VTL0 memory for GP x64 VMs - Log memory usage information as JSON - Produce a failed test for builds that result in memory usage that exceeds reasonable variance from baseline values
1 parent 31f9767 commit 8523232

File tree

7 files changed

+810
-0
lines changed

7 files changed

+810
-0
lines changed

Cargo.lock

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9287,7 +9287,10 @@ dependencies = [
92879287
"petri_artifact_resolver_openvmm_known_paths",
92889288
"petri_artifacts_common",
92899289
"petri_artifacts_vmm_test",
9290+
"pipette_client",
92909291
"scsidisk_resources",
9292+
"serde",
9293+
"serde_json",
92919294
"storvsp_resources",
92929295
"tempfile",
92939296
"tmk_tests",

flowey/flowey_hvlite/src/pipelines/checkin_gates.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -910,6 +910,7 @@ impl IntoPipeline for CheckinGatesCli {
910910
KnownTestArtifacts::FreeBsd13_2X64Iso,
911911
KnownTestArtifacts::Gen1WindowsDataCenterCore2022X64Vhd,
912912
KnownTestArtifacts::Gen2WindowsDataCenterCore2022X64Vhd,
913+
KnownTestArtifacts::Gen2WindowsDataCenterCore2025X64Vhd,
913914
KnownTestArtifacts::Ubuntu2204ServerX64Vhd,
914915
KnownTestArtifacts::VmgsWithBootEntry,
915916
];

petri/src/vm/mod.rs

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -642,6 +642,16 @@ impl<T: PetriVmmBackend> PetriVmBuilder<T> {
642642
self.config.firmware.is_openhcl()
643643
}
644644

645+
/// Get the isolation type of the VM
646+
pub fn isolation(&self) -> Option<IsolationType> {
647+
self.config.firmware.isolation()
648+
}
649+
650+
/// Get the machine architecture
651+
pub fn arch(&self) -> MachineArch {
652+
self.config.arch
653+
}
654+
645655
/// Get the backend-specific config builder
646656
pub fn modify_backend(
647657
mut self,

vmm_tests/vmm_tests/Cargo.toml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,9 @@ hvlite_ttrpc_vmservice.workspace = true
5454
mesh_rpc.workspace = true
5555

5656
tempfile.workspace = true
57+
serde_json.workspace = true
58+
pipette_client.workspace = true
59+
serde.workspace = true
5760

5861
[lints]
5962
workspace = true
Lines changed: 334 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,334 @@
1+
{
2+
"aarch64": {
3+
"vtl2_total": 524288,
4+
"2vp": {
5+
"usage": {
6+
"base": 59510,
7+
"threshold": 150
8+
},
9+
"reservation": {
10+
"base": 18360,
11+
"threshold": 0
12+
},
13+
"underhill_init": {
14+
"Pss": {
15+
"base": 1171,
16+
"threshold": 150
17+
},
18+
"Pss_Anon": {
19+
"base": 290,
20+
"threshold": 150
21+
}
22+
},
23+
"openvmm_hcl": {
24+
"Pss": {
25+
"base": 10775,
26+
"threshold": 150
27+
},
28+
"Pss_Anon": {
29+
"base": 1388,
30+
"threshold": 150
31+
}
32+
},
33+
"underhill_vm": {
34+
"Pss": {
35+
"base": 21567,
36+
"threshold": 150
37+
},
38+
"Pss_Anon": {
39+
"base": 4734,
40+
"threshold": 150
41+
}
42+
}
43+
},
44+
"64vp": {
45+
"usage": {
46+
"base": 118732,
47+
"threshold": 1000
48+
},
49+
"reservation": {
50+
"base": 23884,
51+
"threshold": 0
52+
},
53+
"underhill_init": {
54+
"Pss": {
55+
"base": 1173,
56+
"threshold": 150
57+
},
58+
"Pss_Anon": {
59+
"base": 3760,
60+
"threshold": 150
61+
}
62+
},
63+
"openvmm_hcl": {
64+
"Pss": {
65+
"base": 10757,
66+
"threshold": 150
67+
},
68+
"Pss_Anon": {
69+
"base": 1370,
70+
"threshold": 150
71+
}
72+
},
73+
"underhill_vm": {
74+
"Pss": {
75+
"base": 36105,
76+
"threshold": 1000
77+
},
78+
"Pss_Anon": {
79+
"base": 16976,
80+
"threshold": 1000
81+
}
82+
}
83+
}
84+
},
85+
"gp-x64": {
86+
"vtl2_total": 524288,
87+
"2vp": {
88+
"usage": {
89+
"base": 231334,
90+
"threshold": 500
91+
},
92+
"reservation": {
93+
"base": 17664,
94+
"threshold": 0
95+
},
96+
"underhill_init": {
97+
"Pss": {
98+
"base": 4553,
99+
"threshold": 150
100+
},
101+
"Pss_Anon": {
102+
"base": 3767,
103+
"threshold": 150
104+
}
105+
},
106+
"openvmm_hcl": {
107+
"Pss": {
108+
"base": 15097,
109+
"threshold": 150
110+
},
111+
"Pss_Anon": {
112+
"base": 4824,
113+
"threshold": 150
114+
}
115+
},
116+
"underhill_vm": {
117+
"Pss": {
118+
"base": 29054,
119+
"threshold": 500
120+
},
121+
"Pss_Anon": {
122+
"base": 8951,
123+
"threshold": 250
124+
}
125+
}
126+
},
127+
"32vp": {
128+
"usage": {
129+
"base": 254748,
130+
"threshold": 1000
131+
},
132+
"reservation": {
133+
"base": 24660,
134+
"threshold": 0
135+
},
136+
"underhill_init": {
137+
"Pss": {
138+
"base": 4543,
139+
"threshold": 150
140+
},
141+
"Pss_Anon": {
142+
"base": 3767,
143+
"threshold": 150
144+
}
145+
},
146+
"openvmm_hcl": {
147+
"Pss": {
148+
"base": 15170,
149+
"threshold": 150
150+
},
151+
"Pss_Anon": {
152+
"base": 4811,
153+
"threshold": 150
154+
}
155+
},
156+
"underhill_vm": {
157+
"Pss": {
158+
"base": 37262,
159+
"threshold": 1000
160+
},
161+
"Pss_Anon": {
162+
"base": 16628,
163+
"threshold": 1000
164+
}
165+
}
166+
}
167+
},
168+
"intel-tdx": {
169+
"vtl2_total": 655360,
170+
"2vp": {
171+
"usage": {
172+
"base": 231175,
173+
"threshold": 150
174+
},
175+
"reservation": {
176+
"base": 28952,
177+
"threshold": 0
178+
},
179+
"underhill_init": {
180+
"Pss": {
181+
"base": 4525,
182+
"threshold": 150
183+
},
184+
"Pss_Anon": {
185+
"base": 3760,
186+
"threshold": 150
187+
}
188+
},
189+
"openvmm_hcl": {
190+
"Pss": {
191+
"base": 14940,
192+
"threshold": 150
193+
},
194+
"Pss_Anon": {
195+
"base": 4774,
196+
"threshold": 150
197+
}
198+
},
199+
"underhill_vm": {
200+
"Pss": {
201+
"base": 29554,
202+
"threshold": 500
203+
},
204+
"Pss_Anon": {
205+
"base": 9312,
206+
"threshold": 250
207+
}
208+
}
209+
},
210+
"64vp": {
211+
"usage": {
212+
"base": 307455,
213+
"threshold": 1500
214+
},
215+
"reservation": {
216+
"base": 41676,
217+
"threshold": 0
218+
},
219+
"underhill_init": {
220+
"Pss": {
221+
"base": 4530,
222+
"threshold": 200
223+
},
224+
"Pss_Anon": {
225+
"base": 3755,
226+
"threshold": 150
227+
}
228+
},
229+
"openvmm_hcl": {
230+
"Pss": {
231+
"base": 14933,
232+
"threshold": 250
233+
},
234+
"Pss_Anon": {
235+
"base": 4798,
236+
"threshold": 150
237+
}
238+
},
239+
"underhill_vm": {
240+
"Pss": {
241+
"base": 58375,
242+
"threshold": 1500
243+
},
244+
"Pss_Anon": {
245+
"base": 35983,
246+
"threshold": 1500
247+
}
248+
}
249+
}
250+
},
251+
"amd-snp": {
252+
"vtl2_total": 655360,
253+
"2vp": {
254+
"usage": {
255+
"base": 233704,
256+
"threshold": 150
257+
},
258+
"reservation": {
259+
"base": 28884,
260+
"threshold": 0
261+
},
262+
"underhill_init": {
263+
"Pss": {
264+
"base": 4516,
265+
"threshold": 150
266+
},
267+
"Pss_Anon": {
268+
"base": 3760,
269+
"threshold": 150
270+
}
271+
},
272+
"openvmm_hcl": {
273+
"Pss": {
274+
"base": 15061,
275+
"threshold": 150
276+
},
277+
"Pss_Anon": {
278+
"base": 4799,
279+
"threshold": 150
280+
}
281+
},
282+
"underhill_vm": {
283+
"Pss": {
284+
"base": 31812,
285+
"threshold": 500
286+
},
287+
"Pss_Anon": {
288+
"base": 11730,
289+
"threshold": 150
290+
}
291+
}
292+
},
293+
"64vp": {
294+
"usage": {
295+
"base": 310880,
296+
"threshold": 1000
297+
},
298+
"reservation": {
299+
"base": 42356,
300+
"threshold": 0
301+
},
302+
"underhill_init": {
303+
"Pss": {
304+
"base": 4514,
305+
"threshold": 150
306+
},
307+
"Pss_Anon": {
308+
"base": 3759,
309+
"threshold": 150
310+
}
311+
},
312+
"openvmm_hcl": {
313+
"Pss": {
314+
"base": 14992,
315+
"threshold": 150
316+
},
317+
"Pss_Anon": {
318+
"base": 4787,
319+
"threshold": 150
320+
}
321+
},
322+
"underhill_vm": {
323+
"Pss": {
324+
"base": 57297,
325+
"threshold": 1000
326+
},
327+
"Pss_Anon": {
328+
"base": 34598,
329+
"threshold": 1000
330+
}
331+
}
332+
}
333+
}
334+
}

0 commit comments

Comments
 (0)