All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] target/loongarch: Add timer information dump support
@ 2023-12-06  8:18 Bibo Mao
  2023-12-06  9:47 ` gaosong
  0 siblings, 1 reply; 2+ messages in thread
From: Bibo Mao @ 2023-12-06  8:18 UTC (permalink / raw)
  To: Song Gao; +Cc: qemu-devel

Timer emulation sometimes is problematic especially when vm is running in
kvm mode. This patch adds registers dump support relative with timer
hardware, so that it is easier to find the problems.

Signed-off-by: Bibo Mao <maobibo@loongson.cn>
---
 target/loongarch/cpu.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/target/loongarch/cpu.c b/target/loongarch/cpu.c
index fc075952e6..db9a421cc4 100644
--- a/target/loongarch/cpu.c
+++ b/target/loongarch/cpu.c
@@ -762,6 +762,8 @@ void loongarch_cpu_dump_state(CPUState *cs, FILE *f, int flags)
     qemu_fprintf(f, "TLBRENTRY=%016" PRIx64 "\n", env->CSR_TLBRENTRY);
     qemu_fprintf(f, "TLBRBADV=%016" PRIx64 "\n", env->CSR_TLBRBADV);
     qemu_fprintf(f, "TLBRERA=%016" PRIx64 "\n", env->CSR_TLBRERA);
+    qemu_fprintf(f, "TCFG=%016" PRIx64 "\n", env->CSR_TCFG);
+    qemu_fprintf(f, "TVAL=%016" PRIx64 "\n", env->CSR_TVAL);
 
     /* fpr */
     if (flags & CPU_DUMP_FPU) {
-- 
2.39.3



^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] target/loongarch: Add timer information dump support
  2023-12-06  8:18 [PATCH] target/loongarch: Add timer information dump support Bibo Mao
@ 2023-12-06  9:47 ` gaosong
  0 siblings, 0 replies; 2+ messages in thread
From: gaosong @ 2023-12-06  9:47 UTC (permalink / raw)
  To: Bibo Mao; +Cc: qemu-devel

在 2023/12/6 下午4:18, Bibo Mao 写道:
> Timer emulation sometimes is problematic especially when vm is running in
> kvm mode. This patch adds registers dump support relative with timer
> hardware, so that it is easier to find the problems.
>
> Signed-off-by: Bibo Mao <maobibo@loongson.cn>
> ---
>   target/loongarch/cpu.c | 2 ++
>   1 file changed, 2 insertions(+)

Reviewed-by: Song Gao <gaosong@loongson.cn>

Thanks.
Song Gao
> diff --git a/target/loongarch/cpu.c b/target/loongarch/cpu.c
> index fc075952e6..db9a421cc4 100644
> --- a/target/loongarch/cpu.c
> +++ b/target/loongarch/cpu.c
> @@ -762,6 +762,8 @@ void loongarch_cpu_dump_state(CPUState *cs, FILE *f, int flags)
>       qemu_fprintf(f, "TLBRENTRY=%016" PRIx64 "\n", env->CSR_TLBRENTRY);
>       qemu_fprintf(f, "TLBRBADV=%016" PRIx64 "\n", env->CSR_TLBRBADV);
>       qemu_fprintf(f, "TLBRERA=%016" PRIx64 "\n", env->CSR_TLBRERA);
> +    qemu_fprintf(f, "TCFG=%016" PRIx64 "\n", env->CSR_TCFG);
> +    qemu_fprintf(f, "TVAL=%016" PRIx64 "\n", env->CSR_TVAL);
>   
>       /* fpr */
>       if (flags & CPU_DUMP_FPU) {



^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2023-12-06  9:48 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-12-06  8:18 [PATCH] target/loongarch: Add timer information dump support Bibo Mao
2023-12-06  9:47 ` gaosong

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.