Am 02.06.2025 um 16:45 hat Fiona Ebner geschrieben: > Am 30.05.25 um 17:11 schrieb Fiona Ebner: > > All accesses of bs->quiesce_counter are in the main thread, either > > after a GLOBAL_STATE_CODE() macro or in a function with GRAPH_WRLOCK > > annotation. > > Now I wonder if that is actually good enough? Because vCPUs threads can > also satisfy the qemu_in_main_thread() condition.
It is. vcpu threads can only act as the main thread while holding the BQL, so in this case you already have the necessary synchronisation without atomics. Basically all the otherwise non-thread-safe code running in the main loop depends on this. Kevin