aboutsummaryrefslogtreecommitdiffstats
path: root/xen/arch/x86/acpi/suspend.c
diff options
context:
space:
mode:
authorKeir Fraser <keir.fraser@citrix.com>2009-02-05 12:14:09 +0000
committerKeir Fraser <keir.fraser@citrix.com>2009-02-05 12:14:09 +0000
commit38651997ed10ad12c9dc9aebe04217fd0dd76bb6 (patch)
tree4756bd1d2b124d551bef25492830abda42e1fb66 /xen/arch/x86/acpi/suspend.c
parent345dd80d935ac1db3caff05b5cf59fc6a859c772 (diff)
downloadxen-38651997ed10ad12c9dc9aebe04217fd0dd76bb6.tar.gz
xen-38651997ed10ad12c9dc9aebe04217fd0dd76bb6.tar.bz2
xen-38651997ed10ad12c9dc9aebe04217fd0dd76bb6.zip
x86: 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=20 recovered which could make assigned device defunct after S3 resume Signed-off-by Kevin Tian <kevin.tian@intel.com>
Diffstat (limited to 'xen/arch/x86/acpi/suspend.c')
-rw-r--r--xen/arch/x86/acpi/suspend.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/xen/arch/x86/acpi/suspend.c b/xen/arch/x86/acpi/suspend.c
index 3068590f70..e8a39fc6bc 100644
--- a/xen/arch/x86/acpi/suspend.c
+++ b/xen/arch/x86/acpi/suspend.c
@@ -65,6 +65,9 @@ void restore_rest_processor_state(void)
/* 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);
}