Re: [patch 2/2] x86/kvm: Sanitize kvm_async_pf_task_wait()

From: Paul E. McKenney
Date: Fri Mar 06 2020 - 22:48:45 EST


On Sat, Mar 07, 2020 at 02:02:25AM +0100, Thomas Gleixner wrote:
> "Paul E. McKenney" <paulmck@xxxxxxxxxx> writes:
> >> In #2c RCU is eventually not watching, but as that state cannot schedule
> >> anyway there is no point to worry about it so it has to invoke
> >> rcu_irq_enter() before running that code. This can be optimized, but this
> >> will be done as an extra step in course of the entry code consolidation
> >> work.
> >
> > In other words, any needed rcu_irq_enter() and rcu_irq_exit() are added
> > in one of the entry-code consolidation patches, and patch below depends
> > on that patch, correct?
>
> No. The patch itself is already correct when applied to mainline. It has
> no dependencies.
>
> It invokes rcu_irq_enter()/exit() for the case (#2c) where it is
> relevant. All other case are already RCU safe today.
>
> The fact that the invocation is misplaced is a different story and yes,
> that is part of the entry code cleanup along with some optimization
> which are possible once the entry voodoo is out of ASM and adjustable
> for a particular entry point in C.

The weekend clearly did not come a moment too soon for me, did it? :-/

Thanx, Paul