Skip to content
Snippets Groups Projects
  1. Mar 21, 2022
  2. 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
  3. 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
  4. Feb 08, 2021
  5. Jan 08, 2021
  6. Nov 09, 2020
  7. 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
  8. Oct 06, 2020
  9. Oct 05, 2020
  10. Aug 21, 2020
  11. Jun 26, 2020
  12. 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
  13. 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
  14. Jan 07, 2020
  15. Oct 14, 2019
  16. Aug 21, 2019
  17. Aug 20, 2019
  18. 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
Loading