lkml.org 
[lkml]   [2020]   [May]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [patch V5 24/38] x86/entry: Provide IDTENTRY_SYSVEC
From
Date
On 5/12/20 5:01 PM, Thomas Gleixner wrote:
> +
> +/**
> + * DEFINE_IDTENTRY_SYSVEC - Emit code for system vector IDT entry points
> + * @func: Function name of the entry point
> + *
> + * idtentry_enter/exit() and irq_enter/exit_rcu() are invoked before the
> + * function body. KVM L1D flush request is set.


This is used for entry points for Xen and hyperV as well. Even though
it's harmless at the moment, do we still want to set this flag for non-KVM?


-boris


> + *
> + * Runs the function on the interrupt stack if the entry hit kernel mode
> + */
> +#define DEFINE_IDTENTRY_SYSVEC(func) \
> +static void __##func(struct pt_regs *regs); \
> + \
> +__visible noinstr void func(struct pt_regs *regs) \
> +{ \
> + idtentry_enter(regs); \
> + instrumentation_begin(); \
> + irq_enter_rcu(); \
> + kvm_set_cpu_l1tf_flush_l1d(); \
> + if (!irq_needs_irq_stack(regs)) \
> + __##func (regs); \
> + else \
> + run_on_irqstack(__##func, regs); \
> + irq_exit_rcu(); \
> + lockdep_hardirq_exit(); \
> + instrumentation_end(); \
> + idtentry_exit(regs); \
> +} \
> + \
> +static noinline void __##func(struct pt_regs *regs)

\
 
 \ /
  Last update: 2020-05-15 02:20    [W:0.591 / U:0.036 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site