Revision 4c0960c0 kvm-all.c

b/kvm-all.c
57 57
    KVMSlot slots[32];
58 58
    int fd;
59 59
    int vmfd;
60
    int regs_modified;
60 61
    int coalesced_mmio;
61 62
    int broken_set_mem_region;
62 63
    int migration_log;
......
576 577
#endif
577 578
}
578 579

  
580
void kvm_cpu_synchronize_state(CPUState *env)
581
{
582
    if (!env->kvm_state->regs_modified) {
583
        kvm_arch_get_registers(env);
584
        env->kvm_state->regs_modified = 1;
585
    }
586
}
587

  
579 588
int kvm_cpu_exec(CPUState *env)
580 589
{
581 590
    struct kvm_run *run = env->kvm_run;
......
590 599
            break;
591 600
        }
592 601

  
602
        if (env->kvm_state->regs_modified) {
603
            kvm_arch_put_registers(env);
604
            env->kvm_state->regs_modified = 0;
605
        }
606

  
593 607
        kvm_arch_pre_run(env, run);
594 608
        ret = kvm_vcpu_ioctl(env, KVM_RUN, 0);
595 609
        kvm_arch_post_run(env, run);

Also available in: Unified diff