History

KVM: arm64: Drop unused param from kvm_psci_version()

kvm_psci_version() consumes a pointer to struct kvm in addition to a vcpu pointer. Drop the kvm pointer as it is unused. While the comment suggests the explicit kvm pointer was useful for calling from hyp, there exist no such callsite in hyp.

Oliver Upton committed 4 years ago

Commit dfefa041 parent dfd42fa2 files · +4 −8Browse files

Unified · Split

2 files
  1. arch/arm64/kvm/psci.c +3 −3
  2. include/kvm/arm_psci.h +1 −5
arch/arm64/kvm/psci.c+3−3
@@ -85,7 +85,7 @@ static unsigned long kvm_psci_vcpu_on(struct kvm_vcpu *source_vcpu) · 84 unmodified lines
85 if (!vcpu)85 if (!vcpu)
86 return PSCI_RET_INVALID_PARAMS;86 return PSCI_RET_INVALID_PARAMS;
87 if (!vcpu->arch.power_off) {87 if (!vcpu->arch.power_off) {
88 if (kvm_psci_version(source_vcpu, kvm) != KVM_ARM_PSCI_0_1)88 if (kvm_psci_version(source_vcpu) != KVM_ARM_PSCI_0_1)
89 return PSCI_RET_ALREADY_ON;89 return PSCI_RET_ALREADY_ON;
90 else90 else
91 return PSCI_RET_INVALID_PARAMS;91 return PSCI_RET_INVALID_PARAMS;
@@ -392,7 +392,7 @@ static int kvm_psci_0_1_call(struct kvm_vcpu *vcpu) · 300 unmodified lines
392 */392 */
393int kvm_psci_call(struct kvm_vcpu *vcpu)393int kvm_psci_call(struct kvm_vcpu *vcpu)
394{394{
395 switch (kvm_psci_version(vcpu, vcpu->kvm)) {395 switch (kvm_psci_version(vcpu)) {
396 case KVM_ARM_PSCI_1_0:396 case KVM_ARM_PSCI_1_0:
397 return kvm_psci_1_0_call(vcpu);397 return kvm_psci_1_0_call(vcpu);
398 case KVM_ARM_PSCI_0_2:398 case KVM_ARM_PSCI_0_2:
@@ -471,7 +471,7 @@ int kvm_arm_get_fw_reg(struct kvm_vcpu *vcpu, const struct kvm_one_reg *reg) · 72 unmodified lines
471 471
472 switch (reg->id) {472 switch (reg->id) {
473 case KVM_REG_ARM_PSCI_VERSION:473 case KVM_REG_ARM_PSCI_VERSION:
474 val = kvm_psci_version(vcpu, vcpu->kvm);474 val = kvm_psci_version(vcpu);
475 break;475 break;
476 case KVM_REG_ARM_SMCCC_ARCH_WORKAROUND_1:476 case KVM_REG_ARM_SMCCC_ARCH_WORKAROUND_1:
477 case KVM_REG_ARM_SMCCC_ARCH_WORKAROUND_2:477 case KVM_REG_ARM_SMCCC_ARCH_WORKAROUND_2:
include/kvm/arm_psci.h+1−5
@@ -16,11 +16,7 @@ · 15 unmodified lines
16 16
17#define KVM_ARM_PSCI_LATEST KVM_ARM_PSCI_1_017#define KVM_ARM_PSCI_LATEST KVM_ARM_PSCI_1_0
18 18
19/*19static inline int kvm_psci_version(struct kvm_vcpu *vcpu)
20 * We need the KVM pointer independently from the vcpu as we can call
21 * this from HYP, and need to apply kern_hyp_va on it...
22 */
23static inline int kvm_psci_version(struct kvm_vcpu *vcpu, struct kvm *kvm)
24{20{
25 /*21 /*
26 * Our PSCI implementation stays the same across versions from22 * Our PSCI implementation stays the same across versions from

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t