#define ARM64_MTE                              57
 #define ARM64_WORKAROUND_1508412               58
 #define ARM64_HAS_LDAPR                                59
+#define ARM64_KVM_PROTECTED_MODE               60
 
-#define ARM64_NCAPS                            60
+#define ARM64_NCAPS                            61
 
 #endif /* __ASM_CPUCAPS_H */
 
                return cpus_have_final_cap(ARM64_HAS_VIRT_HOST_EXTN);
 }
 
+static __always_inline bool is_protected_kvm_enabled(void)
+{
+       if (is_vhe_hyp_code())
+               return false;
+       else
+               return cpus_have_final_cap(ARM64_KVM_PROTECTED_MODE);
+}
+
 #endif /* __ASSEMBLY__ */
 
 #endif /* ! __ASM__VIRT_H */
 
 #include <asm/cpufeature.h>
 #include <asm/cpu_ops.h>
 #include <asm/fpsimd.h>
+#include <asm/kvm_host.h>
 #include <asm/mmu_context.h>
 #include <asm/mte.h>
 #include <asm/processor.h>
 }
 #endif /* CONFIG_ARM64_MTE */
 
+#ifdef CONFIG_KVM
+static bool is_kvm_protected_mode(const struct arm64_cpu_capabilities *entry, int __unused)
+{
+       if (kvm_get_mode() != KVM_MODE_PROTECTED)
+               return false;
+
+       if (is_kernel_in_hyp_mode()) {
+               pr_warn("Protected KVM not available with VHE\n");
+               return false;
+       }
+
+       return true;
+}
+#endif /* CONFIG_KVM */
+
 /* Internal helper functions to match cpu capability type */
 static bool
 cpucap_late_cpu_optional(const struct arm64_cpu_capabilities *cap)
                .field_pos = ID_AA64PFR0_EL1_SHIFT,
                .min_field_value = ID_AA64PFR0_EL1_32BIT_64BIT,
        },
+       {
+               .desc = "Protected KVM",
+               .capability = ARM64_KVM_PROTECTED_MODE,
+               .type = ARM64_CPUCAP_SYSTEM_FEATURE,
+               .matches = is_kvm_protected_mode,
+       },
 #endif
        {
                .desc = "Kernel page table isolation (KPTI)",
 
        if (err)
                goto out_hyp;
 
-       if (in_hyp_mode)
+       if (is_protected_kvm_enabled())
+               kvm_info("Protected nVHE mode initialized successfully\n");
+       else if (in_hyp_mode)
                kvm_info("VHE mode initialized successfully\n");
        else
                kvm_info("Hyp mode initialized successfully\n");
 }
 early_param("kvm-arm.mode", early_kvm_mode_cfg);
 
+enum kvm_mode kvm_get_mode(void)
+{
+       return kvm_mode;
+}
+
 static int arm_init(void)
 {
        int rc = kvm_init(NULL, sizeof(struct kvm_vcpu), 0, THIS_MODULE);