From: Tao Wu Date: Wed, 10 Jan 2018 19:50:56 +0000 (-0800) Subject: target/i386: hax: Move x86_update_hflags. X-Git-Tag: v2.12.0-rc0~155^2~20 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=df16af8741398fee4f8bd5112a00730b1ec6a0f6;p=thirdparty%2Fqemu.git target/i386: hax: Move x86_update_hflags. 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 Message-Id: <20180110195056.85403-3-lepton@google.com> Signed-off-by: Paolo Bonzini --- diff --git a/target/i386/hax-all.c b/target/i386/hax-all.c index 07df73ef478..934ec4afd14 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; }