[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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



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) &&
+           likely(regs->vector == IA32_SYSCALL_VECTOR)) {
+               regs->orig_ax = regs->ax;
+               regs->ax = -ENOSYS;
+               return do_int80_syscall_32(regs);
+       }

We can presumably drop the early out here as well...

+
+       /*
+        * Some software exceptions can also be triggered as
+        * int instructions, for historical reasons.
+        */
+       switch (regs->vector) {
+       case X86_TRAP_BP:
+       case X86_TRAP_OF:
+               fred_emulate_trap(regs);
+               break;
+       default:
+               regs->vector = X86_TRAP_GP;
+               fred_emulate_fault(regs);
+               break;
+       }
+}
+




 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.