summary refs log tree commit diff stats
path: root/hw/usb/dev-network.c
diff options
context:
space:
mode:
authorMichael Chapman <mike@very.puzzling.org>2015-04-15 13:59:14 +1000
committerJuan Quintela <quintela@redhat.com>2015-05-07 18:31:54 +0200
commit27ff42e29a1d12e9d9dbc473bbca36a50baf278b (patch)
tree4573c773995ee4538fd0caa288d98e8dbce0d4f5 /hw/usb/dev-network.c
parent50e9a629c6c92e73260cd3d7c2e3f5bfd84e47e2 (diff)
downloadfocaccia-qemu-27ff42e29a1d12e9d9dbc473bbca36a50baf278b.tar.gz
focaccia-qemu-27ff42e29a1d12e9d9dbc473bbca36a50baf278b.zip
migration: avoid divide by zero in xbzrle cache miss rate
This bug manifested itself as a VM that could not be resumed by libvirt
following a migration:

  # virsh resume example
  error: Failed to resume domain example
  error: internal error: cannot parse json {"return":
    {"xbzrle-cache":
      {..., "cache-miss-rate": -nan, ...},
      ...
    }
  }: lexical error: malformed number, a digit is required after the minus sign.

This patch also ensures xbzrle_cache_miss_prev and iterations_prev are
cleared at the start of the migration.

Signed-off-by: Michael Chapman <mike@very.puzzling.org>
Reviewed-by: Amit Shah <amit.shah@redhat.com>
Signed-off-by: Juan Quintela <quintela@redhat.com>
Diffstat (limited to 'hw/usb/dev-network.c')
0 files changed, 0 insertions, 0 deletions