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

Thomas Gleixner
2020-03-07T01:02:33Z

"Paul E. McKenney" <paulmck@kernel.org> 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.

Thanks,

tglx