aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/xen
diff options
context:
space:
mode:
authorLiu, Jinsong <jinsong.liu@intel.com>2012-11-08 00:44:28 -0500
committerKonrad Rzeszutek Wilk <konrad.wilk@oracle.com>2012-11-26 15:08:29 -0500
commite3aa4e61b57da7574fdd1b4c9ca9bdee06a4d23e (patch)
treef298215d0d626cd47de7c22ed15b33da1ee54a9c /arch/x86/xen
parent92e3229dcdc80ff0b6304f14c578d76e7e10e226 (diff)
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 df88b2d96e36d9a9e325bfcd12eb45671cbbc937 ("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>
Diffstat (limited to 'arch/x86/xen')
-rw-r--r--arch/x86/xen/enlighten.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/arch/x86/xen/enlighten.c b/arch/x86/xen/enlighten.c
index a90c3bb58bed..eb0edff5499b 100644
--- a/arch/x86/xen/enlighten.c
+++ b/arch/x86/xen/enlighten.c
@@ -287,8 +287,7 @@ static void xen_cpuid(unsigned int *ax, unsigned int *bx,
287 287
288static bool __init xen_check_mwait(void) 288static bool __init xen_check_mwait(void)
289{ 289{
290#if defined(CONFIG_ACPI) && !defined(CONFIG_ACPI_PROCESSOR_AGGREGATOR) && \ 290#ifdef CONFIG_ACPI
291 !defined(CONFIG_ACPI_PROCESSOR_AGGREGATOR_MODULE)
292 struct xen_platform_op op = { 291 struct xen_platform_op op = {
293 .cmd = XENPF_set_processor_pminfo, 292 .cmd = XENPF_set_processor_pminfo,
294 .u.set_pminfo.id = -1, 293 .u.set_pminfo.id = -1,
@@ -309,6 +308,13 @@ static bool __init xen_check_mwait(void)
309 if (!xen_initial_domain()) 308 if (!xen_initial_domain())
310 return false; 309 return false;
311 310
311 /*
312 * When running under platform earlier than Xen4.2, do not expose
313 * mwait, to avoid the risk of loading native acpi pad driver
314 */
315 if (!xen_running_on_version_or_later(4, 2))
316 return false;
317
312 ax = 1; 318 ax = 1;
313 cx = 0; 319 cx = 0;
314 320