Re: [RFC PATCH] x86/delay: Do not use cpu_tss in preemptible ctxt in delay_mwaitx()
From: Andy Lutomirski
Date: Wed Mar 09 2016 - 12:57:04 EST
On Mar 9, 2016 3:38 AM, "Borislav Petkov" <bp@xxxxxxxxx> wrote:
>
> From: Borislav Petkov <bp@xxxxxxx>
>
> So Andy had a good idea about using a cacheline-aligned, seldomly used
> per-cpu var as the MONITORX target but we can't use it in preemptible
> context. The first simple idea I have is to disable preemption around us
> dereffing it.
What's the actual problem? Is it the preempt warnings and, if so,
would raw_cpu_ptr fix it?
It may pay to move it into the loop, though.
--Andy