aboutsummaryrefslogtreecommitdiff
path: root/target/arm/kvm.c
diff options
context:
space:
mode:
authorRichard Henderson <richard.henderson@linaro.org>2022-04-30 22:49:48 -0700
committerPeter Maydell <peter.maydell@linaro.org>2022-05-05 09:35:51 +0100
commitd385a60571487d9409f247d07aac94d1ee40f9fe (patch)
treebac12f154f3f1d0a37618264a65e3c81e29927a4 /target/arm/kvm.c
parent87c3f0f2f791094adce2b8643d9103dac1b59702 (diff)
target/arm: Avoid bare abort() or assert(0)
Standardize on g_assert_not_reached() for "should not happen". Retain abort() when preceeded by fprintf or error_report. Signed-off-by: Richard Henderson <richard.henderson@linaro.org> Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Message-id: 20220501055028.646596-7-richard.henderson@linaro.org Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'target/arm/kvm.c')
-rw-r--r--target/arm/kvm.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/target/arm/kvm.c b/target/arm/kvm.c
index 5fc37ac10a..4339e1cd6e 100644
--- a/target/arm/kvm.c
+++ b/target/arm/kvm.c
@@ -540,7 +540,7 @@ bool write_kvmstate_to_list(ARMCPU *cpu)
ret = kvm_vcpu_ioctl(cs, KVM_GET_ONE_REG, &r);
break;
default:
- abort();
+ g_assert_not_reached();
}
if (ret) {
ok = false;
@@ -575,7 +575,7 @@ bool write_list_to_kvmstate(ARMCPU *cpu, int level)
r.addr = (uintptr_t)(cpu->cpreg_values + i);
break;
default:
- abort();
+ g_assert_not_reached();
}
ret = kvm_vcpu_ioctl(cs, KVM_SET_ONE_REG, &r);
if (ret) {