diff options
author | Marc Zyngier <marc.zyngier@arm.com> | 2016-09-06 09:02:14 -0400 |
---|---|---|
committer | Christoffer Dall <christoffer.dall@linaro.org> | 2016-09-08 06:53:00 -0400 |
commit | e656a1f91e701e6a1eddf8c029b45639b60877d5 (patch) | |
tree | c890fa354afd35a12b5003b5dc4a3b0b77727df4 | |
parent | 5d7bcf7d644a88183fb34fca12ad6ea40a8db7ab (diff) |
arm: KVM: Drop unreachable HYP abort handlers
Both data and prefetch aborts occuring in HYP lead to a well
deserved panic. Let's get rid of these silly handlers.
Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
Signed-off-by: Christoffer Dall <christoffer.dall@linaro.org>
-rw-r--r-- | arch/arm/kvm/handle_exit.c | 27 |
1 files changed, 0 insertions, 27 deletions
diff --git a/arch/arm/kvm/handle_exit.c b/arch/arm/kvm/handle_exit.c index 4eacb5cb60e8..4e40d1955e35 100644 --- a/arch/arm/kvm/handle_exit.c +++ b/arch/arm/kvm/handle_exit.c | |||
@@ -28,14 +28,6 @@ | |||
28 | 28 | ||
29 | typedef int (*exit_handle_fn)(struct kvm_vcpu *, struct kvm_run *); | 29 | typedef int (*exit_handle_fn)(struct kvm_vcpu *, struct kvm_run *); |
30 | 30 | ||
31 | static int handle_svc_hyp(struct kvm_vcpu *vcpu, struct kvm_run *run) | ||
32 | { | ||
33 | /* SVC called from Hyp mode should never get here */ | ||
34 | kvm_debug("SVC called from Hyp mode shouldn't go here\n"); | ||
35 | BUG(); | ||
36 | return -EINVAL; /* Squash warning */ | ||
37 | } | ||
38 | |||
39 | static int handle_hvc(struct kvm_vcpu *vcpu, struct kvm_run *run) | 31 | static int handle_hvc(struct kvm_vcpu *vcpu, struct kvm_run *run) |
40 | { | 32 | { |
41 | int ret; | 33 | int ret; |
@@ -59,22 +51,6 @@ static int handle_smc(struct kvm_vcpu *vcpu, struct kvm_run *run) | |||
59 | return 1; | 51 | return 1; |
60 | } | 52 | } |
61 | 53 | ||
62 | static int handle_pabt_hyp(struct kvm_vcpu *vcpu, struct kvm_run *run) | ||
63 | { | ||
64 | /* The hypervisor should never cause aborts */ | ||
65 | kvm_err("Prefetch Abort taken from Hyp mode at %#08lx (HSR: %#08x)\n", | ||
66 | kvm_vcpu_get_hfar(vcpu), kvm_vcpu_get_hsr(vcpu)); | ||
67 | return -EFAULT; | ||
68 | } | ||
69 | |||
70 | static int handle_dabt_hyp(struct kvm_vcpu *vcpu, struct kvm_run *run) | ||
71 | { | ||
72 | /* This is either an error in the ws. code or an external abort */ | ||
73 | kvm_err("Data Abort taken from Hyp mode at %#08lx (HSR: %#08x)\n", | ||
74 | kvm_vcpu_get_hfar(vcpu), kvm_vcpu_get_hsr(vcpu)); | ||
75 | return -EFAULT; | ||
76 | } | ||
77 | |||
78 | /** | 54 | /** |
79 | * kvm_handle_wfx - handle a WFI or WFE instructions trapped in guests | 55 | * kvm_handle_wfx - handle a WFI or WFE instructions trapped in guests |
80 | * @vcpu: the vcpu pointer | 56 | * @vcpu: the vcpu pointer |
@@ -112,13 +88,10 @@ static exit_handle_fn arm_exit_handlers[] = { | |||
112 | [HSR_EC_CP14_64] = kvm_handle_cp14_access, | 88 | [HSR_EC_CP14_64] = kvm_handle_cp14_access, |
113 | [HSR_EC_CP_0_13] = kvm_handle_cp_0_13_access, | 89 | [HSR_EC_CP_0_13] = kvm_handle_cp_0_13_access, |
114 | [HSR_EC_CP10_ID] = kvm_handle_cp10_id, | 90 | [HSR_EC_CP10_ID] = kvm_handle_cp10_id, |
115 | [HSR_EC_SVC_HYP] = handle_svc_hyp, | ||
116 | [HSR_EC_HVC] = handle_hvc, | 91 | [HSR_EC_HVC] = handle_hvc, |
117 | [HSR_EC_SMC] = handle_smc, | 92 | [HSR_EC_SMC] = handle_smc, |
118 | [HSR_EC_IABT] = kvm_handle_guest_abort, | 93 | [HSR_EC_IABT] = kvm_handle_guest_abort, |
119 | [HSR_EC_IABT_HYP] = handle_pabt_hyp, | ||
120 | [HSR_EC_DABT] = kvm_handle_guest_abort, | 94 | [HSR_EC_DABT] = kvm_handle_guest_abort, |
121 | [HSR_EC_DABT_HYP] = handle_dabt_hyp, | ||
122 | }; | 95 | }; |
123 | 96 | ||
124 | static exit_handle_fn kvm_get_exit_handler(struct kvm_vcpu *vcpu) | 97 | static exit_handle_fn kvm_get_exit_handler(struct kvm_vcpu *vcpu) |