Hi Christopher and other KVM/ARM community members,
I tried the following QEMU and Kernel combinations on Raspberry Pi 3 (AArch64 mode) but failed:
Latest commit of Alexander Graf's no-kvm-irqchip QEMU branch: https://github.com/agraf/qemu/tree/no-kvm-irqchip
raspberrypi/linux's rpi-4.10.y branch (forked from Linux 4.10-rc8?) latest commit bb0ff9d059c67e1611c7422f7982a6a4876efe67
patched by $(git diff (linux 4.10-rc5 commit 7a308bb3016f57e5be11a677d15b821536419d36) (Christpher's irqs-to-user-v2 latest commit d0a7cc725535df1b9cc64b442d246c20a9edb904) )
and got the following error:
pi@raspberrypi:~/os/graf/no-kvm-irqchip/aarch64-softmmu $ qemu-system-aarch64 --enable-kvm -M virt
"kvm" accelerator not found.
No accelerator found!
pi@raspberrypi:~/os/graf/no-kvm-irqchip/aarch64-softmmu $ lkvm run test
# lkvm run -k test -m 448 -c 4 --name guest-1605
Error: Unsupported KVM extension detected: KVM_CAP_IRQCHIP
Fatal: Failed to create virtual GIC
which seems strange for me because dmesg shows kernel is 4.10.2-v8+ and Boot CPU is AArach64, all CPUs are initialized in HYP mode and /dev/kvm exists. So I thought GIC emulation is also enabled, or should I need to enable other config flags or do settings? Or, is this way of applying patch wrong? Current config.gz is: https://gist.github.com/caprice-j/d6e144cb8727df813a4fbe716beac3cb
My other concerns are no kvm-ok command is available and /proc/cpuinfo does not show flags for virtualization support (I believe RPI3's cortex A53 (ARMv8) has builtin virt support and does not show the support flag explicitly in /proc/cpuinfo ... but I'm unsure that is true)
pi@raspberrypi:~/os/graf/no-kvm-irqchip/aarch64-softmmu $ cat /proc/cpuinfo
processor : 0
BogoMIPS : 38.40
Features : fp asimd evtstrm crc32
CPU implementer : 0x41
CPU architecture: 8
CPU variant : 0x0
CPU part : 0xd03
CPU revision : 4
I would be delighted if someone gives me suggestions.
Yasutaka
2017-03-07 4:55 GMT-05:00 Christoffer Dall <christoffer.dall@xxxxxxxxxx>:
Hi Yasutaka,
On Thu, Mar 02, 2017 at 09:57:50AM -0500, Yasutaka Tanaka wrote:
> Hello KVM/ARM community,
>
> I am now trying to execute KVM on Raspberry Pi 3 Model B (RPI3).
> Does anyone know whether KVM/ARM can run with 32-bit mode on ARM Cortex A53?
Theoretically, it should.
>
> The CPU of RPI3 is ARM Cortex A53 which can be executed in both 32-bit and
> 64-bit mode. I've managed to display /dev/kvm on 64-bit mode execution
> (i.e. with a 64-bit linux kernel) on RPI3, but I failed to do so in 32-bit
> mode.
>
> In 32-bit mode, an KVM error messages says CPU not supported. I guess the
> reason for the error message is KVM_ARM_TARGET_CORTEX_A53 is only returned
> in /arch/arm64/kvm/guest.c not under/arch/arm/kvm/guest.c.
>
> So I'm wondering whether it's possible or not.
It should be. You may just have to add the minimal missing definitions
for a 32-bit A53 CPU support.
> What I'd like to do is to
> compare the execution speed of KVM between 32-bit and 64-bit mode. The
> second plan is to compare between KVMs of 32-bit RPI2 and 64-bit RPI3 (I
> have both), but since RPI2 spec is a little low and I'm worried that some
> numeric comparisons become unfair.
I would be careful here, since the RPI3 doesn't have the GIC and you'll
end up going to user space a lot for interrupt handling. Especially
look out for SMP workloads in the VM which may generate a lot of IPIs
which are really going to suffer from having to go to userspace on the
host.
>
> (I was also notified by an KVM/ARM expert that since RPI doesn't have a GIC
> and I need to apply some patches)
Yes, you need the "Support userspace irqchip with arch timers" series
and corresponding QEMU patches:
http://www.spinics.net/lists/kvm/msg144685.html
Good luck.
-Christoffer
Yasutaka TANAKA
M.S. Candidate, Computer Science
Fu Foundation School of Engineering and Applied Science
Columbia University
_______________________________________________ kvmarm mailing list kvmarm@xxxxxxxxxxxxxxxxxxxxx https://lists.cs.columbia.edu/mailman/listinfo/kvmarm