HOTPLUG: Add CPU_DYING notifier
authorAvi Kivity <avi@qumranet.com>
Thu, 24 May 2007 09:23:10 +0000 (12:23 +0300)
committerAvi Kivity <avi@qumranet.com>
Mon, 16 Jul 2007 09:05:49 +0000 (12:05 +0300)
commitdb912f963909b3cbc3a059b7528f6a1a1eb6ffae
tree85d112b2879782fda2b2ca77413ac73361d0d3b0
parente495606dd09d79f9fa496334ac3958f6ff179d82
HOTPLUG: Add CPU_DYING notifier

KVM wants a notification when a cpu is about to die, so it can disable
hardware extensions, but at a time when user processes cannot be scheduled
on the cpu, so it doesn't try to use virtualization extensions after they
have been disabled.

This adds a CPU_DYING notification.  The notification is called in atomic
context on the doomed cpu.

Signed-off-by: Avi Kivity <avi@qumranet.com>
include/linux/notifier.h
kernel/cpu.c