From d12492ca8ffaf38a9242d2d5a62d0be45fa3b091 Mon Sep 17 00:00:00 2001 From: "Sheng-Wei (Way) Chen" Date: Fri, 27 Jun 2025 13:34:30 +0000 Subject: [PATCH 1/7] fix: Correct GSI numbering for aarch64 to resolve device limit issues On aarch64, Linux expects device tree interrupts (GSIs) to start at 0, as it internally adds an offset of 32 for SPIs. Firecracker previously defined IRQ_BASE as 32, unintentionally causing a double offset and limiting the maximum number of attachable devices to 64. This commit introduces new constants, GSI_BASE and GSI_MAX, properly adjusted for aarch64, with GSIs starting at 1 (since GSI 0 is disallowed by device_manager/mmio.rs). These changes ensure interrupts are numbered correctly, resolving the issue and allowing an aarch64 VM to handle up to 95 devices. Additional adjustments are made to tests to reflect this correction. Signed-off-by: Sheng-Wei (Way) Chen --- src/vmm/src/arch/aarch64/layout.rs | 10 ++++++++++ src/vmm/src/arch/mod.rs | 9 +++++---- src/vmm/src/arch/x86_64/layout.rs | 6 ++++++ src/vmm/src/device_manager/mmio.rs | 2 +- src/vmm/src/device_manager/resources.rs | 12 ++++++------ 5 files changed, 28 insertions(+), 11 deletions(-) diff --git a/src/vmm/src/arch/aarch64/layout.rs b/src/vmm/src/arch/aarch64/layout.rs index 922cfbb66e6..ef171ea46e5 100644 --- a/src/vmm/src/arch/aarch64/layout.rs +++ b/src/vmm/src/arch/aarch64/layout.rs @@ -80,5 +80,15 @@ pub const IRQ_MAX: u32 = 128; /// First usable interrupt on aarch64. pub const IRQ_BASE: u32 = 32; +// The Linux kernel automatically shifts the GSI by 32 if it is an SPI, +// allowing us to start numbering from 0 instead of 32. +// But device_manager/mmio.rs states that 0 is not allowed for GSIs +// So we start with 1 instead. +/// The first usable GSI on aarch64. +pub const GSI_BASE: u32 = 1; + +/// The maximum usable GSI on aarch64. +pub const GSI_MAX: u32 = IRQ_MAX - IRQ_BASE - 1; + /// Below this address will reside the GIC, above this address will reside the MMIO devices. pub const MAPPED_IO_START: u64 = 1 << 30; // 1 GB diff --git a/src/vmm/src/arch/mod.rs b/src/vmm/src/arch/mod.rs index 61d65fea1a5..ebd270a2e61 100644 --- a/src/vmm/src/arch/mod.rs +++ b/src/vmm/src/arch/mod.rs @@ -22,8 +22,8 @@ pub use aarch64::vm::{ArchVm, ArchVmError, VmState}; pub use aarch64::{ ConfigurationError, MMIO_MEM_SIZE, MMIO_MEM_START, arch_memory_regions, configure_system_for_boot, get_kernel_start, initrd_load_addr, layout::CMDLINE_MAX_SIZE, - layout::IRQ_BASE, layout::IRQ_MAX, layout::SYSTEM_MEM_SIZE, layout::SYSTEM_MEM_START, - load_kernel, + layout::GSI_BASE, layout::GSI_MAX, layout::IRQ_BASE, layout::IRQ_MAX, layout::SYSTEM_MEM_SIZE, + layout::SYSTEM_MEM_START, load_kernel, }; /// Module for x86_64 related functionality. @@ -41,8 +41,9 @@ pub use x86_64::vm::{ArchVm, ArchVmError, VmState}; pub use crate::arch::x86_64::{ ConfigurationError, MMIO_MEM_SIZE, MMIO_MEM_START, arch_memory_regions, configure_system_for_boot, get_kernel_start, initrd_load_addr, layout::APIC_ADDR, - layout::CMDLINE_MAX_SIZE, layout::IOAPIC_ADDR, layout::IRQ_BASE, layout::IRQ_MAX, - layout::SYSTEM_MEM_SIZE, layout::SYSTEM_MEM_START, load_kernel, + layout::CMDLINE_MAX_SIZE, layout::GSI_BASE, layout::GSI_MAX, layout::IOAPIC_ADDR, + layout::IRQ_BASE, layout::IRQ_MAX, layout::SYSTEM_MEM_SIZE, layout::SYSTEM_MEM_START, + load_kernel, }; /// Types of devices that can get attached to this platform. diff --git a/src/vmm/src/arch/x86_64/layout.rs b/src/vmm/src/arch/x86_64/layout.rs index 18d718a49b8..a4c2f036906 100644 --- a/src/vmm/src/arch/x86_64/layout.rs +++ b/src/vmm/src/arch/x86_64/layout.rs @@ -24,6 +24,12 @@ pub const IRQ_BASE: u32 = 5; /// Last usable IRQ ID for virtio device interrupts on x86_64. pub const IRQ_MAX: u32 = 23; +/// The first usable GSI on x86_64 is the same as the first usable IRQ ID. +pub const GSI_BASE: u32 = IRQ_BASE; + +/// The maximum usable GSI on x86_64 is the same as the last usable IRQ ID. +pub const GSI_MAX: u32 = IRQ_MAX; + /// Address for the TSS setup. pub const KVM_TSS_ADDRESS: u64 = 0xfffb_d000; diff --git a/src/vmm/src/device_manager/mmio.rs b/src/vmm/src/device_manager/mmio.rs index 394935fe5c1..34ba1a37b4c 100644 --- a/src/vmm/src/device_manager/mmio.rs +++ b/src/vmm/src/device_manager/mmio.rs @@ -834,7 +834,7 @@ mod tests { let device_info = device_manager .allocate_mmio_resources(&mut resource_allocator, 1) .unwrap(); - assert_eq!(device_info.irq.unwrap().get(), crate::arch::IRQ_BASE); + assert_eq!(device_info.irq.unwrap().get(), crate::arch::GSI_BASE); } #[test] diff --git a/src/vmm/src/device_manager/resources.rs b/src/vmm/src/device_manager/resources.rs index 821148794ec..719426a1f55 100644 --- a/src/vmm/src/device_manager/resources.rs +++ b/src/vmm/src/device_manager/resources.rs @@ -27,7 +27,7 @@ impl ResourceAllocator { /// Create a new resource allocator for Firecracker devices pub fn new() -> Result { Ok(Self { - gsi_allocator: IdAllocator::new(arch::IRQ_BASE, arch::IRQ_MAX)?, + gsi_allocator: IdAllocator::new(arch::GSI_BASE, arch::GSI_MAX)?, mmio_memory: AddressAllocator::new(arch::MMIO_MEM_START, arch::MMIO_MEM_SIZE)?, system_memory: AddressAllocator::new(arch::SYSTEM_MEM_START, arch::SYSTEM_MEM_SIZE)?, }) @@ -102,7 +102,7 @@ mod tests { use super::ResourceAllocator; use crate::arch; - const MAX_IRQS: u32 = arch::IRQ_MAX - arch::IRQ_BASE + 1; + const MAX_IRQS: u32 = arch::GSI_MAX - arch::GSI_BASE + 1; #[test] fn test_allocate_gsi() { @@ -117,7 +117,7 @@ mod tests { // But allocating all of them at once should work assert_eq!( allocator.allocate_gsi(MAX_IRQS), - Ok((arch::IRQ_BASE..=arch::IRQ_MAX).collect::>()) + Ok((arch::GSI_BASE..=arch::GSI_MAX).collect::>()) ); // And now we ran out of GSIs assert_eq!( @@ -129,16 +129,16 @@ mod tests { let mut allocator = ResourceAllocator::new().unwrap(); // We should be able to allocate 1 GSI - assert_eq!(allocator.allocate_gsi(1), Ok(vec![arch::IRQ_BASE])); + assert_eq!(allocator.allocate_gsi(1), Ok(vec![arch::GSI_BASE])); // We can't allocate MAX_IRQS any more assert_eq!( allocator.allocate_gsi(MAX_IRQS), Err(vm_allocator::Error::ResourceNotAvailable) ); // We can allocate another one and it should be the second available - assert_eq!(allocator.allocate_gsi(1), Ok(vec![arch::IRQ_BASE + 1])); + assert_eq!(allocator.allocate_gsi(1), Ok(vec![arch::GSI_BASE + 1])); // Let's allocate the rest in a loop - for i in arch::IRQ_BASE + 2..=arch::IRQ_MAX { + for i in arch::GSI_BASE + 2..=arch::GSI_MAX { assert_eq!(allocator.allocate_gsi(1), Ok(vec![i])); } } From 211a8b83e27313c4e902d1725982133f38c36b03 Mon Sep 17 00:00:00 2001 From: "Sheng-Wei (Way) Chen" Date: Fri, 27 Jun 2025 14:58:14 +0000 Subject: [PATCH 2/7] docs: remove limitation of 64 devices on aarch64 Remove the documentation note regarding the 64-device limit on aarch64, as this limitation was resolved by an earlier commit. The limitation no longer applies, and the documentation is now updated. Signed-off-by: Sheng-Wei (Way) Chen --- docs/device-api.md | 6 ------ 1 file changed, 6 deletions(-) diff --git a/docs/device-api.md b/docs/device-api.md index dd2b5e4c9f6..de57fdcd74c 100644 --- a/docs/device-api.md +++ b/docs/device-api.md @@ -125,12 +125,6 @@ specification: | | track_dirty_pages | O | O | O | O | O | O | | | vcpu_count | O | O | O | O | O | O | -## Known device limitations - -If more than 64 devices are configured for a VM in total on aarch64, only first -64 of them are functional -([related issue](https://github.com/firecracker-microvm/firecracker/issues/4207)). - ## Instance Actions All instance actions can be found in the [Swagger](https://swagger.io) From ef69e07aa4c896eb6c8633aea592f801729956ce Mon Sep 17 00:00:00 2001 From: "Sheng-Wei (Way) Chen" Date: Tue, 1 Jul 2025 09:24:36 +0000 Subject: [PATCH 3/7] fix: allow GSI allocation starting from 0 on aarch64 Set `GSI_BASE` to `0` for aarch64, enabling the use of the full interrupt range and allowing up to 96 devices to be attached. Change `MMIODeviceInfo::irq` from `Option` to `Option` to accommodate `0` as a valid IRQ number. Adjust relevant tests to reflect this change and ensure correctness. Signed-off-by: Sheng-Wei (Way) Chen --- src/vmm/src/arch/aarch64/fdt.rs | 7 +++---- src/vmm/src/arch/aarch64/layout.rs | 4 +--- src/vmm/src/device_manager/mmio.rs | 22 ++++++++++------------ 3 files changed, 14 insertions(+), 19 deletions(-) diff --git a/src/vmm/src/arch/aarch64/fdt.rs b/src/vmm/src/arch/aarch64/fdt.rs index 61200cb2148..20f38cc31c0 100644 --- a/src/vmm/src/arch/aarch64/fdt.rs +++ b/src/vmm/src/arch/aarch64/fdt.rs @@ -439,7 +439,6 @@ fn create_devices_node( #[cfg(test)] mod tests { use std::ffi::CString; - use std::num::NonZeroU32; use kvm_ioctls::Kvm; @@ -470,7 +469,7 @@ mod tests { (DeviceType::Serial, DeviceType::Serial.to_string()), MMIODeviceInfo { addr: 0x00, - irq: NonZeroU32::new(1), + irq: Some(1u32), len: LEN, }, ), @@ -478,7 +477,7 @@ mod tests { (DeviceType::Virtio(1), "virtio".to_string()), MMIODeviceInfo { addr: LEN, - irq: NonZeroU32::new(2), + irq: Some(2u32), len: LEN, }, ), @@ -486,7 +485,7 @@ mod tests { (DeviceType::Rtc, "rtc".to_string()), MMIODeviceInfo { addr: 2 * LEN, - irq: NonZeroU32::new(3), + irq: Some(3u32), len: LEN, }, ), diff --git a/src/vmm/src/arch/aarch64/layout.rs b/src/vmm/src/arch/aarch64/layout.rs index ef171ea46e5..8f95519830e 100644 --- a/src/vmm/src/arch/aarch64/layout.rs +++ b/src/vmm/src/arch/aarch64/layout.rs @@ -82,10 +82,8 @@ pub const IRQ_BASE: u32 = 32; // The Linux kernel automatically shifts the GSI by 32 if it is an SPI, // allowing us to start numbering from 0 instead of 32. -// But device_manager/mmio.rs states that 0 is not allowed for GSIs -// So we start with 1 instead. /// The first usable GSI on aarch64. -pub const GSI_BASE: u32 = 1; +pub const GSI_BASE: u32 = 0; /// The maximum usable GSI on aarch64. pub const GSI_MAX: u32 = IRQ_MAX - IRQ_BASE - 1; diff --git a/src/vmm/src/device_manager/mmio.rs b/src/vmm/src/device_manager/mmio.rs index 34ba1a37b4c..9a7dc775295 100644 --- a/src/vmm/src/device_manager/mmio.rs +++ b/src/vmm/src/device_manager/mmio.rs @@ -7,7 +7,6 @@ use std::collections::HashMap; use std::fmt::Debug; -use std::num::NonZeroU32; use std::sync::{Arc, Mutex}; #[cfg(target_arch = "x86_64")] @@ -79,7 +78,7 @@ pub struct MMIODeviceInfo { /// Mmio addr range length. pub len: u64, /// Used Irq line for the device. - pub irq: Option, // NOTE: guaranteed to be a value not 0, 0 is not allowed + pub irq: Option, } #[cfg(target_arch = "x86_64")] @@ -89,7 +88,7 @@ fn add_virtio_aml( len: u64, irq: u32, ) -> Result<(), aml::AmlError> { - let dev_id = irq - crate::arch::IRQ_BASE; + let dev_id = irq - crate::arch::GSI_BASE; debug!( "acpi: Building AML for VirtIO device _SB_.V{:03}. memory range: {:#010x}:{} irq: {}", dev_id, addr, len, irq @@ -151,7 +150,7 @@ impl MMIODeviceManager { ) -> Result { let irq = match resource_allocator.allocate_gsi(irq_count)?[..] { [] => None, - [irq] => NonZeroU32::new(irq), + [irq] => Some(irq), _ => return Err(MmioError::InvalidIrqConfig), }; @@ -205,7 +204,7 @@ impl MMIODeviceManager { vm.register_ioevent(queue_evt, &io_addr, u32::try_from(i).unwrap()) .map_err(MmioError::RegisterIoEvent)?; } - vm.register_irqfd(&locked_device.interrupt_trigger().irq_evt, irq.get()) + vm.register_irqfd(&locked_device.interrupt_trigger().irq_evt, irq) .map_err(MmioError::RegisterIrqFd)?; } @@ -231,7 +230,7 @@ impl MMIODeviceManager { .add_virtio_mmio_device( device_info.len, GuestAddress(device_info.addr), - device_info.irq.unwrap().get(), + device_info.irq.unwrap(), None, ) .map_err(MmioError::Cmdline) @@ -258,7 +257,7 @@ impl MMIODeviceManager { device_info.len, // We are sure that `irqs` has at least one element; allocate_mmio_resources makes // sure of it. - device_info.irq.unwrap().get(), + device_info.irq.unwrap(), )?; } Ok(device_info) @@ -290,7 +289,7 @@ impl MMIODeviceManager { .unwrap() .serial .interrupt_evt(), - device_info.irq.unwrap().get(), + device_info.irq.unwrap(), ) .map_err(MmioError::RegisterIrqFd)?; @@ -693,7 +692,7 @@ mod tests { #[cfg(target_arch = "aarch64")] vm.setup_irqchip(1).unwrap(); - for _i in crate::arch::IRQ_BASE..=crate::arch::IRQ_MAX { + for _i in crate::arch::GSI_BASE..=crate::arch::GSI_MAX { device_manager .register_virtio_test_device( vm.fd(), @@ -773,11 +772,10 @@ mod tests { device_manager.id_to_dev_info[&(DeviceType::Virtio(type_id), id.clone())].addr ); assert_eq!( - crate::arch::IRQ_BASE, + crate::arch::GSI_BASE, device_manager.id_to_dev_info[&(DeviceType::Virtio(type_id), id)] .irq .unwrap() - .get() ); let id = "bar"; @@ -834,7 +832,7 @@ mod tests { let device_info = device_manager .allocate_mmio_resources(&mut resource_allocator, 1) .unwrap(); - assert_eq!(device_info.irq.unwrap().get(), crate::arch::GSI_BASE); + assert_eq!(device_info.irq.unwrap(), crate::arch::GSI_BASE); } #[test] From 39c4e08596a7b1ba09e5770d1340243442f20e42 Mon Sep 17 00:00:00 2001 From: "Sheng-Wei (Way) Chen" Date: Wed, 2 Jul 2025 16:49:35 +0000 Subject: [PATCH 4/7] test: extend test_max_devices to support aarch64 The test_max_devices test verifies the maximum number of devices that can be attached, as permitted by the platform. It checks both that the expected number of devices can be successfully attached and that attaching more than the limit results in a failure. Previously, this test was only executed on x86_64, where 18 devices are expected. This update extends the test to run on aarch64 as well, which supports up to 94 devices. Signed-off-by: Sheng-Wei (Way) Chen --- CHANGELOG.md | 3 +++ .../functional/test_max_devices.py | 18 +++++++++--------- 2 files changed, 12 insertions(+), 9 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index d243b8ef923..457c9ab7628 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -38,6 +38,9 @@ and this project adheres to - [#5260](https://github.com/firecracker-microvm/firecracker/pull/5260): Fixed a bug allowing the block device to starve all other devices when backed by a sufficiently slow drive. +- [#4207](https://github.com/firecracker-microvm/firecracker/issues/4207): Fixed + GSI numbering on aarch64 to correctly allow up to 96 devices being attached + simultaneously. ## [1.12.0] diff --git a/tests/integration_tests/functional/test_max_devices.py b/tests/integration_tests/functional/test_max_devices.py index fc8397445c9..aa87532fb2a 100644 --- a/tests/integration_tests/functional/test_max_devices.py +++ b/tests/integration_tests/functional/test_max_devices.py @@ -6,14 +6,17 @@ import pytest -# IRQs are available from 5 to 23. We always use one IRQ for VMGenID device, so -# the maximum number of devices supported at the same time is 18. -MAX_DEVICES_ATTACHED = 18 +# On x86_64, IRQs are available from 5 to 23. We always use one IRQ for VMGenID +# device, so the maximum number of devices supported at the same time is 18. +# On aarch64, IRQs are available from 32 to 127. We always use one IRQ each for +# the VMGenID and RTC devices, so the maximum number of devices supported +# at the same time is 94. +MAX_DEVICES_ATTACHED = { + "x86_64": 18, + "aarch64": 94 +}.get(platform.machine()) -@pytest.mark.skipif( - platform.machine() != "x86_64", reason="Firecracker supports 24 IRQs on x86_64." -) def test_attach_maximum_devices(uvm_plain_any): """ Test attaching maximum number of devices to the microVM. @@ -36,9 +39,6 @@ def test_attach_maximum_devices(uvm_plain_any): test_microvm.ssh_iface(i).check_output("sync") -@pytest.mark.skipif( - platform.machine() != "x86_64", reason="Firecracker supports 24 IRQs on x86_64." -) def test_attach_too_many_devices(uvm_plain): """ Test attaching to a microVM more devices than available IRQs. From 6032f6f1aaa3ab6675216f1504b44b7f11baa7e4 Mon Sep 17 00:00:00 2001 From: "Sheng-Wei (Way) Chen" Date: Wed, 2 Jul 2025 17:16:21 +0000 Subject: [PATCH 5/7] chore: remove useless conversion in fdt.rs After changing the type of `MMIODeviceInfo::irq` from `Option` to `Option`, we don't need to convert NonZeroU32 to u32 with .into() anymore. Thus any occurance is removed. Signed-off-by: Sheng-Wei (Way) Chen --- src/vmm/src/arch/aarch64/fdt.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/vmm/src/arch/aarch64/fdt.rs b/src/vmm/src/arch/aarch64/fdt.rs index 20f38cc31c0..7d7f7d748a9 100644 --- a/src/vmm/src/arch/aarch64/fdt.rs +++ b/src/vmm/src/arch/aarch64/fdt.rs @@ -362,7 +362,7 @@ fn create_virtio_node(fdt: &mut FdtWriter, dev_info: &MMIODeviceInfo) -> Result< "interrupts", &[ GIC_FDT_IRQ_TYPE_SPI, - dev_info.irq.unwrap().into(), + dev_info.irq.unwrap(), IRQ_TYPE_EDGE_RISING, ], )?; @@ -383,7 +383,7 @@ fn create_serial_node(fdt: &mut FdtWriter, dev_info: &MMIODeviceInfo) -> Result< "interrupts", &[ GIC_FDT_IRQ_TYPE_SPI, - dev_info.irq.unwrap().into(), + dev_info.irq.unwrap(), IRQ_TYPE_EDGE_RISING, ], )?; From d72e1cf5e6d04bb85ae011c9e9c067365db84b25 Mon Sep 17 00:00:00 2001 From: "Sheng-Wei (Way) Chen" Date: Sun, 6 Jul 2025 14:56:42 +0000 Subject: [PATCH 6/7] chore: increase VM memory to reliably pass test_max_devices on aarch64 Establishing 94 SSH connections exhausts the default 256 MiB memory of the `uvm_plain_machine` with `basic_config` previously used in tests `test_max_devices` on aarch64. Increase the VM's memory limit to 512 MiB to ensure stable and consistent test execution. Signed-off-by: Sheng-Wei (Way) Chen --- .../functional/test_max_devices.py | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/tests/integration_tests/functional/test_max_devices.py b/tests/integration_tests/functional/test_max_devices.py index aa87532fb2a..2edfcf7f131 100644 --- a/tests/integration_tests/functional/test_max_devices.py +++ b/tests/integration_tests/functional/test_max_devices.py @@ -17,15 +17,18 @@ "aarch64": 94 }.get(platform.machine()) -def test_attach_maximum_devices(uvm_plain_any): +def test_attach_maximum_devices(microvm_factory, guest_kernel, rootfs): """ Test attaching maximum number of devices to the microVM. """ - test_microvm = uvm_plain_any + if MAX_DEVICES_ATTACHED is None: + pytest.skip("Unsupported platform for this test.") + + test_microvm = microvm_factory.build(guest_kernel, rootfs, monitor_memory=False) test_microvm.spawn() - # Set up a basic microVM. - test_microvm.basic_config() + # The default 256mib is not enough for 94 ssh connections on aarch64. + test_microvm.basic_config(mem_size_mib=512) # Add (`MAX_DEVICES_ATTACHED` - 1) devices because the rootfs # has already been configured in the `basic_config()`function. @@ -43,6 +46,9 @@ def test_attach_too_many_devices(uvm_plain): """ Test attaching to a microVM more devices than available IRQs. """ + if MAX_DEVICES_ATTACHED is None: + pytest.skip("Unsupported platform for this test.") + test_microvm = uvm_plain test_microvm.spawn() From 0fbdf5a7b8dd9c244709899036aa0eb0a33e9a31 Mon Sep 17 00:00:00 2001 From: "Sheng-Wei (Way) Chen" Date: Mon, 7 Jul 2025 14:59:10 +0000 Subject: [PATCH 7/7] chore: disable memory monitor in test_attach_too_much_devices Attaching a large number of devices (94) on aarch64 consumes significant host memory, causing memory monitor checks to fail. Since this test specifically validates behavior when exceeding device limits, memory usage isn't relevant here. Disable the memory monitor check to ensure the test passes consistently. Signed-off-by: Sheng-Wei (Way) Chen --- .../functional/test_max_devices.py | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/tests/integration_tests/functional/test_max_devices.py b/tests/integration_tests/functional/test_max_devices.py index 2edfcf7f131..85cf2f1399c 100644 --- a/tests/integration_tests/functional/test_max_devices.py +++ b/tests/integration_tests/functional/test_max_devices.py @@ -12,10 +12,8 @@ # On aarch64, IRQs are available from 32 to 127. We always use one IRQ each for # the VMGenID and RTC devices, so the maximum number of devices supported # at the same time is 94. -MAX_DEVICES_ATTACHED = { - "x86_64": 18, - "aarch64": 94 -}.get(platform.machine()) +MAX_DEVICES_ATTACHED = {"x86_64": 18, "aarch64": 94}.get(platform.machine()) + def test_attach_maximum_devices(microvm_factory, guest_kernel, rootfs): """ @@ -23,7 +21,7 @@ def test_attach_maximum_devices(microvm_factory, guest_kernel, rootfs): """ if MAX_DEVICES_ATTACHED is None: pytest.skip("Unsupported platform for this test.") - + test_microvm = microvm_factory.build(guest_kernel, rootfs, monitor_memory=False) test_microvm.spawn() @@ -42,14 +40,14 @@ def test_attach_maximum_devices(microvm_factory, guest_kernel, rootfs): test_microvm.ssh_iface(i).check_output("sync") -def test_attach_too_many_devices(uvm_plain): +def test_attach_too_many_devices(microvm_factory, guest_kernel, rootfs): """ Test attaching to a microVM more devices than available IRQs. """ if MAX_DEVICES_ATTACHED is None: pytest.skip("Unsupported platform for this test.") - - test_microvm = uvm_plain + + test_microvm = microvm_factory.build(guest_kernel, rootfs, monitor_memory=False) test_microvm.spawn() # Set up a basic microVM.