Skip to content

Commit

Permalink
[PATCH] KVM: Use boot_cpu_data instead of current_cpu_data
Browse files Browse the repository at this point in the history
current_cpu_data invokes smp_processor_id(), which is inadvisable when
preemption is enabled.  Switch to boot_cpu_data instead.

Resolves sourceforge bug 1621401.

Signed-off-by: Avi Kivity <avi@qumranet.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
  • Loading branch information
Avi Kivity authored and Linus Torvalds committed Dec 30, 2006
1 parent 2b7a52a commit 1e88546
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/kvm/svm.c
Original file line number Diff line number Diff line change
Expand Up @@ -246,7 +246,7 @@ static int has_svm(void)
{
uint32_t eax, ebx, ecx, edx;

if (current_cpu_data.x86_vendor != X86_VENDOR_AMD) {
if (boot_cpu_data.x86_vendor != X86_VENDOR_AMD) {
printk(KERN_INFO "has_svm: not amd\n");
return 0;
}
Expand Down

0 comments on commit 1e88546

Please sign in to comment.