Skip to content

Commit 8cebe75

Browse files
Marc Zyngierchazy
authored andcommitted
arm64: KVM: Make kvm_skip_instr32 available to HYP
As we plan to do some emulation at HYP, let's make kvm_skip_instr32 as part of the hyp_text section. This doesn't preclude the kernel from using it. Signed-off-by: Marc Zyngier <[email protected]> Signed-off-by: Christoffer Dall <[email protected]>
1 parent 3aedd5c commit 8cebe75

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

virt/kvm/arm/aarch32.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323

2424
#include <linux/kvm_host.h>
2525
#include <asm/kvm_emulate.h>
26+
#include <asm/kvm_hyp.h>
2627

2728
#ifndef CONFIG_ARM64
2829
#define COMPAT_PSR_T_BIT PSR_T_BIT
@@ -108,7 +109,7 @@ bool kvm_condition_valid32(const struct kvm_vcpu *vcpu)
108109
*
109110
* IT[7:0] -> CPSR[26:25],CPSR[15:10]
110111
*/
111-
static void kvm_adjust_itstate(struct kvm_vcpu *vcpu)
112+
static void __hyp_text kvm_adjust_itstate(struct kvm_vcpu *vcpu)
112113
{
113114
unsigned long itbits, cond;
114115
unsigned long cpsr = *vcpu_cpsr(vcpu);
@@ -138,7 +139,7 @@ static void kvm_adjust_itstate(struct kvm_vcpu *vcpu)
138139
* kvm_skip_instr - skip a trapped instruction and proceed to the next
139140
* @vcpu: The vcpu pointer
140141
*/
141-
void kvm_skip_instr32(struct kvm_vcpu *vcpu, bool is_wide_instr)
142+
void __hyp_text kvm_skip_instr32(struct kvm_vcpu *vcpu, bool is_wide_instr)
142143
{
143144
bool is_thumb;
144145

0 commit comments

Comments
 (0)