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
8585 if (!vcpu)
8686 return PSCI_RET_INVALID_PARAMS;
8787 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)
8989 return PSCI_RET_ALREADY_ON;
9090 else
9191 return PSCI_RET_INVALID_PARAMS;
@@ -392,7 +392,7 @@ static int kvm_psci_0_1_call(struct kvm_vcpu *vcpu) · 300 unmodified lines
392392 */
393393 int kvm_psci_call(struct kvm_vcpu *vcpu)
394394 {
395− switch (kvm_psci_version(vcpu, vcpu->kvm)) {
395+ switch (kvm_psci_version(vcpu)) {
396396 case KVM_ARM_PSCI_1_0:
397397 return kvm_psci_1_0_call(vcpu);
398398 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
471471
472472 switch (reg->id) {
473473 case KVM_REG_ARM_PSCI_VERSION:
474− val = kvm_psci_version(vcpu, vcpu->kvm);
474+ val = kvm_psci_version(vcpu);
475475 break;
476476 case KVM_REG_ARM_SMCCC_ARCH_WORKAROUND_1:
477477 case KVM_REG_ARM_SMCCC_ARCH_WORKAROUND_2:
include/kvm/arm_psci.h+1−5
@@ -16,11 +16,7 @@ · 15 unmodified lines
1616
1717 #define KVM_ARM_PSCI_LATEST KVM_ARM_PSCI_1_0
1818
19−/*
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− */
23−static inline int kvm_psci_version(struct kvm_vcpu *vcpu, struct kvm *kvm)
19+static inline int kvm_psci_version(struct kvm_vcpu *vcpu)
2420 {
2521 /*
2622 * 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