powerpc: Add user-return-notifier support

Ananth N Mavinakayanahalli ananth at in.ibm.com
Tue Sep 1 16:41:13 AEST 2015

On Mon, Aug 31, 2015 at 08:35:17PM +1000, Michael Ellerman wrote:
> On Tue, 2015-25-08 at 05:41:10 UTC, Ananth N Mavinakayanahalli wrote:
> > Add user return notifier support for powerpc. Similar to x86, this feature
> > keys off of the KVM Kconfig.
> Please flesh this out.
> What is it, why do we want it, why is your implementation correct.

The only current in-kernel user of the infrastructure is KVM on x86. It
is useful for optimizations when MSR values can continue to be used
between the host and guest. Commit log for 18863bdd60f8 upstream has a
more complete explanation.

I do not know the inner details of the KVM implementation on Power,
perhaps Paul/Gautham can comment on if a similar optimization will
benefit Power systems too?

We could certainly make this a generic config option.. but I am yet to
see a real usecase outside of the KVM thingy. We do use TIF_UPROBE for
something very similar, though that needs to fire much before the
outstanding signals get handled. The user-return notifier is the last
thing executed before return to userspace -- the two cannot be merged.


PS: I am not sure having an 'ok' against the Documentation/features/ for
powerpc is a valid enough argument for this :-)

More information about the Linuxppc-dev mailing list