On 2023/3/24 20:38, Weiwei Li wrote:
This patchset tries to simplify the RVH related check and fix some code style
problems, such as problems for indentation, multi-line comments and lines with
over 80 characters.
This patch set looks good to me, except a small comment on patch
6(target/riscv: Fix format for indentation).
I have sent a patch to convert the env->virt to a bool type.
https://lists.gnu.org/archive/html/qemu-devel/2023-03/msg06191.html
With this patch and your patch 3(target/riscv: Remove check on RVH for
riscv_cpu_virt_enabled), I think we can remove the riscv_cpu_virt_enabled
which has been called so many times.
you can pick it up into this patch set if you desire.
No matter what you choose, after small fix for patch 6, for this whole
patch set
Reviewed-by: LIU Zhiwei <zhiwei_...@linux.alibaba.com>
Zhiwei
The port is available here:
https://github.com/plctlab/plct-qemu/tree/plct-cleanup-upstream
Weiwei Li (8):
target/riscv: Remove redundant call to riscv_cpu_virt_enabled
target/riscv: Remove redundant check on RVH
target/riscv: Remove check on RVH for riscv_cpu_virt_enabled
target/riscv: Remove check on RVH for riscv_cpu_set_virt_enabled
target/riscv: Remove redundant parentheses
target/riscv: Fix format for indentation
target/riscv: Fix format for comments
target/riscv: Fix lines with over 80 characters
target/riscv/arch_dump.c | 7 +-
target/riscv/cpu.c | 6 +-
target/riscv/cpu.h | 26 ++-
target/riscv/cpu_bits.h | 2 +-
target/riscv/cpu_helper.c | 86 ++++---
target/riscv/csr.c | 6 +-
target/riscv/insn_trans/trans_rvv.c.inc | 54 ++---
target/riscv/op_helper.c | 7 +-
target/riscv/pmp.c | 48 ++--
target/riscv/pmp.h | 9 +-
target/riscv/pmu.c | 3 +-
target/riscv/sbi_ecall_interface.h | 8 +-
target/riscv/translate.c | 8 +-
target/riscv/vector_helper.c | 292 ++++++++++++++----------
14 files changed, 316 insertions(+), 246 deletions(-)