kvm: external module: add true sched_in preempt notifier emulation
commit58f6e73b9c272f2f3064f104ae55379f8bb1ae61
authorAndrea Arcangeli <andrea@cpushare.com>
Tue, 25 Dec 2007 08:58:52 +0000 (25 10:58 +0200)
committerAvi Kivity <avi@qumranet.com>
Tue, 25 Dec 2007 09:01:42 +0000 (25 11:01 +0200)
tree90f4e4b835325f1a389a31a79a482809d47e89a1
parentc2ecb82cd78a89893196a589e34ac26d738bbe01
kvm: external module: add true sched_in preempt notifier emulation

Instead of hacking the module source to check whether the preempt notifier
sched_in hook needs to be called, add a breakpoint on the caller of
schedule() which triggered sched_out.  Use the Linux support for hardware
breakpoints to load the breakpoint when the process is switched to.

This greatly reduces the amount of hackery needed to support preempt
notifiers.

Signed-off-by: Andrea Arcangeli <andrea@suse.de>
kvm/kernel/hack-module.awk
kvm/kernel/preempt.c