|
From: | Richard Henderson |
Subject: | Re: [PATCH v1 RFC Zisslpcfi 3/9] target/riscv: implements CSRs and new bits in existing CSRs in zisslpcfi |
Date: | Wed, 15 Feb 2023 14:02:49 -1000 |
User-agent: | 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 <zhiwei_liu@linux.alibaba.com> 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.
r~
[Prev in Thread] | Current Thread | [Next in Thread] |