diff mbox series

[PULL,31/51] target/i386: hax: Move x86_update_hflags.

Message ID 1516112253-14480-32-git-send-email-pbonzini@redhat.com
State New
Headers show
Series [PULL,01/51] scsi-generic: Add share-rw option | expand

Commit Message

Paolo Bonzini Jan. 16, 2018, 2:17 p.m. UTC
From: Tao Wu <lepton@google.com>

x86_update_hflags reference env->efer which is updated in hax_get_msrs,
so it has to be called after hax_get_msrs. This fix the bug that sometimes
dump_state show 32 bits regs even in 64 bits mode.

Signed-off-by: Tao Wu <lepton@google.com>
Message-Id: <20180110195056.85403-3-lepton@google.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
 target/i386/hax-all.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)
diff mbox series

Patch

diff --git a/target/i386/hax-all.c b/target/i386/hax-all.c
index 07df73e..934ec4a 100644
--- a/target/i386/hax-all.c
+++ b/target/i386/hax-all.c
@@ -837,9 +837,6 @@  static int hax_sync_vcpu_register(CPUArchState *env, int set)
             return -1;
         }
     }
-    if (!set) {
-        x86_update_hflags(env);
-    }
     return 0;
 }
 
@@ -1020,6 +1017,7 @@  static int hax_arch_get_registers(CPUArchState *env)
         return ret;
     }
 
+    x86_update_hflags(env);
     return 0;
 }