On 2/15/23 15:38, Deepak Gupta wrote:
Question:
I'll basically need two bits (one for forward cfi and one for backward cfi).

Are they separately enabled? It may also be possible to use a single bit and then perform a runtime check. I guess I should read the spec...

But I need to throw away the TB if cfi enabling bits mismatch at the
time TB was generated and the current state of enabling bits.
Reason being, this needs to get translated again and zimops need to be
generated.

What's the best way to throw away a single TB?

You don't throw TBs away at all.

The current cpu state is produced by cpu_get_tb_cpu_state. This is included into the hash table lookup and will only match a TB which has been generated with the same state. Which means that you can have multiple live TBs, those with CFI enabled and those without, and the correct one will be selected at runtime.


r~

Reply via email to