)]}'
{
  "commit": "db12451decf7dfe0f083564183e135f2095228b9",
  "tree": "e32476479f04b46d0f59af67bb4e1d5192ae7b14",
  "parents": [
    "771b6ed37e3aa188a7485560b949a41c6cf174dc"
  ],
  "author": {
    "name": "David Gibson",
    "email": "david@gibson.dropbear.id.au",
    "time": "Thu Nov 27 16:48:10 2014 +1100"
  },
  "committer": {
    "name": "Peter Maydell",
    "email": "peter.maydell@linaro.org",
    "time": "Fri Nov 28 13:06:00 2014 +0000"
  },
  "message": "Fix for crash after migration in virtio-rng on bi-endian targets\n\nVirtIO devices now remember which endianness they\u0027re operating in in order\nto support targets which may have guests of either endianness, such as\npowerpc.  This endianness state is transferred in a subsection of the\nvirtio device\u0027s information.\n\nWith virtio-rng this can lead to an abort after a loadvm hitting the\nassert() in virtio_is_big_endian().  This can be reproduced by doing a\nmigrate and load from file on a bi-endian target with a virtio-rng device.\nThe actual guest state isn\u0027t particularly important to triggering this.\n\nThe cause is that virtio_rng_load_device() calls virtio_rng_process() which\naccesses the ring and thus needs the endianness.  However,\nvirtio_rng_process() is called via virtio_load() before it loads the\nsubsections.  Essentially the -\u003eload callback in VirtioDeviceClass should\nonly be used for actually reading the device state from the stream, not for\npost-load re-initialization.\n\nThis patch fixes the bug by moving the virtio_rng_process() after the call\nto virtio_load().  Better yet would be to convert virtio to use vmsd and\nhave the virtio_rng_process() as a post_load callback, but that\u0027s a bigger\nproject for another day.\n\nThis is bugfix, and should be considered for the 2.2 branch.\n\nSigned-off-by: David Gibson \u003cdavid@gibson.dropbear.id.au\u003e\nReviewed-by: Greg Kurz \u003cgkurz@linux.vnet.ibm.com\u003e\nMessage-id: 1417067290-20715-1-git-send-email-david@gibson.dropbear.id.au\nSigned-off-by: Peter Maydell \u003cpeter.maydell@linaro.org\u003e\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "e85a9797542f84937d02a019281dd720143aa513",
      "old_mode": 33188,
      "old_path": "hw/virtio/virtio-rng.c",
      "new_id": "473c04410e9ebfcc67e1eddebf51c76e955fabd5",
      "new_mode": 33188,
      "new_path": "hw/virtio/virtio-rng.c"
    }
  ]
}
