)]}'
{
  "commit": "8a64609eea8cb2bac015968c4b62da5bce266e22",
  "tree": "40b25ad082ff5b1e883dbb5d804df5c96e9f3886",
  "parents": [
    "a41e2d97f92b48552988b3cc62dce79d62f60dcc"
  ],
  "author": {
    "name": "Dongli Zhang",
    "email": "dongli.zhang@oracle.com",
    "time": "Wed Jul 12 22:58:19 2023 -0700"
  },
  "committer": {
    "name": "Marc-André Lureau",
    "email": "marcandre.lureau@redhat.com",
    "time": "Mon Aug 07 15:46:59 2023 +0400"
  },
  "message": "dump: kdump-zlib data pages not dumped with pvtime/aarch64\n\nThe kdump-zlib data pages are not dumped from aarch64 host when the\n\u0027pvtime\u0027 is involved, that is, when the block-\u003etarget_end is not aligned to\npage_size. In the below example, it is expected to dump two blocks.\n\n(qemu) info mtree -f\n... ...\n  00000000090a0000-00000000090a0fff (prio 0, ram): pvtime KVM\n... ...\n  0000000040000000-00000001bfffffff (prio 0, ram): mach-virt.ram KVM\n... ...\n\nHowever, there is an issue with get_next_page() so that the pages for\n\"mach-virt.ram\" will not be dumped.\n\nAt line 1296, although we have reached at the end of the \u0027pvtime\u0027 block,\nsince it is not aligned to the page_size (e.g., 0x10000), it will not break\nat line 1298.\n\n1255 static bool get_next_page(GuestPhysBlock **blockptr, uint64_t *pfnptr,\n1256                           uint8_t **bufptr, DumpState *s)\n... ...\n1294             memcpy(buf + addr % page_size, hbuf, n);\n1295             addr +\u003d n;\n1296             if (addr % page_size \u003d\u003d 0) {\n1297                 /* we filled up the page */\n1298                 break;\n1299             }\n\nAs a result, get_next_page() will continue to the next\nblock (\"mach-virt.ram\"). Finally, when get_next_page() returns to the\ncaller:\n\n- \u0027pfnptr\u0027 is referring to the \u0027pvtime\u0027\n- but \u0027blockptr\u0027 is referring to the \"mach-virt.ram\"\n\nWhen get_next_page() is called the next time, \"*pfnptr +\u003d 1\" still refers\nto the prior \u0027pvtime\u0027. It will exit immediately because it is out of the\nrange of the current \"mach-virt.ram\".\n\nThe fix is to break when it is time to come to the next block, so that both\n\u0027pfnptr\u0027 and \u0027blockptr\u0027 refer to the same block.\n\nFixes: 94d788408d2d (\"dump: fix kdump to work over non-aligned blocks\")\nCc: Joe Jin \u003cjoe.jin@oracle.com\u003e\nSigned-off-by: Dongli Zhang \u003cdongli.zhang@oracle.com\u003e\nReviewed-by: Marc-André Lureau \u003cmarcandre.lureau@redhat.com\u003e\nMessage-ID: \u003c20230713055819.30497-1-dongli.zhang@oracle.com\u003e\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "1f1a6edcab051af7bedb09ed05e3187eae45be1e",
      "old_mode": 33188,
      "old_path": "dump/dump.c",
      "new_id": "d4ef713cd06cb61edd085e8fffb27b0b4fe72fe0",
      "new_mode": 33188,
      "new_path": "dump/dump.c"
    }
  ]
}
