Re: [PATCH v9 29/36] x86/fred: FRED entry/exit and dispatch code

2023-07-31 Thread H. Peter Anvin
On 7/30/23 23:41, Xin Li wrote: +static DEFINE_FRED_HANDLER(fred_other_default) +{ + regs->vector = X86_TRAP_UD; + fred_emulate_fault(regs); +} + +static DEFINE_FRED_HANDLER(fred_syscall) +{ + regs->orig_ax = regs->ax; + regs->ax = -ENOSYS; + do_syscall_64(regs,

Re: [PATCH v9 29/36] x86/fred: FRED entry/exit and dispatch code

2023-07-31 Thread H. Peter Anvin
On 7/30/23 23:41, Xin Li wrote: + +static DEFINE_FRED_HANDLER(fred_sw_interrupt_user) +{ + /* +* In compat mode INT $0x80 (32bit system call) is +* performance-critical. Handle it first. +*/ + if (IS_ENABLED(CONFIG_IA32_EMULATION) && +

[PATCH v9 29/36] x86/fred: FRED entry/exit and dispatch code

2023-07-31 Thread Xin Li
From: "H. Peter Anvin (Intel)" The code to actually handle kernel and event entry/exit using FRED. It is split up into two files thus: - entry_64_fred.S contains the actual entrypoints and exit code, and saves and restores registers. - entry_fred.c contains the two-level event dispatch code