]> git.karo-electronics.de Git - karo-tx-linux.git/commit
[PATCH] KVM: Fix GFP_KERNEL alloc in atomic section bug
authorIngo Molnar <mingo@elte.hu>
Sat, 6 Jan 2007 00:36:23 +0000 (16:36 -0800)
committerLinus Torvalds <torvalds@woody.osdl.org>
Sat, 6 Jan 2007 07:55:21 +0000 (23:55 -0800)
commit965b58a550b6f84815cb555e6abb953e863f1610
treebb21eb8c919f78662d422528126cffdbe1352983
parentcd36beec0b83d28dceb85696a23542bf1b97cc8c
[PATCH] KVM: Fix GFP_KERNEL alloc in atomic section bug

KVM does kmalloc() in an atomic section while having preemption disabled via
vcpu_load().  Fix this by moving the ->*_msr setup from the vcpu_setup method
to the vcpu_create method.

(This is also a small speedup for setting up a vcpu, which can in theory be
more frequent than the vcpu_create method).

Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Avi Kivity <avi@qumranet.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
drivers/kvm/vmx.c