summaryrefslogtreecommitdiff
path: root/arch/x86/kernel
diff options
context:
space:
mode:
Diffstat (limited to 'arch/x86/kernel')
-rw-r--r--arch/x86/kernel/kvm.c18
1 files changed, 6 insertions, 12 deletions
diff --git a/arch/x86/kernel/kvm.c b/arch/x86/kernel/kvm.c
index f48401be8ce0..60bab4a3b36b 100644
--- a/arch/x86/kernel/kvm.c
+++ b/arch/x86/kernel/kvm.c
@@ -888,32 +888,26 @@ static void kvm_enable_host_haltpoll(void *i)
wrmsrl(MSR_KVM_POLL_CONTROL, 1);
}
-void arch_haltpoll_enable(void)
+void arch_haltpoll_enable(unsigned int cpu)
{
if (!kvm_para_has_feature(KVM_FEATURE_POLL_CONTROL)) {
- printk(KERN_ERR "kvm: host does not support poll control\n");
- printk(KERN_ERR "kvm: host upgrade recommended\n");
+ pr_err_once("kvm: host does not support poll control\n");
+ pr_err_once("kvm: host upgrade recommended\n");
return;
}
- preempt_disable();
/* Enable guest halt poll disables host halt poll */
- kvm_disable_host_haltpoll(NULL);
- smp_call_function(kvm_disable_host_haltpoll, NULL, 1);
- preempt_enable();
+ smp_call_function_single(cpu, kvm_disable_host_haltpoll, NULL, 1);
}
EXPORT_SYMBOL_GPL(arch_haltpoll_enable);
-void arch_haltpoll_disable(void)
+void arch_haltpoll_disable(unsigned int cpu)
{
if (!kvm_para_has_feature(KVM_FEATURE_POLL_CONTROL))
return;
- preempt_disable();
/* Enable guest halt poll disables host halt poll */
- kvm_enable_host_haltpoll(NULL);
- smp_call_function(kvm_enable_host_haltpoll, NULL, 1);
- preempt_enable();
+ smp_call_function_single(cpu, kvm_enable_host_haltpoll, NULL, 1);
}
EXPORT_SYMBOL_GPL(arch_haltpoll_disable);
#endif