~ubuntu-branches/ubuntu/natty/qemu-linaro/natty

« back to all changes in this revision

Viewing changes to savevm.c

  • Committer: Package Import Robot
  • Author(s): Steve Langasek, Loïc Minier, Steve Langasek
  • Date: 2011-03-07 22:55:03 UTC
  • Revision ID: package-import@ubuntu.com-20110307225503-3opjapw0ksg7glo6
[ Loïc Minier ]
* Also pass -fno-var-tracking on armhf.

[ Steve Langasek ]
* New upstream release.
* Build with -marm on armel/armhf; Peter Maydell reports that building for
  Thumb-2 gives an emulator that doesn't work.
* Add support for cross-compiling the package.

Show diffs side-by-side

added added

removed removed

Lines of Context:
78
78
#include "sysemu.h"
79
79
#include "qemu-timer.h"
80
80
#include "qemu-char.h"
81
 
#include "blockdev.h"
82
81
#include "audio/audio.h"
83
82
#include "migration.h"
84
83
#include "qemu_socket.h"
1576
1575
    int ret;
1577
1576
 
1578
1577
    saved_vm_running = vm_running;
1579
 
    vm_stop(0);
 
1578
    vm_stop(VMSTOP_SAVEVM);
1580
1579
 
1581
1580
    if (qemu_savevm_state_blocked(mon)) {
1582
1581
        ret = -EINVAL;
1639
1638
static int vmstate_subsection_load(QEMUFile *f, const VMStateDescription *vmsd,
1640
1639
                                   void *opaque)
1641
1640
{
 
1641
    const VMStateSubsection *sub = vmsd->subsections;
 
1642
 
 
1643
    if (!sub || !sub->needed) {
 
1644
        return 0;
 
1645
    }
 
1646
 
1642
1647
    while (qemu_peek_byte(f) == QEMU_VM_SUBSECTION) {
1643
1648
        char idstr[256];
1644
1649
        int ret;
1651
1656
        idstr[len] = 0;
1652
1657
        version_id = qemu_get_be32(f);
1653
1658
 
1654
 
        sub_vmsd = vmstate_get_subsection(vmsd->subsections, idstr);
 
1659
        sub_vmsd = vmstate_get_subsection(sub, idstr);
1655
1660
        if (sub_vmsd == NULL) {
1656
1661
            return -ENOENT;
1657
1662
        }
 
1663
        assert(!sub_vmsd->subsections);
1658
1664
        ret = vmstate_load_state(f, sub_vmsd, opaque, version_id);
1659
1665
        if (ret) {
1660
1666
            return ret;
1678
1684
            qemu_put_byte(f, len);
1679
1685
            qemu_put_buffer(f, (uint8_t *)vmsd->name, len);
1680
1686
            qemu_put_be32(f, vmsd->version_id);
 
1687
            assert(!vmsd->subsections);
1681
1688
            vmstate_save_state(f, vmsd, opaque);
1682
1689
        }
1683
1690
        sub++;
1897
1904
    }
1898
1905
 
1899
1906
    saved_vm_running = vm_running;
1900
 
    vm_stop(0);
 
1907
    vm_stop(VMSTOP_SAVEVM);
1901
1908
 
1902
1909
    memset(sn, 0, sizeof(*sn));
1903
1910