Signed-off-by: Philippe Mathieu-Daudé <[email protected]>
Reviewed-by: Richard Henderson <[email protected]>
---
target/i386/hvf/hvf.c | 9 ++++-----
1 file changed, 4 insertions(+), 5 deletions(-)
diff --git a/target/i386/hvf/hvf.c b/target/i386/hvf/hvf.c
index 5134f302c08..51b3d392879 100644
--- a/target/i386/hvf/hvf.c
+++ b/target/i386/hvf/hvf.c
@@ -731,6 +731,10 @@ void hvf_simulate_wrmsr(CPUState *cs)
void hvf_arch_cpu_synchronize_pre_exec(CPUState *cpu)
{
+ if (cpu->vcpu_dirty) {
+ hvf_arch_put_registers(cpu);
+ cpu->vcpu_dirty = false;
+ }
}
void hvf_arch_cpu_synchronize_post_exec(CPUState *cpu)
@@ -990,11 +994,6 @@ int hvf_arch_vcpu_exec(CPUState *cpu)
}
do {
- if (cpu->vcpu_dirty) {
- hvf_arch_put_registers(cpu);
- cpu->vcpu_dirty = false;
- }
-
if (hvf_inject_interrupts(cpu)) {
return EXCP_INTERRUPT;
}
--
2.51.0