From: Avi Kivity Date: Sat, 30 Dec 2006 00:49:34 +0000 (-0800) Subject: [PATCH] KVM: Use boot_cpu_data instead of current_cpu_data X-Git-Tag: v2.6.20-rc3~18 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1e885461f02259d75e7480a70d291d2d8aaa938e;p=linux-2.6 [PATCH] KVM: Use boot_cpu_data instead of current_cpu_data 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 Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/drivers/kvm/svm.c b/drivers/kvm/svm.c index 9ec87636de..283024ab3b 100644 --- a/drivers/kvm/svm.c +++ b/drivers/kvm/svm.c @@ -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; }