Skip to content

Make the qemu_logfile handle thread safe.

Robert Foley qemu-devel 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest4 patches 13 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/4Add a mutex to guarantee single writer to qemu_logfile handle.util/log.c+23 -02 replies
2/4Add use of RCU for qemu_logfile.include/exec/log.h include/qemu/log.h tcg/tcg.c +1 more+138 -322 replies
3/4qemu_log_lock/unlock now preserves the qemu_logfile handle.accel/tcg/cpu-exec.c accel/tcg/translate-all.c accel/tcg/translator.c +12 more+44 -432 replies
4/4Added tests for close and change of logfile.tests/test-logging.c+74 -06 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH 0/4] Make the qemu_logfile handle thread safe.

This patch adds thread safety to the qemu_logfile handle. This now allows changing the logfile while logging is active, and also solves the issue of a seg fault while changing the logfile.

This patch adds use of RCU for handling the swap out of the old qemu_logfile file descriptor.

Robert Foley (4):
Add a mutex to guarantee single writer to qemu_logfile handle. Add use of RCU for qemu_logfile. qemu_log_lock/unlock now preserves the qemu_logfile handle. Added tests for close and change of logfile.

 accel/tcg/cpu-exec.c          |  4 +-
 accel/tcg/translate-all.c     |  4 +-
 accel/tcg/translator.c        |  4 +-
 exec.c                        |  4 +-
 hw/net/can/can_sja1000.c      |  4 +-
 include/exec/log.h            | 33 ++++++++++--
 include/qemu/log.h            | 51 +++++++++++++++---
 net/can/can_socketcan.c       |  5 +-
 target/cris/translate.c       |  4 +-
 target/i386/translate.c       |  5 +-
 target/lm32/translate.c       |  4 +-
 target/microblaze/translate.c |  4 +-
 target/nios2/translate.c      |  4 +-
 target/tilegx/translate.c     |  7 +--
 target/unicore32/translate.c  |  4 +-
 tcg/tcg.c                     | 28 ++++++----
 tests/test-logging.c          | 74 ++++++++++++++++++++++++++
 util/log.c                    | 99 ++++++++++++++++++++++++++++-------
 18 files changed, 273 insertions(+), 69 deletions(-)
Signature · 1 line
2.17.1