On Wed, 2 Dec 2015 16:34:56 -0600 Andrew Jones <drjones@xxxxxxxxxx> wrote: > On Fri, Nov 27, 2015 at 06:50:04PM +0000, Marc Zyngier wrote: > > KVM so far relies on code patching, and is likely to use it more > > in the future. The main issue is that our alternative system works > > at the instruction level, while we'd like to have alternatives at > > the function level. > > How about setting static-keys at hyp init time? That was an option I looked at. And while static keys would work to some extent, they also have some nasty side effects: - They create both a fast and a slow path. We don't want that - both path should be equally fast, or at least have as little overhead as possible - We do need code patching for some assembly code, and using static keys on top creates a parallel mechanism that makes it hard to follow/debug/maintain. You can view this alternative function call as a slightly different kind of static keys - one that can give you the capability to handle function calls instead of just jumping over code sequences. Both have their own merits. Thanks, M. -- Without deviation from the norm, progress is not possible. -- To unsubscribe from this list: send the line "unsubscribe kvm" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html