diff options
author | Mark Brown <broonie@kernel.org> | 2021-01-13 17:56:56 +0000 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2021-01-13 17:56:56 +0000 |
commit | cea06d9bf0e035a549226e217022fa51b0c878e5 (patch) | |
tree | a882062da6ee7f1de90a21cc0e717073cc71cb5d /arch/arm64/kvm/hyp/nvhe/hyp-main.c | |
parent | 9c25af250214e45f6d1c21ff6239a1ffeeedf20e (diff) | |
parent | 7c53f6b671f4aba70ff15e1b05148b10d58c2837 (diff) | |
download | lwn-cea06d9bf0e035a549226e217022fa51b0c878e5.tar.gz lwn-cea06d9bf0e035a549226e217022fa51b0c878e5.zip |
Merge v5.11-rc3
Diffstat (limited to 'arch/arm64/kvm/hyp/nvhe/hyp-main.c')
-rw-r--r-- | arch/arm64/kvm/hyp/nvhe/hyp-main.c | 12 |
1 files changed, 2 insertions, 10 deletions
diff --git a/arch/arm64/kvm/hyp/nvhe/hyp-main.c b/arch/arm64/kvm/hyp/nvhe/hyp-main.c index bde658d51404..a906f9e2ff34 100644 --- a/arch/arm64/kvm/hyp/nvhe/hyp-main.c +++ b/arch/arm64/kvm/hyp/nvhe/hyp-main.c @@ -157,11 +157,6 @@ static void default_host_smc_handler(struct kvm_cpu_context *host_ctxt) __kvm_hyp_host_forward_smc(host_ctxt); } -static void skip_host_instruction(void) -{ - write_sysreg_el2(read_sysreg_el2(SYS_ELR) + 4, SYS_ELR); -} - static void handle_host_smc(struct kvm_cpu_context *host_ctxt) { bool handled; @@ -170,11 +165,8 @@ static void handle_host_smc(struct kvm_cpu_context *host_ctxt) if (!handled) default_host_smc_handler(host_ctxt); - /* - * Unlike HVC, the return address of an SMC is the instruction's PC. - * Move the return address past the instruction. - */ - skip_host_instruction(); + /* SMC was trapped, move ELR past the current PC. */ + kvm_skip_host_instr(); } void handle_trap(struct kvm_cpu_context *host_ctxt) |