From: Alistair Francis <alistair23@gmail.com>
To: Ivan Klokov <ivan.klokov@syntacore.com>
Cc: qemu-devel@nongnu.org, qemu-riscv@nongnu.org,
richard.henderson@linaro.org, pbonzini@redhat.com,
eduardo@habkost.net, marcel.apfelbaum@gmail.com,
philmd@linaro.org, wangyanan55@huawei.com, palmer@dabbelt.com,
alistair.francis@wdc.com, bin.meng@windriver.com,
liweiwei@iscas.ac.cn, dbarboza@ventanamicro.com,
zhiwei_liu@linux.alibaba.com
Subject: Re: [PATCH v3 1/2] util/log: Add vector registers to log
Date: Wed, 12 Apr 2023 20:56:29 +1000 [thread overview]
Message-ID: <CAKmqyKNH6cQzLcLJDQXStJpW-pTJD7EtWgoX7GwRzy1wi73V8A@mail.gmail.com> (raw)
In-Reply-To: <20230410124451.15929-2-ivan.klokov@syntacore.com>
On Mon, Apr 10, 2023 at 10:46 PM Ivan Klokov <ivan.klokov@syntacore.com> wrote:
>
> Added QEMU option 'vpu' to log vector extension registers such as gpr\fpu.
>
> Signed-off-by: Ivan Klokov <ivan.klokov@syntacore.com>
Reviewed-by: Alistair Francis <alistair.francis@wdc.com>
Alistair
> ---
> accel/tcg/cpu-exec.c | 3 +++
> include/hw/core/cpu.h | 2 ++
> include/qemu/log.h | 1 +
> util/log.c | 2 ++
> 4 files changed, 8 insertions(+)
>
> diff --git a/accel/tcg/cpu-exec.c b/accel/tcg/cpu-exec.c
> index 56aaf58b9d..0dca69fccb 100644
> --- a/accel/tcg/cpu-exec.c
> +++ b/accel/tcg/cpu-exec.c
> @@ -319,6 +319,9 @@ static void log_cpu_exec(target_ulong pc, CPUState *cpu,
> #if defined(TARGET_I386)
> flags |= CPU_DUMP_CCOP;
> #endif
> + if (qemu_loglevel_mask(CPU_LOG_TB_VPU)) {
> + flags |= CPU_DUMP_VPU;
> + }
> cpu_dump_state(cpu, logfile, flags);
> qemu_log_unlock(logfile);
> }
> diff --git a/include/hw/core/cpu.h b/include/hw/core/cpu.h
> index 75689bff02..7c9d25ff45 100644
> --- a/include/hw/core/cpu.h
> +++ b/include/hw/core/cpu.h
> @@ -545,11 +545,13 @@ GuestPanicInformation *cpu_get_crash_info(CPUState *cpu);
> * @CPU_DUMP_CODE:
> * @CPU_DUMP_FPU: dump FPU register state, not just integer
> * @CPU_DUMP_CCOP: dump info about TCG QEMU's condition code optimization state
> + * @CPU_DUMP_VPU: dump VPU registers
> */
> enum CPUDumpFlags {
> CPU_DUMP_CODE = 0x00010000,
> CPU_DUMP_FPU = 0x00020000,
> CPU_DUMP_CCOP = 0x00040000,
> + CPU_DUMP_VPU = 0x00080000,
> };
>
> /**
> diff --git a/include/qemu/log.h b/include/qemu/log.h
> index c5643d8dd5..df59bfabcd 100644
> --- a/include/qemu/log.h
> +++ b/include/qemu/log.h
> @@ -35,6 +35,7 @@ bool qemu_log_separate(void);
> /* LOG_STRACE is used for user-mode strace logging. */
> #define LOG_STRACE (1 << 19)
> #define LOG_PER_THREAD (1 << 20)
> +#define CPU_LOG_TB_VPU (1 << 21)
>
> /* Lock/unlock output. */
>
> diff --git a/util/log.c b/util/log.c
> index 7837ff9917..93dccee7b8 100644
> --- a/util/log.c
> +++ b/util/log.c
> @@ -495,6 +495,8 @@ const QEMULogItem qemu_log_items[] = {
> "log every user-mode syscall, its input, and its result" },
> { LOG_PER_THREAD, "tid",
> "open a separate log file per thread; filename must contain '%d'" },
> + { CPU_LOG_TB_VPU, "vpu",
> + "include VPU registers in the 'cpu' logging" },
> { 0, NULL, NULL },
> };
>
> --
> 2.34.1
>
>
next prev parent reply other threads:[~2023-04-12 10:57 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-04-10 12:44 [PATCH v3 0/2] Support for print to log vector extension registers Ivan Klokov
2023-04-10 12:44 ` [PATCH v3 1/2] util/log: Add vector registers to log Ivan Klokov
2023-04-12 10:56 ` Alistair Francis [this message]
2023-04-10 12:44 ` [PATCH v3 2/2] target/riscv: Add RVV " Ivan Klokov
2023-04-12 10:57 ` Alistair Francis
2023-06-02 3:43 ` Alistair Francis
2023-06-02 10:20 ` Philippe Mathieu-Daudé
2023-06-02 3:40 ` [PATCH v3 0/2] Support for print to log vector extension registers Alistair Francis
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=CAKmqyKNH6cQzLcLJDQXStJpW-pTJD7EtWgoX7GwRzy1wi73V8A@mail.gmail.com \
--to=alistair23@gmail.com \
--cc=alistair.francis@wdc.com \
--cc=bin.meng@windriver.com \
--cc=dbarboza@ventanamicro.com \
--cc=eduardo@habkost.net \
--cc=ivan.klokov@syntacore.com \
--cc=liweiwei@iscas.ac.cn \
--cc=marcel.apfelbaum@gmail.com \
--cc=palmer@dabbelt.com \
--cc=pbonzini@redhat.com \
--cc=philmd@linaro.org \
--cc=qemu-devel@nongnu.org \
--cc=qemu-riscv@nongnu.org \
--cc=richard.henderson@linaro.org \
--cc=wangyanan55@huawei.com \
--cc=zhiwei_liu@linux.alibaba.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).