-
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
aarch64: Firecracker does not run on a RPi3 kernel 4.19.58 KVM enabled #1186
Comments
The error reported by Firecracker ( The failing KVM capability here is "Cannot configure virtual machine. SetupGIC(CreateGIC(Os { code: 19, kind: Other, message: No such device }))" In other words, it looks like GIC is not available on the host. I also found some articles that are mentioning GIC not being available on RPi3: https://www.raspberrypi.org/forums/viewtopic.php?f=62&t=156639&p=1057546&hilit=GIC#p1057546 I would try to run QEMU + KVM on the host and see if that works. Based on the discussions in this issue: raspberrypi/linux#1868 I will assume that it doesn't work. Without GIC v3 support on the host there is no way to run Firecracker unfortunately. |
We already checked and proofed that Qemu 3.1.0 is able to run a Guest VM on exactly this same system.
|
That's RPi3. RPi4 does have GIC but it looks like GICv2 and not GICv3 which firecracker expects.
Ah right, you have already mentioned the minimum requirement here and RPi4 seem to have GICv2 if I read https://github.com/raspberrypi/linux/blob/rpi-4.19.y/arch/arm/boot/dts/bcm2838.dtsi correctly which is included in couple of rpi-4.dts I see there. |
@DieterReuter Are you running Qemu with |
@sudeep-holla I think the RPi that @DieterReuter is using doesn't have GIC at all. If it would have GICv2 the capability check would not fail (at least that's what I understand from the kernel code). If the RPi would have GICv2, but not GICv3, you would still not be able to run Firecracker microVMs, but the failure would happen later in the execution path when you send the Some code references that got me to the above conclusion:
In |
Good digging @andreeaflorescu and @sudeep-holla 👍 In this thread they run qemu with args Also, there was an other (possibly relevant) message and error:
most likely. or, it has some non-standard proprietary gic. I couldn't find a definition of a gic here so...
That'd be a bummer. Can you explain to me that doesn't understand what you use the GIC for, and why you need v3? Is there any way that could be worked around in the case of RPi (even though we'd do it in an experimental fork first, for the RPi4)? |
I believe we require GIC_v3 because we added support for armv8 and it looks like armv8 can use either GIC_v3 or GIC_v4. @dianpopa should have more insight into this particular choice. As for why we need GIC, this is required for implementing our Virtio devices (block and network). As far as I can tell the interrupts are the mechanism used for the communication between the CPU and the devices. I tried to find some sort of documentation that can better explain how and why Virtio devices implemented with MMIO require interrupts, but I miserably failed. I haven't really touched that code in Firecracker. @dhrgit recently implemented a virtio device so he might be able to give a better explanation on the Virtio internals. |
@luxas The GIC device is a GIC is the preferred way of routing interrupts on the ARM architecture and this device is required for supporting most other devices (not just virtio) that require IRQs to properly function.
I am not sure. There are alternatives to IRQs when it comes to letting the CPU know about devices events. The popular one is polling for example, where the CPU constantly polls each device continuously looking for pending events. With the right support in the guest OS and the right emulation, that is definitely possible. Unfortunately Firecracker's devices do not support that particular way of functioning and our device emulation follows the general standard implementation for each of our devices and thus uses IRQs. [1] https://static.docs.arm.com/ihi0069/d/IHI0069D_gic_architecture_specification.pdf |
@DieterReuter As per our slack conversation I am closing this issue as the root cause is that GIC v3 is not available on the RPi you are running Firecracker on. If you would like to continue the conversation related to adding GIC emulation in Firecracker, please open another issue. |
It's not true. There are hardware that are ARMv8 and GICv2. I thought choice of minimum GICv3 was made in Firecracker to keep it simple. As you see in the spec you have pointed out that changes are huge and I assume hence the decision for min requirement. |
Currently Firecracker doesn't run on the RPi3 with KVM enabled.
Here are the details, when I’m starting Firecracker (did used the binary from GitHub releases) on arm64 I did get the following error message:
FC basically complains about
Missing KVM capability: Irqchip
, but this one is included in the kernel. For reference here are the KVM related kernel settings:The system in question is a Raspberry Pi 3B, running Debian 9 with a Linux kernel 4.19.58
GIC is also enable in the kernel
The text was updated successfully, but these errors were encountered: