Skip to content
Snippets Groups Projects
  1. Sep 16, 2023
  2. Sep 15, 2023
  3. Sep 08, 2023
  4. Sep 07, 2023
  5. Aug 31, 2023
  6. Aug 29, 2023
  7. Aug 24, 2023
  8. Aug 22, 2023
  9. Aug 10, 2023
  10. Aug 06, 2023
  11. Aug 05, 2023
  12. Jul 31, 2023
    • Richard Henderson's avatar
      accel/tcg: Clear tcg_ctx->gen_tb on buffer overflow · ad17868e
      Richard Henderson authored
      
      On overflow of code_gen_buffer, we unlock the guest pages we had been
      translating, but failed to clear gen_tb.  On restart, if we cannot
      allocate a TB, we exit to the main loop to perform the flush of all
      TBs as soon as possible.  With garbage in gen_tb, we hit an assert:
      
      ../src/accel/tcg/tb-maint.c:348:page_unlock__debug: \
          assertion failed: (page_is_locked(pd))
      
      Fixes: deba7870 ("accel/tcg: Always lock pages before translation")
      Signed-off-by: default avatarRichard Henderson <richard.henderson@linaro.org>
      ad17868e
    • Gavin Shan's avatar
      kvm: Fix crash due to access uninitialized kvm_state · fe6bda58
      Gavin Shan authored
      
      Runs into core dump on arm64 and the backtrace extracted from the
      core dump is shown as below. It's caused by accessing uninitialized
      @kvm_state in kvm_flush_coalesced_mmio_buffer() due to commit 176d0730
      ("hw/arm/virt: Use machine_memory_devices_init()"), where the machine's
      memory region is added earlier than before.
      
          main
          qemu_init
          configure_accelerators
          qemu_opts_foreach
          do_configure_accelerator
          accel_init_machine
          kvm_init
          virt_kvm_type
          virt_set_memmap
          machine_memory_devices_init
          memory_region_add_subregion
          memory_region_add_subregion_common
          memory_region_update_container_subregions
          memory_region_transaction_begin
          qemu_flush_coalesced_mmio_buffer
          kvm_flush_coalesced_mmio_buffer
      
      Fix it by bailing early in kvm_flush_coalesced_mmio_buffer() on the
      uninitialized @kvm_state. With this applied, no crash is observed on
      arm64.
      
      Fixes: 176d0730 ("hw/arm/virt: Use machine_memory_devices_init()")
      Signed-off-by: default avatarGavin Shan <gshan@redhat.com>
      Reviewed-by: default avatarDavid Hildenbrand <david@redhat.com>
      Reviewed-by: default avatarPhilippe Mathieu-Daudé <philmd@linaro.org>
      Message-id: 20230731125946.2038742-1-gshan@redhat.com
      Signed-off-by: default avatarPeter Maydell <peter.maydell@linaro.org>
      fe6bda58
  13. Jul 24, 2023
  14. Jul 23, 2023
  15. Jul 17, 2023
    • Peter Maydell's avatar
      accel/tcg: Zero-pad PC in TCG CPU exec trace lines · e60a7d0d
      Peter Maydell authored
      
      In commit f0a08b09 we changed the type of the PC from
      target_ulong to vaddr.  In doing so we inadvertently dropped the
      zero-padding on the PC in trace lines (the second item inside the []
      in these lines).  They used to look like this on AArch64, for
      instance:
      
      Trace 0: 0x7f2260000100 [00000000/0000000040000000/00000061/ff200000]
      
      and now they look like this:
      Trace 0: 0x7f4f50000100 [00000000/40000000/00000061/ff200000]
      
      and if the PC happens to be somewhere low like 0x5000
      then the field is shown as /5000/.
      
      This is because TARGET_FMT_lx is a "%08x" or "%016x" specifier,
      depending on TARGET_LONG_SIZE, whereas VADDR_PRIx is just PRIx64
      with no width specifier.
      
      Restore the zero-padding by adding an 016 width specifier to
      this tracing and a couple of others that were similarly recently
      changed to use VADDR_PRIx without a width specifier.
      
      We can't unfortunately restore the "32-bit guests are padded to
      8 hex digits and 64-bit guests to 16 hex digits" behaviour so
      easily.
      
      Fixes: f0a08b09 ("accel/tcg/cpu-exec.c: Widen pc to vaddr")
      Signed-off-by: default avatarPeter Maydell <peter.maydell@linaro.org>
      Reviewed-by: default avatarPhilippe Mathieu-Daudé <philmd@linaro.org>
      Reviewed-by: default avatarAnton Johansson <anjo@rev.ng>
      Message-id: 20230711165434.4123674-1-peter.maydell@linaro.org
      e60a7d0d
  16. Jul 15, 2023
Loading