qemu-devel
[Top][All Lists]
Advanced

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

Re: [PATCH v3 11/20] target/riscv: tb flag for shadow stack instructions


From: Richard Henderson
Subject: Re: [PATCH v3 11/20] target/riscv: tb flag for shadow stack instructions
Date: Wed, 7 Aug 2024 12:13:36 +1000
User-agent: Mozilla Thunderbird

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<debug@rivosinc.com>
Co-developed-by: Jim Shu<jim.shu@sifive.com>
Co-developed-by: Andy Chiu<andy.chiu@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.henderson@linaro.org>

r~



reply via email to

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