[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v1 RFC Zisslpcfi 3/9] target/riscv: implements CSRs and new b
Re: [PATCH v1 RFC Zisslpcfi 3/9] target/riscv: implements CSRs and new bits in existing CSRs in zisslpcfi
Wed, 15 Feb 2023 14:02:49 -1000
Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.7.1
On 2/15/23 13:33, Deepak Gupta wrote:
On Tue, Feb 14, 2023 at 9:47 PM LIU Zhiwei <firstname.lastname@example.org> wrote:
And MSTATUS_UBCFIEN field change don't need flush tlb.
TCG code-gen would be different depending on whether ubcfi is enabled or not.
As an example a TB might have code generated when bcfi was enabled.
But if someone disables it,
translation needs to happen again and zimops implementation should be
generated this time.
tlb_flush does not affect translation. TB are tied to physical addresses and are only
flushed by writes or tb_flush().
The correct fix is to allocate a bit from FIELD(TB_FLAGS, X, Y, 1), and adjust
cpu_get_tb_cpu_state to indicate when CFI is active in the current cpu mode.