botfap Posted October 10, 2017 Share Posted October 10, 2017 Has anyone played with kvm or xen on the hw-virt capable rockchip devices? Im trying to setup a simple kvm scenario. Im using Armbian tinker stable and the excellent @Myy 4.13 kernel and have configured it for guest and host support. Im struggling to get the boards up in "Normal" (PL2 / Hyp) mode. I can only get them to boot in "Secure" mode, which is the normal method of boot. Secure boot disables access to Privilege Level 2 and the ARM Hypervisor which makes virtualisation impossible. I have tried setting "bootm_boot_mode=nonsec" but it makes no difference, I still get "kvm [1]: HYP mode not available" during boot. Same as I get with "bootm_boot_mode=sec" which is the standard startup method. Im suspect this is a uboot issue and maybe the CONFIG_ARMV7_VIRT option is disabled? Anyone played with this yet? If not, whats the correct Armbian way to build just uboot for a specific board? I will look at creating a patch for uboot to enable the ARM Virt options Link to comment Share on other sites More sharing options...
botfap Posted October 10, 2017 Author Share Posted October 10, 2017 Also if anyone has played with this before, is there an Armbian board target for vm guest? Or a target with absolute minimal hardware support additions to use as a base for creating a new target? Link to comment Share on other sites More sharing options...
Myy Posted October 15, 2017 Share Posted October 15, 2017 I haven't tried for the moment, given that the actual hardware still need a few drivers to be usable for daily tasks with mainline kernels. Still, I haven't checked but is the Hypervisor mode an ARMv7 thing or a Rockchip thing. If it's an ARMv7 thing, the reference manuals might contain some clues on what to do to use these features. When reviewing the patches, I'll try to check what could cause this message to appear, programming wise. Link to comment Share on other sites More sharing options...
botfap Posted October 15, 2017 Author Share Posted October 15, 2017 Its an arm7 / arm8 thing, anything after the Cortex-a15 ish supports HYP mode in hardware. I have managed to get it working today but that was under a buildroot based system with legacy kernel not armbian, but it is possible. Something in Armbian's u-boot is ignoring or blocking the nonsec PL2/HYP boot mode. With a "clean" u-boot from rockchips github repo it works as expected after setting CONFIG_ARMV7_VIRT. I will compare the difference between the 2 when I get a chance. 1 Link to comment Share on other sites More sharing options...
Recommended Posts