mirror of https://gitee.com/openkylin/linux.git
xen/acpi: revert pad config check in xen_check_mwait
With Xen acpi pad logic added into kernel, we can now revert xen mwait related
patch df88b2d96e
("xen/enlighten: Disable
MWAIT_LEAF so that acpi-pad won't be loaded. "). The reason is, when running under
newer Xen platform, Xen pad driver would be early loaded, so native pad driver
would fail to be loaded, and hence no mwait/monitor #UD risk again.
Another point is, only Xen4.2 or later support Xen acpi pad, so we won't expose
mwait cpuid capability when running under older Xen platform.
Signed-off-by: Liu, Jinsong <jinsong.liu@intel.com>
Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
This commit is contained in:
parent
92e3229dcd
commit
e3aa4e61b5
|
@ -287,8 +287,7 @@ static void xen_cpuid(unsigned int *ax, unsigned int *bx,
|
|||
|
||||
static bool __init xen_check_mwait(void)
|
||||
{
|
||||
#if defined(CONFIG_ACPI) && !defined(CONFIG_ACPI_PROCESSOR_AGGREGATOR) && \
|
||||
!defined(CONFIG_ACPI_PROCESSOR_AGGREGATOR_MODULE)
|
||||
#ifdef CONFIG_ACPI
|
||||
struct xen_platform_op op = {
|
||||
.cmd = XENPF_set_processor_pminfo,
|
||||
.u.set_pminfo.id = -1,
|
||||
|
@ -309,6 +308,13 @@ static bool __init xen_check_mwait(void)
|
|||
if (!xen_initial_domain())
|
||||
return false;
|
||||
|
||||
/*
|
||||
* When running under platform earlier than Xen4.2, do not expose
|
||||
* mwait, to avoid the risk of loading native acpi pad driver
|
||||
*/
|
||||
if (!xen_running_on_version_or_later(4, 2))
|
||||
return false;
|
||||
|
||||
ax = 1;
|
||||
cx = 0;
|
||||
|
||||
|
|
Loading…
Reference in New Issue