On 8/7/24 10:06, Deepak Gupta wrote:
Shadow stack instructions can be decoded as zimop / zcmop or shadow stack
instructions depending on whether shadow stack are enabled at current
privilege. This requires a TB flag so that correct TB generation and correct
TB lookup happens. `DisasContext` gets a field indicating whether bcfi is
enabled or not.
This patch also implements helper bcfi function which determines if bcfi
is enabled at current privilege or not. qemu-user also gets field
`ubcfien` indicating whether qemu user has shadow stack enabled or not.
Signed-off-by: Deepak Gupta<de...@rivosinc.com>
Co-developed-by: Jim Shu<jim....@sifive.com>
Co-developed-by: Andy Chiu<andy.c...@sifive.com>
---
target/riscv/cpu.c | 2 ++
target/riscv/cpu.h | 4 ++++
target/riscv/cpu_helper.c | 30 ++++++++++++++++++++++++++++++
target/riscv/translate.c | 4 ++++
4 files changed, 40 insertions(+)
Reviewed-by: Richard Henderson <richard.hender...@linaro.org>
r~