-
Notifications
You must be signed in to change notification settings - Fork 1.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Bug] Only up to 64 devices can be used on aarch64 #4207
Comments
Hi, is this issue still up? Can attempt a fix. |
Hi @dush-t ! Yes, the issue is still valid. Please feel free to take it. Thanks in advance! |
Perfect. Wanted to know if this can be tested for on an ARM MacBook, or do I need to get myself a Linux device? |
Hi @dush-t, you need Linux KVM to test this. |
Hello! We are students from the University of Texas at Austin taking a virtualization course (cs360v) looking for opportunities to contribute to an open source project for class credit. Could I be assigned to this? |
This is still reproducible.
@kalyazin where is the 96 devices limit defined? Can this limit be configured by a GIC configuration option in the guest? Currently, I only see 64 virtio IRQs in the test vm spawned by the test:
|
Hi @vliaskov . I believe 96 is inferred from https://github.com/firecracker-microvm/firecracker/blob/main/src/vmm/src/device_manager/resources.rs#L31 gsi_allocator: IdAllocator::new(arch::IRQ_BASE, arch::IRQ_MAX)?, where // As per virt/kvm/arm/vgic/vgic-kvm-device.c we need
// the number of interrupts our GIC will support to be:
// * bigger than 32
// * less than 1023 and
// * a multiple of 32.
/// The highest usable SPI on aarch64.
pub const IRQ_MAX: u32 = 128;
/// First usable interrupt on aarch64.
pub const IRQ_BASE: u32 = 32; This may well be misaligned with what the guest configures. |
Thanks for the clarification. For anyone following, the logic is described in
However, the guest dmesg contains:
so there must be something changing the maximum number of SPIs during guest initialization. I haven't figured out what yet. The logic in linux guest kernel
A part of VGIC initilization I don't understand (and I don't understand if it's relevant here) is :
Do
Anyway this analysis may be out of scope for fixing this test. Let me know if digging deeper is appropriate in the current bug or not. Currently, it seems 96 SPIs is an overestimate of the available SPIs on a Linux guest kernel. |
Hi @vliaskov . Thank for sharing your progress. We have not had an opportunity to investigate the issue further, so would still be happy to receive a contribution from the community to address that. Please feel free to post a PR if are able to fix that. |
Describe the bug
It is expected that up to 96 devices can be used on aarch64, however If more than 64 devices are attached to an aarch64 microVM, only first 64 are usable.
To Reproduce
./tools/devtool build
test_attach_maximum_devices
test:The observed failure is:
The test creates a rootfs block device and a number of net devices. When it tries to connect the the last one (which is a 65th device in total), it fails.
Expected behaviour
The test should have passed, because according to the aarch64 layout, it should be possible to use up to 96 devices on aarch64.
Environment
27fb303f7f8487bfe6b78db1bc5f6e4b26b456b6
(main)Additional context
Impact: users cannot use more than 64 devices attached to an aarch64 microVM.
Checks
The text was updated successfully, but these errors were encountered: