Revision b0a46a33

b/exec.c
516 516
{
517 517
    CPUState *env = opaque;
518 518

  
519
    cpu_synchronize_state(env, 0);
520

  
519 521
    qemu_put_be32s(f, &env->halted);
520 522
    qemu_put_be32s(f, &env->interrupt_request);
521 523
}
......
533 535
       version_id is increased. */
534 536
    env->interrupt_request &= ~0x01;
535 537
    tlb_flush(env, 1);
538
    cpu_synchronize_state(env, 1);
536 539

  
537 540
    return 0;
538 541
}
......
1923 1926
int cpu_physical_memory_set_dirty_tracking(int enable)
1924 1927
{
1925 1928
    in_migration = enable;
1929
    if (kvm_enabled()) {
1930
        return kvm_set_migration_log(enable);
1931
    }
1926 1932
    return 0;
1927 1933
}
1928 1934

  
b/target-i386/machine.c
4 4
#include "hw/isa.h"
5 5

  
6 6
#include "exec-all.h"
7
#include "kvm.h"
7 8

  
8 9
static void cpu_put_seg(QEMUFile *f, SegmentCache *dt)
9 10
{
......
29 30
    int32_t a20_mask;
30 31
    int i;
31 32

  
33
    cpu_synchronize_state(env, 0);
34

  
32 35
    for(i = 0; i < CPU_NB_REGS; i++)
33 36
        qemu_put_betls(f, &env->regs[i]);
34 37
    qemu_put_betls(f, &env->eip);
......
321 324
    /* XXX: compute redundant hflags bits */
322 325
    env->hflags = hflags;
323 326
    tlb_flush(env, 1);
327
    cpu_synchronize_state(env, 1);
324 328
    return 0;
325 329
}
b/target-ppc/machine.c
1 1
#include "hw/hw.h"
2 2
#include "hw/boards.h"
3
#include "kvm.h"
3 4

  
4 5
void cpu_save(QEMUFile *f, void *opaque)
5 6
{
6 7
    CPUState *env = (CPUState *)opaque;
7 8
    unsigned int i, j;
8 9

  
10
    cpu_synchronize_state(env, 0);
11

  
9 12
    for (i = 0; i < 32; i++)
10 13
        qemu_put_betls(f, &env->gpr[i]);
11 14
#if !defined(TARGET_PPC64)
......
174 177
    qemu_get_sbe32s(f, &env->mmu_idx);
175 178
    qemu_get_sbe32s(f, &env->power_mode);
176 179

  
180
    cpu_synchronize_state(env, 1);
181

  
177 182
    return 0;
178 183
}
b/vl.c
3232 3232
{
3233 3233
    ram_addr_t addr;
3234 3234

  
3235
    if (cpu_physical_sync_dirty_bitmap(0, last_ram_offset) != 0) {
3236
        qemu_file_set_error(f);
3237
        return 0;
3238
    }
3239

  
3235 3240
    if (stage == 1) {
3236 3241
        /* Make sure all dirty bits are set */
3237 3242
        for (addr = 0; addr < last_ram_offset; addr += TARGET_PAGE_SIZE) {
3238 3243
            if (!cpu_physical_memory_get_dirty(addr, MIGRATION_DIRTY_FLAG))
3239 3244
                cpu_physical_memory_set_dirty(addr);
3240 3245
        }
3241
        
3246

  
3242 3247
        /* Enable dirty memory tracking */
3243 3248
        cpu_physical_memory_set_dirty_tracking(1);
3244 3249

  

Also available in: Unified diff