mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-07-31 14:23:53 -06:00
migration/next for 20140505
-----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQIcBAABCAAGBQJTZ/QsAAoJEPSH7xhYctcjJ4wP/31lNMpPLxdRpxpUoTPK39L0 zEoBTUH5dzG2FG34p8/znNH0Lbmc3GALqP9UzyM0sL3QU0EDwqAP0idLJ/8zHrYN ZNJnNH6wexlpEypAsyQiayAFYAq6bc3hYtnEurN56dQgPVgb6jCicuOAt26JafLg xuGIuencgaEFZaIb8iobxloqDX9raoq0+JfnoV8r02+ES+PG+HHfZsAlbDiWpj/Z o06WBq9Xvf8X/zvuGHb9PCLGK36+kxPJ2G2531TJGZ6BjjewDExF2xlQH+PQ8pQB d2OKCP0In66JfyLu6JBz21APrks7DJxsuenvoqPhxhtlIcBSm+grZElNLbccDMLQ 3fteWOCcri5WSwKNAkZ138D5SzIArZFBlqD9qW0GQsiaj3tCxfy162JAmzRPa94i R5OJCTDclwjCH6JvRsOs8NrQyYcXHcEl2rfeymfr68YOH5XBMeRPhcR91tVr03ow ZVgvwC/TJHntKnW+qtGIOa9Wfq4KghjddD37ayPAqKM/GQ0TV2sAPEr2htDaBZ0l 5O/YGsAZPKax72OnMR2ObqoIMokympeanQLxG3Q8VKQSU2c+aU3rGVQrG1juiVYw NiC/nzarFzFWU8UYToXIu2QBDTde2vuRLX/myzL7L4OLavOcv8EXZBp60DP/bktE Pd+jdeLMh9kWu1tFrE8F =VoYL -----END PGP SIGNATURE----- Merge remote-tracking branch 'remotes/juanquintela/tags/migration/20140505' into staging migration/next for 20140505 # gpg: Signature made Mon 05 May 2014 21:27:24 BST using RSA key ID 5872D723 # gpg: Can't check signature: public key not found * remotes/juanquintela/tags/migration/20140505: (36 commits) migration: expose xbzrle cache miss rate migration: expose the bitmap_sync_count to the end migration: Add counts of updating the dirty bitmap XBZRLE: Fix one XBZRLE corruption issues migration: remove duplicate code Coverity: Fix failure path for qemu_accept in migration Init the XBZRLE.lock in ram_mig_init Provide init function for ram migration Count used RAMBlock pages for migration_dirty_pages Make qemu_peek_buffer loop until it gets it's data Disallow outward migration while awaiting incoming migration virtio: validate config_len on load virtio-net: out-of-bounds buffer write on load openpic: avoid buffer overrun on incoming migration ssi-sd: fix buffer overrun on invalid state load savevm: Ignore minimum_version_id_old if there is no load_state_old usb: sanity check setup_index+setup_len in post_load vmstate: s/VMSTATE_INT32_LE/VMSTATE_INT32_POSITIVE_LE/ virtio-scsi: fix buffer overrun on invalid state load zaurus: fix buffer overrun on invalid state load ... Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
This commit is contained in:
commit
c9541f67df
32 changed files with 484 additions and 185 deletions
|
@ -176,8 +176,8 @@ typedef struct VirtIONet {
|
|||
uint8_t nobcast;
|
||||
uint8_t vhost_started;
|
||||
struct {
|
||||
int in_use;
|
||||
int first_multi;
|
||||
uint32_t in_use;
|
||||
uint32_t first_multi;
|
||||
uint8_t multi_overflow;
|
||||
uint8_t uni_overflow;
|
||||
uint8_t *macs;
|
||||
|
|
|
@ -61,6 +61,7 @@ struct MigrationState
|
|||
bool enabled_capabilities[MIGRATION_CAPABILITY_MAX];
|
||||
int64_t xbzrle_cache_size;
|
||||
int64_t setup_time;
|
||||
int64_t dirty_sync_count;
|
||||
};
|
||||
|
||||
void process_incoming_migration(QEMUFile *f);
|
||||
|
@ -113,8 +114,6 @@ void free_xbzrle_decoded_buf(void);
|
|||
|
||||
void acct_update_position(QEMUFile *f, size_t size, bool zero);
|
||||
|
||||
extern SaveVMHandlers savevm_ram_handlers;
|
||||
|
||||
uint64_t dup_mig_bytes_transferred(void);
|
||||
uint64_t dup_mig_pages_transferred(void);
|
||||
uint64_t skipped_mig_bytes_transferred(void);
|
||||
|
@ -125,6 +124,7 @@ uint64_t xbzrle_mig_bytes_transferred(void);
|
|||
uint64_t xbzrle_mig_pages_transferred(void);
|
||||
uint64_t xbzrle_mig_pages_overflow(void);
|
||||
uint64_t xbzrle_mig_pages_cache_miss(void);
|
||||
double xbzrle_mig_cache_miss_rate(void);
|
||||
|
||||
void ram_handle_compressed(void *host, uint8_t ch, uint64_t size);
|
||||
|
||||
|
|
|
@ -123,6 +123,11 @@ void qemu_put_be32(QEMUFile *f, unsigned int v);
|
|||
void qemu_put_be64(QEMUFile *f, uint64_t v);
|
||||
int qemu_peek_buffer(QEMUFile *f, uint8_t *buf, int size, size_t offset);
|
||||
int qemu_get_buffer(QEMUFile *f, uint8_t *buf, int size);
|
||||
/*
|
||||
* Note that you can only peek continuous bytes from where the current pointer
|
||||
* is; you aren't guaranteed to be able to peak to +n bytes unless you've
|
||||
* previously peeked +n-1.
|
||||
*/
|
||||
int qemu_peek_byte(QEMUFile *f, int offset);
|
||||
int qemu_get_byte(QEMUFile *f);
|
||||
void qemu_file_skip(QEMUFile *f, int size);
|
||||
|
|
|
@ -100,6 +100,7 @@ enum VMStateFlags {
|
|||
VMS_MULTIPLY = 0x200, /* multiply "size" field by field_size */
|
||||
VMS_VARRAY_UINT8 = 0x400, /* Array with size in uint8_t field*/
|
||||
VMS_VARRAY_UINT32 = 0x800, /* Array with size in uint32_t field*/
|
||||
VMS_MUST_EXIST = 0x1000, /* Field must exist in input */
|
||||
};
|
||||
|
||||
typedef struct {
|
||||
|
@ -203,6 +204,14 @@ extern const VMStateInfo vmstate_info_bitmap;
|
|||
.offset = vmstate_offset_value(_state, _field, _type), \
|
||||
}
|
||||
|
||||
/* Validate state using a boolean predicate. */
|
||||
#define VMSTATE_VALIDATE(_name, _test) { \
|
||||
.name = (_name), \
|
||||
.field_exists = (_test), \
|
||||
.flags = VMS_ARRAY | VMS_MUST_EXIST, \
|
||||
.num = 0, /* 0 elements: no data, only run _test */ \
|
||||
}
|
||||
|
||||
#define VMSTATE_POINTER(_field, _state, _version, _info, _type) { \
|
||||
.name = (stringify(_field)), \
|
||||
.version_id = (_version), \
|
||||
|
@ -592,7 +601,7 @@ extern const VMStateInfo vmstate_info_bitmap;
|
|||
#define VMSTATE_UINT64_EQUAL(_f, _s) \
|
||||
VMSTATE_UINT64_EQUAL_V(_f, _s, 0)
|
||||
|
||||
#define VMSTATE_INT32_LE(_f, _s) \
|
||||
#define VMSTATE_INT32_POSITIVE_LE(_f, _s) \
|
||||
VMSTATE_SINGLE(_f, _s, 0, vmstate_info_int32_le, int32_t)
|
||||
|
||||
#define VMSTATE_UINT8_TEST(_f, _s, _t) \
|
||||
|
|
|
@ -29,6 +29,7 @@ extern const uint32_t arch_type;
|
|||
void select_soundhw(const char *optarg);
|
||||
void do_acpitable_option(const QemuOpts *opts);
|
||||
void do_smbios_option(QemuOpts *opts);
|
||||
void ram_mig_init(void);
|
||||
void cpudef_init(void);
|
||||
void audio_init(void);
|
||||
int tcg_available(void);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue