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

Even if PVMs can't be straightforwardly reset, we should still propagate
this information to the VMM.

Bug: 216801012
Signed-off-by: Will Deacon <willdeacon@google.com>
Change-Id: I41833748da6744605ec3d68897a785305640ea2b
This commit is contained in:
Will Deacon
2022-02-07 17:47:20 +00:00
parent 8f3d3d547d
commit c96767cc24
2 changed files with 1 additions and 7 deletions

View File

@@ -290,6 +290,7 @@ 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,13 +1017,6 @@ 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: