qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH v7 2/4] target/riscv: implement Zicboz extension


From: Richard Henderson
Subject: Re: [PATCH v7 2/4] target/riscv: implement Zicboz extension
Date: Thu, 23 Feb 2023 14:06:57 -1000
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.7.1

On 2/23/23 13:44, Daniel Henrique Barboza wrote:
From: Christoph Muellner<cmuellner@linux.com>

The RISC-V base cache management operation (CBO) ISA extension has been
ratified. It defines three extensions: Cache-Block Management, Cache-Block
Prefetch and Cache-Block Zero. More information about the spec can be
found at [1].

Let's start by implementing the Cache-Block Zero extension, Zicboz. It
uses the cbo.zero instruction that, as with all CBO instructions that
will be added later, needs to be implemented in an overlap group with
the LQ instruction due to overlapping patterns.

cbo.zero throws a Illegal Instruction/Virtual Instruction exception
depending on CSR state. This is also the case for the remaining cbo
instructions we're going to add next, so create a check_zicbo_envcfg()
that will be used by all Zicbo[mz] instructions.

[1]https://github.com/riscv/riscv-CMOs/blob/master/specifications/cmobase-v1.0.1.pdf

Co-developed-by: Philipp Tomsich<philipp.tomsich@vrull.eu>
Signed-off-by: Christoph Muellner<cmuellner@linux.com>
Signed-off-by: Daniel Henrique Barboza<dbarboza@ventanamicro.com>
---
  target/riscv/cpu.c                          |  4 ++
  target/riscv/cpu.h                          |  2 +
  target/riscv/helper.h                       |  3 +
  target/riscv/insn32.decode                  | 10 +++-
  target/riscv/insn_trans/trans_rvzicbo.c.inc | 30 ++++++++++
  target/riscv/op_helper.c                    | 65 +++++++++++++++++++++
  target/riscv/translate.c                    |  1 +
  7 files changed, 114 insertions(+), 1 deletion(-)
  create mode 100644 target/riscv/insn_trans/trans_rvzicbo.c.inc

Reviewed-by: Richard Henderson <richard.henderson@linaro.org>

r~



reply via email to

[Prev in Thread] Current Thread [Next in Thread]