On 4/17/24 04:02, Nikolay Borisov wrote:
On 17.04.24 г. 9:30 ч., Xin Li (Intel) wrote:
4) int80_emulation() does a CLEAR_BRANCH_HISTORY, which is likely > overkill for new x86 CPU implementations that support FRED.
Well, that's a bit of an overstatement/speculation, because clear_branch_history will only be effective if the machine is susceptible to the given bug and there isn't a better options (i.e using a hardware bit controlling the respective aspect of the CPU).
It would seem like a huge stretch to expect that a FRED-capable CPU would not have such a facility. This is a matter of establishing a baseline for FRED-capable hardware.
It would make more sense to me to add it if we turn out to need it; note that FRED code is currently only enabled on demand, in order to defend against bit rot until we have physical hardware.
Now, if this is still desired, it *probably* belongs better in either fred_intx()/fred_other() or asm_fred_entrypoint_user, depending on if this ought to be done for all entries from userspace or only system calls.