diff options
-rw-r--r-- | kvm-all.c | 18 |
1 files changed, 16 insertions, 2 deletions
@@ -1669,18 +1669,32 @@ void kvm_cpu_synchronize_state(CPUState *cpu) } } -void kvm_cpu_synchronize_post_reset(CPUState *cpu) +static void do_kvm_cpu_synchronize_post_reset(void *arg) { + CPUState *cpu = arg; + kvm_arch_put_registers(cpu, KVM_PUT_RESET_STATE); cpu->kvm_vcpu_dirty = false; } -void kvm_cpu_synchronize_post_init(CPUState *cpu) +void kvm_cpu_synchronize_post_reset(CPUState *cpu) +{ + run_on_cpu(cpu, do_kvm_cpu_synchronize_post_reset, cpu); +} + +static void do_kvm_cpu_synchronize_post_init(void *arg) { + CPUState *cpu = arg; + kvm_arch_put_registers(cpu, KVM_PUT_FULL_STATE); cpu->kvm_vcpu_dirty = false; } +void kvm_cpu_synchronize_post_init(CPUState *cpu) +{ + run_on_cpu(cpu, do_kvm_cpu_synchronize_post_init, cpu); +} + int kvm_cpu_exec(CPUState *cpu) { struct kvm_run *run = cpu->kvm_run; |