Am 20.02.2013 15:49, schrieb Peter Maydell: > On 20 February 2013 14:43, Laszlo Ersek <ler...@redhat.com> wrote: >> On 02/20/13 14:43, Paolo Bonzini wrote: >>> QEMU system emulation has been thread-safe for a long time > > Says who? cpu_interrupt() calls tcg_handle_interrupt() > which calls cpu_unlink_tb() which makes changes to the > TB datastructure with no kind of locking at all. > > I'm actually working on a patchset which fixes this
A word of warning: My QOM CPUState part 9 series (v1 on the list with an arm patch waiting for an ack, v2 upcoming) refactors and partially moves the interrupt code, including cpu_interrupt() and tcg_handle_interrupt(). The cpu_unlink_tb() line itself seems unaffected though. https://github.com/afaerber/qemu-cpu/commits/qom-cpu-9 Andreas > (by having every TCG TB check the exit_request flag at > the start and exit if set, so we can throw out cpu_unlink_tb() > entirely), but as of right now the codebase is definitely > not threadsafe. > > -- PMM -- SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer; HRB 16746 AG Nürnberg