Skip to content
Snippets Groups Projects
  1. Aug 07, 2023
    • Dongli Zhang's avatar
      dump: kdump-zlib data pages not dumped with pvtime/aarch64 · 8a64609e
      Dongli Zhang authored
      
      The kdump-zlib data pages are not dumped from aarch64 host when the
      'pvtime' is involved, that is, when the block->target_end is not aligned to
      page_size. In the below example, it is expected to dump two blocks.
      
      (qemu) info mtree -f
      ... ...
        00000000090a0000-00000000090a0fff (prio 0, ram): pvtime KVM
      ... ...
        0000000040000000-00000001bfffffff (prio 0, ram): mach-virt.ram KVM
      ... ...
      
      However, there is an issue with get_next_page() so that the pages for
      "mach-virt.ram" will not be dumped.
      
      At line 1296, although we have reached at the end of the 'pvtime' block,
      since it is not aligned to the page_size (e.g., 0x10000), it will not break
      at line 1298.
      
      1255 static bool get_next_page(GuestPhysBlock **blockptr, uint64_t *pfnptr,
      1256                           uint8_t **bufptr, DumpState *s)
      ... ...
      1294             memcpy(buf + addr % page_size, hbuf, n);
      1295             addr += n;
      1296             if (addr % page_size == 0) {
      1297                 /* we filled up the page */
      1298                 break;
      1299             }
      
      As a result, get_next_page() will continue to the next
      block ("mach-virt.ram"). Finally, when get_next_page() returns to the
      caller:
      
      - 'pfnptr' is referring to the 'pvtime'
      - but 'blockptr' is referring to the "mach-virt.ram"
      
      When get_next_page() is called the next time, "*pfnptr += 1" still refers
      to the prior 'pvtime'. It will exit immediately because it is out of the
      range of the current "mach-virt.ram".
      
      The fix is to break when it is time to come to the next block, so that both
      'pfnptr' and 'blockptr' refer to the same block.
      
      Fixes: 94d78840 ("dump: fix kdump to work over non-aligned blocks")
      Cc: Joe Jin <joe.jin@oracle.com>
      Signed-off-by: default avatarDongli Zhang <dongli.zhang@oracle.com>
      Reviewed-by: default avatarMarc-André Lureau <marcandre.lureau@redhat.com>
      Message-ID: <20230713055819.30497-1-dongli.zhang@oracle.com>
      8a64609e
  2. Jun 20, 2023
  3. Mar 22, 2023
  4. Feb 27, 2023
  5. Feb 23, 2023
  6. Dec 14, 2022
    • Markus Armbruster's avatar
      qapi dump: Elide redundant has_FOO in generated C · d4f8bdc7
      Markus Armbruster authored
      
      The has_FOO for pointer-valued FOO are redundant, except for arrays.
      They are also a nuisance to work with.  Recent commit "qapi: Start to
      elide redundant has_FOO in generated C" provided the means to elide
      them step by step.  This is the step for qapi/dump.json.
      
      Said commit explains the transformation in more detail.  The invariant
      violations mentioned there do not occur here.
      
      Cc: Marc-André Lureau <marcandre.lureau@redhat.com>
      Signed-off-by: default avatarMarkus Armbruster <armbru@redhat.com>
      Message-Id: <20221104160712.3005652-14-armbru@redhat.com>
      Reviewed-by: default avatarPhilippe Mathieu-Daudé <philmd@linaro.org>
      d4f8bdc7
    • Markus Armbruster's avatar
      error: Drop a few superfluous ERRP_GUARD() · 740d6c4e
      Markus Armbruster authored
      
      include/qapi/error.h on ERRP_GUARD():
      
       * It must be used when the function dereferences @errp or passes
       * @errp to error_prepend(), error_vprepend(), or error_append_hint().
       * It is safe to use even when it's not needed, but please avoid
       * cluttering the source with useless code.
      
      Clean up some of this clutter.
      
      Signed-off-by: default avatarMarkus Armbruster <armbru@redhat.com>
      Message-Id: <20221121085054.683122-3-armbru@redhat.com>
      740d6c4e
  7. Oct 26, 2022
    • Viktor Prutyanov's avatar
      dump/win_dump: limit number of processed PRCBs · e38c24cb
      Viktor Prutyanov authored
      
      When number of CPUs utilized by guest Windows is less than defined in
      QEMU (i.e., desktop versions of Windows severely limits number of CPU
      sockets), patch_and_save_context routine accesses non-existent PRCB and
      fails. So, limit number of processed PRCBs by NumberProcessors taken
      from guest Windows driver.
      
      Signed-off-by: default avatarViktor Prutyanov <viktor.prutyanov@redhat.com>
      Reviewed-by: default avatarMarc-André Lureau <marcandre.lureau@redhat.com>
      Message-Id: <20221019235948.656411-1-viktor.prutyanov@redhat.com>
      e38c24cb
    • Janosch Frank's avatar
      s390x: pv: Add dump support · 113d8f4e
      Janosch Frank authored
      
      Sometimes dumping a guest from the outside is the only way to get the
      data that is needed. This can be the case if a dumping mechanism like
      KDUMP hasn't been configured or data needs to be fetched at a specific
      point. Dumping a protected guest from the outside without help from
      fw/hw doesn't yield sufficient data to be useful. Hence we now
      introduce PV dump support.
      
      The PV dump support works by integrating the firmware into the dump
      process. New Ultravisor calls are used to initiate the dump process,
      dump cpu data, dump memory state and lastly complete the dump process.
      The UV calls are exposed by KVM via the new KVM_PV_DUMP command and
      its subcommands. The guest's data is fully encrypted and can only be
      decrypted by the entity that owns the customer communication key for
      the dumped guest. Also dumping needs to be allowed via a flag in the
      SE header.
      
      On the QEMU side of things we store the PV dump data in the newly
      introduced architecture ELF sections (storage state and completion
      data) and the cpu notes (for cpu dump data).
      
      Users can use the zgetdump tool to convert the encrypted QEMU dump to an
      unencrypted one.
      
      Signed-off-by: default avatarJanosch Frank <frankja@linux.ibm.com>
      Reviewed-by: default avatarSteffen Eiden <seiden@linux.ibm.com>
      Message-Id: <20221017083822.43118-11-frankja@linux.ibm.com>
      113d8f4e
  8. Oct 24, 2022
  9. Oct 06, 2022
  10. Apr 22, 2022
Loading