]> xenbits.xensource.com Git - xen.git/commitdiff
x86/cpuidle: deny access to the I/O port used for EM_SYSIO
authorJan Beulich <jbeulich@suse.com>
Tue, 6 Mar 2012 15:41:41 +0000 (16:41 +0100)
committerJan Beulich <jbeulich@suse.com>
Tue, 6 Mar 2012 15:41:41 +0000 (16:41 +0100)
Nothing, not even Dom0, should fiddle with this.

Signed-off-by: Jan Beulich <jbeulich@suse.com>
Acked-by: Keir Fraser <keir@xen.org>
xen/arch/x86/acpi/cpu_idle.c

index bc824e88c050b5c636aec547c8ca7638fb52e3f4..a675867f2450a4e15f26e6d802016c9989d4ae43 100644 (file)
@@ -45,6 +45,7 @@
 #include <xen/irq.h>
 #include <asm/cache.h>
 #include <asm/io.h>
+#include <asm/iocap.h>
 #include <asm/hpet.h>
 #include <asm/processor.h>
 #include <xen/pmstat.h>
@@ -907,6 +908,9 @@ static void set_cx(
             cx->entry_method = ACPI_CSTATE_EM_HALT;
         break;
     case ACPI_ADR_SPACE_SYSTEM_IO:
+        if ( ioports_deny_access(dom0, cx->address, cx->address) )
+            printk(XENLOG_WARNING "Could not deny access to port %04x\n",
+                   cx->address);
         cx->entry_method = ACPI_CSTATE_EM_SYSIO;
         break;
     default: