|
@@ -403,12 +403,8 @@ static bool __hyp_text fixup_guest_exit(struct kvm_vcpu *vcpu, u64 *exit_code)
|
|
|
if (valid) {
|
|
|
int ret = __vgic_v2_perform_cpuif_access(vcpu);
|
|
|
|
|
|
- if (ret == 1) {
|
|
|
- if (__skip_instr(vcpu))
|
|
|
- return true;
|
|
|
- else
|
|
|
- *exit_code = ARM_EXCEPTION_TRAP;
|
|
|
- }
|
|
|
+ if (ret == 1 && __skip_instr(vcpu))
|
|
|
+ return true;
|
|
|
|
|
|
if (ret == -1) {
|
|
|
/* Promote an illegal access to an
|
|
@@ -430,12 +426,8 @@ static bool __hyp_text fixup_guest_exit(struct kvm_vcpu *vcpu, u64 *exit_code)
|
|
|
kvm_vcpu_trap_get_class(vcpu) == ESR_ELx_EC_CP15_32)) {
|
|
|
int ret = __vgic_v3_perform_cpuif_access(vcpu);
|
|
|
|
|
|
- if (ret == 1) {
|
|
|
- if (__skip_instr(vcpu))
|
|
|
- return true;
|
|
|
- else
|
|
|
- *exit_code = ARM_EXCEPTION_TRAP;
|
|
|
- }
|
|
|
+ if (ret == 1 && __skip_instr(vcpu))
|
|
|
+ return true;
|
|
|
}
|
|
|
|
|
|
/* Return to the host kernel and handle the exit */
|