On Thu, Feb 2, 2017 at 3:59 PM, Marc Zyngier <marc.zyng...@arm.com> wrote: > [+Christoffer] > > Hi Pekka, > > On 02/02/17 14:44, Pekka Enberg wrote: >> Hi, >> >> Has anyone been able to successfully run QEMU/KVM under Raspberry Pi 3? >> >> I have installed 64-bit Fedora 24 by Gerd Hoffmann on the hardware: >> >> https://www.kraxel.org/blog/2016/04/fedora-on-raspberry-pi-updates/ >> >> and built a VM image using virt-builder: >> >> virt-builder --root-password password:root --arch aarch64 fedora-24 >> >> I also built the latest UEFI for QEMU from sources: >> >> https://wiki.linaro.org/LEG/UEFIforQEMU >> >> and updated to QEMU 2.8.0 from rawhide: >> >> [root@fedora-rpi2 ~]# qemu-system-aarch64 -version >> QEMU emulator version 2.8.0(qemu-2.8.0-1.fc26) >> Copyright (c) 2003-2016 Fabrice Bellard and the QEMU Project developers >> >> The VM image should be fine because I’m able to boot to it under CPU >> emulation: >> >> qemu-system-aarch64 \ >> -nographic \ >> -M virt \ >> -cpu cortex-a57 \ >> -smp 1 \ >> -m 512 \ >> -bios QEMU_EFI.fd \ >> -device virtio-blk-device,drive=image -drive >> if=none,id=image,file=fedora-24.img \ >> -netdev bridge,id=hn0,br=virbr0 -device >> virtio-net-pci,netdev=hn0,romfile= \ >> -device virtio-rng-pci >> >> However, when I enable KVM, keyboard stops working (interrupt delivery >> issue?) and Fedora boot process hangs at random places before reaching >> login: > > [snip] > > TL;DR: as it stands now, none of the RPi{2,3} can run KVM out of the > box, as they lack a virtualization capable interrupt controller. This > means that timer interrupts cannot be reported to the core, and things > die a painful death. > > The longer story: we have a set of patches somewhere on the list that do > enable the timer interrupts to be reported to userspace (QEMU), which > can then inject them into its on GIC emulation and kick the vcpu. So > far, work on this seems to have stopped (API issues? QEMU patches?) > > Christoffer was about to revive the kernel patches, but we need someone > to pick up the QEMU part, and work with us and the QEMU people so that > we agree once and for all on the ABI to signal PPIs to userspace.
Interesting timing. I just revived the patches today, but I reworked the ABI slightly and rebased the work on top of support for the physical timer in the guest and ran into two issues: First, turning of the in-kernel irqchip no longer works, and I also lost track of how the patches should look, so indeed I need help from a QEMU person to look at that. Second, there is some sort of regression on the 32-bit side using the physical timer patches. Once I've sorted some of this out, I can send out the patch series. At least I want to figure out the 32-bit breakage first, and then I may simply send out the patches with a big fat UNTESTED warning in hope that someone will work on the qemu side with me. Thanks, -Christoffer