target/loongarch/kvm: remove redundant cpucfg failure traces
kvm_get_one_reg() and kvm_set_one_reg() already trace on failure, so the trace_kvm_failed_get_cpucfg()/trace_kvm_failed_put_cpucfg() calls in kvm_loongarch_get_cpucfg() and kvm_loongarch_put_cpucfg() duplicate that. Remove the calls and the now-unused trace events. Signed-off-by: Tao Cui <cuitao@kylinos.cn> Reviewed-by: Bibo Mao <maobibo@loongson.cn> Message-ID: <20260626052742.810726-4-cui.tao@linux.dev> Signed-off-by: Song Gao <gaosong@loongson.cn>
Tao Cui committed
Jun 26, 2026 at 13:27 UTC
5f59ac61692b4f289f499f80b698e17f377ec59d
2 files changed
-8
target/loongarch/kvm/kvm.c
-6
@@ -714,9 +714,6 @@ static int kvm_loongarch_get_cpucfg(CPUState *cs)
714
715
for (i = 0; i < 21; i++) {
716
ret = kvm_get_one_reg(cs, KVM_IOC_CPUCFG(i), &val);
717
- if (ret < 0) {
718
- trace_kvm_failed_get_cpucfg(strerror(errno));
719
- }
717
env->cpucfg[i] = (uint32_t)val;
718
}
719
return ret;
@@ -777,9 +774,6 @@ static int kvm_loongarch_put_cpucfg(CPUState *cs)
774
}
775
val = env->cpucfg[i];
776
ret = kvm_set_one_reg(cs, KVM_IOC_CPUCFG(i), &val);
780
- if (ret < 0) {
781
- trace_kvm_failed_put_cpucfg(strerror(errno));
782
- }
777
}
778
return ret;
779
}
target/loongarch/trace-events
-2
@@ -9,7 +9,5 @@ kvm_failed_get_mpstate(const char *msg) "Failed to get mp_state from KVM: %s"
9
kvm_failed_put_mpstate(const char *msg) "Failed to put mp_state into KVM: %s"
10
kvm_failed_get_counter(const char *msg) "Failed to get counter from KVM: %s"
11
kvm_failed_put_counter(const char *msg) "Failed to put counter into KVM: %s"
12
-kvm_failed_get_cpucfg(const char *msg) "Failed to get cpucfg from KVM: %s"
13
-kvm_failed_put_cpucfg(const char *msg) "Failed to put cpucfg into KVM: %s"
12
kvm_arch_handle_exit(int num) "kvm arch handle exit, the reason number: %d"
13
kvm_set_intr(int irq, int level) "kvm set interrupt, irq num: %d, level: %d"