On 4/14/22 07:56, Alex Bennée wrote:
#ifdef CONFIG_TRACE_LOG
- qemu_loglevel |= LOG_TRACE;
+ log_flags |= LOG_TRACE;
#endif
+ qemu_loglevel = log_flags;
+
This looked weird - so should we consider a qatomic_set here to avoid an
inconsistent set of flags being read non-atomically elsewhere?
I suppose we could do, as a separate change, since this has not been considered before.
But I don't believe in tears to aligned 'int' on any qemu host.
+ logfile = g_new0(QemuLogFile, 1);
+ logfile->fd = fd;
qatomic_rcu_set(&qemu_logfile, logfile);
I was also pondering if flags should be part of the QemuLogFile
structure so it's consistent with each opened file. However I see it
gets repurposed just for clean-up later...
I actually had this at one point in development. But yes, there's no point in it for just
the release.
r~