ia64/xen-unstable

changeset 19169:8303bd33d030

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>
author Keir Fraser <keir.fraser@citrix.com>
date Thu Feb 05 12:14:09 2009 +0000 (2009-02-05)
parents 4c92a04f4f5e
children 1dfcb2444c6e
files xen/arch/x86/acpi/suspend.c xen/include/asm-x86/processor.h
line diff
     1.1 --- a/xen/arch/x86/acpi/suspend.c	Thu Feb 05 12:13:25 2009 +0000
     1.2 +++ b/xen/arch/x86/acpi/suspend.c	Thu Feb 05 12:14:09 2009 +0000
     1.3 @@ -65,6 +65,9 @@ void restore_rest_processor_state(void)
     1.4      /* Reload FPU state on next FPU use. */
     1.5      stts();
     1.6  
     1.7 +    if (cpu_has_pat)
     1.8 +        wrmsrl(MSR_IA32_CR_PAT, host_pat);
     1.9 +
    1.10      mtrr_ap_init();
    1.11      mcheck_init(&boot_cpu_data);
    1.12  }
     2.1 --- a/xen/include/asm-x86/processor.h	Thu Feb 05 12:13:25 2009 +0000
     2.2 +++ b/xen/include/asm-x86/processor.h	Thu Feb 05 12:14:09 2009 +0000
     2.3 @@ -188,6 +188,7 @@ extern struct cpuinfo_x86 cpu_data[];
     2.4  #define current_cpu_data boot_cpu_data
     2.5  #endif
     2.6  
     2.7 +extern u64 host_pat;
     2.8  extern int phys_proc_id[NR_CPUS];
     2.9  extern int cpu_core_id[NR_CPUS];
    2.10