@@ -44,12 +44,13 @@ def id(self):
4444 """Computes a unique id for this test instance"""
4545 return "all_dev" if self .all_devices else f"{ self .vcpus } vcpu_{ self .mem } mb"
4646
47- def boot_vm (self , microvm_factory , guest_kernel , rootfs ) -> Microvm :
47+ def boot_vm (self , microvm_factory , guest_kernel , rootfs , pci_enabled ) -> Microvm :
4848 """Creates the initial snapshot that will be loaded repeatedly to sample latencies"""
4949 vm = microvm_factory .build (
5050 guest_kernel ,
5151 rootfs ,
5252 monitor_memory = False ,
53+ pci = pci_enabled ,
5354 )
5455 vm .spawn (log_level = "Info" , emit_metrics = True )
5556 vm .time_api_requests = False
@@ -96,7 +97,7 @@ def boot_vm(self, microvm_factory, guest_kernel, rootfs) -> Microvm:
9697 ids = lambda x : x .id ,
9798)
9899def test_restore_latency (
99- microvm_factory , rootfs , guest_kernel_linux_5_10 , test_setup , metrics
100+ microvm_factory , guest_kernel_linux_5_10 , rootfs , pci_enabled , test_setup , metrics
100101):
101102 """
102103 Restores snapshots with vcpu/memory configuration, roughly scaling according to mem = (vcpus - 1) * 2048MB,
@@ -105,7 +106,9 @@ def test_restore_latency(
105106
106107 We only test a single guest kernel, as the guest kernel does not "participate" in snapshot restore.
107108 """
108- vm = test_setup .boot_vm (microvm_factory , guest_kernel_linux_5_10 , rootfs )
109+ vm = test_setup .boot_vm (
110+ microvm_factory , guest_kernel_linux_5_10 , rootfs , pci_enabled
111+ )
109112
110113 metrics .set_dimensions (
111114 {
@@ -147,6 +150,7 @@ def test_post_restore_latency(
147150 microvm_factory ,
148151 rootfs ,
149152 guest_kernel_linux_5_10 ,
153+ pci_enabled ,
150154 metrics ,
151155 uffd_handler ,
152156 huge_pages ,
@@ -156,7 +160,9 @@ def test_post_restore_latency(
156160 pytest .skip ("huge page snapshots can only be restored using uffd" )
157161
158162 test_setup = SnapshotRestoreTest (mem = 1024 , vcpus = 2 , huge_pages = huge_pages )
159- vm = test_setup .boot_vm (microvm_factory , guest_kernel_linux_5_10 , rootfs )
163+ vm = test_setup .boot_vm (
164+ microvm_factory , guest_kernel_linux_5_10 , rootfs , pci_enabled
165+ )
160166
161167 metrics .set_dimensions (
162168 {
@@ -204,14 +210,17 @@ def test_population_latency(
204210 microvm_factory ,
205211 rootfs ,
206212 guest_kernel_linux_5_10 ,
213+ pci_enabled ,
207214 metrics ,
208215 huge_pages ,
209216 vcpus ,
210217 mem ,
211218):
212219 """Collects population latency metrics (e.g. how long it takes UFFD handler to fault in all memory)"""
213220 test_setup = SnapshotRestoreTest (mem = mem , vcpus = vcpus , huge_pages = huge_pages )
214- vm = test_setup .boot_vm (microvm_factory , guest_kernel_linux_5_10 , rootfs )
221+ vm = test_setup .boot_vm (
222+ microvm_factory , guest_kernel_linux_5_10 , rootfs , pci_enabled
223+ )
215224
216225 metrics .set_dimensions (
217226 {
0 commit comments