summaryrefslogtreecommitdiffstats
path: root/virt/kvm/arm
diff options
context:
space:
mode:
authorMarc Zyngier <marc.zyngier@arm.com>2017-06-09 12:49:32 +0100
committerMarc Zyngier <marc.zyngier@arm.com>2017-06-15 09:44:58 +0100
commit021234ef3752f853704ef1919e8ff33173aca093 (patch)
tree598f3fb8e246fe21daf83b816a7506fedaacda44 /virt/kvm/arm
parent63000dd8006dc987db31ba670edc23142ea91e01 (diff)
downloadop-kernel-dev-021234ef3752f853704ef1919e8ff33173aca093.zip
op-kernel-dev-021234ef3752f853704ef1919e8ff33173aca093.tar.gz
KVM: arm64: Make kvm_condition_valid32() accessible from EL2
As we're about to trap CP15 accesses and handle them at EL2, we need to evaluate whether or not the condition flags are valid, as an implementation is allowed to trap despite the condition not being met. Tagging the function as __hyp_text allows this. We still rely on the cc_map array to be mapped at EL2 by virtue of being "const", and the linker to only emit relative references. Tested-by: Alexander Graf <agraf@suse.de> Acked-by: David Daney <david.daney@cavium.com> Reviewed-by: Eric Auger <eric.auger@redhat.com> Signed-off-by: Marc Zyngier <marc.zyngier@arm.com> Signed-off-by: Christoffer Dall <cdall@linaro.org>
Diffstat (limited to 'virt/kvm/arm')
-rw-r--r--virt/kvm/arm/aarch32.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/virt/kvm/arm/aarch32.c b/virt/kvm/arm/aarch32.c
index 528af4b..79c7c35 100644
--- a/virt/kvm/arm/aarch32.c
+++ b/virt/kvm/arm/aarch32.c
@@ -60,7 +60,7 @@ static const unsigned short cc_map[16] = {
/*
* Check if a trapped instruction should have been executed or not.
*/
-bool kvm_condition_valid32(const struct kvm_vcpu *vcpu)
+bool __hyp_text kvm_condition_valid32(const struct kvm_vcpu *vcpu)
{
unsigned long cpsr;
u32 cpsr_cond;
OpenPOWER on IntegriCloud