summaryrefslogtreecommitdiff
path: root/target-i386
diff options
context:
space:
mode:
authorPaolo Bonzini <pbonzini@redhat.com>2015-04-02 14:13:55 +0200
committerPaolo Bonzini <pbonzini@redhat.com>2015-04-02 15:57:27 +0200
commitcbea0c26e718191b57783f847ad2c805670439e8 (patch)
treecba59a80f25d5b36f9c75757c9335f0eb9371ee1 /target-i386
parent11f10cf8057dd5392171da061381f6c890b1e21d (diff)
target-i386: save 64-bit CR3 in 64-bit SMM state save area
The x86_64 CR3 register is 64 bits wide, save all of them! Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'target-i386')
-rw-r--r--target-i386/smm_helper.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/target-i386/smm_helper.c b/target-i386/smm_helper.c
index 58051d3bcc..c62f46847c 100644
--- a/target-i386/smm_helper.c
+++ b/target-i386/smm_helper.c
@@ -101,7 +101,7 @@ void do_smm_enter(X86CPU *cpu)
stl_phys(cs->as, sm_state + 0x7f60, env->dr[7]);
stl_phys(cs->as, sm_state + 0x7f48, env->cr[4]);
- stl_phys(cs->as, sm_state + 0x7f50, env->cr[3]);
+ stq_phys(cs->as, sm_state + 0x7f50, env->cr[3]);
stl_phys(cs->as, sm_state + 0x7f58, env->cr[0]);
stl_phys(cs->as, sm_state + 0x7efc, SMM_REVISION_ID);
@@ -236,7 +236,7 @@ void helper_rsm(CPUX86State *env)
env->dr[7] = ldl_phys(cs->as, sm_state + 0x7f60);
cpu_x86_update_cr4(env, ldl_phys(cs->as, sm_state + 0x7f48));
- cpu_x86_update_cr3(env, ldl_phys(cs->as, sm_state + 0x7f50));
+ cpu_x86_update_cr3(env, ldq_phys(cs->as, sm_state + 0x7f50));
cpu_x86_update_cr0(env, ldl_phys(cs->as, sm_state + 0x7f58));
for (i = 0; i < 6; i++) {