Skip to content

Commit

Permalink
Merge branch kvm-arm64/psci-1.1 into kvmarm-master/next
Browse files Browse the repository at this point in the history
* kvm-arm64/psci-1.1:
  : .
  : Limited PSCI-1.1 support from Will Deacon:
  :
  : This small series exposes the PSCI SYSTEM_RESET2 call to guests, which
  : allows the propagation of a "reset_type" and a "cookie" back to the VMM.
  : Although Linux guests only ever pass 0 for the type ("SYSTEM_WARM_RESET"),
  : the vendor-defined range can be used by a bootloader to provide additional
  : information about the reset, such as an error code.
  : .
  KVM: arm64: Really propagate PSCI SYSTEM_RESET2 arguments to userspace

Signed-off-by: Marc Zyngier <maz@kernel.org>
  • Loading branch information
Marc Zyngier committed Mar 9, 2022
2 parents 7297a8b + 9d3e7b7 commit 9872e6b
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions arch/arm64/kvm/psci.c
Original file line number Diff line number Diff line change
Expand Up @@ -367,14 +367,14 @@ static int kvm_psci_1_x_call(struct kvm_vcpu *vcpu, u32 minor)
if (minor >= 1) {
arg = smccc_get_arg1(vcpu);

if (arg > PSCI_1_1_RESET_TYPE_SYSTEM_WARM_RESET &&
arg < PSCI_1_1_RESET_TYPE_VENDOR_START) {
val = PSCI_RET_INVALID_PARAMS;
} else {
if (arg <= PSCI_1_1_RESET_TYPE_SYSTEM_WARM_RESET ||
arg >= PSCI_1_1_RESET_TYPE_VENDOR_START) {
kvm_psci_system_reset2(vcpu);
val = PSCI_RET_INTERNAL_FAILURE;
ret = 0;
vcpu_set_reg(vcpu, 0, PSCI_RET_INTERNAL_FAILURE);
return 0;
}

val = PSCI_RET_INVALID_PARAMS;
break;
}
fallthrough;
Expand Down

0 comments on commit 9872e6b

Please sign in to comment.