Kvm support in kernel

Which system do you use? Ubuntu

Which version of system do you use? Khadas official images

Please describe your issue below:

Does vim4 hardware support kvm? I tried to add the corresponding configuration in the kernel, but there is still no kvm support after compilation. Can you give me some guidance?

Post a console log of your issue below:

Hello @jeff_9999

Can you follow the step below to enable KVM?

Edit /boot/uEnv.txt, add kvm-arm.mode=protected to boot_user_args, like this


Save the file and reboot.

Check kvm status:

khadas@Khadas:~$ sudo kvm-ok
INFO: /dev/kvm exists
KVM acceleration can be used

I got kvm in /dev/ ,but kvm program still has error :
failed to create IRQ chip with kvm

Maybe similar issue to this : Cannot run KVM on the VIM4 - #3 by jemalloc

What image you used? 5.4 or 5.15? Please provide the information to us.

cat /etc/fenix-release
uname -a

IMAGE VERSION=1.6-231229
UBOOT GIT VERSION=khadas-vims-u-boot-2019.01-v1.6-release
LINUX GIT VERSION=khadas-vims-linux-5.15-v1.6-release

Hello @jeff_9999

Can you try to upgrade the kernel and check again?

wget https://dl.khadas.com/.test/linux-dtb-amlogic-5.15_1.6.3_arm64.deb
sudo dpkg -i linux-dtb-amlogic-5.15_1.6.3_arm64.deb 
sudo reboot

The above settings have been made, but kvm program still has error :
failed to create IRQ chip with kvm, use this command
egrep -c ‘(svm|vmx)’ /proc/cpuinfo
always return 0, we want the kernel support kvm, how to configure it ?

Hello @zhangzhichen

How test on your side? Could you provide the reproduce steps?

In the kernel config.gz,CONFIG_HAVE_KVM_IRQCHIP=y,i think current kernel support kvm and IRQ chip, but when I run cuttlefish (Android Virtual Machine), prompt
[2024-01-25T09:17:10.757747219+00:00 ERROR crosvm] exiting with error 1: failed to create IRQ chip, and now I want modify kernel config to solve this case

I want add CONFIG_KVM_ARM_HOST=y into kernel configure,but always failed,how to add CONFIG_KVM_ARM_HOST into the kernel? I saw somebody do this successuly

i got same error as zhangzhichen’s post

Please check here: