]> xenbits.xensource.com Git - xen.git/commitdiff
x86/cpuidle: deny access to the I/O port used for EM_SYSIO
authorJan Beulich <jbeulich@novell.com>
Mon, 9 Jul 2012 09:23:57 +0000 (10:23 +0100)
committerJan Beulich <jbeulich@novell.com>
Mon, 9 Jul 2012 09:23:57 +0000 (10:23 +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-unstable changeset:   24970:33980e36597b
xen-unstable date:        Tue Mar 06 16:41:41 2012 +0100

xen/arch/x86/acpi/cpu_idle.c

index 6ae9d476a9a6b526d098b5fdbf255a9e365856b7..3fde934194779429292bf68abe20a180f5f14041 100644 (file)
@@ -44,6 +44,7 @@
 #include <xen/sched-if.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>
@@ -888,6 +889,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: