}
 }
 
+static unsigned long psci_call(unsigned long fn, unsigned long arg0,
+                              unsigned long arg1, unsigned long arg2)
+{
+       struct arm_smccc_res res;
+
+       arm_smccc_1_1_smc(fn, arg0, arg1, arg2, &res);
+       return res.a0;
+}
+
+static unsigned long psci_forward(struct kvm_cpu_context *host_ctxt)
+{
+       return psci_call(cpu_reg(host_ctxt, 0), cpu_reg(host_ctxt, 1),
+                        cpu_reg(host_ctxt, 2), cpu_reg(host_ctxt, 3));
+}
+
+static __noreturn unsigned long psci_forward_noreturn(struct kvm_cpu_context *host_ctxt)
+{
+       psci_forward(host_ctxt);
+       hyp_panic(); /* unreachable */
+}
+
 static unsigned long psci_0_1_handler(u64 func_id, struct kvm_cpu_context *host_ctxt)
 {
-       return PSCI_RET_NOT_SUPPORTED;
+       if ((func_id == kvm_host_psci_0_1_function_ids.cpu_off) ||
+           (func_id == kvm_host_psci_0_1_function_ids.migrate))
+               return psci_forward(host_ctxt);
+       else
+               return PSCI_RET_NOT_SUPPORTED;
 }
 
 static unsigned long psci_0_2_handler(u64 func_id, struct kvm_cpu_context *host_ctxt)
 {
        switch (func_id) {
+       case PSCI_0_2_FN_PSCI_VERSION:
+       case PSCI_0_2_FN_CPU_OFF:
+       case PSCI_0_2_FN64_AFFINITY_INFO:
+       case PSCI_0_2_FN64_MIGRATE:
+       case PSCI_0_2_FN_MIGRATE_INFO_TYPE:
+       case PSCI_0_2_FN64_MIGRATE_INFO_UP_CPU:
+               return psci_forward(host_ctxt);
+       case PSCI_0_2_FN_SYSTEM_OFF:
+       case PSCI_0_2_FN_SYSTEM_RESET:
+               psci_forward_noreturn(host_ctxt);
+               unreachable();
        default:
                return PSCI_RET_NOT_SUPPORTED;
        }
 static unsigned long psci_1_0_handler(u64 func_id, struct kvm_cpu_context *host_ctxt)
 {
        switch (func_id) {
+       case PSCI_1_0_FN_PSCI_FEATURES:
+       case PSCI_1_0_FN_SET_SUSPEND_MODE:
+       case PSCI_1_1_FN64_SYSTEM_RESET2:
+               return psci_forward(host_ctxt);
        default:
                return psci_0_2_handler(func_id, host_ctxt);
        }