Skip to contentSkip to conversation

x86/cpuidle: deny access to the I/O port used for EM_SYSIO

PATCH In review Jan Beulich 2 participants 2 messages Mar 6, 2012

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 x86/cpuidle: deny access to the I/O port used for EM_SYSIO

Nothing, not even Dom0, should fiddle with this.

xen/arch/x86/acpi/cpu_idle.c +4 -0
@@ -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:

x86/cpuidle: deny access to the I/O port used for EM_SYSIO

Nothing, not even Dom0, should fiddle with this.

xen/arch/x86/acpi/cpu_idle.c +4 -0
@@ -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:

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel

Acked-by on v1 1/1
#1 lore raw
Quoted 3 lines · Jan Beulich

Nothing, not even Dom0, should fiddle with this.

Quoted 27 lines
xen/arch/x86/acpi/cpu_idle.c +4 -0
@@ -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:

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel