Skip to content

Commit aac9496

Browse files
ouptonMarc Zyngier
authored andcommitted
KVM: arm64: Rename SMC/HVC call handler to reflect reality
KVM handles SMCCC calls from virtual EL2 that use the SMC instruction since commit bd36b1a ("KVM: arm64: nv: Handle SMCs taken from virtual EL2"). Thus, the function name of the handler no longer reflects reality. Normalize the name on SMCCC, since that's the only hypercall interface KVM supports in the first place. No fuctional change intended. Reviewed-by: Suzuki K Poulose <suzuki.poulose@arm.com> Signed-off-by: Oliver Upton <oliver.upton@linux.dev> Signed-off-by: Marc Zyngier <maz@kernel.org> Link: https://lore.kernel.org/r/20230404154050.2270077-5-oliver.upton@linux.dev
1 parent e0fc6b2 commit aac9496

3 files changed

Lines changed: 4 additions & 4 deletions

File tree

arch/arm64/kvm/handle_exit.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ static int handle_hvc(struct kvm_vcpu *vcpu)
5252
return 1;
5353
}
5454

55-
ret = kvm_hvc_call_handler(vcpu);
55+
ret = kvm_smccc_call_handler(vcpu);
5656
if (ret < 0) {
5757
vcpu_set_reg(vcpu, 0, ~0UL);
5858
return 1;
@@ -89,7 +89,7 @@ static int handle_smc(struct kvm_vcpu *vcpu)
8989
* at Non-secure EL1 is trapped to EL2 if HCR_EL2.TSC==1, rather than
9090
* being treated as UNDEFINED.
9191
*/
92-
ret = kvm_hvc_call_handler(vcpu);
92+
ret = kvm_smccc_call_handler(vcpu);
9393
if (ret < 0)
9494
vcpu_set_reg(vcpu, 0, ~0UL);
9595

arch/arm64/kvm/hypercalls.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ static bool kvm_hvc_call_allowed(struct kvm_vcpu *vcpu, u32 func_id)
121121
}
122122
}
123123

124-
int kvm_hvc_call_handler(struct kvm_vcpu *vcpu)
124+
int kvm_smccc_call_handler(struct kvm_vcpu *vcpu)
125125
{
126126
struct kvm_smccc_features *smccc_feat = &vcpu->kvm->arch.smccc_feat;
127127
u32 func_id = smccc_get_function(vcpu);

include/kvm/arm_hypercalls.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
#include <asm/kvm_emulate.h>
88

9-
int kvm_hvc_call_handler(struct kvm_vcpu *vcpu);
9+
int kvm_smccc_call_handler(struct kvm_vcpu *vcpu);
1010

1111
static inline u32 smccc_get_function(struct kvm_vcpu *vcpu)
1212
{

0 commit comments

Comments
 (0)