diff options
author | Ivan Klokov <ivan.klokov@syntacore.com> | 2023-04-10 15:44:50 +0300 |
---|---|---|
committer | Alistair Francis <alistair.francis@wdc.com> | 2023-06-13 17:42:01 +1000 |
commit | b84694defbcc675a42bc35c4eb28cac590a5414b (patch) | |
tree | 9e20555c6058704bab32962551f23addf1c22008 | |
parent | e158a6520a690b98242b9ecb53d25aa639641547 (diff) | |
download | qemu-b84694defbcc675a42bc35c4eb28cac590a5414b.zip qemu-b84694defbcc675a42bc35c4eb28cac590a5414b.tar.gz qemu-b84694defbcc675a42bc35c4eb28cac590a5414b.tar.bz2 |
util/log: Add vector registers to log
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>
Message-Id: <20230410124451.15929-2-ivan.klokov@syntacore.com>
Signed-off-by: Alistair Francis <alistair.francis@wdc.com>
-rw-r--r-- | accel/tcg/cpu-exec.c | 3 | ||||
-rw-r--r-- | include/hw/core/cpu.h | 2 | ||||
-rw-r--r-- | include/qemu/log.h | 1 | ||||
-rw-r--r-- | util/log.c | 2 |
4 files changed, 8 insertions, 0 deletions
diff --git a/accel/tcg/cpu-exec.c b/accel/tcg/cpu-exec.c index 4208652..ebc1db0 100644 --- a/accel/tcg/cpu-exec.c +++ b/accel/tcg/cpu-exec.c @@ -313,6 +313,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 383456d..d84fbcc 100644 --- a/include/hw/core/cpu.h +++ b/include/hw/core/cpu.h @@ -544,11 +544,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 c5643d8..df59bfa 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. */ @@ -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 }, }; |