From: "Jan Beulich" Subject: [PATCH] x86/cpuidle: deny access to the I/O port used for EM_SYSIO Date: Tue, 06 Mar 2012 14:59:45 +0000 Message-ID: <4F5634710200007800076AD1@nat28.tlf.novell.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=__Part26083271.0__=" Return-path: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: xen-devel List-Id: xen-devel@lists.xenproject.org This is a MIME message. If you are reading this text, you may want to consider changing to a mail reader or gateway that understands how to properly handle MIME multipart messages. --=__Part26083271.0__= Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Nothing, not even Dom0, should fiddle with this. Signed-off-by: Jan Beulich --- a/xen/arch/x86/acpi/cpu_idle.c +++ b/xen/arch/x86/acpi/cpu_idle.c @@ -45,6 +45,7 @@ #include #include #include +#include #include #include #include @@ -907,6 +908,9 @@ static void set_cx( cx->entry_method =3D 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 =3D ACPI_CSTATE_EM_SYSIO; break; default: --=__Part26083271.0__= Content-Type: text/plain; name="x86-deny-C-state-port.patch" Content-Transfer-Encoding: quoted-printable Content-Disposition: attachment; filename="x86-deny-C-state-port.patch" x86/cpuidle: deny access to the I/O port used for EM_SYSIO=0A=0ANothing, = not even Dom0, should fiddle with this.=0A=0ASigned-off-by: Jan Beulich = =0A=0A--- a/xen/arch/x86/acpi/cpu_idle.c=0A+++ = b/xen/arch/x86/acpi/cpu_idle.c=0A@@ -45,6 +45,7 @@=0A #include = =0A #include =0A #include =0A+#include = =0A #include =0A #include =0A #include = =0A@@ -907,6 +908,9 @@ static void set_cx(=0A = cx->entry_method =3D ACPI_CSTATE_EM_HALT;=0A break;=0A case = ACPI_ADR_SPACE_SYSTEM_IO:=0A+ if ( ioports_deny_access(dom0, = cx->address, cx->address) )=0A+ printk(XENLOG_WARNING "Could = not deny access to port %04x\n",=0A+ cx->address);=0A = cx->entry_method =3D ACPI_CSTATE_EM_SYSIO;=0A break;=0A = default:=0A --=__Part26083271.0__= Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Xen-devel mailing list Xen-devel@lists.xen.org http://lists.xen.org/xen-devel --=__Part26083271.0__=--