-
Notifications
You must be signed in to change notification settings - Fork 373
Support ARM64 hosts without GIC #848
Comments
/cc @Pennyzct, @Weichen81. |
The first time when I saw the issue, I got shocked. There are having some SoCs really don't support GIC. Then I checked the RPI code, https://github.com/torvalds/linux/blob/bebc6082da0a9f5d47a1ea2edc099bf671058bd4/arch/arm/boot/dts/bcm2837.dtsi#L12. |
I think I agree - we should have the GIC case as the working default, as generally Kata is a server type thing, and you'd expect all servers to have GICs? |
It would be rather awesome to have kata running on a Pi. Either way, the logic to specify the minimum hardware spec should be part of the |
Thanks for considering GIC-less support. I guess the main purpose for running Kata Containers on a Raspberry Pi would be just experimenting, not any very serious use. Actually leaving out the GIC parameter seemed to be pretty much the only code-level issue that needed to be addressed in order to create and start Kata instances on a 64-bit RPi 3 B+ host (that has Raspbian's 4.14.70 arm64 Linux kernel with KVM enabled, Debian Buster's base system etc., and QEMU 2.12). In this case I simply used Kata's default guest kernel config for arm64, as well as an Alpine-based initrd guest image, and launched containers through cri-containerd. Didn't do any more thorough testing so far, though. |
@srcman Don't worry, I am willing to send a PR to fix this issue. Doesn't like x86, most of Arm developers don't have real Arm servers like x86-based PC. So various kinds of PI are their debug platforms. I certainly wouldn't refuse to pay a small price for so many potential developers or users : ) @jodh-intel @grahamwhaley Maybe we can rate the kata-check to levels: As we are using QEMU now, it is a full-functionality emulator, even supports binary translation. But for NEMU, I think most of these features, like binary translation and user space irqchip emulator would be removed. And if we support Xen and Kvmtools later, both of them don't support irqchip emulator. |
@Weichen81 - this sounds like an interesting idea! By default, running However, if we recall that
/cc @sameo, @egernst, @sboeuf, @gnawux, @bergwolf, @grahamwhaley. |
@jodh-intel |
As a side note regarding Kata on RPis, the newly released Raspberry Pi 4 actually seems to have a GIC (v2), if I read their bcm2711.dtsi and bcm2838.dtsi files for Linux 4.19 correctly. |
Hi~@srcman really excited to see people running kata containers on Pi. Pi 4 is really a new generation, having cortex-A72 core. |
This function watches for uvents that match addresses stored in s.deviceWatchers() and if there's a matching entry signals the associated channel. "Matching" in this instance means soem sort of comparison between the address we're watching for and the sysfs path in the uevent. Currently we match any of a bunch of different cases for different types of device. Being very specific with how we match *sounds* like a good idea, but it's complicated, tightly coupled to other parts of the code and, ultimately, pointless. The user of the data we're collecting here is getDeviceName(). Before registering a watcher it checks s.sysToDevMap in case the uevent it's interested in has already happened. To have consistent behaviour regardless of when the uevent arrives, the matching that getDeviceName() uses against s.sysToDevMap must be the same as we use in listenToUdevEvents() and right now, it's not. So, change the matching in listenToUdevEvents() to be the same as the much simpler version in getDeviceName(). fixes kata-containers#848 Signed-off-by: David Gibson <[email protected]>
Description of problem
Apparently Raspberry Pi 3 (arm64) doesn't have a GIC, so
getHostGICVersion()
inqemu_arm64.go
can't find the GIC version in/proc/interrupts
, and giving thegic-version=host
machine option to QEMU (which is the current fallback) results in an error in this case.Not giving the
gic-version
option to QEMU at all if the host doesn’t have a GIC seems to fix this problem. (Thekernel_irqchip=off
option could be given instead, in order to explicitly request irqchip emulation in user space, but actually that doesn’t seem to be required here.)Expected result
VM for Kata container started successfully on, e.g., a 64-bit RPi 3 with KVM
Actual result
QEMU: "Unable to determine GIC version supported by host” (since creating a VGIC device in QEMU fails)
The text was updated successfully, but these errors were encountered: