aboutsummaryrefslogtreecommitdiffstats
path: root/virt/kvm
diff options
context:
space:
mode:
authorMarc Zyngier <marc.zyngier@arm.com>2016-09-06 04:28:44 -0400
committerChristoffer Dall <christoffer.dall@linaro.org>2016-09-08 06:53:00 -0400
commit8cebe750c4d9acdfdce41ee0a83a58be973ebc5e (patch)
tree257daa26ec750aa2f6c29f283b0e7bdef40b47a4 /virt/kvm
parent3aedd5c49e63c0d31a53b00ab906d48f53abb68b (diff)
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 <marc.zyngier@arm.com> Signed-off-by: Christoffer Dall <christoffer.dall@linaro.org>
Diffstat (limited to 'virt/kvm')
-rw-r--r--virt/kvm/arm/aarch32.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/virt/kvm/arm/aarch32.c b/virt/kvm/arm/aarch32.c
index ba4417b640c7..528af4b2d09e 100644
--- a/virt/kvm/arm/aarch32.c
+++ b/virt/kvm/arm/aarch32.c
@@ -23,6 +23,7 @@
23 23
24#include <linux/kvm_host.h> 24#include <linux/kvm_host.h>
25#include <asm/kvm_emulate.h> 25#include <asm/kvm_emulate.h>
26#include <asm/kvm_hyp.h>
26 27
27#ifndef CONFIG_ARM64 28#ifndef CONFIG_ARM64
28#define COMPAT_PSR_T_BIT PSR_T_BIT 29#define COMPAT_PSR_T_BIT PSR_T_BIT
@@ -108,7 +109,7 @@ bool kvm_condition_valid32(const struct kvm_vcpu *vcpu)
108 * 109 *
109 * IT[7:0] -> CPSR[26:25],CPSR[15:10] 110 * IT[7:0] -> CPSR[26:25],CPSR[15:10]
110 */ 111 */
111static void kvm_adjust_itstate(struct kvm_vcpu *vcpu) 112static void __hyp_text kvm_adjust_itstate(struct kvm_vcpu *vcpu)
112{ 113{
113 unsigned long itbits, cond; 114 unsigned long itbits, cond;
114 unsigned long cpsr = *vcpu_cpsr(vcpu); 115 unsigned long cpsr = *vcpu_cpsr(vcpu);
@@ -138,7 +139,7 @@ static void kvm_adjust_itstate(struct kvm_vcpu *vcpu)
138 * kvm_skip_instr - skip a trapped instruction and proceed to the next 139 * kvm_skip_instr - skip a trapped instruction and proceed to the next
139 * @vcpu: The vcpu pointer 140 * @vcpu: The vcpu pointer
140 */ 141 */
141void kvm_skip_instr32(struct kvm_vcpu *vcpu, bool is_wide_instr) 142void __hyp_text kvm_skip_instr32(struct kvm_vcpu *vcpu, bool is_wide_instr)
142{ 143{
143 bool is_thumb; 144 bool is_thumb;
144 145