)]}'
{
  "commit": "4c0cfc72b31a79f737a64ebbe0411e4b83e25771",
  "tree": "c60b5ffadbceaa712a07169ab9b828730b39f276",
  "parents": [
    "afeb25f9263e470ad715cab2b79b8965c0519fb7"
  ],
  "author": {
    "name": "Laszlo Ersek",
    "email": "lersek@redhat.com",
    "time": "Sat Aug 23 12:19:07 2014 +0200"
  },
  "committer": {
    "name": "Stefan Hajnoczi",
    "email": "stefanha@redhat.com",
    "time": "Mon Sep 08 11:12:43 2014 +0100"
  },
  "message": "pflash_cfi01: write flash contents to bdrv on incoming migration\n\nA drive that backs a pflash device is special:\n- it is very small,\n- its entire contents are kept in a RAMBlock at all times, covering the\n  guest-phys address range that provides the guest\u0027s view of the emulated\n  flash chip.\n\nThe pflash device model keeps the drive (the host-side file) and the\nguest-visible flash contents in sync. When migrating the guest, the\nguest-visible flash contents (the RAMBlock) is migrated by default, but on\nthe target host, the drive (the host-side file) remains in full sync with\nthe RAMBlock only if:\n- the source and target hosts share the storage underlying the pflash\n  drive,\n- or the migration requests full or incremental block migration too, which\n  then covers all drives.\n\nDue to the special nature of pflash drives, the following scenario makes\nsense as well:\n- no full nor incremental block migration, covering all drives, alongside\n  the base migration (justified eg. by shared storage for \"normal\" (big)\n  drives),\n- non-shared storage for pflash drives.\n\nIn this case, currently only those portions of the flash drive are updated\non the target disk that the guest reprograms while running on the target\nhost.\n\nIn order to restore accord, dump the entire flash contents to the bdrv in\na post_load() callback.\n\n- The read-only check follows the other call-sites of pflash_update();\n- both \"pfl-\u003ero\" and pflash_update() reflect / consider the case when\n  \"pfl-\u003ebs\" is NULL;\n- the total size of the flash device is calculated as in\n  pflash_cfi01_realize().\n\nWhen using shared storage, or requesting full or incremental block\nmigration along with the normal migration, the patch should incur a\nharmless rewrite from the target side.\n\nIt is assumed that, on the target host, RAM is loaded ahead of the call to\npflash_post_load().\n\nSuggested-by: Paolo Bonzini \u003cpbonzini@redhat.com\u003e\nSigned-off-by: Laszlo Ersek \u003clersek@redhat.com\u003e\nSigned-off-by: Stefan Hajnoczi \u003cstefanha@redhat.com\u003e\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "fddef39982310b156a54d381916828f508e3f2c1",
      "old_mode": 33188,
      "old_path": "hw/block/pflash_cfi01.c",
      "new_id": "593fbc552538ba85cebb34b83dc9532210c9a360",
      "new_mode": 33188,
      "new_path": "hw/block/pflash_cfi01.c"
    }
  ]
}
