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] s3: recover pat value for bsp after S3 resume.

To: "xen-devel@xxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxx>
Subject: [Xen-devel] [PATCH] s3: recover pat value for bsp after S3 resume.
From: "Tian, Kevin" <kevin.tian@xxxxxxxxx>
Date: Thu, 5 Feb 2009 18:17:23 +0800
Accept-language: en-US
Acceptlanguage: en-US
Delivery-date: Thu, 05 Feb 2009 02:18:20 -0800
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
Thread-index: AcmHeu/XWn/eTLCyQi6bK+wCLSFQGA==
Thread-topic: [PATCH] s3: recover pat value for bsp after S3 resume.
recover pat value for bsp after S3 resume.

host pat is set to cover all memory types by Xen, which is
necessary to support guest mtrr/pat, especially when device
is passthroughed with VT-d. However pat on bsp is not 
recovered which could make assigned device defunct after S3
resume

Signed-off-by Kevin Tian <kevin.tian@xxxxxxxxx>

diff -r 0894164a95f4 xen/arch/x86/acpi/suspend.c
--- a/xen/arch/x86/acpi/suspend.c       Wed Feb 04 22:41:20 2009 -0500
+++ b/xen/arch/x86/acpi/suspend.c       Wed Feb 04 22:54:33 2009 -0500
@@ -65,6 +65,9 @@
     /* Reload FPU state on next FPU use. */
     stts();
 
+    if (cpu_has_pat)
+        wrmsrl(MSR_IA32_CR_PAT, host_pat);
+
     mtrr_ap_init();
     mcheck_init(&boot_cpu_data);
 }
diff -r 0894164a95f4 xen/include/asm-x86/processor.h
--- a/xen/include/asm-x86/processor.h   Wed Feb 04 22:41:20 2009 -0500
+++ b/xen/include/asm-x86/processor.h   Wed Feb 04 22:54:33 2009 -0500
@@ -188,6 +188,7 @@
 #define current_cpu_data boot_cpu_data
 #endif
 
+extern u64 host_pat;
 extern int phys_proc_id[NR_CPUS];
 extern int cpu_core_id[NR_CPUS];
 

Attachment: s3_bsp_pat.patch
Description: s3_bsp_pat.patch

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel
<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-devel] [PATCH] s3: recover pat value for bsp after S3 resume., Tian, Kevin <=