aboutsummaryrefslogtreecommitdiffstats
path: root/xen/arch/x86/acpi/suspend.c
diff options
context:
space:
mode:
authorKeir Fraser <keir.fraser@citrix.com>2009-08-05 13:50:36 +0100
committerKeir Fraser <keir.fraser@citrix.com>2009-08-05 13:50:36 +0100
commit0d22c8d92c6cdc78f8300f55a6360ef9c0bb51a3 (patch)
treef6b31a451f67cad656f429cff589ef6ee5b3cf3f /xen/arch/x86/acpi/suspend.c
parent37455c343614ded2788380973c0c5334fa6cb796 (diff)
downloadxen-0d22c8d92c6cdc78f8300f55a6360ef9c0bb51a3.tar.gz
xen-0d22c8d92c6cdc78f8300f55a6360ef9c0bb51a3.tar.bz2
xen-0d22c8d92c6cdc78f8300f55a6360ef9c0bb51a3.zip
x86: CPU synchronization while doing MTRR register update
The current Xen code does not synchronize all the cpus while initializing MTRR registers when a cpu comes up.=20 As per IA32 SDM vol 3: Section: 10.11.8 MTRR Considerations in MP Systems, all the processors should be synchronized while updating MTRRs. Processors starting with westmere are caching VMCS data for better VMX performance. These processors also has Hyper-threading support. With hyper-threading, when one thread's cache is disabled, it also disables cache for the sibling threads. And MTRR register updating procedure involves cache disabling. So if cpus are not synchronized, updating MTRR registers on a thread, results in the VMCS data from sibling threads becoming inaccessible, and it causes system failure. With this patch while updating the MTRR registers, all the cpus are synchronized as per the IA32 SDM. Also at the boot time and resume time when multiple cpus are brought up, an optimization is added to delay the MTRR initialization until all the cpus are up, to avoid multiple times cpu synchronization. Signed-off-by: Nitin A Kamble <nitin.a.kamble@intel.com> Signed-off-by: Suresh B Siddha <suresh.b.siddha@intel.com> Signed-off-by: Asit K Mallick <asit.k.mallick@intel.com>
Diffstat (limited to 'xen/arch/x86/acpi/suspend.c')
-rw-r--r--xen/arch/x86/acpi/suspend.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/xen/arch/x86/acpi/suspend.c b/xen/arch/x86/acpi/suspend.c
index 2a799e2a6b..4e064a66fd 100644
--- a/xen/arch/x86/acpi/suspend.c
+++ b/xen/arch/x86/acpi/suspend.c
@@ -78,6 +78,6 @@ void restore_rest_processor_state(void)
if (cpu_has_pat)
wrmsrl(MSR_IA32_CR_PAT, host_pat);
- mtrr_ap_init();
+ mtrr_bp_restore();
mcheck_init(&boot_cpu_data);
}