Commit e95edefb authored by Peter Maydell's avatar Peter Maydell
Browse files

Merge remote-tracking branch 'remotes/sstabellini/tags/xen-migration-2.4-tag' into staging



xen-migration-2.4

# gpg: Signature made Mon 03 Aug 2015 17:18:36 BST using RSA key ID 70E1AE90
# gpg: Good signature from "Stefano Stabellini <stefano.stabellini@eu.citrix.com>"

* remotes/sstabellini/tags/xen-migration-2.4-tag:
  migration: Fix regression for xenfv and pc,accel=xen machine.
  migration: Fix global state with Xen.

Signed-off-by: default avatarPeter Maydell <peter.maydell@linaro.org>
parents f60c8715 8c6dc68f
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -203,4 +203,5 @@ void register_global_state(void);
void global_state_set_optional(void);
void savevm_skip_configuration(void);
int global_state_store(void);
void global_state_store_running(void);
#endif
+7 −0
Original line number Diff line number Diff line
@@ -122,6 +122,13 @@ int global_state_store(void)
    return 0;
}

void global_state_store_running(void)
{
    const char *state = RunState_lookup[RUN_STATE_RUNNING];
    strncpy((char *)global_state.runstate,
           state, sizeof(global_state.runstate));
}

static bool global_state_received(void)
{
    return global_state.received;
+1 −0
Original line number Diff line number Diff line
@@ -1394,6 +1394,7 @@ void qmp_xen_save_devices_state(const char *filename, Error **errp)

    saved_vm_running = runstate_is_running();
    vm_stop(RUN_STATE_SAVE_VM);
    global_state_store_running();

    f = qemu_fopen(filename, "wb");
    if (!f) {
+5 −0
Original line number Diff line number Diff line
@@ -12,6 +12,7 @@
#include "qmp-commands.h"
#include "sysemu/char.h"
#include "sysemu/accel.h"
#include "migration/migration.h"

//#define DEBUG_XEN

@@ -119,6 +120,10 @@ static int xen_init(MachineState *ms)
    }
    qemu_add_vm_change_state_handler(xen_change_state_handler, NULL);

    global_state_set_optional();
    savevm_skip_configuration();
    savevm_skip_section_footers();

    return 0;
}