RISC-V qemu doesn't log "PRIV" in every instruction
2023-12-27
RISC-V qemu seems wrong because it doesn’t log “PRIV:” in every instruction in qemu.log. Even mret is execute and the mode is changed, it doesn’t log “PRIV”.
To fix this:
- In accel/tcg/cpu-exec.c, in function log_cpu_exec, add parameter “CPURISCVState *env”
qemu_log_mask(CPU_LOG_EXEC,"Priv: "TARGET_FMT_ld"; Virt: %d\n", env->priv, env->virt_enabled);
- Change every calling function “log_cpu_exec”, add env as last parameter
- “make” and “sudo make install”