I want to know how I can enable virtualization support for the CPUs on TX2 board. Based on this Cortex-A57 the processor on this board support hardware virtualization. Can anybody help me to get KVM working on my board? Here is what I get when I type “kvm-ok” command:
INFO: /dev/kvm does not exist
HIT: sudo modprobe kvm
modeprobe: FATAL: Module msr not found in directory /lib/modules/4.4.15-tegra
U may like to use Docker : https://devtalk.nvidia.com/default/topic/1000224/jetson-tx2/docker-on-the-tx2/
Mamad, As far as I remember it was rather straightforward procedure. I used simple means like sudo apt-get install quemu, in general. But due to the resulting performance it was rather non-usable than usable.
I use the instruction in Build Kernel and Modules - NVIDIA Jetson TX2 - JetsonHacks to get kernel source code and build kernel on tx2 board.
I enable “Tegra Virtualization Support” and “Kernel-based Virtual Machine (KVM) support” options from kernel configuration and build the kernel.
First I get the following error:
include/linux/irqchip/arm-gic.h: Assembler messages:
include/linux/irqchip/arm-gic.h:100: Error: unknown mnemonic enum' -- enum domain_gic_pm_event{’
include/linux/irqchip/arm-gic.h:101: Error: unknown mnemonic mod_domain_power_on' -- mod_domain_power_on,’
include/linux/irqchip/arm-gic.h:102: Error: unknown mnemonic mod_domain_power_off' -- mod_domain_power_off’
include/linux/irqchip/arm-gic.h:103: Error: junk at end of line, first unrecognized character is `}’
scripts/Makefile.build:297: recipe for target ‘arch/arm64/kvm/vgic-v2-switch.o’ failed
make[1]: *** [arch/arm64/kvm/vgic-v2-switch.o] Error 1
Makefile:958: recipe for target ‘arch/arm64/kvm’ failed
I am able to fix this error by the following changes in “include/linux/irqchip/arm-gic.h”
CC init/version.o
LD init/built-in.o
drivers/built-in.o: In function nvmap_populate_ivm_carveout': /usr/src/kernel/kernel-4.4/drivers/video/tegra/../../../../nvmap//drivers/video/tegra/nvmap/nvmap_init.c:209: undefined reference to tegra_hv_mempool_reserve’
/usr/src/kernel/kernel-4.4/drivers/video/tegra/…/…/…/…/nvmap//drivers/video/tegra/nvmap/nvmap_init.c:209:(.init.text+0x5950): relocation truncated to fit: R_AARCH64_CALL26 against undefined symbol `tegra_hv_mempool_reserve’
Makefile:944: recipe for target ‘vmlinux’ failed
make: *** [vmlinux] Error 1
CHK include/config/kernel.release
Can you let me know how to get around these and enabled KVM on Jetson-tx2 board?
BTW, I want to do some instrumentations using KVM, so containers does not work for me and I don’t care about the speed of visualization.
hi wbq7758258,
I am following your introduction about how to create virtual machines step by step ,but I encountered such issue: qemu-system-aarch64:Initialization of device cfi.pflash01 failed: failed to read the initial flash content.
I used the ubuntu 18.04 ISO. Could you help me out?
I used ubuntu 16.04 arm server for virtual machines. The link of the ISO file is included in my Github repository. There can be some problems if you try new versions of ubuntu iso, especially the ISO is not for arm-based devices.