WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

[Xen-devel] [PATCH] x86: deny access to the ACPI PM timer I/O port range

To: <xen-devel@xxxxxxxxxxxxxxxxxxx>
Subject: [Xen-devel] [PATCH] x86: deny access to the ACPI PM timer I/O port range for Dom0
From: "Jan Beulich" <JBeulich@xxxxxxxxxx>
Date: Tue, 27 Oct 2009 13:11:36 +0000
Delivery-date: Tue, 27 Oct 2009 06:12:01 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
Also move the declaration of pmtmr_ioport to a suitable header file.

Signed-off-by: Jan Beulich <jbeulich@xxxxxxxxxx>

--- 2009-10-27.orig/xen/arch/x86/acpi/boot.c    2009-10-07 13:31:36.000000000 
+0200
+++ 2009-10-27/xen/arch/x86/acpi/boot.c 2009-10-27 12:11:36.000000000 +0100
@@ -332,10 +332,6 @@ static int __init acpi_parse_hpet(struct
 #define        acpi_parse_hpet NULL
 #endif
 
-#ifdef CONFIG_X86_PM_TIMER
-extern u32 pmtmr_ioport;
-#endif
-
 #ifdef CONFIG_ACPI_SLEEP
 #define acpi_fadt_copy_address(dst, src, len) do {                     \
        if (fadt->header.revision >= FADT2_REVISION_ID)                 \
--- 2009-10-27.orig/xen/arch/x86/acpi/cpu_idle.c        2009-10-07 
13:31:36.000000000 +0200
+++ 2009-10-27/xen/arch/x86/acpi/cpu_idle.c     2009-10-27 12:11:36.000000000 
+0100
@@ -56,7 +56,6 @@ static void lapic_timer_nop(void) { }
 static void (*lapic_timer_off)(void);
 static void (*lapic_timer_on)(void);
 
-extern u32 pmtmr_ioport;
 extern void (*pm_idle) (void);
 extern void (*dead_idle) (void);
 extern void menu_get_trace_data(u32 *expected, u32 *pred);
--- 2009-10-27.orig/xen/arch/x86/domain_build.c 2009-10-07 13:31:36.000000000 
+0200
+++ 2009-10-27/xen/arch/x86/domain_build.c      2009-10-27 12:12:24.000000000 
+0100
@@ -29,6 +29,7 @@
 #include <asm/paging.h>
 #include <asm/p2m.h>
 #include <asm/e820.h>
+#include <asm/acpi.h>
 #include <asm/bzimage.h> /* for bzimage_parse */
 
 #include <public/version.h>
@@ -1064,6 +1065,9 @@ int __init construct_dom0(
     rc |= ioports_deny_access(dom0, 0x40, 0x43);
     /* PIT Channel 2 / PC Speaker Control. */
     rc |= ioports_deny_access(dom0, 0x61, 0x61);
+    /* ACPI PM Timer. */
+    if ( pmtmr_ioport )
+        rc |= ioports_deny_access(dom0, pmtmr_ioport, pmtmr_ioport + 3);
     /* PCI configuration space (NB. 0xcf8 has special treatment). */
     rc |= ioports_deny_access(dom0, 0xcfc, 0xcff);
     /* Command-line I/O ranges. */
--- 2009-10-27.orig/xen/arch/x86/time.c 2009-10-27 12:04:10.000000000 +0100
+++ 2009-10-27/xen/arch/x86/time.c      2009-10-27 12:11:36.000000000 +0100
@@ -30,6 +30,7 @@
 #include <asm/fixmap.h>
 #include <asm/mc146818rtc.h>
 #include <asm/div64.h>
+#include <asm/acpi.h>
 #include <asm/hpet.h>
 #include <io_ports.h>
 #include <asm/setup.h> /* for early_time_init */
--- 2009-10-27.orig/xen/include/asm-x86/acpi.h  2009-10-07 13:31:36.000000000 
+0200
+++ 2009-10-27/xen/include/asm-x86/acpi.h       2009-10-27 12:11:36.000000000 
+0100
@@ -153,6 +153,8 @@ struct acpi_sleep_info {
 extern u8 x86_acpiid_to_apicid[];
 #define MAX_LOCAL_APIC 256
 
+extern u32 pmtmr_ioport;
+
 int acpi_dmar_init(void);
 void acpi_mmcfg_init(void);
 



Attachment: xen-x86-pmtmr-ioport-deny.patch
Description: Text document

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel
<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-devel] [PATCH] x86: deny access to the ACPI PM timer I/O port range for Dom0, Jan Beulich <=