Messages in this thread | | | Subject | Re: [PATCH v3] Linux VM workaround for Knights Landing A/D leak | From | Nadav Amit <> | Date | Thu, 16 Jun 2016 09:43:01 -0700 |
| |
Lukasz Anaczkowski <lukasz.anaczkowski@intel.com> wrote:
> From: Andi Kleen <ak@linux.intel.com> > > +void fix_pte_leak(struct mm_struct *mm, unsigned long addr, pte_t *ptep) > +{ > + if (cpumask_any_but(mm_cpumask(mm), smp_processor_id()) < nr_cpu_ids) { > + trace_tlb_flush(TLB_LOCAL_SHOOTDOWN, TLB_FLUSH_ALL); This tracing seems incorrect since you don’t perform a local flush. I don’t think you need any tracing - native_flush_tlb_others will do it for you.
> + flush_tlb_others(mm_cpumask(mm), mm, addr, > + addr + PAGE_SIZE); > + mb(); Why do you need the memory barrier?
Regards, Nadav
| |