On 5/1/2025 11:59 AM, Sean Christopherson wrote:
Ok maybe I'm being dense, but what is left other than simply calling
__fred_entry_from_kvm() as a normal C function?
I'm on the go so there might be something in the code I'm missing, but on the
surface...?
I'm sure it's doable, though I'd be more than a little nervous about diverging
from what FRED=y does, e.g. in case code somewhere expects the stack to look
exactly like a real FRED event.
__fred_entry_from_kvm() accepts a pt_regs structure pointer, with event
type and vector in FRED stack frame. They are set up in the assembly.
And since we'd still need the assembly to support FRED=y, I don't see any point
in adding more code when it's trivially easy to have asm_fred_entry_from_kvm()
skip ERETS.
Yeah, your change seems minimized to me.