Skip to content
Snippets Groups Projects
  1. Jan 08, 2021
  2. Nov 09, 2020
  3. Oct 22, 2020
    • Claudio Fontana's avatar
      replay: do not build if TCG is not available · 9b1c9116
      Claudio Fontana authored
      
      this fixes non-TCG builds broken recently by replay reverse debugging.
      
      Stub the needed functions in stub/, splitting roughly between functions
      needed only by system emulation, by system emulation and tools,
      and by everyone.  This includes duplicating some code in replay/, and
      puts the logic for non-replay related events in the replay/ module (+
      the stubs), so this should be revisited in the future.
      
      Surprisingly, only _one_ qtest was affected by this, ide-test.c, which
      resulted in a buzz as the bh events were never delivered, and the bh
      never executed.
      
      Many other subsystems _should_ have been affected.
      
      This fixes the immediate issue, however a better way to group replay
      functionality to TCG-only code could be developed in the long term.
      
      Signed-off-by: default avatarClaudio Fontana <cfontana@suse.de>
      Message-Id: <20201013192123.22632-4-cfontana@suse.de>
      Signed-off-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
      9b1c9116
  4. Oct 06, 2020
  5. Oct 05, 2020
  6. Aug 21, 2020
  7. Jun 26, 2020
  8. Jun 12, 2020
    • Pavel Dovgaluk's avatar
      replay: fix replay shutdown for console mode · ed5d7ff3
      Pavel Dovgaluk authored
      
      When QEMU is used without any graphical window,
      QEMU execution is terminated with the signal (e.g., Ctrl-C).
      Signal processing in QEMU does not include
      qemu_system_shutdown_request call. That is why shutdown
      event is not recorded by record/replay in this case.
      This patch adds shutdown event to the end of the record log.
      Now every replay will shutdown the machine at the end.
      
      Signed-off-by: default avatarPavel Dovgalyuk <Pavel.Dovgaluk@ispras.ru>
      Message-Id: <159012995470.27967.18129611453659045726.stgit@pasha-ThinkPad-X280>
      Signed-off-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
      ed5d7ff3
  9. Jun 10, 2020
    • Pavel Dovgaluk's avatar
      replay: implement fair mutex · ddf63df7
      Pavel Dovgaluk authored
      
      In record/replay icount mode main loop thread and vCPU thread
      do not perform simultaneously. They take replay mutex to synchronize
      the actions. Sometimes vCPU thread waits for locking the mutex for
      very long time, because main loop releases the mutex and takes it
      back again. Standard qemu mutex do not provide the ordering
      capabilities.
      
      This patch adds a "queue" for replay mutex. Therefore thread ordering
      becomes more "fair". Threads are executed in the same order as
      they are trying to take the mutex.
      
      Signed-off-by: default avatarPavel Dovgalyuk <Pavel.Dovgaluk@ispras.ru>
      Message-Id: <158823802979.28101.9340462887738957616.stgit@pasha-ThinkPad-X280>
      Signed-off-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
      ddf63df7
  10. Jan 07, 2020
  11. Oct 14, 2019
  12. Aug 21, 2019
  13. Aug 20, 2019
  14. Aug 16, 2019
    • Markus Armbruster's avatar
      sysemu: Split sysemu/runstate.h off sysemu/sysemu.h · 54d31236
      Markus Armbruster authored
      
      sysemu/sysemu.h is a rather unfocused dumping ground for stuff related
      to the system-emulator.  Evidence:
      
      * It's included widely: in my "build everything" tree, changing
        sysemu/sysemu.h still triggers a recompile of some 1100 out of 6600
        objects (not counting tests and objects that don't depend on
        qemu/osdep.h, down from 5400 due to the previous two commits).
      
      * It pulls in more than a dozen additional headers.
      
      Split stuff related to run state management into its own header
      sysemu/runstate.h.
      
      Touching sysemu/sysemu.h now recompiles some 850 objects.  qemu/uuid.h
      also drops from 1100 to 850, and qapi/qapi-types-run-state.h from 4400
      to 4200.  Touching new sysemu/runstate.h recompiles some 500 objects.
      
      Since I'm touching MAINTAINERS to add sysemu/runstate.h anyway, also
      add qemu/main-loop.h.
      
      Suggested-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
      Signed-off-by: default avatarMarkus Armbruster <armbru@redhat.com>
      Message-Id: <20190812052359.30071-30-armbru@redhat.com>
      Reviewed-by: default avatarAlex Bennée <alex.bennee@linaro.org>
      [Unbreak OS-X build]
      54d31236
    • Markus Armbruster's avatar
      Clean up inclusion of sysemu/sysemu.h · d5938f29
      Markus Armbruster authored
      
      In my "build everything" tree, changing sysemu/sysemu.h triggers a
      recompile of some 5400 out of 6600 objects (not counting tests and
      objects that don't depend on qemu/osdep.h).
      
      Almost a third of its inclusions are actually superfluous.  Delete
      them.  Downgrade two more to qapi/qapi-types-run-state.h, and move one
      from char/serial.h to char/serial.c.
      
      hw/semihosting/config.c, monitor/monitor.c, qdev-monitor.c, and
      stubs/semihost.c define variables declared in sysemu/sysemu.h without
      including it.  The compiler is cool with that, but include it anyway.
      
      This doesn't reduce actual use much, as it's still included into
      widely included headers.  The next commit will tackle that.
      
      Signed-off-by: default avatarMarkus Armbruster <armbru@redhat.com>
      Reviewed-by: default avatarAlistair Francis <alistair.francis@wdc.com>
      Message-Id: <20190812052359.30071-27-armbru@redhat.com>
      Reviewed-by: default avatarAlex Bennée <alex.bennee@linaro.org>
      d5938f29
    • Markus Armbruster's avatar
      Include qemu/main-loop.h less · db725815
      Markus Armbruster authored
      
      In my "build everything" tree, changing qemu/main-loop.h triggers a
      recompile of some 5600 out of 6600 objects (not counting tests and
      objects that don't depend on qemu/osdep.h).  It includes block/aio.h,
      which in turn includes qemu/event_notifier.h, qemu/notify.h,
      qemu/processor.h, qemu/qsp.h, qemu/queue.h, qemu/thread-posix.h,
      qemu/thread.h, qemu/timer.h, and a few more.
      
      Include qemu/main-loop.h only where it's needed.  Touching it now
      recompiles only some 1700 objects.  For block/aio.h and
      qemu/event_notifier.h, these numbers drop from 5600 to 2800.  For the
      others, they shrink only slightly.
      
      Signed-off-by: default avatarMarkus Armbruster <armbru@redhat.com>
      Message-Id: <20190812052359.30071-21-armbru@redhat.com>
      Reviewed-by: default avatarAlex Bennée <alex.bennee@linaro.org>
      Reviewed-by: default avatarPhilippe Mathieu-Daudé <philmd@redhat.com>
      Tested-by: default avatarPhilippe Mathieu-Daudé <philmd@redhat.com>
      db725815
  15. Jun 12, 2019
    • Markus Armbruster's avatar
      Include qemu-common.h exactly where needed · a8d25326
      Markus Armbruster authored
      
      No header includes qemu-common.h after this commit, as prescribed by
      qemu-common.h's file comment.
      
      Signed-off-by: default avatarMarkus Armbruster <armbru@redhat.com>
      Message-Id: <20190523143508.25387-5-armbru@redhat.com>
      [Rebased with conflicts resolved automatically, except for
      include/hw/arm/xlnx-zynqmp.h hw/arm/nrf51_soc.c hw/arm/msf2-soc.c
      block/qcow2-refcount.c block/qcow2-cluster.c block/qcow2-cache.c
      target/arm/cpu.h target/lm32/cpu.h target/m68k/cpu.h target/mips/cpu.h
      target/moxie/cpu.h target/nios2/cpu.h target/openrisc/cpu.h
      target/riscv/cpu.h target/tilegx/cpu.h target/tricore/cpu.h
      target/unicore32/cpu.h target/xtensa/cpu.h; bsd-user/main.c and
      net/tap-bsd.c fixed up]
      a8d25326
  16. Nov 08, 2018
  17. Oct 19, 2018
  18. Oct 02, 2018
    • Pavel Dovgaluk's avatar
      replay: allow loading any snapshots before recording · bb3d7702
      Pavel Dovgaluk authored
      
      This patch enables using -loadvm in recording mode to allow starting
      the execution recording from any of the available snapshots.
      It also fixes loading of the record/replay state, therefore snapshots
      created in replay mode may also be used for starting the new recording.
      
      Signed-off-by: default avatarPavel Dovgalyuk <Pavel.Dovgaluk@ispras.ru>
      Message-Id: <20180912081939.3228.56131.stgit@pasha-VirtualBox>
      Signed-off-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
      bb3d7702
    • Pavel Dovgaluk's avatar
      replay: flush events when exiting · d873fe03
      Pavel Dovgaluk authored
      
      This patch adds events processing when emulation finishes instead
      of just cleaning the queue. Now the bdrv coroutines will be in consistent
      state when emulator closes. It allows correct polling of the block layer
      at exit.
      
      Signed-off-by: default avatarPavel Dovgalyuk <Pavel.Dovgaluk@ispras.ru>
      Message-Id: <20180912081859.3228.79735.stgit@pasha-VirtualBox>
      Signed-off-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
      d873fe03
    • Pavel Dovgaluk's avatar
      replay: wake up vCPU when replaying · 0c08185f
      Pavel Dovgaluk authored
      
      In record/replay icount mode vCPU thread and iothread synchronize
      the execution using the checkpoints.
      vCPU thread processes the virtual timers and iothread processes all others.
      When iothread wants to wake up sleeping vCPU thread, it sends dummy queued
      work. Therefore it could be the following sequence of the events in
      record mode:
       - IO: sending dummy work
       - IO: processing timers
       - CPU: wakeup
       - CPU: clearing dummy work
       - CPU: processing virtual timers
      
      But due to the races in replay mode the sequence may change:
       - IO: sending dummy work
       - CPU: wakeup
       - CPU: clearing dummy work
       - CPU: sleeping again because nothing to do
       - IO: Processing timers
       - CPU: zzzz
      
      In this case vCPU will not wake up, because dummy work is not to be set up
      again.
      
      This patch tries to wake up the vCPU when it sleeps and the icount warp
      checkpoint isn't met. It means that vCPU has something to do, because
      there are no other reasons of non-matching warp checkpoint.
      
      Signed-off-by: default avatarPavel Dovgalyuk <Pavel.Dovgaluk@ispras.ru>
      
      --
      
      v5: improve checking that vCPU is still sleeping
      Message-Id: <20180912081945.3228.19776.stgit@pasha-VirtualBox>
      Signed-off-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
      0c08185f
  19. Sep 25, 2018
  20. Mar 12, 2018
Loading