On 08/18/2011 08:13 PM, Peter Maydell wrote:
> On 19 August 2011 03:59, 陳韋任 <che...@iis.sinica.edu.tw> wrote:
>>> More generally and not x86-specific, there are problems with
>>> the multithreaded user-mode support which I suspect exist because
>>> nobody has ever sat down and worked out a coherent design for it,
>>> including what might need to be thread-local and what locking
>>> is required. So the result is that it mostly works but if you
>>
>>  You mean some QEMU data structures need to be thread-local or lock
>> protected in order to emulate guest multi-threaded program correctly?
> 
> Approximately, yes (the third option being "redesign the data
> structure so it can be sensibly protected"). See
> https://bugs.launchpad.net/qemu/+bug/668799 for discussion of
> one example.

I suspect that to make things tractable for i386, which has so
many LOCKable instructions, that we'll also have to implement
at least a compare-and-swap primitive in TCG.


r~

Reply via email to