[PATCH RFC REPOST 2/2] paravirt: clean up lazy mode handling - Kernel

This is a discussion on [PATCH RFC REPOST 2/2] paravirt: clean up lazy mode handling - Kernel ; [ I think this is a straight repost this patch, which addresses all the
previous comments. I'd like to submit this for .24 as the basis for a
unified paravirt_ops. Any objections? ]
Currently, the set_lazy_mode pv_op is overloaded with ...

This complicates each paravirt backend, since it needs to deal with
all the possible state transitions, handling flushing, etc. In
particular, flushing is quite distinct from the other 4 functions, and
seems to just cause complication.

This patch removes the set_lazy_mode operation, and adds "enter" and
"leave" lazy mode operations on mmu_ops and cpu_ops. All the logic
associated with enter and leaving lazy states is now in common code
(basically BUG_ONs to make sure that no mode is current when entering
a lazy mode, and make sure that the mode is current when leaving).
Also, flush is handled in a common way, by simply leaving and
re-entering the lazy mode.

The result is that the Xen and VMI lazy mode implementations are much
simpler; as would lguest's be.