Skip to content
Snippets Groups Projects
  1. Jan 07, 2021
  2. Jan 04, 2021
  3. Jan 02, 2021
    • Paolo Bonzini's avatar
      meson: cleanup Kconfig.host handling · 0a189110
      Paolo Bonzini authored
      
      Build the array of command line arguments coming from config_host
      once for all targets.  Add all accelerators to accel/Kconfig so
      that the command line arguments for accelerators can be computed
      easily in the existing "foreach sym: accelerators" loop.
      
      Reviewed-by: default avatarMarc-André Lureau <marcandre.lureau@redhat.com>
      Signed-off-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
      0a189110
    • Paolo Bonzini's avatar
      remove TCG includes from common code · 3b9bd3f4
      Paolo Bonzini authored
      
      Enable removing tcg/$tcg_arch from the include path when TCG is disabled.
      Move translate-all.h to include/exec, since stubs exist for the functions
      defined therein.
      
      Signed-off-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
      3b9bd3f4
    • Daniele Buono's avatar
      cfi: Initial support for cfi-icall in QEMU · c905a368
      Daniele Buono authored
      
      LLVM/Clang, supports runtime checks for forward-edge Control-Flow
      Integrity (CFI).
      
      CFI on indirect function calls (cfi-icall) ensures that, in indirect
      function calls, the function called is of the right signature for the
      pointer type defined at compile time.
      
      For this check to work, the code must always respect the function
      signature when using function pointer, the function must be defined
      at compile time, and be compiled with link-time optimization.
      
      This rules out, for example, shared libraries that are dynamically loaded
      (given that functions are not known at compile time), and code that is
      dynamically generated at run-time.
      
      This patch:
      
      1) Introduces the CONFIG_CFI flag to support cfi in QEMU
      
      2) Introduces a decorator to allow the definition of "sensitive"
      functions, where a non-instrumented function may be called at runtime
      through a pointer. The decorator will take care of disabling cfi-icall
      checks on such functions, when cfi is enabled.
      
      3) Marks functions currently in QEMU that exhibit such behavior,
      in particular:
      - The function in TCG that calls pre-compiled TBs
      - The function in TCI that interprets instructions
      - Functions in the plugin infrastructures that jump to callbacks
      - Functions in util that directly call a signal handler
      
      Signed-off-by: default avatarDaniele Buono <dbuono@linux.vnet.ibm.com>
      Acked-by: default avatarAlex Bennée <alex.bennee@linaro.org>
      Message-Id: <20201204230615.2392-3-dbuono@linux.vnet.ibm.com>
      Signed-off-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
      c905a368
  4. Dec 18, 2020
  5. Dec 16, 2020
  6. Dec 15, 2020
  7. Dec 10, 2020
  8. Nov 16, 2020
  9. Nov 03, 2020
  10. Oct 27, 2020
    • Peter Maydell's avatar
      accel/tcg: Add CPU_LOG_EXEC tracing for cpu_io_recompile() · 1d705e8a
      Peter Maydell authored
      
      When using -icount, it's useful for the CPU_LOG_EXEC logging
      to include information about when cpu_io_recompile() was
      called, because it alerts the reader of the log that the
      tracing of a previous TB execution may not actually
      correspond to an actually executed instruction. For instance
      if you're using -icount and also -singlestep then a guest
      instruction that makes an IO access appears in two
      "Trace" lines, once in a TB that triggers the cpu_io_recompile()
      and then again in the TB that actually executes.
      
      (This is a similar reason to why the "Stopped execution of
      TB chain before..." logging in cpu_tb_exec() is helpful
      when trying to track execution flow in the logs.)
      
      Signed-off-by: default avatarPeter Maydell <peter.maydell@linaro.org>
      Message-Id: <20201013122658.4620-1-peter.maydell@linaro.org>
      Signed-off-by: default avatarRichard Henderson <richard.henderson@linaro.org>
      1d705e8a
    • Greg Kurz's avatar
      spapr: Unrealize vCPUs with qdev_unrealize() · f1023d21
      Greg Kurz authored
      
      Since we introduced CPU hot-unplug in sPAPR, we don't unrealize the
      vCPU objects explicitly. Instead, we let QOM handle that for us under
      object_property_del_all() when the CPU core object is finalized. The
      only thing we do is calling cpu_remove_sync() to tear the vCPU thread
      down.
      
      This happens to work but it is ugly because:
      - we call qdev_realize() but the corresponding qdev_unrealize() is
        buried deep in the QOM code
      - we call cpu_remove_sync() to undo qemu_init_vcpu() called by
        ppc_cpu_realize() in target/ppc/translate_init.c.inc
      - the CPU init and teardown paths aren't really symmetrical
      
      The latter didn't bite us so far but a future patch that greatly
      simplifies the CPU core realize path needs it to avoid a crash
      in QOM.
      
      For all these reasons, have ppc_cpu_unrealize() to undo the changes
      of ppc_cpu_realize() by calling cpu_remove_sync() at the right place,
      and have the sPAPR CPU core code to call qdev_unrealize().
      
      This requires to add a missing stub because translate_init.c.inc is
      also compiled for user mode.
      
      Signed-off-by: default avatarGreg Kurz <groug@kaod.org>
      Message-Id: <160279671236.1808373.14732005038172874990.stgit@bahia.lan>
      Signed-off-by: default avatarDavid Gibson <david@gibson.dropbear.id.au>
      f1023d21
  11. Oct 24, 2020
  12. Oct 21, 2020
  13. Oct 20, 2020
  14. Oct 08, 2020
  15. Oct 06, 2020
Loading