提交 1e885461 编写于 作者: A Avi Kivity 提交者: Linus Torvalds

[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: NAvi Kivity <avi@qumranet.com>
Signed-off-by: NAndrew Morton <akpm@osdl.org>
Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
上级 2b7a52a4
......@@ -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;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册