Commit 4a2759f1 authored by Joao Martins's avatar Joao Martins Committed by lishusen
Browse files

governors/haltpoll: drop kvm_para_available() check

virt inclusion
category: feature
bugzilla: https://gitee.com/openeuler/kernel/issues/IB7PU3


CVE: NA

----------------------------------------------------

The haltpoll governor is selected either by the cpuidle-haltpoll
driver, or explicitly by the user.
In particular, it is never selected by default since it has the lowest
rating of all governors (menu=20, teo=19, ladder=10/25, haltpoll=9).

So, we can safely forgo the kvm_para_available() check. This also
allows cpuidle-haltpoll to be tested on baremetal.

Signed-off-by: default avatarJoao Martins <joao.m.martins@oracle.com>
Signed-off-by: default avatarMihai Carabas <mihai.carabas@oracle.com>
Acked-by: default avatarRafael J. Wysocki <rafael@kernel.org>
Signed-off-by: default avatarAnkur Arora <ankur.a.arora@oracle.com>
Signed-off-by: default avatarlishusen <lishusen2@huawei.com>
parent 4911f135
Loading
Loading
Loading
Loading
+1 −5
Original line number Diff line number Diff line
@@ -18,7 +18,6 @@
#include <linux/tick.h>
#include <linux/sched.h>
#include <linux/module.h>
#include <linux/kvm_para.h>
#include <trace/events/power.h>

static unsigned int guest_halt_poll_ns __read_mostly = 200000;
@@ -143,10 +142,7 @@ static struct cpuidle_governor haltpoll_governor = {

static int __init init_haltpoll(void)
{
	if (kvm_para_available())
	return cpuidle_register_governor(&haltpoll_governor);

	return 0;
}

postcore_initcall(init_haltpoll);