1. 11 12月, 2014 19 次提交
  2. 10 12月, 2014 12 次提交
  3. 09 12月, 2014 1 次提交
  4. 04 12月, 2014 2 次提交
  5. 01 12月, 2014 4 次提交
  6. 28 11月, 2014 2 次提交
    • D
      Fix for crash after migration in virtio-rng on bi-endian targets · db12451d
      David Gibson 提交于
      VirtIO devices now remember which endianness they're operating in in order
      to support targets which may have guests of either endianness, such as
      powerpc.  This endianness state is transferred in a subsection of the
      virtio device's information.
      
      With virtio-rng this can lead to an abort after a loadvm hitting the
      assert() in virtio_is_big_endian().  This can be reproduced by doing a
      migrate and load from file on a bi-endian target with a virtio-rng device.
      The actual guest state isn't particularly important to triggering this.
      
      The cause is that virtio_rng_load_device() calls virtio_rng_process() which
      accesses the ring and thus needs the endianness.  However,
      virtio_rng_process() is called via virtio_load() before it loads the
      subsections.  Essentially the ->load callback in VirtioDeviceClass should
      only be used for actually reading the device state from the stream, not for
      post-load re-initialization.
      
      This patch fixes the bug by moving the virtio_rng_process() after the call
      to virtio_load().  Better yet would be to convert virtio to use vmsd and
      have the virtio_rng_process() as a post_load callback, but that's a bigger
      project for another day.
      
      This is bugfix, and should be considered for the 2.2 branch.
      Signed-off-by: NDavid Gibson <david@gibson.dropbear.id.au>
      Reviewed-by: NGreg Kurz <gkurz@linux.vnet.ibm.com>
      Message-id: 1417067290-20715-1-git-send-email-david@gibson.dropbear.id.au
      Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
      db12451d
    • J
      virtio-net: fix unmap leak · 771b6ed3
      Jason Wang 提交于
      virtio_net_handle_ctrl() and other functions that process control vq
      request call iov_discard_front() which will shorten the iov. This will
      lead unmapping in virtqueue_push() leaks mapping.
      
      Fixes this by keeping the original iov untouched and using a temp variable
      in those functions.
      
      Cc: Wen Congyang <wency@cn.fujitsu.com>
      Cc: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
      Cc: qemu-stable@nongnu.org
      Signed-off-by: NJason Wang <jasowang@redhat.com>
      Reviewed-by: NStefano Stabellini <stefano.stabellini@eu.citrix.com>
      Reviewed-by: NFam Zheng <famz@redhat.com>
      Reviewed-by: NMichael S. Tsirkin <mst@redhat.com>
      Message-id: 1417082643-23907-1-git-send-email-jasowang@redhat.com
      Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
      771b6ed3