General Force enabling KVM and attempting to run Windows 11 ARM

Search This thread

gckim250

Member
Nov 21, 2017
13
4
Sorry for bad english...
Model : A536N
ROM : Stock Android 12

I modified two files from afaneh92's kernel source like this:
first, I removed the string "kvm-arm.mode=protected" from CONFIG_CMDLINE
and modified /arch/arm64/include/asm/virt.h :
C:
static inline bool is_hyp_mode_available(void)
{
    /*
     * If KVM protected mode is initialized, all CPUs must have been booted
     * in EL2. Avoid checking __boot_cpu_mode as CPUs now come up in EL1.
     */
    if (IS_ENABLED(CONFIG_KVM) &&
        static_branch_likely(&kvm_protected_mode_initialized))
        return true;

    /*
    return (__boot_cpu_mode[0] == BOOT_CPU_MODE_EL2 &&
        __boot_cpu_mode[1] == BOOT_CPU_MODE_EL2);*/
    return 1;
}

After compiling and applying that kernel, kvm showed in /dev folder!
I didn't expected that those doings enable kvm!
So I attempted my Windows 11 ARM VM with KVM, but got some error...

kvm_enabled.jpg

kvm_error.jpg
 
Last edited: