Re: [PATCH v6 3/6] arch/x86/mm: Refactor cond_ibpb() to support other use cases

2020-05-13 Thread Thomas Gleixner
Balbir Singh writes: > @@ -550,8 +549,10 @@ void switch_mm_irqs_off(struct mm_struct *prev, struct > mm_struct *next, >* Avoid user/user BTB poisoning by flushing the branch >* predictor when switching between processes. This stops >* one process

[PATCH v6 3/6] arch/x86/mm: Refactor cond_ibpb() to support other use cases

2020-05-09 Thread Balbir Singh
cond_ibpb() has the necessary bits required to track the previous mm in switch_mm_irqs_off(). This can be reused for other use cases like L1D flushing (on context switch out). Suggested-by: Thomas Gleixner Signed-off-by: Balbir Singh --- arch/x86/include/asm/tlbflush.h | 2 +-