]> git.baikalelectronics.ru Git - kernel.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)
commit06a52b1a5ba6f7f036d84e43f98688d029defdcb
treebb21eb8c919f78662d422528126cffdbe1352983
parent325fb725379378fbe2b60c2521ac232c20ee19d0
[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