qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Paolo Bonzini <pbonzini@redhat.com>
To: qemu-devel@nongnu.org
Subject: [Qemu-devel] [PULL 1/6] target-i386: save 64-bit CR3 in 64-bit SMM state save area
Date: Thu,  2 Apr 2015 16:21:26 +0200	[thread overview]
Message-ID: <1427984491-23475-2-git-send-email-pbonzini@redhat.com> (raw)
In-Reply-To: <1427984491-23475-1-git-send-email-pbonzini@redhat.com>

The x86_64 CR3 register is 64 bits wide, save all of them!

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
 target-i386/smm_helper.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/target-i386/smm_helper.c b/target-i386/smm_helper.c
index 58051d3..c62f468 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++) {
-- 
2.3.4

  reply	other threads:[~2015-04-02 14:21 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-04-02 14:21 [Qemu-devel] [PULL 0/6] More changes for QEMU 2.3.0-rc2 Paolo Bonzini
2015-04-02 14:21 ` Paolo Bonzini [this message]
2015-04-02 14:21 ` [Qemu-devel] [PULL 2/6] qga: fitering out -fstack-protector-strong Paolo Bonzini
2015-04-02 14:21 ` [Qemu-devel] [PULL 3/6] target-i386: clear bsp bit when designating bsp Paolo Bonzini
2015-04-02 14:21 ` [Qemu-devel] [PULL 4/6] util/qemu-config: fix regression of qmp_query_command_line_options Paolo Bonzini
2015-04-02 14:21 ` [Qemu-devel] [PULL 5/6] kvm-all: Sync dirty-bitmap from kvm before kvm destroy the corresponding dirty_bitmap Paolo Bonzini
2015-04-02 14:21 ` [Qemu-devel] [PULL 6/6] Use $(MAKE) for recursive make Paolo Bonzini
2015-04-02 15:52 ` [Qemu-devel] [PULL 0/6] More changes for QEMU 2.3.0-rc2 Peter Maydell

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1427984491-23475-2-git-send-email-pbonzini@redhat.com \
    --to=pbonzini@redhat.com \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).