]> git.ipfire.org Git - thirdparty/qemu.git/commit
target/riscv: tb flag for shadow stack instructions
authorDeepak Gupta <debug@rivosinc.com>
Tue, 8 Oct 2024 22:50:02 +0000 (15:50 -0700)
committerAlistair Francis <alistair.francis@wdc.com>
Wed, 30 Oct 2024 01:22:08 +0000 (11:22 +1000)
commitf9fdf9077c2a6d7d2bfc5ccfcd961f60d311218d
tree75b83618107495825a5ad2c66bdb80a902433b2c
parent8205bc127a83719d85a28ceffdd5e822b8fa3db7
target/riscv: tb flag for shadow stack instructions

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.

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>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Reviewed-by: Alistair Francis <alistair.francis@wdc.com>
Message-ID: <20241008225010.1861630-13-debug@rivosinc.com>
Signed-off-by: Alistair Francis <alistair.francis@wdc.com>
target/riscv/cpu.h
target/riscv/cpu_helper.c
target/riscv/translate.c