Revert "ANDROID: KVM: arm64: Don't repaint PSCI SYSTEM_RESET to SYSTEM_OFF"

This reverts commit c96767cc24.

Bug: 233587962
Signed-off-by: Will Deacon <willdeacon@google.com>
Change-Id: I9352e7ad2a8fb088fd63d3243cea24dfcb11ca7a
This commit is contained in:
Will Deacon
2022-07-07 15:49:15 +01:00
parent 96c5df4973
commit 4cf007bc65
2 changed files with 7 additions and 1 deletions

View File

@@ -290,7 +290,6 @@ static void handle_pvm_exit_hvc64(struct kvm_vcpu *host_vcpu, struct kvm_vcpu *s
case PSCI_0_2_FN_CPU_OFF:
case PSCI_0_2_FN_SYSTEM_OFF:
case PSCI_0_2_FN_SYSTEM_RESET:
case PSCI_0_2_FN_CPU_SUSPEND:
case PSCI_0_2_FN64_CPU_SUSPEND:
n = 1;

View File

@@ -1017,6 +1017,13 @@ static bool pkvm_handle_psci(struct kvm_vcpu *vcpu)
case PSCI_1_0_FN_PSCI_FEATURES:
return pvm_psci_features(vcpu);
case PSCI_0_2_FN_SYSTEM_RESET:
/*
* NOTE: Until we add proper support for reset for protected
* VMs, repaint reset requests as system off because some VMMs
* use reset when tearing down a VM.
*/
vcpu_set_reg(vcpu, 0, PSCI_0_2_FN_SYSTEM_OFF);
fallthrough;
case PSCI_0_2_FN_CPU_SUSPEND:
case PSCI_0_2_FN64_CPU_SUSPEND:
case PSCI_0_2_FN_SYSTEM_OFF: