#define KVM_PSCI_RET_INVAL            PSCI_RET_INVALID_PARAMS
  #define KVM_PSCI_RET_DENIED           PSCI_RET_DENIED
  
+ /* arm64-specific kvm_run::system_event flags */
+ /*
+  * Reset caused by a PSCI v1.1 SYSTEM_RESET2 call.
+  * Valid only when the system event has a type of KVM_SYSTEM_EVENT_RESET.
+  */
+ #define KVM_SYSTEM_EVENT_RESET_FLAG_PSCI_RESET2       (1ULL << 0)
+ 
 +/* run->fail_entry.hardware_entry_failure_reason codes. */
 +#define KVM_EXIT_FAIL_ENTRY_CPU_UNSUPPORTED   (1ULL << 0)
 +
  #endif
  
  #endif /* __ARM_KVM_H__ */
 
   */
  int kvm_psci_call(struct kvm_vcpu *vcpu)
  {
 -      switch (kvm_psci_version(vcpu, vcpu->kvm)) {
 +      switch (kvm_psci_version(vcpu)) {
+       case KVM_ARM_PSCI_1_1:
+               return kvm_psci_1_x_call(vcpu, 1);
        case KVM_ARM_PSCI_1_0:
-               return kvm_psci_1_0_call(vcpu);
+               return kvm_psci_1_x_call(vcpu, 0);
        case KVM_ARM_PSCI_0_2:
                return kvm_psci_0_2_call(vcpu);
        case KVM_ARM_PSCI_0_1:
 
  #define KVM_ARM_PSCI_0_1      PSCI_VERSION(0, 1)
  #define KVM_ARM_PSCI_0_2      PSCI_VERSION(0, 2)
  #define KVM_ARM_PSCI_1_0      PSCI_VERSION(1, 0)
+ #define KVM_ARM_PSCI_1_1      PSCI_VERSION(1, 1)
  
- #define KVM_ARM_PSCI_LATEST   KVM_ARM_PSCI_1_0
+ #define KVM_ARM_PSCI_LATEST   KVM_ARM_PSCI_1_1
  
 -/*
 - * We need the KVM pointer independently from the vcpu as we can call
 - * this from HYP, and need to apply kern_hyp_va on it...
 - */
 -static inline int kvm_psci_version(struct kvm_vcpu *vcpu, struct kvm *kvm)
 +static inline int kvm_psci_version(struct kvm_vcpu *vcpu)
  {
        /*
         * Our PSCI implementation stays the same across versions from