From 6adc4f2c90d1afa3cc9a6204e291772eb383cde4 Mon Sep 17 00:00:00 2001 From: Bo Chen Date: Sat, 11 Apr 2026 04:42:44 +0000 Subject: [PATCH] tests: vfio: Add more checks on the Nvidia GPU from the guest Signed-off-by: Bo Chen --- cloud-hypervisor/tests/integration.rs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/cloud-hypervisor/tests/integration.rs b/cloud-hypervisor/tests/integration.rs index 15516e84e..8b16c909e 100644 --- a/cloud-hypervisor/tests/integration.rs +++ b/cloud-hypervisor/tests/integration.rs @@ -8274,6 +8274,9 @@ mod vfio { assert!(guest.get_total_memory().unwrap_or_default() > 3_840_000); + // Verify the VFIO device works before memory hotplug + guest.check_nvidia_gpu(); + guest.enable_memory_hotplug(); // Add RAM to the VM @@ -8447,6 +8450,9 @@ mod vfio { .unwrap() .contains("input address: 42 bits") ); + + // Check the VFIO device works after boot + guest.check_nvidia_gpu(); }); let _ = child.kill();