[PATCH 0/4] Clean up TSAN warnings

Marc Morcos posted 4 patches 1 month, 3 weeks ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/20251213001443.2041258-1-marcmorcos@google.com
Maintainers: Paolo Bonzini <pbonzini@redhat.com>, Richard Henderson <richard.henderson@linaro.org>, Eduardo Habkost <eduardo@habkost.net>, "Michael S. Tsirkin" <mst@redhat.com>, Marcel Apfelbaum <marcel.apfelbaum@gmail.com>, Markus Armbruster <armbru@redhat.com>, "Dr. David Alan Gilbert" <dave@treblig.org>
hw/i386/kvm/apic.c              | 12 ++++++++----
hw/intc/apic_common.c           | 24 ++++++++++++++----------
include/hw/i386/apic_internal.h |  2 +-
monitor/monitor.c               | 11 ++++++++++-
monitor/qmp.c                   |  6 ++++--
util/thread-pool.c              | 30 ++++++++++++++++--------------
6 files changed, 53 insertions(+), 32 deletions(-)
[PATCH 0/4] Clean up TSAN warnings
Posted by Marc Morcos 1 month, 3 weeks ago
When running several tests with tsan, thread races were detected when reading certain variables. This should allieviate the problem.
Additionally, the apicbase member of APICCommonState has been updated to 64 bit to reflect its 36 bit contents.

Marc Morcos (4):
  apic: Resize APICBASE
  thread-pool: Fix thread race
  qmp: Fix thread race
  apic: Make apicbase accesses atomic to fix data race

 hw/i386/kvm/apic.c              | 12 ++++++++----
 hw/intc/apic_common.c           | 24 ++++++++++++++----------
 include/hw/i386/apic_internal.h |  2 +-
 monitor/monitor.c               | 11 ++++++++++-
 monitor/qmp.c                   |  6 ++++--
 util/thread-pool.c              | 30 ++++++++++++++++--------------
 6 files changed, 53 insertions(+), 32 deletions(-)

-- 
2.52.0.239.gd5f0c6e74e-goog
Re: [PATCH 0/4] Clean up TSAN warnings
Posted by Michael S. Tsirkin 3 days, 11 hours ago
On Sat, Dec 13, 2025 at 12:14:39AM +0000, Marc Morcos wrote:
> When running several tests with tsan, thread races were detected when reading certain variables. This should allieviate the problem.
> Additionally, the apicbase member of APICCommonState has been updated to 64 bit to reflect its 36 bit contents.


Doing a sweep over old threads, Paolo iiuc you will be
fixing it all up differently, yourself?

> Marc Morcos (4):
>   apic: Resize APICBASE
>   thread-pool: Fix thread race
>   qmp: Fix thread race
>   apic: Make apicbase accesses atomic to fix data race
> 
>  hw/i386/kvm/apic.c              | 12 ++++++++----
>  hw/intc/apic_common.c           | 24 ++++++++++++++----------
>  include/hw/i386/apic_internal.h |  2 +-
>  monitor/monitor.c               | 11 ++++++++++-
>  monitor/qmp.c                   |  6 ++++--
>  util/thread-pool.c              | 30 ++++++++++++++++--------------
>  6 files changed, 53 insertions(+), 32 deletions(-)
> 
> -- 
> 2.52.0.239.gd5f0c6e74e-goog