Skip to content
Snippets Groups Projects
  1. Jun 06, 2022
  2. Mar 21, 2022
  3. Apr 01, 2021
    • Pavel Dovgalyuk's avatar
      replay: notify CPU on event · 46967b1a
      Pavel Dovgalyuk authored
      
      This patch enables vCPU notification to wake it up
      when new async event comes in replay mode.
      
      The motivation of this patch is the following.
      Consider recorded block async event. It is saved into the log
      with one of the checkpoints. This checkpoint may be passed in
      vCPU loop. In replay mode when this async event is read from
      the log, and block thread task is not finished yet, vCPU thread
      goes to sleep. That is why this patch adds waking up the vCPU
      to process this finished event.
      
      Signed-off-by: default avatarPavel Dovgalyuk <Pavel.Dovgalyuk@ispras.ru>
      Message-Id: <161726519158.1476949.7614181684462079836.stgit@pasha-ThinkPad-X280>
      Signed-off-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
      46967b1a
    • Pavel Dovgalyuk's avatar
      replay: fix recursive checkpoints · 7cebff0d
      Pavel Dovgalyuk authored
      
      Record/replay uses checkpoints to synchronize the execution
      of the threads and timers. Hardware events such as BH are
      processed at the checkpoints too.
      Event processing can cause refreshing the virtual timers
      and calling the icount-related functions, that also use checkpoints.
      This patch prevents recursive processing of such checkpoints,
      because they have their own records in the log and should be
      processed later.
      
      Signed-off-by: default avatarPavel Dovgalyuk <Pavel.Dovgalyuk@ispras.ru>
      Message-Id: <161700476500.1140362.10108444973730452257.stgit@pasha-ThinkPad-X280>
      Signed-off-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
      7cebff0d
  4. Feb 16, 2021
    • Pavel Dovgalyuk's avatar
      replay: fix icount request when replaying clock access · 366a85e4
      Pavel Dovgalyuk authored
      
      Record/replay provides REPLAY_CLOCK_LOCKED macro to access
      the clock when vm_clock_seqlock is locked. This macro is
      needed because replay internals operate icount. In locked case
      replay use icount_get_raw_locked for icount request, which prevents
      excess locking which leads to deadlock. But previously only
      record code used *_locked function and replay did not.
      Therefore sometimes clock access lead to deadlocks.
      This patch fixes clock access for replay too and uses *_locked
      icount access function.
      
      Signed-off-by: default avatarPavel Dovgalyuk <Pavel.Dovgalyuk@ispras.ru>
      Message-Id: <161347990483.1313189.8371838968343494161.stgit@pasha-ThinkPad-X280>
      Signed-off-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
      366a85e4
  5. Feb 08, 2021
  6. Jan 08, 2021
  7. Nov 09, 2020
  8. 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
  9. Oct 06, 2020
  10. Oct 05, 2020
  11. Aug 21, 2020
  12. Jun 26, 2020
  13. 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
  14. 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
  15. Jan 07, 2020
  16. Oct 14, 2019
  17. Aug 21, 2019
  18. Aug 20, 2019
Loading