From 1e885461f02259d75e7480a70d291d2d8aaa938e Mon Sep 17 00:00:00 2001 From: Avi Kivity Date: Fri, 29 Dec 2006 16:49:34 -0800 Subject: [PATCH] [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 --- drivers/kvm/svm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/kvm/svm.c b/drivers/kvm/svm.c index 9ec87636ded6..283024ab3ba0 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; } -- 2.20.1